OSDN Git Service

* config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 14 Apr 2007 10:50:45 +0000 (10:50 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 14 Apr 2007 10:50:45 +0000 (10:50 +0000)
* config/bfin/bfin.md (movsi_insn): Delete two unused alternatives.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123813 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 2067138..016c62a 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 3c7f012..c600af3 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 e7c41e2..853024c 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 (X);
    %0 = %1 (Z);
    #
    %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")