inserting instructions into prologue/epilogue

Nathan Sidwell nathan@codesourcery.com
Wed Aug 3 14:50:00 GMT 2005


Gunther Nikl wrote:
> 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.

you can add a (USE reg) after the restore in the prologue.  Then flow considers 
the register, and the preceding load, to be live at that point.

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc mailing list