aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2005-11-28 12:59:34 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2005-11-28 12:59:34 +0000
commite97f20583c0fe982424f2e212c426e803a86ee5b (patch)
tree298eadea9b793ec37c0f235f512fd5db1fe80ea9
parent646c0835465a8438ce3543bfcae30becf641a63e (diff)
downloadgcc-e97f20583c0fe982424f2e212c426e803a86ee5b.zip
gcc-e97f20583c0fe982424f2e212c426e803a86ee5b.tar.gz
gcc-e97f20583c0fe982424f2e212c426e803a86ee5b.tar.bz2
bfin.c (bfin_secondary_reload): Renamed from secondary_input_reload_class, made static.
* 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. From-SVN: r107601
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/bfin/bfin.c26
-rw-r--r--gcc/config/bfin/bfin.h5
3 files changed, 21 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 35d08ba..aaed30c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index f1a8268..c635c97 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -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);
-}
/* 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;
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index 0e6da5c..5ac0036 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -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