From 9bb7ffda7088261370a2b954b137f4ddb467c038 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Sun, 25 Apr 1993 14:14:37 -0700 Subject: [PATCH] (output_function_epilogue): Emit 'nop' instead of 'sub %sp,-0,%sp' when the frame is empty. From-SVN: r4218 --- gcc/config/sparc/sparc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 1d132c7af4c..f65ea0a63f8 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) -- 2.30.2