m68k.h (HARD_REGNO_RENAME_OK): New macro.
* config/m68k/m68k.h (HARD_REGNO_RENAME_OK): New macro. * config/m68k/m68k.c (m68k_hard regno_rename_ok): Disallow renaming of non-live registers in interrupt functions. * config/m68k/m68k-protos.h (m68k_hard_regno_rename_ok): Add prototype. From-SVN: r89441
This commit is contained in:
parent
76aebc9f3e
commit
cfca21cb61
@ -1,3 +1,10 @@
|
||||
2004-10-22 Peter Barada <peter@the-baradas.com>
|
||||
|
||||
* config/m68k/m68k.h (HARD_REGNO_RENAME_OK): New macro.
|
||||
* config/m68k/m68k.c (m68k_hard regno_rename_ok): Disallow
|
||||
renaming of non-live registers in interrupt functions.
|
||||
* config/m68k/m68k-protos.h (m68k_hard_regno_rename_ok): Add prototype.
|
||||
|
||||
2004-10-22 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* tree-ssa-loop-niter.c (inverse): Count in HOST_WIDE_INT if possible.
|
||||
|
@ -50,9 +50,11 @@ extern void print_operand_address (FILE *, rtx);
|
||||
extern void print_operand (FILE *, rtx, int);
|
||||
extern void notice_update_cc (rtx, rtx);
|
||||
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
|
||||
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
extern int flags_in_68881 (void);
|
||||
extern bool use_return_insn (void);
|
||||
extern void override_options (void);
|
||||
extern void init_68881_table (void);
|
||||
extern int m68k_hard_regno_rename_ok(unsigned int, unsigned int);
|
||||
|
@ -3428,3 +3428,20 @@ m68k_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
|
||||
{
|
||||
return gen_rtx_REG (Pmode, M68K_STRUCT_VALUE_REGNUM);
|
||||
}
|
||||
|
||||
/* Return nonzero if register old_reg can be renamed to register new_reg. */
|
||||
int
|
||||
m68k_hard_regno_rename_ok (unsigned int old_reg ATTRIBUTE_UNUSED,
|
||||
unsigned int new_reg)
|
||||
{
|
||||
|
||||
/* Interrupt functions can only use registers that have already been
|
||||
saved by the prologue, even if they would normally be
|
||||
call-clobbered. */
|
||||
|
||||
if (m68k_interrupt_function_p (current_function_decl)
|
||||
&& !regs_ever_live[new_reg])
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -480,6 +480,12 @@ extern int target_flags;
|
||||
((REGNO) >= 16 ? GET_MODE_NUNITS (MODE) \
|
||||
: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
|
||||
|
||||
/* A C expression that is nonzero if hard register NEW_REG can be
|
||||
considered for use as a rename register for OLD_REG register. */
|
||||
|
||||
#define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
|
||||
m68k_hard_regno_rename_ok (OLD_REG, NEW_REG)
|
||||
|
||||
/* On the m68k, the cpu registers can hold any mode but the 68881 registers
|
||||
can hold only SFmode or DFmode. */
|
||||
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
|
||||
|
Loading…
Reference in New Issue
Block a user