public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix PR target/10567 (continued)
@ 2004-07-08 16:41 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2004-07-08 16:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: David S. Miller

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

I managed to miss one instance in the .md file yesterday, in the 
update_return pattern which is used in 32-bit mode to scan the code on the 
fly to detect the 'unimp' insn.

Bootstrapped/regtested on sparc64-sun-solaris2.9 and sparc-sun-solaris2.8.

Applied to mainline.


2004-07-08  Eric Botcazou  <ebotcazou@libertysurf.fr>

        PR target/10567
	* config/sparc/sparc.md (update_return): Honor flag_delayed_branch.


-- 
Eric Botcazou

[-- Attachment #2: sparc_no_delayed_branch-2.diff --]
[-- Type: text/x-diff, Size: 1000 bytes --]

Index: config/sparc/sparc.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.md,v
retrieving revision 1.207
diff -u -r1.207 sparc.md
--- config/sparc/sparc.md	7 Jul 2004 21:33:09 -0000	1.207
+++ config/sparc/sparc.md	8 Jul 2004 09:36:07 -0000
@@ -7758,9 +7783,17 @@
   [(unspec:SI [(match_operand:SI 0 "register_operand" "r")
 	       (match_operand:SI 1 "register_operand" "r")] UNSPEC_UPDATE_RETURN)]
   "! TARGET_ARCH64"
-  "cmp\t%1, 0\;be,a\t.+8\;add\t%0, 4, %0"
-  [(set_attr "type" "multi")
-   (set_attr "length" "3")])
+{
+  if (flag_delayed_branch)
+    return "cmp\t%1, 0\n\tbe,a\t.+8\n\t add\t%0, 4, %0";
+  else
+    return "cmp\t%1, 0\n\tbne\t.+12\n\t nop\n\tadd\t%0, 4, %0";
+}
+  [(set (attr "type") (const_string "multi"))
+   (set (attr "length")
+	(if_then_else (eq_attr "delayed_branch" "true")
+		      (const_int 3)
+		      (const_int 4)))])
 \f
 (define_insn "nop"
   [(const_int 0)]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-08 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08 16:41 Fix PR target/10567 (continued) Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).