aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2009-07-10 23:16:31 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2009-07-10 23:16:31 +0000
commit98ac6510fa40424a33df9cd8fabb0cdc18e147e7 (patch)
treecdb24a83ff997126b2f176b392ce9f7d36cbbed5
parentb96c5923d4deaf4d37b89b40ff5f6760d22b5ea3 (diff)
downloadgcc-98ac6510fa40424a33df9cd8fabb0cdc18e147e7.zip
gcc-98ac6510fa40424a33df9cd8fabb0cdc18e147e7.tar.gz
gcc-98ac6510fa40424a33df9cd8fabb0cdc18e147e7.tar.bz2
thumb2.md (thumb2_cbz): Correct computation of length attribute.
* config/arm/thumb2.md (thumb2_cbz): Correct computation of length attribute. (thumb2_cbnz): Likewise. From-SVN: r149501
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/thumb2.md10
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bff4bd7..50c7a1c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-10 Mark Mitchell <mark@codesourcery.com>
+
+ * config/arm/thumb2.md (thumb2_cbz): Correct computation of length
+ attribute.
+ (thumb2_cbnz): Likewise.
+
2009-07-10 David Daney <ddaney@caviumnetworks.com>
PR target/39079
diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md
index 0c5c2db..884d58c 100644
--- a/gcc/config/arm/thumb2.md
+++ b/gcc/config/arm/thumb2.md
@@ -1325,7 +1325,7 @@
(clobber (reg:CC CC_REGNUM))]
"TARGET_THUMB2"
"*
- if (get_attr_length (insn) == 2 && which_alternative == 0)
+ if (get_attr_length (insn) == 2)
return \"cbz\\t%0, %l1\";
else
return \"cmp\\t%0, #0\;beq\\t%l1\";
@@ -1333,7 +1333,8 @@
[(set (attr "length")
(if_then_else
(and (ge (minus (match_dup 1) (pc)) (const_int 2))
- (le (minus (match_dup 1) (pc)) (const_int 128)))
+ (le (minus (match_dup 1) (pc)) (const_int 128))
+ (eq (symbol_ref ("which_alternative")) (const_int 0)))
(const_int 2)
(const_int 8)))]
)
@@ -1347,7 +1348,7 @@
(clobber (reg:CC CC_REGNUM))]
"TARGET_THUMB2"
"*
- if (get_attr_length (insn) == 2 && which_alternative == 0)
+ if (get_attr_length (insn) == 2)
return \"cbnz\\t%0, %l1\";
else
return \"cmp\\t%0, #0\;bne\\t%l1\";
@@ -1355,7 +1356,8 @@
[(set (attr "length")
(if_then_else
(and (ge (minus (match_dup 1) (pc)) (const_int 2))
- (le (minus (match_dup 1) (pc)) (const_int 128)))
+ (le (minus (match_dup 1) (pc)) (const_int 128))
+ (eq (symbol_ref ("which_alternative")) (const_int 0)))
(const_int 2)
(const_int 8)))]
)