public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Alan Lehotsky <qsmgmt@earthlink.net>
To: cgen@sourceware.org
Subject: re: expanding 1 insn into 2
Date: Fri, 26 Aug 2011 12:47:00 -0000	[thread overview]
Message-ID: <6EBEA0C6-B72E-4471-BFC7-9C4398DE3790@earthlink.net> (raw)


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

             reply	other threads:[~2011-08-26 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 12:47 Alan Lehotsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-11 14:04 Aurelien Buhrig
2011-08-26 11:59 ` Aurelien Buhrig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6EBEA0C6-B72E-4471-BFC7-9C4398DE3790@earthlink.net \
    --to=qsmgmt@earthlink.net \
    --cc=apl@alum.mit.edu \
    --cc=cgen@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).