aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-07-13 14:08:56 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-07-13 12:08:56 +0000
commit883d9e0c3f8da4b06c0fdef2c4e0db8d1c7c7a19 (patch)
tree9eab93b97cdd7c0ba60c8fb38ad489d5403315d4
parentaeb29bae3da5db492a27d7cbb2315489e705b363 (diff)
downloadgcc-883d9e0c3f8da4b06c0fdef2c4e0db8d1c7c7a19.zip
gcc-883d9e0c3f8da4b06c0fdef2c4e0db8d1c7c7a19.tar.gz
gcc-883d9e0c3f8da4b06c0fdef2c4e0db8d1c7c7a19.tar.bz2
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: r84618
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/sparc/sparc.c9
-rw-r--r--gcc/config/sparc/sparc.md2
3 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2062462..4191d04 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,12 @@
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>
PR target/15186
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 8f73f1b..199ae0a 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -6131,7 +6131,7 @@ output_cbranch (rtx op, rtx dest, int label, int reversed, int annul,
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
@@ -6261,9 +6261,7 @@ output_cbranch (rtx op, rtx dest, int label, int reversed, int annul,
spaces -= 2;
}
- if (! TARGET_V9)
- labelno = "";
- else
+ if (TARGET_V9)
{
rtx note;
int v8 = 0;
@@ -6313,6 +6311,9 @@ output_cbranch (rtx op, rtx dest, int label, int reversed, int annul,
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 f81482a..fecce78 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -128,6 +128,8 @@
(symbol_ref "flag_delayed_branch != 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")
(if_then_else (eq_attr "empty_delay_slot" "true")