summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-02 17:09:45 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-02 17:09:45 +0000
commit2f02c19fcb5beb0e374361b374d6b924cedc53d9 (patch)
treea190294fb128d69fe3712cd4ec1aa09dd33e7321
parentcde8f1c846d02f52e6ea68bd9fc4b799609d702a (diff)
downloadppe42-gcc-2f02c19fcb5beb0e374361b374d6b924cedc53d9.tar.gz
ppe42-gcc-2f02c19fcb5beb0e374361b374d6b924cedc53d9.zip
2009-02-02 Paul Brook <paul@codesourcery.com>
gcc/ * config/arm/arm.md (arm_addsi3): Add r/r/k alternative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143874 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/arm/arm.md12
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a4c777c57a5..8ed5b7fc92e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-02 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm.md (arm_addsi3): Add r/r/k alternative.
+
2009-02-02 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/39058
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 0acf257cb43..4eccd734b82 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -605,14 +605,18 @@
""
)
+;; The r/r/k alternative is required when reloading the address
+;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will
+;; put the duplicated register first, and not try the commutative version.
(define_insn_and_split "*arm_addsi3"
- [(set (match_operand:SI 0 "s_register_operand" "=r, !k,r, !k,r")
- (plus:SI (match_operand:SI 1 "s_register_operand" "%rk,!k,rk,!k,rk")
- (match_operand:SI 2 "reg_or_int_operand" "rI, rI,L, L,?n")))]
+ [(set (match_operand:SI 0 "s_register_operand" "=r, !k, r,r, !k,r")
+ (plus:SI (match_operand:SI 1 "s_register_operand" "%rk,!k, r,rk,!k,rk")
+ (match_operand:SI 2 "reg_or_int_operand" "rI, rI,!k,L, L,?n")))]
"TARGET_32BIT"
"@
add%?\\t%0, %1, %2
add%?\\t%0, %1, %2
+ add%?\\t%0, %2, %1
sub%?\\t%0, %1, #%n2
sub%?\\t%0, %1, #%n2
#"
@@ -627,7 +631,7 @@
operands[1], 0);
DONE;
"
- [(set_attr "length" "4,4,4,4,16")
+ [(set_attr "length" "4,4,4,4,4,16")
(set_attr "predicable" "yes")]
)
OpenPOWER on IntegriCloud