public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* re: expanding 1 insn into 2
@ 2011-08-26 12:47 Alan Lehotsky
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Lehotsky @ 2011-08-26 12:47 UTC (permalink / raw)
  To: cgen


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
>> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: expanding 1 insn into 2
  2011-08-11 14:04 Aurelien Buhrig
@ 2011-08-26 11:59 ` Aurelien Buhrig
  0 siblings, 0 replies; 3+ messages in thread
From: Aurelien Buhrig @ 2011-08-26 11:59 UTC (permalink / raw)
  To: cgen

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* expanding 1 insn into 2
@ 2011-08-11 14:04 Aurelien Buhrig
  2011-08-26 11:59 ` Aurelien Buhrig
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Buhrig @ 2011-08-11 14:04 UTC (permalink / raw)
  To: cgen

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-26 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 12:47 expanding 1 insn into 2 Alan Lehotsky
  -- strict thread matches above, loose matches on Subject: below --
2011-08-11 14:04 Aurelien Buhrig
2011-08-26 11:59 ` Aurelien Buhrig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).