From 939dcd0d38af0571a15f1bcff788d593ed33d5eb Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 12 Jul 2010 18:53:08 +0000 Subject: 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 --- gcc/reginfo.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'gcc/reginfo.c') diff --git a/gcc/reginfo.c b/gcc/reginfo.c index a9d29c8..87bc630 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -59,6 +59,11 @@ along with GCC; see the file COPYING3. If not see int max_regno; +struct target_regs default_target_regs; +#if SWITCHABLE_TARGET +struct target_regs *this_target_regs = &default_target_regs; +#endif + /* Register tables used by many passes. */ /* Indexed by hard register number, contains 1 for registers @@ -175,12 +180,6 @@ const char * reg_names[] = REGISTER_NAMES; /* Array containing all of the register class names. */ const char * reg_class_names[] = REG_CLASS_NAMES; -/* For each hard register, the widest mode object that it can contain. - This will be a MODE_INT mode if the register can hold integers. Otherwise - it will be a MODE_FLOAT or a MODE_CC mode, whichever is valid for the - register. */ -enum machine_mode reg_raw_mode[FIRST_PSEUDO_REGISTER]; - /* 1 if there is a register of given mode. */ bool have_regs_of_mode [MAX_MACHINE_MODE]; @@ -209,9 +208,6 @@ static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE]; reginfo has been initialized. */ static int no_global_reg_vars = 0; -/* Specify number of hard registers given machine mode occupy. */ -unsigned char hard_regno_nregs[FIRST_PSEUDO_REGISTER][MAX_MACHINE_MODE]; - /* Given a register bitmap, turn on the bits in a HARD_REG_SET that correspond to the hard registers, if any, set in that map. This could be done far more efficiently by having all sorts of special-cases -- cgit v1.1