aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1997-04-14 14:57:14 -0700
committerJim Wilson <wilson@gcc.gnu.org>1997-04-14 14:57:14 -0700
commit977eef43d8891a481186c971a46cec0c619c8e2d (patch)
tree1f1db43e6e37c3b0ab98b2105f9451357a06c5c6
parent460f4b9dddad212b224cca2516c7116406910650 (diff)
downloadgcc-977eef43d8891a481186c971a46cec0c619c8e2d.zip
gcc-977eef43d8891a481186c971a46cec0c619c8e2d.tar.gz
gcc-977eef43d8891a481186c971a46cec0c619c8e2d.tar.bz2
(xtrct_left, xtrct_right): New patterns.
From-SVN: r13904
-rw-r--r--gcc/config/sh/sh.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 342b3e4..e5ee868 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -1296,6 +1296,26 @@
(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")
;; -------------------------------------------------------------------------
;; Unary arithmetic