From 649bdf00a9e14e74dececa44e5d192ecd84c98a6 Mon Sep 17 00:00:00 2001 From: froydnj Date: Tue, 31 Jul 2012 02:46:05 +0000 Subject: * defaults.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete. * targhooks.c (default_mode_dependent_address_p): Delete code for GO_IF_MODE_DEPENDENT_ADDRESS. * system.h (GO_IF_MODE_DEPENDENT_ADDRESS): Poison. * doc/tm.texi.in (GO_IF_MODE_DEPENDENT_ADDRESS): Delete documention. * doc/tm.texi: Regenerate. * config/alpha.h (GO_IF_MODE_DEPENDENT_ADDRESS): Move code to... * config/alpha.c (alpha_mode_dependent_address_p): ...here. New function. (TARGET_MODE_DEPENDENT_ADDRESS_P): Define. * config/cr16/cr16.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete. * config/mep/mep.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete. * config/vax/vax-protos.h (vax_mode_dependent_address_p): Delete. * config/vax/vax.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete. * config/vax/vax.c (vax_mode_dependent_address_p): Make static. Take a const_rtx. (TARGET_MODE_DEPENDENT_ADDRESS_P): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189995 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/alpha/alpha.c | 12 ++++++++++++ gcc/config/alpha/alpha.h | 7 ------- gcc/config/cr16/cr16.h | 4 ---- gcc/config/mep/mep.h | 2 -- gcc/config/vax/vax-protos.h | 1 - gcc/config/vax/vax.c | 7 +++++-- gcc/config/vax/vax.h | 5 ----- 7 files changed, 17 insertions(+), 21 deletions(-) (limited to 'gcc/config') diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 5617ea313de..6d455eff0a4 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1038,6 +1038,16 @@ alpha_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, return new_x ? new_x : x; } +/* Return true if ADDR has an effect that depends on the machine mode it + is used for. On the Alpha this is true only for the unaligned modes. + We can simplify the test since we know that the address must be valid. */ + +static bool +alpha_mode_dependent_address_p (const_rtx addr) +{ + return GET_CODE (addr) == AND; +} + /* Primarily this is required for TLS symbols, but given that our move patterns *ought* to be able to handle any symbol at any time, we should never be spilling symbolic operands to the constant pool, ever. */ @@ -9709,6 +9719,8 @@ alpha_conditional_register_usage (void) #undef TARGET_LEGITIMIZE_ADDRESS #define TARGET_LEGITIMIZE_ADDRESS alpha_legitimize_address +#undef TARGET_MODE_DEPENDENT_ADDRESS_P +#define TARGET_MODE_DEPENDENT_ADDRESS_P alpha_mode_dependent_address_p #undef TARGET_ASM_FILE_START #define TARGET_ASM_FILE_START alpha_file_start diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 8520ea82f45..cdb7c49b007 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -851,13 +851,6 @@ do { \ } \ } while (0) -/* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. - On the Alpha this is true only for the unaligned modes. We can - simplify this test since we know that the address must be valid. */ - -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ -{ if (GET_CODE (ADDR) == AND) goto LABEL; } /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ diff --git a/gcc/config/cr16/cr16.h b/gcc/config/cr16/cr16.h index 54794e1fd27..cf5bdf143ca 100644 --- a/gcc/config/cr16/cr16.h +++ b/gcc/config/cr16/cr16.h @@ -460,10 +460,6 @@ struct cumulative_args #define REG_OK_FOR_INDEX_P(X) 1 #endif /* not REG_OK_STRICT. */ -/* Go to LABEL if ADDR (a legitimate address expression) has - an effect that depends on the machine mode it is used for. */ -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) - /* Assume best case (branch predicted). */ #define BRANCH_COST(speed_p, predictable_p) 2 diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h index ad5b36d375d..920120c92b9 100644 --- a/gcc/config/mep/mep.h +++ b/gcc/config/mep/mep.h @@ -561,8 +561,6 @@ typedef struct if (mep_legitimize_reload_address (&(X), (MODE), (OPNUM), (TYPE), (IND_LEVELS))) \ goto WIN -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) - #define SELECT_CC_MODE(OP, X, Y) CCmode diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h index 3f247943314..5363877a36d 100644 --- a/gcc/config/vax/vax-protos.h +++ b/gcc/config/vax/vax-protos.h @@ -19,7 +19,6 @@ along with GCC; see the file COPYING3. If not see . */ extern bool legitimate_constant_address_p (rtx); -extern bool vax_mode_dependent_address_p (rtx); extern void vax_expand_prologue (void); #ifdef RTX_CODE diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index aa929ca1e50..aa848108cf7 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -64,6 +64,7 @@ static rtx vax_builtin_setjmp_frame_value (void); static void vax_asm_trampoline_template (FILE *); static void vax_trampoline_init (rtx, tree, rtx); static int vax_return_pops_args (tree, tree, int); +static bool vax_mode_dependent_address_p (const_rtx); /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP @@ -103,6 +104,8 @@ static int vax_return_pops_args (tree, tree, int); #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P vax_legitimate_address_p +#undef TARGET_MODE_DEPENDENT_ADDRESS_P +#define TARGET_MODE_DEPENDENT_ADDRESS_P vax_mode_dependent_address_p #undef TARGET_FRAME_POINTER_REQUIRED #define TARGET_FRAME_POINTER_REQUIRED hook_bool_void_true @@ -1833,8 +1836,8 @@ vax_legitimate_address_p (enum machine_mode mode, rtx x, bool strict) increment being the length of the operand) and all indexed address depend thus (because the index scale factor is the length of the operand). */ -bool -vax_mode_dependent_address_p (rtx x) +static bool +vax_mode_dependent_address_p (const_rtx x) { rtx xfoo0, xfoo1; diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index 9d23fd058f5..35b8f8ea93a 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -432,11 +432,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) #endif - -/* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \ - { if (vax_mode_dependent_address_p (ADDR)) goto LABEL; } /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ -- cgit v1.2.1