aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-04-25 14:14:37 -0700
committerJim Wilson <wilson@gcc.gnu.org>1993-04-25 14:14:37 -0700
commit9bb7ffda7088261370a2b954b137f4ddb467c038 (patch)
tree6eb7c8a0765e56669413bd2af62daa8970380c32 /gcc
parentae0cab494b2586cee9c0906fcd17447a6101d486 (diff)
downloadgcc-9bb7ffda7088261370a2b954b137f4ddb467c038.zip
gcc-9bb7ffda7088261370a2b954b137f4ddb467c038.tar.gz
gcc-9bb7ffda7088261370a2b954b137f4ddb467c038.tar.bz2
(output_function_epilogue): Emit 'nop' instead of
'sub %sp,-0,%sp' when the frame is empty. From-SVN: r4218
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sparc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 1d132c7..f65ea0a 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -2246,6 +2246,10 @@ output_function_epilogue (file, size, leaf_function)
final_scan_insn (XEXP (current_function_epilogue_delay_list, 0),
file, 1, 0, 1);
}
+ /* Output 'nop' instead of 'sub %sp,-0,%sp' when no frame, so as to
+ avoid generating confusing assembly language output. */
+ else if (actual_fsize == 0)
+ fprintf (file, "\t%s\n\tnop\n", ret);
else if (actual_fsize <= 4096)
fprintf (file, "\t%s\n\tsub %%sp,-%d,%%sp\n", ret, actual_fsize);
else if (actual_fsize <= 8192)