Commit a398a822 by Kazuhiro Inaoka Committed by Richard Henderson

m32r.h (HARD_REGNO_RENAME_OK): New.

        * config/m32r/m32r.h (HARD_REGNO_RENAME_OK): New.
        * config/m32r/m32r.c (m32r_hard_regno_rename_ok): New.
        * config/m32r/m32r-protos.h: Prototype it.

From-SVN: r67711
parent cec31c55
2003-06-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* config/m32r/m32r.h (HARD_REGNO_RENAME_OK): New.
* config/m32r/m32r.c (m32r_hard_regno_rename_ok): New.
* config/m32r/m32r-protos.h: Prototype it.
2003-06-10 Janis Johnson <janis187@us.ibm.com>
* config/rs6000/eabi.h (TARGET_OS_CPP_BUILTINS): Define builtins
......
......@@ -55,6 +55,8 @@ extern void m32r_expand_block_move PARAMS ((rtx *));
extern void m32r_print_operand PARAMS ((FILE *, rtx, int));
extern void m32r_print_operand_address PARAMS ((FILE *, rtx));
extern int m32r_not_same_reg PARAMS ((rtx, rtx));
extern int m32r_hard_regno_rename_ok PARAMS ((unsigned int,
unsigned int));
#ifdef HAVE_MACHINE_MODES
extern int call_address_operand PARAMS ((rtx, Mmode));
......
......@@ -2944,3 +2944,23 @@ m32r_block_immediate_operand (op, mode)
return 1;
}
/* Return true if using NEW_REG in place of OLD_REG is ok. */
int
m32r_hard_regno_rename_ok (old_reg, new_reg)
unsigned int old_reg ATTRIBUTE_UNUSED;
unsigned int new_reg;
{
/* Interrupt routines can't clobber any register that isn't already used. */
if (lookup_attribute ("interrupt", DECL_ATTRIBUTES (current_function_decl))
&& !regs_ever_live[new_reg])
return 0;
/* We currently emit epilogues as text, not rtl, so the liveness
of the return address register isn't visible. */
if (current_function_is_leaf && new_reg == RETURN_ADDR_REGNUM)
return 0;
return 1;
}
......@@ -657,6 +657,9 @@ extern unsigned int m32r_mode_class[];
&& GET_MODE_CLASS (MODE2) == MODE_INT \
&& GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \
&& GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)
#define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
m32r_hard_regno_rename_ok (OLD_REG, NEW_REG)
/* Register classes and constants. */
......
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