sh.h (PREFERRED_RELOAD_CLASS): Remove.
* config/sh/sh.h (PREFERRED_RELOAD_CLASS): Remove. * config/sh/sh-protos.h (secondary_reload_info, sh_secondary_reload): Remove forward declaration. * config/sh/sh.c (sh_preferred_reload_class): New function. (sh_secondary_reload): Make static. (TARGET_PREFERRED_RELOAD_CLASS): Define. From-SVN: r168104
This commit is contained in:
parent
5ae2ca96ad
commit
486b10aa89
|
@ -1,3 +1,12 @@
|
|||
2010-12-21 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
* config/sh/sh.h (PREFERRED_RELOAD_CLASS): Remove.
|
||||
* config/sh/sh-protos.h (secondary_reload_info, sh_secondary_reload):
|
||||
Remove forward declaration.
|
||||
* config/sh/sh.c (sh_preferred_reload_class): New function.
|
||||
(sh_secondary_reload): Make static.
|
||||
(TARGET_PREFERRED_RELOAD_CLASS): Define.
|
||||
|
||||
2010-12-20 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/alpha/linux.h (OPTION_GLIBC): Define differently if
|
||||
|
|
|
@ -165,10 +165,6 @@ extern int shmedia_cleanup_truncate (rtx *, void *);
|
|||
extern int sh_contains_memref_p (rtx);
|
||||
extern int sh_loads_bankedreg_p (rtx);
|
||||
extern rtx shmedia_prepare_call_address (rtx fnaddr, int is_sibcall);
|
||||
struct secondary_reload_info;
|
||||
extern reg_class_t sh_secondary_reload (bool, rtx, reg_class_t,
|
||||
enum machine_mode,
|
||||
struct secondary_reload_info *);
|
||||
extern int sh2a_get_function_vector_number (rtx);
|
||||
extern int sh2a_is_function_vector_call (rtx);
|
||||
extern void sh_fix_range (const char *);
|
||||
|
|
|
@ -253,6 +253,10 @@ static bool sh_rtx_costs (rtx, int, int, int *, bool);
|
|||
static int sh_address_cost (rtx, bool);
|
||||
static int sh_pr_n_sets (void);
|
||||
static rtx sh_allocate_initial_value (rtx);
|
||||
static reg_class_t sh_preferred_reload_class (rtx, reg_class_t);
|
||||
static reg_class_t sh_secondary_reload (bool, rtx, reg_class_t,
|
||||
enum machine_mode,
|
||||
struct secondary_reload_info *);
|
||||
static bool sh_legitimate_address_p (enum machine_mode, rtx, bool);
|
||||
static rtx sh_legitimize_address (rtx, rtx, enum machine_mode);
|
||||
static rtx sh_delegitimize_address (rtx);
|
||||
|
@ -591,6 +595,9 @@ static const struct default_options sh_option_optimization_table[] =
|
|||
#undef TARGET_SECONDARY_RELOAD
|
||||
#define TARGET_SECONDARY_RELOAD sh_secondary_reload
|
||||
|
||||
#undef TARGET_PREFERRED_RELOAD_CLASS
|
||||
#define TARGET_PREFERRED_RELOAD_CLASS sh_preferred_reload_class
|
||||
|
||||
#undef TARGET_CONDITIONAL_REGISTER_USAGE
|
||||
#define TARGET_CONDITIONAL_REGISTER_USAGE sh_conditional_register_usage
|
||||
|
||||
|
@ -12426,7 +12433,24 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall)
|
|||
return fnaddr;
|
||||
}
|
||||
|
||||
reg_class_t
|
||||
/* Implement TARGET_PREFERRED_RELOAD_CLASS. */
|
||||
|
||||
static reg_class_t
|
||||
sh_preferred_reload_class (rtx x, reg_class_t rclass)
|
||||
{
|
||||
if (rclass == NO_REGS
|
||||
&& TARGET_SHMEDIA
|
||||
&& (CONST_DOUBLE_P (x)
|
||||
|| GET_CODE (x) == SYMBOL_REF
|
||||
|| PIC_ADDR_P (x)))
|
||||
return GENERAL_REGS;
|
||||
|
||||
return rclass;
|
||||
}
|
||||
|
||||
/* Implement TARGET_SECONDARY_RELOAD. */
|
||||
|
||||
static reg_class_t
|
||||
sh_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
|
||||
enum machine_mode mode, secondary_reload_info *sri)
|
||||
{
|
||||
|
|
|
@ -1213,19 +1213,6 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
|
|||
#define CONST_OK_FOR_K08(VALUE) (((HOST_WIDE_INT)(VALUE))>= 0 \
|
||||
&& ((HOST_WIDE_INT)(VALUE)) <= 255)
|
||||
|
||||
/* Given an rtx X being reloaded into a reg required to be
|
||||
in class CLASS, return the class of reg to actually use.
|
||||
In general this is just CLASS; but on some machines
|
||||
in some cases it is preferable to use a more restrictive class. */
|
||||
|
||||
#define PREFERRED_RELOAD_CLASS(X, CLASS) \
|
||||
((CLASS) == NO_REGS && TARGET_SHMEDIA \
|
||||
&& (GET_CODE (X) == CONST_DOUBLE \
|
||||
|| GET_CODE (X) == SYMBOL_REF \
|
||||
|| PIC_ADDR_P (X)) \
|
||||
? GENERAL_REGS \
|
||||
: (CLASS)) \
|
||||
|
||||
#if 0
|
||||
#define SECONDARY_INOUT_RELOAD_CLASS(CLASS,MODE,X,ELSE) \
|
||||
((((REGCLASS_HAS_FP_REG (CLASS) \
|
||||
|
|
Loading…
Reference in New Issue