public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* inserting instructions into prologue/epilogue
@ 2005-08-03 14:40 Gunther Nikl
  2005-08-03 14:50 ` Nathan Sidwell
  2005-08-03 17:50 ` Ian Lance Taylor
  0 siblings, 2 replies; 8+ messages in thread
From: Gunther Nikl @ 2005-08-03 14:40 UTC (permalink / raw)
  To: gcc

Hello!

I am trying to add instructions into function prologue/epilogue. These
instructions shall save and load "fixed" registers to avoid assembly.

Register saving in the prologue appears to work. The restore code in the
epilogue aborts in flow.c/propagate_one_insn with

  "Attempt to delete prologue/epilogue insn"

unless the stackslot was marked with MEM_VOLATILE_P. I don't think thats
the proper fix.

Then I used TARGET_ASM_FUNCTION_END_PROLOGUE to emit additional assembly
code. However this hook is _only_ called if prologue/epilogue instructions
are scheduled. Is that the expected behaviour? tm.texi doesn't mention this.
I tried to get rid of TARGET_ASM_FUNCTION_END_PROLOGUE by emitting the
loads as RTL, but then I also get flow.c aborts if prologue and epilogue
are scheduled. It works when not scheduling. This is the load code:

     ref = gen_rtx_SYMBOL_REF (Pmode, "symbol");
     emit_insn (gen_elf_high (reg, ref));
     emit_insn (gen_elf_low (reg, reg, ref));

How do I prevent the aborts from flow? Any help appreciated.

Gunther Nikl

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-04 16:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-03 14:40 inserting instructions into prologue/epilogue Gunther Nikl
2005-08-03 14:50 ` Nathan Sidwell
2005-08-03 14:53   ` Nathan Sidwell
2005-08-03 15:27     ` Gunther Nikl
2005-08-03 18:09       ` Richard Henderson
2005-08-03 17:50 ` Ian Lance Taylor
2005-08-04 12:02   ` Gunther Nikl
2005-08-04 16:57     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).