This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: fix rs6000 handling of out-of-range BDxx
- From: Dale Johannesen <dalej at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Geoffrey Keating <geoffk at apple dot com>, David Edelsohn <dje at watson dot ibm dot com>
- Date: Fri, 8 Aug 2003 12:48:55 -0700
- Subject: Patch: fix rs6000 handling of out-of-range BDxx
This patch
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01143.html
broke the handling of decrement-and-branch insns that jump farther
than 32K, by changing the length attribute of the ctr*i patterns from *
to 4.
These aren't the same thing for branches; see define_attr "length"
near the top of the file. Bootstrapping.
As a 3.1 regression, this should go in 3.3.
Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.224.2.4
diff -u -d -b -w -r1.224.2.4 rs6000.md
--- rs6000.md 9 Jun 2003 21:37:52 -0000 1.224.2.4
+++ rs6000.md 8 Aug 2003 19:44:48 -0000
@@ -14308,7 +14308,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrsi_internal2"
[(set (pc)
@@ -14332,7 +14332,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal1"
[(set (pc)
@@ -14356,7 +14356,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal2"
[(set (pc)
@@ -14380,7 +14380,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
;; Similar, but we can use GE since we have a REG_NONNEG.
@@ -14406,7 +14406,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrsi_internal4"
[(set (pc)
@@ -14430,7 +14430,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal3"
[(set (pc)
@@ -14454,7 +14454,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal4"
[(set (pc)
@@ -14478,7 +14478,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
;; Similar but use EQ
@@ -14504,7 +14504,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrsi_internal6"
[(set (pc)
@@ -14528,7 +14528,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal5"
[(set (pc)
@@ -14552,7 +14552,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal6"
[(set (pc)
@@ -14576,7 +14576,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
;; Now the splitters if we could not allocate the CTR register