]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/16494 ([3.3.2/3.4/3.5] Pessimization with FP conditional branches)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Tue, 13 Jul 2004 12:18:25 +0000 (14:18 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 13 Jul 2004 12:18:25 +0000 (12:18 +0000)
PR target/16494
* config/sparc/sparc.c (output_cbranch): Properly guard
the code handling far branches with TARGET_V9.
* config/sparc/sparc.md (length attribute): Document the
side-effect of having a length greater or equal to 3.

From-SVN: r84620

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

index be0580351e08fb35f1146eaf8c92ee2129594459..571c11148b4a30612d7c178d5a88e7556b7a53c8 100644 (file)
@@ -1,3 +1,11 @@
+2004-07-13  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR target/16494
+       * config/sparc/sparc.c (output_cbranch): Properly guard
+       the code handling far branches with TARGET_V9.
+       * config/sparc/sparc.md (length attribute): Document the
+       side-effect of having a length greater or equal to 3.
+
 2004-07-13  Eric Botcazou  <ebotcazou@libertysurf.fr>
             Lloyd Parkes  <lloyd@must-have-coffee.gen.nz>
 
index 931114f5db843c877ac4947b8ff1aa97c1744ddb..9f4d552cc062bf1c570f1e13961e88bf5374bfdf 100644 (file)
@@ -5491,7 +5491,7 @@ output_cbranch (op, dest, label, reversed, annul, noop, insn)
      nop
      ba .LC29  */
 
-  far = get_attr_length (insn) >= 3;
+  far = TARGET_V9 && (get_attr_length (insn) >= 3);
   if (reversed ^ far)
     {
       /* Reversal of FP compares takes care -- an ordered compare
@@ -5621,9 +5621,7 @@ output_cbranch (op, dest, label, reversed, annul, noop, insn)
       spaces -= 2;
     }
 
-  if (! TARGET_V9)
-    labelno = "";
-  else
+  if (TARGET_V9)
     {
       rtx note;
       int v8 = 0;
@@ -5673,6 +5671,9 @@ output_cbranch (op, dest, label, reversed, annul, noop, insn)
          spaces -= 3;
        }
     }
+  else
+    labelno = "";
+
   if (spaces > 0)
     *p++ = '\t';
   else
index 8c3e7c03f7cdf548874d395ae18136a0b5b87112..85759caeef01847cf07278166d724ba884664f9f 100644 (file)
   (symbol_ref "TARGET_FLAT != 0"))
 
 ;; Length (in # of insns).
+;; Beware that setting a length greater or equal to 3 for conditional branches
+;; has a side-effect (see output_cbranch and output_v9branch).
 (define_attr "length" ""
   (cond [(eq_attr "type" "uncond_branch,call,sibcall")
           (if_then_else (eq_attr "empty_delay_slot" "true")