h8300-protos.h: Declare h8300_hard_regno_rename_ok
* config/h8300/h8300-protos.h: Declare h8300_hard_regno_rename_ok * config/h8300/h8300.h (HARD_REGNO_RENAME_OK): New. * config/h8300/h8300.c (h8300_hard_regno_rename_ok): New. From-SVN: r71119
This commit is contained in:
parent
31ff3e0b77
commit
c87ec0bae2
4 changed files with 30 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-09-05 Nitin Yewale <NitinY@KPITCummins.com>
|
||||
|
||||
* config/h8300/h8300-protos.h: Declare h8300_hard_regno_rename_ok
|
||||
* config/h8300/h8300.h (HARD_REGNO_RENAME_OK): New.
|
||||
* config/h8300/h8300.c (h8300_hard_regno_rename_ok): New.
|
||||
|
||||
2003-09-05 Roger Sayle <roger@eyesopen.com>
|
||||
Richard Henderson <rth@redhat.com>
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ extern void h8300_expand_prologue (void);
|
|||
extern void h8300_expand_epilogue (void);
|
||||
extern int h8300_current_function_interrupt_function_p (void);
|
||||
extern int h8300_initial_elimination_offset (int, int);
|
||||
extern int h8300_hard_regno_rename_ok (unsigned int, unsigned int);
|
||||
|
||||
struct cpp_reader;
|
||||
extern void h8300_pr_interrupt (struct cpp_reader *);
|
||||
|
|
|
@ -4489,6 +4489,23 @@ same_cmp_preceding_p (rtx i3)
|
|||
return (INSN_P (i1) && rtx_equal_p (PATTERN (i1), PATTERN (i3))
|
||||
&& any_condjump_p (i2) && onlyjump_p (i2));
|
||||
}
|
||||
|
||||
/* Return nonzero if register OLD_REG can be renamed to register NEW_REG. */
|
||||
|
||||
int
|
||||
h8300_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 (h8300_current_function_interrupt_function_p ()
|
||||
&& !regs_ever_live[new_reg])
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Initialize the GCC target structure. */
|
||||
#undef TARGET_ATTRIBUTE_TABLE
|
||||
|
|
|
@ -350,6 +350,12 @@ extern int target_flags;
|
|||
&& ((MODE2) == QImode || (MODE2) == HImode \
|
||||
|| ((TARGET_H8300H || TARGET_H8300S) && (MODE2) == SImode))))
|
||||
|
||||
/* 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) \
|
||||
h8300_hard_regno_rename_ok (OLD_REG, NEW_REG)
|
||||
|
||||
/* Specify the registers used for certain standard purposes.
|
||||
The values of these macros are register numbers. */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue