diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/expr.c | 12 | ||||
-rw-r--r-- | gcc/regs.h | 15 |
3 files changed, 23 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 833cfea39c0..d5864aa8567 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2010-07-12 Richard Sandiford <rdsandiford@googlemail.com> + * regs.h (target_regs): Add x_direct_load, x_direct_store and + x_float_extend_from_mem. + (direct_load, direct_store, float_extend_from_mem): New macros. + * expr.c (direct_load, direct_store, float_extend_from_mem): Delete. + +2010-07-12 Richard Sandiford <rdsandiford@googlemail.com> + * Makefile.in (LIBFUNCS_H): Add $(HASHTAB_H). (target-globals.o): Depend on $(LIBFUNCS_H). * libfuncs.h: Include hashtab.h. diff --git a/gcc/expr.c b/gcc/expr.c index 00ebfdc6429..7788461a961 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "diagnostic.h" #include "ssaexpand.h" +#include "target-globals.h" /* Decide whether a function's arguments should be processed from first to last or from last to first. @@ -158,17 +159,6 @@ static void do_tablejump (rtx, enum machine_mode, rtx, rtx, rtx); static rtx const_vector_from_tree (tree); static void write_complex_part (rtx, rtx, bool); -/* Record for each mode whether we can move a register directly to or - from an object of that mode in memory. If we can't, we won't try - to use that mode directly when accessing a field of that mode. */ - -static char direct_load[NUM_MACHINE_MODES]; -static char direct_store[NUM_MACHINE_MODES]; - -/* Record for each mode whether we can float-extend from memory. */ - -static bool float_extend_from_mem[NUM_MACHINE_MODES][NUM_MACHINE_MODES]; - /* This macro is used to determine whether move_by_pieces should be called to perform a structure copy. */ #ifndef MOVE_BY_PIECES_P diff --git a/gcc/regs.h b/gcc/regs.h index ac23ae62fc9..9e8ea814570 100644 --- a/gcc/regs.h +++ b/gcc/regs.h @@ -280,6 +280,15 @@ struct target_regs { /* Keep track of the last mode we initialized move costs for. */ int x_last_mode_for_init_move_cost; + + /* Record for each mode whether we can move a register directly to or + from an object of that mode in memory. If we can't, we won't try + to use that mode directly when accessing a field of that mode. */ + char x_direct_load[NUM_MACHINE_MODES]; + char x_direct_store[NUM_MACHINE_MODES]; + + /* Record for each mode whether we can float-extend from memory. */ + bool x_float_extend_from_mem[NUM_MACHINE_MODES][NUM_MACHINE_MODES]; }; extern struct target_regs default_target_regs; @@ -303,6 +312,12 @@ extern struct target_regs *this_target_regs; (this_target_regs->x_may_move_in_cost) #define may_move_out_cost \ (this_target_regs->x_may_move_out_cost) +#define direct_load \ + (this_target_regs->x_direct_load) +#define direct_store \ + (this_target_regs->x_direct_store) +#define float_extend_from_mem \ + (this_target_regs->x_float_extend_from_mem) /* Return an exclusive upper bound on the registers occupied by hard register (reg:MODE REGNO). */ |