From 4bcbfa039316bc3e3f9c43ec1230971935e17290 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 12 Jul 2010 18:54:35 +0000 Subject: Makefile.in (target-globals.o): Depend on $(EXPR_H) and $(OPTABS_H). gcc/ * Makefile.in (target-globals.o): Depend on $(EXPR_H) and $(OPTABS_H). * optabs.h (target_optabs): New structure. (default_target_optabs): Declare. (this_target_optabs): Declare as a variable or define as a macro. (optab_table, convert_optab_table, direct_optab_table): Redefine as macros. * optabs.c (default_target_optabs): New variable. (this_target_optabs): New conditional variable. (optab_table, convert_optab_table, direct_optab_table): Delete. * target-globals.h (this_target_optabs): Declare. (target_globals): Add a optabs field. (restore_target_globals): Copy the optabs field to this_target_optabs. * target-globals.c: Include expr.h and optabs.h. (default_target_globals): Initialize the optabs field. (save_target_globals): Likewise. From-SVN: r162097 --- gcc/optabs.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'gcc/optabs.c') diff --git a/gcc/optabs.c b/gcc/optabs.c index 782c449..e9487d0 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -45,26 +45,13 @@ along with GCC; see the file COPYING3. If not see #include "basic-block.h" #include "target.h" -/* Each optab contains info on how this target machine - can perform a particular operation - for all sizes and kinds of operands. - - The operation to be performed is often specified - by passing one of these optabs as an argument. - - See expr.h for documentation of these optabs. */ - -struct optab_d optab_table[OTI_MAX]; +struct target_optabs default_target_optabs; +#if SWITCHABLE_TARGET +struct target_optabs *this_target_optabs = &default_target_optabs; +#endif rtx libfunc_table[LTI_MAX]; -/* Tables of patterns for converting one mode to another. */ -struct convert_optab_d convert_optab_table[COI_MAX]; - -/* Tables of patterns for direct optabs (i.e. those which cannot be - implemented using a libcall). */ -struct direct_optab_d direct_optab_table[(int) DOI_MAX]; - /* Contains the optab used for each rtx code. */ optab code_to_optab[NUM_RTX_CODE + 1]; -- cgit v1.1