aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2007-09-04 04:44:47 +0000
committerZack Weinberg <zack@gcc.gnu.org>2007-09-04 04:44:47 +0000
commitfc7a6a0dfa65af07a199aa34823d81800ec35f64 (patch)
tree4f65b1b4e23d003efc79175bdc58531c0b5fd674 /gcc
parent72c65674311c2e3421ee31468b10ad8393519297 (diff)
downloadgcc-fc7a6a0dfa65af07a199aa34823d81800ec35f64.zip
gcc-fc7a6a0dfa65af07a199aa34823d81800ec35f64.tar.gz
gcc-fc7a6a0dfa65af07a199aa34823d81800ec35f64.tar.bz2
* config/arm/arm.md (mulsidi3, umulsidi3, mulsi3_highpart)
(umulsi3_highpart): Make into expanders; existing insns are now named *[insn]_nov6. Add stars to existing [insn]_v6 counterparts' names. From-SVN: r128067
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/arm/arm.md68
2 files changed, 67 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8468979..c469388 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-03 Zack Weinberg <zack@codesourcery.com>
+
+ * config/arm/arm.md (mulsidi3, umulsidi3, mulsi3_highpart)
+ (umulsi3_highpart): Make into expanders; existing insns are
+ now named *[insn]_nov6. Add stars to existing [insn]_v6
+ counterparts' names.
+
2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (DRIVER_DEFINES, gcc.o, gccspec.o, protoize.o)
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 2c753b4..04ca8ac 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -1340,7 +1340,22 @@
(set_attr "predicable" "yes")]
)
-(define_insn "mulsidi3"
+;; 32x32->64 widening multiply.
+;; As with mulsi3, the only difference between the v3-5 and v6+
+;; versions of these patterns is the requirement that the output not
+;; overlap the inputs, but that still means we have to have a named
+;; expander and two different starred insns.
+
+(define_expand "mulsidi3"
+ [(set (match_operand:DI 0 "s_register_operand" "")
+ (mult:DI
+ (sign_extend:DI (match_operand:SI 1 "s_register_operand" ""))
+ (sign_extend:DI (match_operand:SI 2 "s_register_operand" ""))))]
+ "TARGET_32BIT && arm_arch3m"
+ ""
+)
+
+(define_insn "*mulsidi3_nov6"
[(set (match_operand:DI 0 "s_register_operand" "=&r")
(mult:DI
(sign_extend:DI (match_operand:SI 1 "s_register_operand" "%r"))
@@ -1351,7 +1366,7 @@
(set_attr "predicable" "yes")]
)
-(define_insn "mulsidi3_v6"
+(define_insn "*mulsidi3_v6"
[(set (match_operand:DI 0 "s_register_operand" "=r")
(mult:DI
(sign_extend:DI (match_operand:SI 1 "s_register_operand" "r"))
@@ -1362,7 +1377,16 @@
(set_attr "predicable" "yes")]
)
-(define_insn "umulsidi3"
+(define_expand "umulsidi3"
+ [(set (match_operand:DI 0 "s_register_operand" "")
+ (mult:DI
+ (zero_extend:DI (match_operand:SI 1 "s_register_operand" ""))
+ (zero_extend:DI (match_operand:SI 2 "s_register_operand" ""))))]
+ "TARGET_32BIT && arm_arch3m"
+ ""
+)
+
+(define_insn "*umulsidi3_nov6"
[(set (match_operand:DI 0 "s_register_operand" "=&r")
(mult:DI
(zero_extend:DI (match_operand:SI 1 "s_register_operand" "%r"))
@@ -1373,7 +1397,7 @@
(set_attr "predicable" "yes")]
)
-(define_insn "umulsidi3_v6"
+(define_insn "*umulsidi3_v6"
[(set (match_operand:DI 0 "s_register_operand" "=r")
(mult:DI
(zero_extend:DI (match_operand:SI 1 "s_register_operand" "r"))
@@ -1412,7 +1436,21 @@
(set_attr "predicable" "yes")]
)
-(define_insn "smulsi3_highpart"
+(define_expand "smulsi3_highpart"
+ [(parallel
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (truncate:SI
+ (lshiftrt:DI
+ (mult:DI
+ (sign_extend:DI (match_operand:SI 1 "s_register_operand" ""))
+ (sign_extend:DI (match_operand:SI 2 "s_register_operand" "")))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 ""))])]
+ "TARGET_32BIT && arm_arch3m"
+ ""
+)
+
+(define_insn "*smulsi3_highpart_nov6"
[(set (match_operand:SI 0 "s_register_operand" "=&r,&r")
(truncate:SI
(lshiftrt:DI
@@ -1427,7 +1465,7 @@
(set_attr "predicable" "yes")]
)
-(define_insn "smulsi3_highpart_v6"
+(define_insn "*smulsi3_highpart_v6"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(truncate:SI
(lshiftrt:DI
@@ -1442,7 +1480,21 @@
(set_attr "predicable" "yes")]
)
-(define_insn "umulsi3_highpart"
+(define_expand "umulsi3_highpart"
+ [(parallel
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (truncate:SI
+ (lshiftrt:DI
+ (mult:DI
+ (zero_extend:DI (match_operand:SI 1 "s_register_operand" ""))
+ (zero_extend:DI (match_operand:SI 2 "s_register_operand" "")))
+ (const_int 32))))
+ (clobber (match_scratch:SI 3 ""))])]
+ "TARGET_32BIT && arm_arch3m"
+ ""
+)
+
+(define_insn "*umulsi3_highpart_nov6"
[(set (match_operand:SI 0 "s_register_operand" "=&r,&r")
(truncate:SI
(lshiftrt:DI
@@ -1457,7 +1509,7 @@
(set_attr "predicable" "yes")]
)
-(define_insn "umulsi3_highpart_v6"
+(define_insn "*umulsi3_highpart_v6"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(truncate:SI
(lshiftrt:DI