aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1997-12-17 07:07:39 -0800
committerRichard Henderson <rth@gcc.gnu.org>1997-12-17 07:07:39 -0800
commit8dcb529511c71f818cf107964ce568b521dcb025 (patch)
treeae3bfd36f5ca10e9f56e941bddb7105b62c68737
parenta99503b17d0f9fef4bfdb1fc4ff6a7786ce821d7 (diff)
downloadgcc-8dcb529511c71f818cf107964ce568b521dcb025.zip
gcc-8dcb529511c71f818cf107964ce568b521dcb025.tar.gz
gcc-8dcb529511c71f818cf107964ce568b521dcb025.tar.bz2
sparc.md (jump): Don't use the annul bit around an empty loop.
* sparc.md (jump): Don't use the annul bit around an empty loop. Patch from Kevin.Kelly@East.Sun.COM. From-SVN: r17124
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sparc/sparc.md16
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1ffe005..a727929 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Wed Dec 17 15:06:04 1997 Richard Henderson <rth@cygnus.com>
+
+ * sparc.md (jump): Don't use the annul bit around an empty loop.
+ Patch from Kevin.Kelly@East.Sun.COM.
+
Wed Dec 17 00:51:36 1997 Stan Cox (scox@cygnus.com)
* jump.c: (optimize_jump): Don't use the return register as a
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 8ec12f5..8b235fb 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -5014,7 +5014,21 @@
(define_insn "jump"
[(set (pc) (label_ref (match_operand 0 "" "")))]
""
- "b%* %l0%("
+ "*
+{
+ /* Some implementations are reported to have problems with
+ foo: b,a foo
+ i.e. an empty loop with the annul bit set. The workaround is to use
+ foo: b foo; nop
+ instead. */
+
+ if (flag_delayed_branch
+ && (insn_addresses[INSN_UID (operands[0])]
+ == insn_addresses[INSN_UID (insn)]))
+ return \"b %l0%#\";
+ else
+ return \"b%* %l0%(\";
+}"
[(set_attr "type" "uncond_branch")])
(define_expand "tablejump"