xtensa.h (PREFERRED_RELOAD_CLASS, [...]): Remove.
* config/xtensa/xtensa.h (PREFERRED_RELOAD_CLASS, PREFERRED_OUTPUT_RELOAD_CLASS): Remove. * config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class, secondary_reload_info, xtensa_secondary_reload): Remove. * config/xtensa/xtensa.c (TARGET_PREFERRED_RELOAD_CLASS, TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define. (xtensa_preferred_reload_class): Make static. Change return and 'rclass' argument type to reg_class_t. Remove 'isoutput' argument. Use CONST_DOUBLE_P predicate. (xtensa_preferred_output_reload_class): New function. (xtensa_secondary_reload): Make static. From-SVN: r169810
This commit is contained in:
parent
82dc0de3f7
commit
a6e508f91d
4 changed files with 50 additions and 16 deletions
|
@ -1,3 +1,17 @@
|
|||
2011-02-03 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
* config/xtensa/xtensa.h (PREFERRED_RELOAD_CLASS,
|
||||
PREFERRED_OUTPUT_RELOAD_CLASS): Remove.
|
||||
* config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class,
|
||||
secondary_reload_info, xtensa_secondary_reload): Remove.
|
||||
* config/xtensa/xtensa.c (TARGET_PREFERRED_RELOAD_CLASS,
|
||||
TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define.
|
||||
(xtensa_preferred_reload_class): Make static. Change return and
|
||||
'rclass' argument type to reg_class_t. Remove 'isoutput' argument.
|
||||
Use CONST_DOUBLE_P predicate.
|
||||
(xtensa_preferred_output_reload_class): New function.
|
||||
(xtensa_secondary_reload): Make static.
|
||||
|
||||
2011-02-03 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/microblaze/microblaze.opt (Zxl-mode-bootstrap,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Prototypes of target machine for GNU compiler for Xtensa.
|
||||
Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
|
||||
Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
|
||||
|
||||
|
@ -63,11 +63,6 @@ extern void print_operand (FILE *, rtx, int);
|
|||
extern void print_operand_address (FILE *, rtx);
|
||||
extern void xtensa_output_literal (FILE *, rtx, enum machine_mode, int);
|
||||
extern rtx xtensa_return_addr (int, rtx);
|
||||
extern enum reg_class xtensa_preferred_reload_class (rtx, enum reg_class, int);
|
||||
struct secondary_reload_info;
|
||||
extern reg_class_t xtensa_secondary_reload (bool, rtx, reg_class_t,
|
||||
enum machine_mode,
|
||||
struct secondary_reload_info *);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
extern void xtensa_setup_frame_addresses (void);
|
||||
|
|
|
@ -162,6 +162,12 @@ static void xtensa_asm_trampoline_template (FILE *);
|
|||
static void xtensa_trampoline_init (rtx, tree, rtx);
|
||||
static bool xtensa_output_addr_const_extra (FILE *, rtx);
|
||||
|
||||
static reg_class_t xtensa_preferred_reload_class (rtx, reg_class_t);
|
||||
static reg_class_t xtensa_preferred_output_reload_class (rtx, reg_class_t);
|
||||
static reg_class_t xtensa_secondary_reload (bool, rtx, reg_class_t,
|
||||
enum machine_mode,
|
||||
struct secondary_reload_info *);
|
||||
|
||||
static bool constantpool_address_p (const_rtx addr);
|
||||
|
||||
static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
|
||||
|
@ -260,6 +266,11 @@ static const struct default_options xtensa_option_optimization_table[] =
|
|||
#undef TARGET_EXPAND_BUILTIN
|
||||
#define TARGET_EXPAND_BUILTIN xtensa_expand_builtin
|
||||
|
||||
#undef TARGET_PREFERRED_RELOAD_CLASS
|
||||
#define TARGET_PREFERRED_RELOAD_CLASS xtensa_preferred_reload_class
|
||||
#undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
|
||||
#define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS xtensa_preferred_output_reload_class
|
||||
|
||||
#undef TARGET_SECONDARY_RELOAD
|
||||
#define TARGET_SECONDARY_RELOAD xtensa_secondary_reload
|
||||
|
||||
|
@ -3153,11 +3164,12 @@ xtensa_expand_builtin (tree exp, rtx target,
|
|||
return NULL_RTX;
|
||||
}
|
||||
|
||||
/* Worker function for TARGET_PREFERRED_RELOAD_CLASS. */
|
||||
|
||||
enum reg_class
|
||||
xtensa_preferred_reload_class (rtx x, enum reg_class rclass, int isoutput)
|
||||
static reg_class_t
|
||||
xtensa_preferred_reload_class (rtx x, reg_class_t rclass)
|
||||
{
|
||||
if (!isoutput && CONSTANT_P (x) && GET_CODE (x) == CONST_DOUBLE)
|
||||
if (CONSTANT_P (x) && CONST_DOUBLE_P (x))
|
||||
return NO_REGS;
|
||||
|
||||
/* Don't use the stack pointer or hard frame pointer for reloads!
|
||||
|
@ -3172,8 +3184,27 @@ xtensa_preferred_reload_class (rtx x, enum reg_class rclass, int isoutput)
|
|||
return rclass;
|
||||
}
|
||||
|
||||
/* Worker function for TARGET_PREFERRED_OUTPUT_RELOAD_CLASS. */
|
||||
|
||||
reg_class_t
|
||||
static reg_class_t
|
||||
xtensa_preferred_output_reload_class (rtx x ATTRIBUTE_UNUSED,
|
||||
reg_class_t rclass)
|
||||
{
|
||||
/* Don't use the stack pointer or hard frame pointer for reloads!
|
||||
The hard frame pointer would normally be OK except that it may
|
||||
briefly hold an incoming argument in the prologue, and reload
|
||||
won't know that it is live because the hard frame pointer is
|
||||
treated specially. */
|
||||
|
||||
if (rclass == AR_REGS || rclass == GR_REGS)
|
||||
return RL_REGS;
|
||||
|
||||
return rclass;
|
||||
}
|
||||
|
||||
/* Worker function for TARGET_SECONDARY_RELOAD. */
|
||||
|
||||
static reg_class_t
|
||||
xtensa_secondary_reload (bool in_p, rtx x, reg_class_t rclass,
|
||||
enum machine_mode mode, secondary_reload_info *sri)
|
||||
{
|
||||
|
|
|
@ -455,12 +455,6 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER];
|
|||
the RTL, as either incoming or outgoing arguments. */
|
||||
#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
|
||||
|
||||
#define PREFERRED_RELOAD_CLASS(X, CLASS) \
|
||||
xtensa_preferred_reload_class (X, CLASS, 0)
|
||||
|
||||
#define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS) \
|
||||
xtensa_preferred_reload_class (X, CLASS, 1)
|
||||
|
||||
/* Return the maximum number of consecutive registers
|
||||
needed to represent mode MODE in a register of class CLASS. */
|
||||
#define CLASS_UNITS(mode, size) \
|
||||
|
|
Loading…
Add table
Reference in a new issue