bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
authorBernd Schmidt <bernd.schmidt@analog.com>
Sat, 14 Apr 2007 10:50:45 +0000 (10:50 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Sat, 14 Apr 2007 10:50:45 +0000 (10:50 +0000)
* config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
* config/bfin/bfin.md (movsi_insn): Delete two unused alternatives.

From-SVN: r123813

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

index 2067138b3c94debd651eebac53330fa504c66eba..016c62ade409dd85a89632405d6fc234f00357df 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-14  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+       * config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
+       * config/bfin/bfin.md (movsi_insn): Delete two unused alternatives.
+
 2007-04-14  Kazu Hirata  <kazu@codesourcery.com>
 
        * config.gcc: Recognize fido.
index 3c7f0125e064b63a7dd67a51834d10240cffb3af..c600af395d666f260a2a460c5655564b3c13d359 100644 (file)
@@ -684,7 +684,15 @@ enum reg_class
    If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R,
    MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1,
    MODE2)' must be zero. */
-#define MODES_TIEABLE_P(MODE1, MODE2) ((MODE1) == (MODE2))
+#define MODES_TIEABLE_P(MODE1, MODE2)                  \
+ ((MODE1) == (MODE2)                                   \
+  || ((GET_MODE_CLASS (MODE1) == MODE_INT              \
+       || GET_MODE_CLASS (MODE1) == MODE_FLOAT)                \
+      && (GET_MODE_CLASS (MODE2) == MODE_INT           \
+         || GET_MODE_CLASS (MODE2) == MODE_FLOAT)      \
+      && (MODE1) != BImode && (MODE2) != BImode                \
+      && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD       \
+      && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD))
 
 /* `PREFERRED_RELOAD_CLASS (X, CLASS)'
    A C expression that places additional restrictions on the register
index e7c41e2734bd3a902f0d802f6c69558802f7ee03..853024cb148f377252a783539835996f48349214 100644 (file)
 ;; with a PLUS.  We generally require fewer secondary reloads this way.
 
 (define_insn "*movsi_insn"
-  [(set (match_operand:SI 0 "nonimmediate_operand" "=da,x*y,*k,da,da,x,x,x,da,mr")
-       (match_operand:SI 1 "general_operand" "da,x*y,da,*k,xKs7,xKsh,xKuh,ix,mr,da"))]
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=da,x*y,da,x,x,x,da,mr")
+       (match_operand:SI 1 "general_operand" "da,x*y,xKs7,xKsh,xKuh,ix,mr,da"))]
   "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
  "@
-   %0 = %1;
-   %0 = %1;
    %0 = %1;
    %0 = %1;
    %0 = %1 (X);
    #
    %0 = %1%!
    %0 = %1%!"
-  [(set_attr "type" "move,move,move,move,mvi,mvi,mvi,*,mcld,mcst")
-   (set_attr "length" "2,2,2,2,2,4,4,*,*,*")])
+  [(set_attr "type" "move,move,mvi,mvi,mvi,*,mcld,mcst")
+   (set_attr "length" "2,2,2,4,4,*,*,*")])
 
 (define_insn "*movsi_insn32"
   [(set (match_operand:SI 0 "register_operand" "=d,d")