From: wilson Date: Mon, 14 Apr 1997 21:57:14 +0000 (+0000) Subject: (xtrct_left, xtrct_right): New patterns. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=b7d3d83bbff74cac04a2310ccb53067abf84f8fa (xtrct_left, xtrct_right): New patterns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13904 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 342b3e40911..e5ee8685df0 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