summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-12 18:53:59 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-12 18:53:59 +0000
commit5f00384a2df620694cde858c379b6fa5060f3692 (patch)
tree81833811781814bd7dc33b609cd55e47bc56fc7e /gcc/reload1.c
parenteb2c25b54b230c5efbaf84075ed139a8c5508883 (diff)
downloadgcc-5f00384a2df620694cde858c379b6fa5060f3692.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162093 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 48191a2a00f..437b8c2f286 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];