summaryrefslogtreecommitdiff
path: root/gcc/config/bfin
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-28 12:59:34 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-28 12:59:34 +0000
commit88eaee2d9e837474fca5895d712c4958305ca3f5 (patch)
tree298eadea9b793ec37c0f235f512fd5db1fe80ea9 /gcc/config/bfin
parentc2ab04f9e57d248094640e87fdfe3f9454a9cd5d (diff)
downloadgcc-88eaee2d9e837474fca5895d712c4958305ca3f5.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107601 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r--gcc/config/bfin/bfin.c26
-rw-r--r--gcc/config/bfin/bfin.h5
2 files changed, 11 insertions, 20 deletions
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index f1a82683aa1..c635c976838 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 0e6da5c08a8..5ac00368c43 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