(xtrct_left, xtrct_right): New patterns.
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 14 Apr 1997 21:57:14 +0000 (14:57 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 14 Apr 1997 21:57:14 +0000 (14:57 -0700)
From-SVN: r13904

gcc/config/sh/sh.md

index 342b3e4..e5ee868 100644 (file)
              (const_string "14")))
     (set_attr "type" "arith")])
 
+;; These patterns are found in expansions of DImode shifts by 16, and
+;; allow the xtrct instruction to be generated from C source.
+
+(define_insn "xtrct_left"
+  [(set (match_operand:SI 0 "arith_reg_operand" "=r")
+        (ior:SI (ashift:SI (match_operand:SI 1 "arith_reg_operand" "r")
+                          (const_int 16))
+               (lshiftrt:SI (match_operand:SI 2 "arith_reg_operand" "0")
+                            (const_int 16))))]
+  ""
+  "xtrct       %1,%0")
+
+(define_insn "xtrct_right"
+  [(set (match_operand:SI 0 "arith_reg_operand" "=r")
+        (ior:SI (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0")
+                            (const_int 16))
+               (ashift:SI (match_operand:SI 2 "arith_reg_operand" "r")
+                          (const_int 16))))]
+  ""
+  "xtrct       %2,%0")
 \f
 ;; -------------------------------------------------------------------------
 ;; Unary arithmetic