Nonlocal gotos: wrong frame pointer handling
Jim Wilson
wilson@specifixinc.com
Thu Nov 6 08:43:00 GMT 2003
Andreas Krebbel wrote:
> A blockage is defined in the s390 backend as an UNSPEC_VOLATILE. Therefore the scheduler can't
> exchange the insns. But this solution is apparently platform dependent and therefore is not the right way.
> My question is how to generate a blockage which is platform independent or whether there is a better way
> to solve this.
The MEM clobbers emitted by emit_stack_restore should do the trick. We
already have the clobbers emitted after the instruction that sets the
stack pointer. We also need them before the instruction to solve this
problem.
The scheduler could perhaps be smart enough to know that explicit stores
to the stack pointer/frame pointer will clobber memory, but this is so
rare that it may not be worthwhile to handle this in the scheduler.
You could also fix the problem by defining your own nonlocal_goto
pattern, but it would be nicer to fix this for all targets. So adding
the MEM clobbers seems like a better solution.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list