diff options
author | Paul Brook <pbrook@gcc.gnu.org> | 2004-10-12 13:56:03 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-10-12 13:56:03 +0000 |
commit | b49e92fea26d4644fa5b2ab193dd29400de333d7 (patch) | |
tree | 2fdb1a34cf91d8268cd9afefbfd45dbae9a8f32a /gcc | |
parent | 49dee49c62d205f49623837e05c657da93c9ab80 (diff) | |
download | gcc-b49e92fea26d4644fa5b2ab193dd29400de333d7.zip gcc-b49e92fea26d4644fa5b2ab193dd29400de333d7.tar.gz gcc-b49e92fea26d4644fa5b2ab193dd29400de333d7.tar.bz2 |
arm.md (addsi3_cbranch_scratch): Correct constraints.
* config/arm/arm.md (addsi3_cbranch_scratch): Correct constraints.
Handle negative constants.
From-SVN: r88929
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 13e81e4..86113e7 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -6417,7 +6417,7 @@ (match_operator 3 "comparison_operator" [(plus:SI (match_operand:SI 1 "s_register_operand" "%l,l,l,0") - (match_operand:SI 2 "reg_or_int_operand" "J,l,I,L")) + (match_operand:SI 2 "reg_or_int_operand" "J,l,L,IJ")) (const_int 0)]) (label_ref (match_operand 4 "" "")) (pc))) @@ -6438,10 +6438,16 @@ output_asm_insn (\"cmn\t%1, %2\", operands); break; case 2: - output_asm_insn (\"add\t%0, %1, %2\", operands); + if (INTVAL (operands[2]) < 0) + output_asm_insn (\"sub\t%0, %1, %2\", operands); + else + output_asm_insn (\"add\t%0, %1, %2\", operands); break; case 3: - output_asm_insn (\"add\t%0, %0, %2\", operands); + if (INTVAL (operands[2]) < 0) + output_asm_insn (\"sub\t%0, %0, %2\", operands); + else + output_asm_insn (\"add\t%0, %0, %2\", operands); break; } |