aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-10-24 02:07:50 +0000
committerRichard Stallman <rms@gnu.org>1992-10-24 02:07:50 +0000
commit0d37806322000994c97fca0ad386026c511cd44f (patch)
treec15a45d80c82950c0d8b8766f927118f4aa4028b
parented5f8355747cdd5880fa9969c1e963d6d6c0096a (diff)
downloadgcc-0d37806322000994c97fca0ad386026c511cd44f.zip
gcc-0d37806322000994c97fca0ad386026c511cd44f.tar.gz
gcc-0d37806322000994c97fca0ad386026c511cd44f.tar.bz2
(FUNCTION_EPILOGUE): If no frame ptr, increment stack ptr over the local space.
From-SVN: r2586
-rw-r--r--gcc/config/m68k/news.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/m68k/news.h b/gcc/config/m68k/news.h
index 6387bdf..707a44c 100644
--- a/gcc/config/m68k/news.h
+++ b/gcc/config/m68k/news.h
@@ -144,7 +144,17 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
else if (TARGET_68020) \
fprintf (FILE, "\tlink.l fp,#%d\n", -fsize); \
else \
- fprintf (FILE, "\tlink fp,#0\n\tsub.l #%d,sp\n", fsize); } \
+ fprintf (FILE, "\tlink fp,#0\n\tsub.l #%d,sp\n", fsize);\
+ } \
+ else if (fsize) \
+ { \
+ int amt = fsize + 4; \
+ /* Adding negative number is faster on the 68040. */ \
+ if (fsize + 4 < 0x8000) \
+ asm_fprintf (FILE, "\tadd.w %0I%d,%Rsp\n", - amt); \
+ else \
+ asm_fprintf (FILE, "\tadd.l %0I%d,%Rsp\n", - amt); \
+ } \
for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) \
if (regs_ever_live[regno] && ! call_used_regs[regno]) \
mask |= 1 << (regno - 16); \
@@ -217,6 +227,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
foffset + fsize, fmask); } \
if (frame_pointer_needed) \
fprintf (FILE, "\tunlk fp\n"); \
+ else if (fsize) \
+ { \
+ if (fsize + 4 < 0x8000) \
+ asm_fprintf (stream, "\tadd.w #%d,sp\n", fsize + 4); \
+ else \
+ asm_fprintf (stream, "\tadd.l #%d,sp\n", fsize + 4); \
+ } \
if (current_function_pops_args) \
fprintf (FILE, "\trtd #%d\n", current_function_pops_args); \
else fprintf (FILE, "\trts\n"); }