re PR target/36424 (avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization)
PR target/36424 * config/avr/avr.h (HARD_REGNO_RENAME_OK): Define. * config/avr/avr.c (avr_hard_regno_rename_ok): New function. * config/avr/avr-protos.h (avr_hard_regno_rename_ok): New prototype. From-SVN: r136562
This commit is contained in:
parent
929a75b24f
commit
91635d0806
@ -1,3 +1,10 @@
|
||||
2008-07-08 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
PR target/36424
|
||||
* config/avr/avr.h (HARD_REGNO_RENAME_OK): Define.
|
||||
* config/avr/avr.c (avr_hard_regno_rename_ok): New function.
|
||||
* config/avr/avr-protos.h (avr_hard_regno_rename_ok): New prototype.
|
||||
|
||||
2008-06-07 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* config/i386/cygming.h (MAYBE_UWIN_CPP_BUILTINS): Remove.
|
||||
|
@ -37,6 +37,7 @@ extern int initial_elimination_offset (int from, int to);
|
||||
extern int avr_simple_epilogue (void);
|
||||
extern void gas_output_limited_string (FILE *file, const char *str);
|
||||
extern void gas_output_ascii (FILE *file, const char *str, size_t length);
|
||||
extern int avr_hard_regno_rename_ok (unsigned int, unsigned int);
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern void asm_output_external (FILE *file, tree decl, char *name);
|
||||
|
@ -5916,6 +5916,23 @@ avr_peep2_scratch_safe (rtx scratch)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return nonzero if register OLD_REG can be renamed to register NEW_REG. */
|
||||
|
||||
int
|
||||
avr_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 ((cfun->machine->is_interrupt || cfun->machine->is_signal)
|
||||
&& !df_regs_ever_live_p (new_reg))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Output a branch that tests a single bit of a register (QI, HI or SImode)
|
||||
or memory location in the I/O space (QImode only).
|
||||
|
||||
|
@ -1026,6 +1026,9 @@ mmcu=*:-mmcu=%*}"
|
||||
|
||||
#define OBJECT_FORMAT_ELF
|
||||
|
||||
#define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
|
||||
avr_hard_regno_rename_ok (OLD_REG, NEW_REG)
|
||||
|
||||
/* A C structure for machine-specific, per-function data.
|
||||
This is added to the cfun structure. */
|
||||
struct machine_function GTY(())
|
||||
|
Loading…
Reference in New Issue
Block a user