This is the mail archive of the
mailing list for the GCC project.
Re: Looking for advice on manipulating asm code
- To: gcc-help at gcc dot gnu dot org, gcc at gcc dot gnu dot org, pant at ece dot gatech dot edu
- Subject: Re: Looking for advice on manipulating asm code
- From: Mike Stump <mrs at windriver dot com>
- Date: Mon, 22 May 2000 15:35:24 -0700 (PDT)
> To: email@example.com, firstname.lastname@example.org
> From: Pankaj Pant <email@example.com>
> 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.