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: Nonlocal gotos: wrong frame pointer handling


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



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