Commit 1bb99877 by Kaz Kojima

sh-protos.h (sh_legitimate_address_p): Remove.

	* config/sh/sh-protos.h (sh_legitimate_address_p): Remove.
	* config/sh/sh.c (sh_legitimate_address_p): Make static.
	(TARGET_LEGITIMATE_ADDRESS_P): New.
	* config/sh/sh.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
	* config/sh/sh.md: Clean up references to GO_IF_LEGITIMATE_ADDRESS.

From-SVN: r147679
parent ff74fd13
2009-05-18 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh-protos.h (sh_legitimate_address_p): Remove.
* config/sh/sh.c (sh_legitimate_address_p): Make static.
(TARGET_LEGITIMATE_ADDRESS_P): New.
* config/sh/sh.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
* config/sh/sh.md: Clean up references to GO_IF_LEGITIMATE_ADDRESS.
2009-05-18 Dodji Seketeli <dodji@redhat.com> 2009-05-18 Dodji Seketeli <dodji@redhat.com>
PR debug/40109 PR debug/40109
......
...@@ -59,7 +59,6 @@ extern int fp_one_operand (rtx); ...@@ -59,7 +59,6 @@ extern int fp_one_operand (rtx);
extern int fp_int_operand (rtx); extern int fp_int_operand (rtx);
extern rtx get_fpscr_rtx (void); extern rtx get_fpscr_rtx (void);
extern bool sh_legitimate_index_p (enum machine_mode, rtx); extern bool sh_legitimate_index_p (enum machine_mode, rtx);
extern bool sh_legitimate_address_p (enum machine_mode, rtx, bool);
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx); extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
extern int nonpic_symbol_mentioned_p (rtx); extern int nonpic_symbol_mentioned_p (rtx);
extern void emit_sf_insn (rtx); extern void emit_sf_insn (rtx);
......
...@@ -238,6 +238,7 @@ static bool sh_rtx_costs (rtx, int, int, int *, bool); ...@@ -238,6 +238,7 @@ static bool sh_rtx_costs (rtx, int, int, int *, bool);
static int sh_address_cost (rtx, bool); static int sh_address_cost (rtx, bool);
static int sh_pr_n_sets (void); static int sh_pr_n_sets (void);
static rtx sh_allocate_initial_value (rtx); static rtx sh_allocate_initial_value (rtx);
static bool sh_legitimate_address_p (enum machine_mode, rtx, bool);
static rtx sh_legitimize_address (rtx, rtx, enum machine_mode); static rtx sh_legitimize_address (rtx, rtx, enum machine_mode);
static int shmedia_target_regs_stack_space (HARD_REG_SET *); static int shmedia_target_regs_stack_space (HARD_REG_SET *);
static int shmedia_reserve_space_for_target_registers_p (int, HARD_REG_SET *); static int shmedia_reserve_space_for_target_registers_p (int, HARD_REG_SET *);
...@@ -480,6 +481,9 @@ static int sh2a_function_vector_p (tree); ...@@ -480,6 +481,9 @@ static int sh2a_function_vector_p (tree);
#undef TARGET_SECONDARY_RELOAD #undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD sh_secondary_reload #define TARGET_SECONDARY_RELOAD sh_secondary_reload
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P sh_legitimate_address_p
/* Machine-specific symbol_ref flags. */ /* Machine-specific symbol_ref flags. */
#define SYMBOL_FLAG_FUNCVEC_FUNCTION (SYMBOL_FLAG_MACH_DEP << 0) #define SYMBOL_FLAG_FUNCVEC_FUNCTION (SYMBOL_FLAG_MACH_DEP << 0)
...@@ -9029,7 +9033,7 @@ sh_legitimate_index_p (enum machine_mode mode, rtx op) ...@@ -9029,7 +9033,7 @@ sh_legitimate_index_p (enum machine_mode mode, rtx op)
REG++ REG++
--REG */ --REG */
bool static bool
sh_legitimate_address_p (enum machine_mode mode, rtx x, bool strict) sh_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
{ {
if (MAYBE_BASE_REGISTER_RTX_P (x, strict)) if (MAYBE_BASE_REGISTER_RTX_P (x, strict))
......
...@@ -2321,20 +2321,6 @@ struct sh_args { ...@@ -2321,20 +2321,6 @@ struct sh_args {
goto WIN; \ goto WIN; \
} while (0) } while (0)
#ifdef REG_OK_STRICT
#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
do { \
if (sh_legitimate_address_p ((MODE), (X), true)) \
goto LABEL; \
} while (0)
#else
#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
do { \
if (sh_legitimate_address_p ((MODE), (X), false)) \
goto LABEL; \
} while (0)
#endif
/* A C compound statement that attempts to replace X, which is an address /* A C compound statement that attempts to replace X, which is an address
that needs reloading, with a valid memory address for an operand of that needs reloading, with a valid memory address for an operand of
mode MODE. WIN is a C statement label elsewhere in the code. mode MODE. WIN is a C statement label elsewhere in the code.
......
...@@ -9564,7 +9564,7 @@ mov.l\\t1f,r0\\n\\ ...@@ -9564,7 +9564,7 @@ mov.l\\t1f,r0\\n\\
;; The c / m alternative is a fake to guide reload to load directly into ;; The c / m alternative is a fake to guide reload to load directly into
;; fpscr, since reload doesn't know how to use post-increment. ;; fpscr, since reload doesn't know how to use post-increment.
;; GO_IF_LEGITIMATE_ADDRESS guards about bogus addresses before reload, ;; TARGET_LEGITIMATE_ADDRESS_P guards about bogus addresses before reload,
;; SECONDARY_INPUT_RELOAD_CLASS does this during reload, and the insn's ;; SECONDARY_INPUT_RELOAD_CLASS does this during reload, and the insn's
;; predicate after reload. ;; predicate after reload.
;; The mac_gp type for r/!c might look a bit odd, but it actually schedules ;; The mac_gp type for r/!c might look a bit odd, but it actually schedules
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment