aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-07-12 18:54:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2010-07-12 18:54:35 +0000
commit4bcbfa039316bc3e3f9c43ec1230971935e17290 (patch)
treec920ed4d7946023638d154dfa81c2b963b87076a /gcc/optabs.c
parentb6609375319133de3e9a46d3477369482b92f9fa (diff)
downloadgcc-4bcbfa039316bc3e3f9c43ec1230971935e17290.zip
gcc-4bcbfa039316bc3e3f9c43ec1230971935e17290.tar.gz
gcc-4bcbfa039316bc3e3f9c43ec1230971935e17290.tar.bz2
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
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c21
1 files changed, 4 insertions, 17 deletions
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];