aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@codesourcery.com>2010-04-16 09:47:17 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2010-04-16 09:47:17 +0000
commit3302cfa12afe2086b0cc16a4c3f4610dd994497c (patch)
treef44a94d0575ad7a004874d3ef201050e21f0caab /gcc
parent6ea007e447876a49b7ea271d0bdee721e6b98cef (diff)
downloadgcc-3302cfa12afe2086b0cc16a4c3f4610dd994497c.zip
gcc-3302cfa12afe2086b0cc16a4c3f4610dd994497c.tar.gz
gcc-3302cfa12afe2086b0cc16a4c3f4610dd994497c.tar.bz2
arm.md (addsi3_cbranch): If destination is a high register...
* config/arm/arm.md (addsi3_cbranch): If destination is a high register, inputs must be low registers and we need a low register scratch. Handle alternative 2 like alternative 3. From-SVN: r158405
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/arm/arm.md11
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0e384b5..a3bb0b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -13,6 +13,10 @@
If the previous insn is a cbranchsi4_insn with the same arguments,
omit the compare instruction.
+ * config/arm/arm.md (addsi3_cbranch): If destination is a high
+ register, inputs must be low registers and we need a low register
+ scratch. Handle alternative 2 like alternative 3.
+
2010-04-16 Jakub Jelinek <jakub@redhat.com>
* alias.c (memrefs_conflict_p): If x and y are the same VALUE,
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 1a07f36..4604e13 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -7543,15 +7543,15 @@
(if_then_else
(match_operator 4 "arm_comparison_operator"
[(plus:SI
- (match_operand:SI 2 "s_register_operand" "%l,0,*0,1,1,1")
- (match_operand:SI 3 "reg_or_int_operand" "lL,IJ,*r,lIJ,lIJ,lIJ"))
+ (match_operand:SI 2 "s_register_operand" "%l,0,*l,1,1,1")
+ (match_operand:SI 3 "reg_or_int_operand" "lL,IJ,*l,lIJ,lIJ,lIJ"))
(const_int 0)])
(label_ref (match_operand 5 "" ""))
(pc)))
(set
(match_operand:SI 0 "thumb_cbrch_target_operand" "=l,l,*!h,*?h,*?m,*?m")
(plus:SI (match_dup 2) (match_dup 3)))
- (clobber (match_scratch:SI 1 "=X,X,X,l,&l,&l"))]
+ (clobber (match_scratch:SI 1 "=X,X,l,l,&l,&l"))]
"TARGET_THUMB1
&& (GET_CODE (operands[4]) == EQ
|| GET_CODE (operands[4]) == NE
@@ -7561,8 +7561,7 @@
{
rtx cond[3];
-
- cond[0] = (which_alternative < 3) ? operands[0] : operands[1];
+ cond[0] = (which_alternative < 2) ? operands[0] : operands[1];
cond[1] = operands[2];
cond[2] = operands[3];
@@ -7571,7 +7570,7 @@
else
output_asm_insn (\"add\\t%0, %1, %2\", cond);
- if (which_alternative >= 3
+ if (which_alternative >= 2
&& which_alternative < 4)
output_asm_insn (\"mov\\t%0, %1\", operands);
else if (which_alternative >= 4)