summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-11-15 21:48:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-11-15 21:48:16 +0000
commit8a8887e784346160e0aca85672ab88455381014e (patch)
treed85e232cc39cfe05698f406080a98af16844f7eb /sys/arch/macppc
parent82da634ac260f677dfc23f0b4ea2d93ce6a94376 (diff)
Only allow the "return" insn construct (which simply yields a "jmp r1" line)
if null_prologue(), i.e. if there is no stack frame to undo and no r1 to restore. Make the "epilogue" insn construct no longer depend on "return", but rather on "(use (const_int 0))" as "prologue" and as generally done on other backends. On the other hand, make it unconditionnal, instead of "! null_prologue()". These changes make sure than a leaf procedure call does not end up "returning" (i.e. jmp r1) upon return from the call, without restoring r1 and r30 (whenever applicable) from the existing stack frame. This makes a gcc3-compiled __main() (from libgcc2.c) no longer spin after invoking the constructors, and gives the real payload (i.e. main() and whatever follows from there) a chance to run.
Diffstat (limited to 'sys/arch/macppc')
0 files changed, 0 insertions, 0 deletions