aboutsummaryrefslogtreecommitdiff
path: root/gcc/target-globals.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-07-12 18:53:08 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2010-07-12 18:53:08 +0000
commit939dcd0d38af0571a15f1bcff788d593ed33d5eb (patch)
treed708b56be81952da9c5f1952199355f972230b0e /gcc/target-globals.c
parent3bd36029de1b586b49b3b021385b275ba5427611 (diff)
downloadgcc-939dcd0d38af0571a15f1bcff788d593ed33d5eb.zip
gcc-939dcd0d38af0571a15f1bcff788d593ed33d5eb.tar.gz
gcc-939dcd0d38af0571a15f1bcff788d593ed33d5eb.tar.bz2
Makefile.in (target-globals.o): Depend on $(REGS_H).
gcc/ * Makefile.in (target-globals.o): Depend on $(REGS_H). * regs.h (target_reg_modes): New structure. (default_target_reg_modes): Declare. (this_target_reg_modes): Declare as a variable or define as a macro. (hard_regno_nregs, reg_raw_mode): Redefine as macros. * reginfo.c (default_target_reg_modes): New variable. (this_target_reg_modes): New conditional variable. (hard_regno_nregs, reg_raw_mode): Delete. * target-globals.h (this_target_regs): Declare. (target_globals): Add a regs field. (restore_target_globals): Copy the regs field to this_target_regs. * target-globals.c: Include regs.h. (default_target_globals): Initialize the regs field. (save_target_globals): Likewise. From-SVN: r162087
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 ecbc76b..3a7f2d4 100644
--- a/gcc/target-globals.c
+++ b/gcc/target-globals.c
@@ -27,10 +27,12 @@ along with GCC; see the file COPYING3. If not see
#include "toplev.h"
#include "target-globals.h"
#include "flags.h"
+#include "regs.h"
#if SWITCHABLE_TARGET
struct target_globals default_target_globals = {
- &default_target_flag_state
+ &default_target_flag_state,
+ &default_target_regs
};
struct target_globals *
@@ -40,6 +42,7 @@ save_target_globals (void)
g = ggc_alloc_target_globals ();
g->flag_state = XCNEW (struct target_flag_state);
+ g->regs = XCNEW (struct target_regs);
restore_target_globals (g);
target_reinit ();
return g;