This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[RTL] -- How to insert code into functions?
- From: 王 逸 <cnnjuwy at hotmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 31 Mar 2004 11:09:15 +0000
- Subject: [RTL] -- How to insert code into functions?
- Bcc:
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