OSDN Git Service

PR target/10567
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2004 15:25:04 +0000 (15:25 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2004 15:25:04 +0000 (15:25 +0000)
* config/sparc/sparc.md (update_return): Honor flag_delayed_branch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84293 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.md

index d9152d9..b259f42 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR target/10567
+       * config/sparc/sparc.md (update_return): Honor flag_delayed_branch.
+
 2004-07-08  Diego Novillo  <dnovillo@redhat.com>
 
        * tree-ssa-operands.c (get_asm_expr_operands): Fix thinkos in
index c4f4daf..021e910 100644 (file)
   [(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)]