summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config/sparc
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-08-22 02:56:07 +0000
committerkan <kan@FreeBSD.org>2003-08-22 02:56:07 +0000
commit08db0e4d745472adc9c30de407304713c78e950e (patch)
treeaa86de970d24a76b30b53157cf41e9d09ffe4d51 /contrib/gcc/config/sparc
parent7b704871fdac058719f34a1e6b9de71ee76c5be4 (diff)
downloadFreeBSD-src-08db0e4d745472adc9c30de407304713c78e950e.zip
FreeBSD-src-08db0e4d745472adc9c30de407304713c78e950e.tar.gz
Gcc 3.3.1-release.
Diffstat (limited to 'contrib/gcc/config/sparc')
-rw-r--r--contrib/gcc/config/sparc/sparc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c
index 7c25bc5..5b03f05 100644
--- a/contrib/gcc/config/sparc/sparc.c
+++ b/contrib/gcc/config/sparc/sparc.c
@@ -4037,11 +4037,19 @@ sparc_nonflat_function_epilogue (file, size, leaf_function)
of a function were call foo; dslot; this can make the return
PC of foo (ie. address of call instruction plus 8) point to
the first instruction in the next function. */
- rtx insn;
-
- fputs("\tnop\n", file);
+ rtx insn, last_real_insn;
insn = get_last_insn ();
+
+ last_real_insn = prev_real_insn (insn);
+ if (last_real_insn
+ && GET_CODE (last_real_insn) == INSN
+ && GET_CODE (PATTERN (last_real_insn)) == SEQUENCE)
+ last_real_insn = XVECEXP (PATTERN (last_real_insn), 0, 0);
+
+ if (last_real_insn && GET_CODE (last_real_insn) == CALL_INSN)
+ fputs("\tnop\n", file);
+
if (GET_CODE (insn) == NOTE)
insn = prev_nonnote_insn (insn);
if (insn && GET_CODE (insn) == BARRIER)
OpenPOWER on IntegriCloud