aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2009-08-26 01:09:00 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2009-08-26 01:09:00 +0400
commit7b5cbb57032c98320bc7b5ba9da3dab8362a393d (patch)
tree44f8c8c44ea173046d301d7e79624a45b2640933 /gcc/config/avr
parent79232baaf890c7223876b5ffb93ed05e7948d7a3 (diff)
downloadgcc-7b5cbb57032c98320bc7b5ba9da3dab8362a393d.zip
gcc-7b5cbb57032c98320bc7b5ba9da3dab8362a393d.tar.gz
gcc-7b5cbb57032c98320bc7b5ba9da3dab8362a393d.tar.bz2
hooks.h (hook_bool_const_int_const_int_true): Declare.
* hooks.h (hook_bool_const_int_const_int_true): Declare. * hooks.c (hook_bool_const_int_const_int_true): New function. * target.h (struct gcc_target): Add can_eliminate field. * target-def.h (TARGET_CAN_ELIMINATE): Define. (TARGET_INITIALIZER): Use TARGET_CAN_ELIMINATE. * ira.c (setup_eliminable_regset): Use can_eliminate target hook. * reload1.c (update_eliminables, init_elim_table): (Ditto.). (elim_table): Revise comment. * system.h (CAN_ELIMINATE): Poison. * defaults.h (CAN_ELIMINATE): Remove. * doc/tm.texi (CAN_ELIMINATE): Revise documentation. * config/alpha/vms.h (CAN_ELIMINATE): Remove macro. * config/alpha/alpha.c (TARGET_CAN_ELIMINATE) [TARGET_ABI_OPEN_VMS]: Define macro. (alpha_vms_can_eliminate): Declare as static, change return type to bool. * config/alpha/alpha-protos.h (alpha_vms_can_eliminate): Remove. * config/arm/arm.h (CAN_ELIMINATE): Remove macro. * config/arm/arm.c (TARGET_CAN_ELIMINATE): Define macro. (arm_can_eliminate): New function. * config/avr/avr.h (CAN_ELIMINATE): Remove macro. * config/avr/avr.c (TARGET_CAN_ELIMINATE): Define macro. (avr_can_eliminate): Declare as static. * config/avr/avr-protos.h (avr_can_eliminate): Remove. * config/bfin/bfin.h (CAN_ELIMINATE): Remove macro. * config/bfin/bfin.c (TARGET_CAN_ELIMINATE): Define macro. (bfin_can_eliminate): New function. * config/crx/crx.h (CAN_ELIMINATE): Remove macro. * config/crx/crx.c (TARGET_CAN_ELIMINATE): Define macro. (crx_can_eliminate): New function. * config/fr30/fr30.h (CAN_ELIMINATE): Remove macro. * config/fr30/fr30.c (TARGET_CAN_ELIMINATE): Define macro. (fr30_can_eliminate): New function. * config/frv/frv.h (CAN_ELIMINATE): Remove macro. * config/frv/frv.c (TARGET_CAN_ELIMINATE): Define macro. (frv_can_eliminate): New function. * config/h8300/h8300.h (CAN_ELIMINATE): Remove macro. * config/h8300/h8300.c (TARGET_CAN_ELIMINATE): Define macro. (h8300_can_eliminate): New function. * config/i386/i386.h (CAN_ELIMINATE): Remove macro. * config/i386/i386.c (TARGET_CAN_ELIMINATE): Define macro. (i386_can_eliminate): Declare as static, change return type to bool. * config/i386/i386-protos.h (i386_can_eliminate): Remove. * config/ia64/ia64.h (CAN_ELIMINATE): Remove macro. * config/ia64/ia64.c (TARGET_CAN_ELIMINATE): Define macro. (ia64_can_eliminate): New function. * config/iq2000/iq2000.h (CAN_ELIMINATE): Remove macro. * config/iq2000/iq2000.c (TARGET_CAN_ELIMINATE): Define macro. (iq2000_can_eliminate): New function. * config/m32r/m32r.h (CAN_ELIMINATE): Remove macro. * config/m32r/m32r.c (TARGET_CAN_ELIMINATE): Define macro. (m32r_can_eliminate): New function. * config/m68hc11/m68hc11.h (CAN_ELIMINATE): Remove macro. * config/m68hc11/m68hc11.c (TARGET_CAN_ELIMINATE): Define macro. (m68hc11_can_eliminate): New function. * config/m68k/m68k.h (CAN_ELIMINATE): Remove macro. * config/m68k/m68k.c (TARGET_CAN_ELIMINATE): Define macro. (m68k_can_eliminate): New function. * config/mep/mep.h (CAN_ELIMINATE): Remove macro. * config/mep/mep.c (TARGET_CAN_ELIMINATE): Define macro. (mep_can_eliminate): New function. * config/mips/mips.h (CAN_ELIMINATE): Remove macro. * config/mips/mips.c (TARGET_CAN_ELIMINATE): Define macro. (mips_can_eliminate): New function. * config/rs6000/rs6000.h (CAN_ELIMINATE): Remove macro. * config/rs6000/rs6000.c (TARGET_CAN_ELIMINATE): Define macro. (rs6000_can_eliminate): New function. * config/s390/s390.h (CAN_ELIMINATE): Remove macro. * config/s390/s390.c (TARGET_CAN_ELIMINATE): Define macro. (s390_can_eliminate): Declare as static. * config/s390/s390-protos.h (sparc_can_eliminate): Remove. * config/score/score.h (CAN_ELIMINATE): Remove macro. * config/score/score.c (TARGET_CAN_ELIMINATE): Define macro. (score_can_eliminate): New function. * config/sparc/sparc.h (CAN_ELIMINATE): Remove macro. * config/sparc/sparc.c (TARGET_CAN_ELIMINATE): Define macro. (sparc_can_eliminate): Declare as static. * config/sparc/sparc-protos.h (sparc_can_eliminate): Remove. * config/stormy16/stormy16.h (CAN_ELIMINATE): Remove macro. * config/stormy16/stormy16.c (TARGET_CAN_ELIMINATE): Define macro. (xstormy16_can_eliminate): New function. * config/v850/v850.h (CAN_ELIMINATE): Remove macro. * config/v850/v850.c (TARGET_CAN_ELIMINATE): Define macro. (v850_can_eliminate): New function. From-SVN: r151096
Diffstat (limited to 'gcc/config/avr')
-rw-r--r--gcc/config/avr/avr-protos.h1
-rw-r--r--gcc/config/avr/avr.c5
-rw-r--r--gcc/config/avr/avr.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h
index 719829d..c39b97b 100644
--- a/gcc/config/avr/avr-protos.h
+++ b/gcc/config/avr/avr-protos.h
@@ -34,7 +34,6 @@ extern enum reg_class avr_reg_class_from_letter (int c);
extern void asm_globalize_label (FILE *file, const char *name);
extern void avr_asm_declare_function_name (FILE *, const char *, tree);
extern void order_regs_for_local_alloc (void);
-extern bool avr_can_eliminate (int, int);
extern int avr_initial_elimination_offset (int from, int to);
extern int avr_simple_epilogue (void);
extern void gas_output_limited_string (FILE *file, const char *str);
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index d08d89f..2c562e9 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -90,6 +90,7 @@ static rtx avr_builtin_setjmp_frame_value (void);
static bool avr_hard_regno_scratch_ok (unsigned int);
static unsigned int avr_case_values_threshold (void);
static bool avr_frame_pointer_required_p (void);
+static bool avr_can_eliminate (const int, const int);
/* Allocate registers from r25 to r8 for parameters for function calls. */
#define FIRST_CUM_REG 26
@@ -191,6 +192,8 @@ static const struct attribute_spec avr_attribute_table[] =
#undef TARGET_FRAME_POINTER_REQUIRED
#define TARGET_FRAME_POINTER_REQUIRED avr_frame_pointer_required_p
+#undef TARGET_CAN_ELIMINATE
+#define TARGET_CAN_ELIMINATE avr_can_eliminate
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -428,7 +431,7 @@ avr_regs_to_save (HARD_REG_SET *set)
/* Return true if register FROM can be eliminated via register TO. */
bool
-avr_can_eliminate (int from, int to)
+avr_can_eliminate (const int from, const int to)
{
return ((from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
|| ((from == FRAME_POINTER_REGNUM
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 7100ad1..ff40939 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -364,8 +364,6 @@ enum reg_class {
{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}}
-#define CAN_ELIMINATE(FROM, TO) avr_can_eliminate (FROM, TO)
-
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
OFFSET = avr_initial_elimination_offset (FROM, TO)