* config/arm/arm.md (mulsidi3, umulsidi3, mulsi3_highpart)
authorZack Weinberg <zack@codesourcery.com>
Tue, 4 Sep 2007 04:44:47 +0000 (04:44 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 4 Sep 2007 04:44:47 +0000 (04:44 +0000)
(umulsi3_highpart): Make into expanders; existing insns are
now named *[insn]_nov6.  Add stars to existing [insn]_v6
counterparts' names.

From-SVN: r128067

gcc/ChangeLog
gcc/config/arm/arm.md

index 84689795b9f92349471e5ea73e406e8ef251776e..c469388519b8b75abb87b275bf2e16b4ce94c379 100644 (file)
@@ -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)
index 2c753b48be793b5afd307918edb9f0cfaae5e6f6..04ca8ac37f53c7386c7bd0348c02c71430778d9d 100644 (file)
    (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"))
    (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"))
    (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"))
    (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"))
    (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
    (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
    (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
    (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