aboutsummaryrefslogtreecommitdiff
path: root/gcc/target-globals.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-07-12 18:53:17 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2010-07-12 18:53:17 +0000
commit5fb0e246f4d16dd1f341cc34ded11eb4813fe50d (patch)
treecafe482a7a09e052682a76fb7e607508ee8298a3 /gcc/target-globals.c
parent939dcd0d38af0571a15f1bcff788d593ed33d5eb (diff)
downloadgcc-5fb0e246f4d16dd1f341cc34ded11eb4813fe50d.zip
gcc-5fb0e246f4d16dd1f341cc34ded11eb4813fe50d.tar.gz
gcc-5fb0e246f4d16dd1f341cc34ded11eb4813fe50d.tar.bz2
Makefile.in (target-globals.o): Depend on $(RTL_H).
gcc/ * Makefile.in (target-globals.o): Depend on $(RTL_H). * rtl.h: (target_rtl): New structure. (default_target_rtl): Declare. (this_target_rtl): Declare as a variable or define as a macro. (global_rtl, pic_offset_table_rtx, return_address_pointer_rtx): Redefine as macros. * emit-rtl.c (default_target_rtl): New variable. (this_target_rtl): New conditional variable. (global_rtl, static_regno_reg_rtx, pic_offset_table_rtx) (return_address_pointer_rtx): Delete. (initial_regno_reg_rtx): New macro. (init_emit): Use initial_regno_reg_rtx instead of static_regno_reg_rtx. (init_emit_regs): Likewise. * target-globals.h (this_target_rtl): Declare. (target_globals): Add a rtl field. (restore_target_globals): Copy the rtl field to this_target_rtl. * target-globals.c: Include rtl.h. (default_target_globals): Initialize the rtl field. (save_target_globals): Likewise. From-SVN: r162088
Diffstat (limited to 'gcc/target-globals.c')
-rw-r--r--gcc/target-globals.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/target-globals.c b/gcc/target-globals.c
index 3a7f2d4..26b2fa3 100644
--- a/gcc/target-globals.c
+++ b/gcc/target-globals.c
@@ -28,11 +28,13 @@ along with GCC; see the file COPYING3. If not see
#include "target-globals.h"
#include "flags.h"
#include "regs.h"
+#include "rtl.h"
#if SWITCHABLE_TARGET
struct target_globals default_target_globals = {
&default_target_flag_state,
- &default_target_regs
+ &default_target_regs,
+ &default_target_rtl
};
struct target_globals *
@@ -43,6 +45,7 @@ save_target_globals (void)
g = ggc_alloc_target_globals ();
g->flag_state = XCNEW (struct target_flag_state);
g->regs = XCNEW (struct target_regs);
+ g->rtl = ggc_alloc_cleared_target_rtl ();
restore_target_globals (g);
target_reinit ();
return g;