Commit e97f2058 by Bernd Schmidt Committed by Bernd Schmidt

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
parent 646c0835
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
......
......@@ -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;
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment