This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

re: expanding 1 insn into 2


It's possible (and documented in the cgen manua)l to do this inside cgen - see section 5.4.14 Writing define-macro-insn. and section 3.17 Macro-instructions

You could also do this in the assembler.  I assume use used cgen to build a gas assembler from
the binutils distribution.

You can either define a .macro that will do what you want assuming that your addressing is simple enough, or you can tweak the md_assemble() function in your assember to parse the operands and break them down appropriately if you need.

I've found that having a machine-readable copy of the manual suitable for searching to be invaluable when writing CGEN models.

Regards,
Al Lehotsky



On Aug 26, 2011, at 7:59 AM, cgen-digest-help@sourceware.org wrote:
> 
> From: Aurelien Buhrig <aurelien.buhrig.gcc@gmail.com>
> Date: August 26, 2011 7:59:27 AM EDT
> To: cgen@sources.redhat.com
> Subject: Re: expanding 1 insn into 2
> 
> 
> Is there anybody here ?
> Any idea ?
> 
> 2011/8/11 Aurelien Buhrig <aurelien.buhrig.gcc@gmail.com>:
>> Hi,
>> 
>> I would like to define a pseudo instruction such as the mips "la"
>> instruction to load a 32-bit  address using  2 16-bit move
>> instructions with different operands to differentiate bfd howtos...
>> 
>> How to handle this using cgen ?
>> 
>> Thanks,
>> Aurélien
>> 
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]