This is the mail archive of the
mailing list for the GCC project.
Re: How do you emit RTL for a jump to a mem/symbol instead of an asm label?
- From: Jeff Law <law at redhat dot com>
- To: Daniel Santos <daniel dot santos at pobox dot com>, gcc <gcc at gcc dot gnu dot org>
- Date: Sat, 20 Aug 2016 08:53:05 -0600
- Subject: Re: How do you emit RTL for a jump to a mem/symbol instead of an asm label?
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On 08/20/2016 06:01 AM, Daniel Santos wrote:
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.
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!
Then use emit_insn (gen_prologue (...)) and emit_jump_insn
(gen_epilogue)) or something along those lines.