aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-07-12 19:03:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2010-07-12 19:03:35 +0000
commitfa19795ec4394113e1d79f4660d97b2da23cfaca (patch)
tree62ef72086ece76b905d83fddffb7913f0ad12b2e /gcc/builtins.c
parentc371bb73807c48f1a708c51f113caea45f0347b1 (diff)
downloadgcc-fa19795ec4394113e1d79f4660d97b2da23cfaca.zip
gcc-fa19795ec4394113e1d79f4660d97b2da23cfaca.tar.gz
gcc-fa19795ec4394113e1d79f4660d97b2da23cfaca.tar.bz2
Makefile.in (target-globals.o): Depend on builtins.h.
gcc/ * Makefile.in (target-globals.o): Depend on builtins.h. * builtins.h: New file. * builtins.c: Include builtins.h. (default_target_builtins): New variable. (this_target_builtins): New conditional variable. (apply_args_mode, apply_result_mode): Redefine as macros. * target-globals.h (this_target_builtins): Declare. (target_globals): Add a builtins field. (restore_target_globals): Copy the builtins field to this_target_builtins. * target-globals.c: Include builtins.h. (default_target_globals): Initialize the builtins field. (save_target_globals): Likewise. From-SVN: r162105
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 8039f9b..73a70f2 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-flow.h"
#include "value-prof.h"
#include "diagnostic-core.h"
+#include "builtins.h"
#ifndef SLOW_UNALIGNED_ACCESS
#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) STRICT_ALIGNMENT
@@ -60,6 +61,11 @@ along with GCC; see the file COPYING3. If not see
#endif
static tree do_mpc_arg1 (tree, tree, int (*)(mpc_ptr, mpc_srcptr, mpc_rnd_t));
+struct target_builtins default_target_builtins;
+#if SWITCHABLE_TARGET
+struct target_builtins *this_target_builtins = &default_target_builtins;
+#endif
+
/* Define the names of the builtin function types and codes. */
const char *const built_in_class_names[4]
= {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"};
@@ -1249,19 +1255,10 @@ get_memory_rtx (tree exp, tree len)
/* Built-in functions to perform an untyped call and return. */
-/* For each register that may be used for calling a function, this
- gives a mode used to copy the register's value. VOIDmode indicates
- the register is not used for calling a function. If the machine
- has register windows, this gives only the outbound registers.
- INCOMING_REGNO gives the corresponding inbound register. */
-static enum machine_mode apply_args_mode[FIRST_PSEUDO_REGISTER];
-
-/* For each register that may be used for returning values, this gives
- a mode used to copy the register's value. VOIDmode indicates the
- register is not used for returning values. If the machine has
- register windows, this gives only the outbound registers.
- INCOMING_REGNO gives the corresponding inbound register. */
-static enum machine_mode apply_result_mode[FIRST_PSEUDO_REGISTER];
+#define apply_args_mode \
+ (this_target_builtins->x_apply_args_mode)
+#define apply_result_mode \
+ (this_target_builtins->x_apply_result_mode)
/* Return the size required for the block returned by __builtin_apply_args,
and initialize apply_args_mode. */