]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bfin.md (rotl16, [...]): New patterns.
authorBernd Schmidt <bernd.schmidt@analog.com>
Tue, 27 Feb 2007 15:26:19 +0000 (15:26 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 27 Feb 2007 15:26:19 +0000 (15:26 +0000)
* config/bfin/bfin.md (rotl16, rotlsi3, rotrsi3): New patterns.

From-SVN: r122377

gcc/ChangeLog
gcc/config/bfin/bfin.md

index b902a0293107af708116f054790e1bd6ab1a779d..a9070cc046fcd4031523a159f09e3a259f6764fe 100644 (file)
@@ -46,6 +46,8 @@
        * config/bfin/bfin.c (bfin_output_mi_thunk): Use R3 as scratch reg
        instead of R2.
 
+       * config/bfin/bfin.md (rotl16, rotlsi3, rotrsi3): New patterns.
+
 2007-02-27  Andreas Schwab  <schwab@suse.de>
 
        * Makefile.in (TEXI_GCCINSTALL_FILES): Add gcc-common.texi.
index 6786902fac5d5d53f1d7bf1716d90e4452f3dd6d..b65e8dda935726ce79650e291cefcb963fec0aae 100644 (file)
    %0 = %1 >>> %2%!"
   [(set_attr "type" "shft,dsp32")])
 
+(define_insn "rotl16"
+  [(set (match_operand:SI 0 "register_operand" "=d")
+       (rotate:SI (match_operand:SI 1 "register_operand" "d")
+                  (const_int 16)))]
+  ""
+  "%0 = PACK (%h1, %d1)%!"
+  [(set_attr "type" "dsp32")])
+
+(define_expand "rotlsi3"
+  [(set (match_operand:SI 0 "register_operand" "")
+       (rotate:SI (match_operand:SI 1 "register_operand" "")
+                  (match_operand:SI 2 "immediate_operand" "")))]
+  ""
+{
+  if (INTVAL (operands[2]) != 16)
+    FAIL;
+})
+
+(define_expand "rotrsi3"
+  [(set (match_operand:SI 0 "register_operand" "")
+       (rotatert:SI (match_operand:SI 1 "register_operand" "")
+                    (match_operand:SI 2 "immediate_operand" "")))]
+  ""
+{
+  if (INTVAL (operands[2]) != 16)
+    FAIL;
+  emit_insn (gen_rotl16 (operands[0], operands[1]));
+  DONE;
+})
+
+
 (define_insn "ror_one"
   [(set (match_operand:SI 0 "register_operand" "=d")
        (ior:SI (lshiftrt:SI (match_operand:SI 1 "register_operand" "d") (const_int 1))