Looking for advice on manipulating asm code

Mike Stump mrs@windriver.com
Mon May 22 15:35:00 GMT 2000


> To: gcc@gcc.gnu.org, gcc-help@gcc.gnu.org
> From: Pankaj Pant <pant@ece.gatech.edu>
> Date: 22 May 2000 17:31:26 -0400

> How difficult is it to manipulate the target asm code

Target asm code isn't manipulated.  rtl is manipulated.

gcc does this type of operation.  Generally speaking, gcc already has
all the relevant information to do these types of transformations, if
you provide a complete port.

> I tried looking at the gcc code, but I couldn't determine how easy it would
> be to modify gcc itself. I am looking for suggestions on whether I should
> delve into gcc

Yes.  See the manual on how-why-where.  In your case, find all uses of
the term function_unit.  grep function_unit *.texi (for example).
Then, figure out how to apply that information to complete your port.
See other ports for examples of how it is used.

> or write a post-processor which directly works on the asm.

No, this is wrong.


More information about the Gcc-help mailing list