OSDN Git Service

* config/bfin/bfin.c (bfin_secondary_reload): Renamed from
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Nov 2005 12:59:34 +0000 (12:59 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Nov 2005 12:59:34 +0000 (12:59 +0000)
secondary_input_reload_class, made static.  Adapt to new
infrastructure.
(secondary_output_reload_class): Delete.
(TARGET_SECONDARY_RELOAD): New macro.
* config/bfin/bfin.h (SECONDARY_INPUT_RELOAD_CLASS,
SECONDARY_OUTPUT_RELOAD_CLASS): Delete.

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

gcc/ChangeLog
gcc/config/bfin/bfin.c
gcc/config/bfin/bfin.h

index 35d08ba..aaed30c 100644 (file)
@@ -1,3 +1,13 @@
+2005-11-28  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+       * config/bfin/bfin.c (bfin_secondary_reload): Renamed from
+       secondary_input_reload_class, made static.  Adapt to new
+       infrastructure.
+       (secondary_output_reload_class): Delete.
+       (TARGET_SECONDARY_RELOAD): New macro.
+       * config/bfin/bfin.h (SECONDARY_INPUT_RELOAD_CLASS,
+       SECONDARY_OUTPUT_RELOAD_CLASS): Delete.
+
 2005-11-28  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/21166
index f1a8268..c635c97 100644 (file)
@@ -1714,9 +1714,9 @@ bfin_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
    CLASS requires an extra scratch register.  Return the class needed for the
    scratch register.  */
 
-enum reg_class
-secondary_input_reload_class (enum reg_class class, enum machine_mode mode,
-                             rtx x)
+static enum reg_class
+bfin_secondary_reload (bool in_p, rtx x, enum reg_class class,
+                    enum machine_mode mode, secondary_reload_info *sri)
 {
   /* If we have HImode or QImode, we can only use DREGS as secondary registers;
      in most other cases we can also use PREGS.  */
@@ -1750,11 +1750,13 @@ secondary_input_reload_class (enum reg_class class, enum machine_mode mode,
        return NO_REGS;
       /* If destination is a DREG, we can do this without a scratch register
         if the constant is valid for an add instruction.  */
-      if (class == DREGS || class == DPREGS)
-       return large_constant_p ? PREGS : NO_REGS;
+      if ((class == DREGS || class == DPREGS)
+         && ! large_constant_p)
+       return NO_REGS;
       /* Reloading to anything other than a DREG?  Use a PREG scratch
         register.  */
-      return PREGS;
+      sri->icode = CODE_FOR_reload_insi;
+      return NO_REGS;
     }
 
   /* Data can usually be moved freely between registers of most classes.
@@ -1783,15 +1785,6 @@ secondary_input_reload_class (enum reg_class class, enum machine_mode mode,
       return default_class;
   return NO_REGS;
 }
-
-/* Like secondary_input_reload_class; and all we do is call that function.  */
-
-enum reg_class
-secondary_output_reload_class (enum reg_class class, enum machine_mode mode,
-                              rtx x)
-{
-  return secondary_input_reload_class (class, mode, x);
-}
 \f
 /* Implement TARGET_HANDLE_OPTION.  */
 
@@ -3008,4 +3001,7 @@ bfin_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
 #undef TARGET_DEFAULT_TARGET_FLAGS
 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
 
+#undef TARGET_SECONDARY_RELOAD
+#define TARGET_SECONDARY_RELOAD bfin_secondary_reload
+
 struct gcc_target targetm = TARGET_INITIALIZER;
index 0e6da5c..5ac0036 100644 (file)
@@ -515,11 +515,6 @@ enum reg_class
    perhaps another, smaller class.  */
 #define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS)
 
-#define  SECONDARY_OUTPUT_RELOAD_CLASS(class,mode,x) \
-    secondary_output_reload_class(class,mode,x)
-#define  SECONDARY_INPUT_RELOAD_CLASS(class,mode,x)  \
-    secondary_input_reload_class(class,mode,x)
-
 /* Function Calling Conventions. */
 
 /* The type of the current function; normal functions are of type