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: How do you emit RTL for a jump to a mem/symbol instead of an asm label?


On 08/20/2016 06:01 AM, Daniel Santos wrote:
I have been unable to figure out how to (correctly) generate RTL (in
expand the pro/epilogue pass) to jump to a stub defined in libgcc for
the out-of-lined epilogue. If I write it as a function call, but then
set the insn's jump field to true it emits the correct jump asm, but
then it thinks it's a sibling call epilogue and it screws up other
things (just read up on the sibling call optimization earlier).

Basically, it should replace the function's ret with a jmp to the
outlined epilogue that will do the ret. Any pointers greatly appreciated!
When I did this on the mn102, I created a "prologue" and "epilogue" insn that did not expose the details. Look at how unspecs are used.

Then use emit_insn (gen_prologue (...)) and emit_jump_insn (gen_epilogue)) or something along those lines.

jeff


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