alpha.md (addvsi3, addvdi3): New.
authorRichard Henderson <rth@redhat.com>
Wed, 3 Jan 2001 22:52:42 +0000 (14:52 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 3 Jan 2001 22:52:42 +0000 (14:52 -0800)
        * config/alpha/alpha.md (addvsi3, addvdi3): New.
        (negvsi2, negvdi2, subvsi3, subvdi3, mulvsi3, mulvdi3): New.

From-SVN: r38676

gcc/ChangeLog
gcc/config/alpha/alpha.md

index 3446f71d429197e3f2ca0db69e7c1fdc207a04de..80397cee1dd210aff17979660e39969f770d6473 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-03  Richard Henderson  <rth@redhat.com>
+
+       * config/alpha/alpha.md (addvsi3, addvdi3): New.
+       (negvsi2, negvdi2, subvsi3, subvdi3, mulvsi3, mulvdi3): New.
+       
 2001-01-03  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
 
        * tradcpp.c (main): Make sure finclude() is called with a valid
index 01498f49ab2303914e38d942bdb115d005554503..23d9f5ae6ddcbf666b7b630b9e962ed3e4504fb3 100644 (file)
   operands[7] = gen_lowpart (SImode, operands[5]);
 }")
 
+(define_insn "addvsi3"
+  [(set (match_operand:SI 0 "register_operand" "=r,r")
+       (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ,rJ")
+                (match_operand:SI 2 "sext_add_operand" "rI,O")))
+   (trap_if (ne (plus:DI (sign_extend:DI (match_dup 1))
+                        (sign_extend:DI (match_dup 2)))
+               (sign_extend:DI (plus:SI (match_dup 1)
+                                        (match_dup 2))))
+           (const_int 0))]
+  ""
+  "@
+   addlv %r1,%2,%0
+   sublv %r1,%n2,%0")
+
 (define_expand "adddi3"
   [(set (match_operand:DI 0 "register_operand" "")
        (plus:DI (match_operand:DI 1 "register_operand" "")
    s%2addq %1,%3,%0
    s%2subq %1,%n3,%0")
 
+(define_insn "addvdi3"
+  [(set (match_operand:DI 0 "register_operand" "=r,r")
+       (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ")
+                (match_operand:DI 2 "sext_add_operand" "rI,O")))
+   (trap_if (ne (plus:TI (sign_extend:TI (match_dup 1))
+                        (sign_extend:TI (match_dup 2)))
+               (sign_extend:TI (plus:DI (match_dup 1)
+                                        (match_dup 2))))
+           (const_int 0))]
+  ""
+  "@
+   addqv %r1,%2,%0
+   subqv %r1,%n2,%0")
+
 (define_insn "negsi2"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (neg:SI (match_operand:SI 1 "reg_or_8bit_operand" "rI")))]
   ""
   "subl $31,%1,%0")
 
+(define_insn "negvsi2"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+       (neg:SI (match_operand:SI 1 "register_operand" "r")))
+   (trap_if (ne (neg:DI (sign_extend:DI (match_dup 1)))
+               (sign_extend:DI (neg:SI (match_dup 1))))
+           (const_int 0))]
+  ""
+  "sublv $31,%1,%0")
+
 (define_insn "negdi2"
   [(set (match_operand:DI 0 "register_operand" "=r")
        (neg:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")))]
   ""
   "subq $31,%1,%0")
 
+(define_insn "negvdi2"
+  [(set (match_operand:DI 0 "register_operand" "=r")
+       (neg:DI (match_operand:DI 1 "register_operand" "r")))
+   (trap_if (ne (neg:TI (sign_extend:TI (match_dup 1)))
+               (sign_extend:TI (neg:DI (match_dup 1))))
+           (const_int 0))]
+  ""
+  "subqv $31,%1,%0")
+
 (define_expand "subsi3"
   [(set (match_operand:SI 0 "register_operand" "")
        (minus:SI (match_operand:SI 1 "reg_or_0_operand" "")
   ""
   "subl %r1,%2,%0")
 
+(define_insn "subvsi3"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+       (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ")
+                 (match_operand:SI 2 "reg_or_8bit_operand" "rI")))
+   (trap_if (ne (minus:DI (sign_extend:DI (match_dup 1))
+                         (sign_extend:DI (match_dup 2)))
+               (sign_extend:DI (minus:SI (match_dup 1)
+                                         (match_dup 2))))
+           (const_int 0))]
+  ""
+  "sublv %r1,%2,%0")
+
 (define_insn "subdi3"
   [(set (match_operand:DI 0 "register_operand" "=r")
        (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ")
   ""
   "s%2subq %1,%3,%0")
 
+(define_insn "subvdi3"
+  [(set (match_operand:DI 0 "register_operand" "=r")
+       (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ")
+                 (match_operand:DI 2 "reg_or_8bit_operand" "rI")))
+   (trap_if (ne (minus:TI (sign_extend:TI (match_dup 1))
+                         (sign_extend:TI (match_dup 2)))
+               (sign_extend:TI (minus:DI (match_dup 1)
+                                         (match_dup 2))))
+           (const_int 0))]
+  ""
+  "subqv %r1,%2,%0")
+
 (define_insn "mulsi3"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ")
   [(set_attr "type" "imul")
    (set_attr "opsize" "si")])
 
+(define_insn "mulvsi3"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+       (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ")
+                (match_operand:SI 2 "reg_or_8bit_operand" "rI")))
+   (trap_if (ne (mult:DI (sign_extend:DI (match_dup 1))
+                        (sign_extend:DI (match_dup 2)))
+               (sign_extend:DI (mult:SI (match_dup 1)
+                                        (match_dup 2))))
+           (const_int 0))]
+  ""
+  "mullv %r1,%2,%0"
+  [(set_attr "type" "imul")
+   (set_attr "opsize" "si")])
+
 (define_insn "muldi3"
   [(set (match_operand:DI 0 "register_operand" "=r")
        (mult:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ")
   "mulq %r1,%2,%0"
   [(set_attr "type" "imul")])
 
+(define_insn "mulvdi3"
+  [(set (match_operand:DI 0 "register_operand" "=r")
+       (mult:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ")
+                (match_operand:DI 2 "reg_or_8bit_operand" "rI")))
+   (trap_if (ne (mult:TI (sign_extend:TI (match_dup 1))
+                        (sign_extend:TI (match_dup 2)))
+               (sign_extend:TI (mult:DI (match_dup 1)
+                                        (match_dup 2))))
+           (const_int 0))]
+  ""
+  "mulqv %r1,%2,%0"
+  [(set_attr "type" "imul")])
+
 (define_insn "umuldi3_highpart"
   [(set (match_operand:DI 0 "register_operand" "=r")
        (truncate:DI