defaults.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.

* 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.

From-SVN: r189995
This commit is contained in:
Nathan Froyd 2012-07-31 02:46:05 +00:00
parent 2a261cd35f
commit b0f6b6129a
13 changed files with 40 additions and 77 deletions

View file

@ -1,3 +1,24 @@
2012-07-30 Nathan Froyd <froydnj@gcc.gnu.org>
* 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.
2012-07-30 Nathan Froyd <froydnj@gcc.gnu.org>
* expmed.h (NUM_MODE_VECTOR_INT): Define.

View file

@ -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

View file

@ -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. */

View file

@ -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

View file

@ -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

View file

@ -19,7 +19,6 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
extern bool legitimate_constant_address_p (rtx);
extern bool vax_mode_dependent_address_p (rtx);
extern void vax_expand_prologue (void);
#ifdef RTX_CODE

View file

@ -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;

View file

@ -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. */

View file

@ -1218,13 +1218,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
#endif
/* Many ports have no mode-dependent addresses (except possibly autoincrement
and autodecrement addresses, which are handled by target-independent code
in recog.c). */
#ifndef GO_IF_MODE_DEPENDENT_ADDRESS
#define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN)
#endif
/* For most ports anything that evaluates to a constant symbolic
or integer value is acceptable as a constant address. */
#ifndef CONSTANT_ADDRESS_P

View file

@ -5623,24 +5623,6 @@ You may assume that @var{addr} is a valid address for the machine.
The default version of this hook returns @code{false}.
@end deftypefn
@defmac GO_IF_MODE_DEPENDENT_ADDRESS (@var{addr}, @var{label})
A C statement or compound statement with a conditional @code{goto
@var{label};} executed if memory address @var{x} (an RTX) can have
different meanings depending on the machine mode of the memory
reference it is used for or if the address is valid for some modes
but not others.
Autoincrement and autodecrement addresses typically have mode-dependent
effects because the amount of the increment or decrement is the size
of the operand being addressed. Some machines have other mode-dependent
addresses. Many RISC machines have no mode-dependent addresses.
You may assume that @var{addr} is a valid address for the machine.
These are obsolete macros, replaced by the
@code{TARGET_MODE_DEPENDENT_ADDRESS_P} target hook.
@end defmac
@deftypefn {Target Hook} bool TARGET_LEGITIMATE_CONSTANT_P (enum machine_mode @var{mode}, rtx @var{x})
This hook returns true if @var{x} is a legitimate constant for a
@var{mode}-mode immediate operand on the target machine. You can assume that

View file

@ -5547,24 +5547,6 @@ You may assume that @var{addr} is a valid address for the machine.
The default version of this hook returns @code{false}.
@end deftypefn
@defmac GO_IF_MODE_DEPENDENT_ADDRESS (@var{addr}, @var{label})
A C statement or compound statement with a conditional @code{goto
@var{label};} executed if memory address @var{x} (an RTX) can have
different meanings depending on the machine mode of the memory
reference it is used for or if the address is valid for some modes
but not others.
Autoincrement and autodecrement addresses typically have mode-dependent
effects because the amount of the increment or decrement is the size
of the operand being addressed. Some machines have other mode-dependent
addresses. Many RISC machines have no mode-dependent addresses.
You may assume that @var{addr} is a valid address for the machine.
These are obsolete macros, replaced by the
@code{TARGET_MODE_DEPENDENT_ADDRESS_P} target hook.
@end defmac
@hook TARGET_LEGITIMATE_CONSTANT_P
This hook returns true if @var{x} is a legitimate constant for a
@var{mode}-mode immediate operand on the target machine. You can assume that

View file

@ -888,7 +888,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
IDENT_ASM_OP UNALIGNED_SHORT_ASM_OP UNALIGNED_INT_ASM_OP \
UNALIGNED_LONG_ASM_OP UNALIGNED_DOUBLE_INT_ASM_OP \
USE_COMMON_FOR_ONE_ONLY IFCVT_EXTRA_FIELDS IFCVT_INIT_EXTRA_FIELDS \
CASE_USE_BIT_TESTS FIXUNS_TRUNC_LIKE_FIX_TRUNC
CASE_USE_BIT_TESTS FIXUNS_TRUNC_LIKE_FIX_TRUNC \
GO_IF_MODE_DEPENDENT_ADDRESS
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \

View file

@ -1204,19 +1204,7 @@ default_hard_regno_scratch_ok (unsigned int regno ATTRIBUTE_UNUSED)
bool
default_mode_dependent_address_p (const_rtx addr ATTRIBUTE_UNUSED)
{
#ifdef GO_IF_MODE_DEPENDENT_ADDRESS
GO_IF_MODE_DEPENDENT_ADDRESS (CONST_CAST_RTX (addr), win);
return false;
/* Label `win' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
win: ATTRIBUTE_UNUSED_LABEL
return true;
#else
return false;
#endif
}
bool