From: Eric Botcazou Date: Tue, 13 Jul 2004 12:18:25 +0000 (+0200) Subject: re PR target/16494 ([3.3.2/3.4/3.5] Pessimization with FP conditional branches) X-Git-Tag: releases/gcc-3.3.5~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d4f30bf9eb7c904800ab822c99014c6aface980;p=thirdparty%2Fgcc.git re PR target/16494 ([3.3.2/3.4/3.5] Pessimization with FP conditional branches) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be0580351e08..571c11148b4a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-07-13 Eric Botcazou + + 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 Lloyd Parkes diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 931114f5db84..9f4d552cc062 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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 diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 8c3e7c03f7cd..85759caeef01 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -120,6 +120,8 @@ (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")