CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2012/11/15 14:48:15

Modified files:
        gnu/usr.bin/gcc/gcc/config/m88k: m88k.md 

Log message:
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.

Reply via email to