26 Aug 2011 14:48
re: expanding 1 insn into 2
Alan Lehotsky <qsmgmt <at> earthlink.net>
2011-08-26 12:48:28 GMT
2011-08-26 12:48:28 GMT
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 <at> sourceware.org wrote: > > From: Aurelien Buhrig <aurelien.buhrig.gcc <at> gmail.com> > Date: August 26, 2011 7:59:27 AM EDT > To: cgen <at> sources.redhat.com > Subject: Re: expanding 1 insn into 2 > > > Is there anybody here ? > Any idea ? > > 2011/8/11 Aurelien Buhrig <aurelien.buhrig.gcc <at> 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 >> > >
RSS Feed