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]

Re: x386 function prologue


Bharat Madan wrote:
I need to modify the Pentium-4 gcc's function prologue. The modifications
requires a assemably language instructions to be added. Would greatly
appreciate getting some tips on how to go about carrying out this
modification.

An up to date gcc port, like the i386 one, emits function prologues as RTL instead of assembly language. This is so that we can optimize them and manipulate them more easily. Hence you will need to learn a minimal amount of RTL to change the function prologue.


See the ix86_expand_prologue function in gcc/config/i386/i386.c.

If you just need an instruction near the prologue, but not necessarily part of it, then you might be able to hack one of the other macros. TARGET_ASM_FUNCTION_PROLOGUE for instance, which is currently not defined by the i386 port because it was obsoleted by the RTL prologues.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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