From d474db84488c71868483429070d545811adbc677 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 12 Jul 2010 18:53:59 +0000 Subject: Makefile.in (target-globals.o): Depend on reload.h. gcc/ * Makefile.in (target-globals.o): Depend on reload.h. * reload.h (target_reload): New structure. (default_target_reload): Declare. (this_target_reload): Declare as a variable or define as a macro. (indirect_symref_ok, double_reg_address_ok): Redefine as macros. * reload1.c (default_target_reload): New variable (this_target_reload): New conditional variable. (indirect_symref_ok, double_reg_address_ok): Delete. (spill_indirect_levels): Redefine as a macro. * target-globals.h (this_target_reload): Declare. (target_globals): Add a reload field. (restore_target_globals): Copy the reload field to this_target_reload. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the reload field. (save_target_globals): Likewise. From-SVN: r162093 --- gcc/reload1.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'gcc/reload1.c') diff --git a/gcc/reload1.c b/gcc/reload1.c index 48191a2..437b8c2 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -81,6 +81,14 @@ along with GCC; see the file COPYING3. If not see fixing up each insn, and generating the new insns to copy values into the reload registers. */ +struct target_reload default_target_reload; +#if SWITCHABLE_TARGET +struct target_reload *this_target_reload = &default_target_reload; +#endif + +#define spill_indirect_levels \ + (this_target_reload->x_spill_indirect_levels) + /* During reload_as_needed, element N contains a REG rtx for the hard reg into which reg N has been reloaded (perhaps for a previous insn). */ static rtx *reg_last_reload_reg; @@ -231,22 +239,6 @@ static HARD_REG_SET used_spill_regs; a round-robin fashion. */ static int last_spill_reg; -/* Nonzero if indirect addressing is supported on the machine; this means - that spilling (REG n) does not require reloading it into a register in - order to do (MEM (REG n)) or (MEM (PLUS (REG n) (CONST_INT c))). The - value indicates the level of indirect addressing supported, e.g., two - means that (MEM (MEM (REG n))) is also valid if (REG n) does not get - a hard register. */ -static char spill_indirect_levels; - -/* Nonzero if indirect addressing is supported when the innermost MEM is - of the form (MEM (SYMBOL_REF sym)). It is assumed that the level to - which these are valid is the same as spill_indirect_levels, above. */ -char indirect_symref_ok; - -/* Nonzero if an address (plus (reg frame_pointer) (reg ...)) is valid. */ -char double_reg_address_ok; - /* Record the stack slot for each spilled hard register. */ static rtx spill_stack_slot[FIRST_PSEUDO_REGISTER]; -- cgit v1.1