This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RTL] -- How to insert code into functions?


Hi, everyone!
I'd like to patch GCC to insert some RTL code into all compiled functions.

For example, I'd like the following instructions to be inserted automatically by GCC:
int main()
{
//instructions1 generated by my patch.
......
function body;
......
//instructions2 generated by my patch.
}


Where should I insert RTL codes?

In gcc/toplev.c, there is a function rest_of_compilation(), may be I should modify this function?
But I'm not familiar with this function and this function is so~~~~ long, would someone give me some advice?
thanks.



Wang Yi Graduate student @ NJU P.R.C.

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]