aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-07-17 20:35:04 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2004-07-17 20:35:04 +0100
commit6e34d3a39f0ce48e95a2853df4be8d01eb745850 (patch)
treeda217fba5f52589b72af2ded549bf9b898b28326 /gcc/config
parentac83f770155974ae069a59d73303eb7f4f19b827 (diff)
downloadgcc-6e34d3a39f0ce48e95a2853df4be8d01eb745850.zip
gcc-6e34d3a39f0ce48e95a2853df4be8d01eb745850.tar.gz
gcc-6e34d3a39f0ce48e95a2853df4be8d01eb745850.tar.bz2
langhooks.h (builtin_function): New langhook.
* langhooks.h (builtin_function): New langhook. * langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION): New. (LANG_HOOKS_INITIALIZER): Update. * tree.h (builtin_function): Remove. * doc/tm.texi: Update. * c-tree.h (builtin_function): Declare. * c-common.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/frv/frv.c, config/i386/i386.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/stormy16/stormy16.c: All callers of builtin_function changed. ada: * gigi.h (builtin_function): Declare. cp: * cp-tree.h (builtin_function): Declare. fortran: * trans.h (builtin_function): Declare. java: * java-tree.h (builtin_function): Declare. From-SVN: r84878
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.c24
-rw-r--r--gcc/config/arm/arm.c4
-rw-r--r--gcc/config/c4x/c4x.c76
-rw-r--r--gcc/config/frv/frv.c3
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/config/ia64/ia64.c5
-rw-r--r--gcc/config/iq2000/iq2000.c6
-rw-r--r--gcc/config/rs6000/rs6000.c10
-rw-r--r--gcc/config/s390/s390.c12
-rw-r--r--gcc/config/sh/sh.c4
-rw-r--r--gcc/config/stormy16/stormy16.c6
11 files changed, 90 insertions, 72 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index e10468b..102cbb1 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -6532,8 +6532,8 @@ alpha_init_builtins (void)
p = zero_arg_builtins;
for (i = 0; i < ARRAY_SIZE (zero_arg_builtins); ++i, ++p)
if ((target_flags & p->target_mask) == p->target_mask)
- builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
+ NULL, NULL_TREE);
ftype = build_function_type_list (long_integer_type_node,
long_integer_type_node, NULL_TREE);
@@ -6541,8 +6541,8 @@ alpha_init_builtins (void)
p = one_arg_builtins;
for (i = 0; i < ARRAY_SIZE (one_arg_builtins); ++i, ++p)
if ((target_flags & p->target_mask) == p->target_mask)
- builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
+ NULL, NULL_TREE);
ftype = build_function_type_list (long_integer_type_node,
long_integer_type_node,
@@ -6551,18 +6551,18 @@ alpha_init_builtins (void)
p = two_arg_builtins;
for (i = 0; i < ARRAY_SIZE (two_arg_builtins); ++i, ++p)
if ((target_flags & p->target_mask) == p->target_mask)
- builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD,
+ NULL, NULL_TREE);
ftype = build_function_type (ptr_type_node, void_list_node);
- builtin_function ("__builtin_thread_pointer", ftype,
- ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function ("__builtin_thread_pointer", ftype,
+ ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
+ NULL, NULL_TREE);
ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
- builtin_function ("__builtin_set_thread_pointer", ftype,
- ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function ("__builtin_set_thread_pointer", ftype,
+ ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
+ NULL, NULL_TREE);
}
/* Expand an expression EXP that calls a built-in function,
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 1de284e..f342a80 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -51,6 +51,7 @@
#include "target.h"
#include "target-def.h"
#include "debug.h"
+#include "langhooks.h"
/* Forward definitions of types. */
typedef struct minipool_node Mnode;
@@ -11591,7 +11592,8 @@ arm_debugger_arg_offset (int value, rtx addr)
do \
{ \
if ((MASK) & insn_flags) \
- builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, NULL_TREE); \
+ lang_hooks.builtin_function ((NAME), (TYPE), (CODE), \
+ BUILT_IN_MD, NULL, NULL_TREE); \
} \
while (0)
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 4e6dd8f..4011a51 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
+#include "langhooks.h"
rtx smulhi3_libfunc;
rtx umulhi3_libfunc;
@@ -4767,41 +4768,52 @@ c4x_init_builtins (void)
{
tree endlink = void_list_node;
- builtin_function ("fast_ftoi",
- build_function_type
- (integer_type_node,
- tree_cons (NULL_TREE, double_type_node, endlink)),
- C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE);
- builtin_function ("ansi_ftoi",
- build_function_type
- (integer_type_node,
- tree_cons (NULL_TREE, double_type_node, endlink)),
- C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL, NULL_TREE);
+ lang_hooks.builtin_function ("fast_ftoi",
+ build_function_type
+ (integer_type_node,
+ tree_cons (NULL_TREE, double_type_node,
+ endlink)),
+ C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE);
+ lang_hooks.builtin_function ("ansi_ftoi",
+ build_function_type
+ (integer_type_node,
+ tree_cons (NULL_TREE, double_type_node,
+ endlink)),
+ C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL,
+ NULL_TREE);
if (TARGET_C3X)
- builtin_function ("fast_imult",
- build_function_type
- (integer_type_node,
- tree_cons (NULL_TREE, integer_type_node,
- tree_cons (NULL_TREE,
- integer_type_node, endlink))),
- C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL, NULL_TREE);
+ lang_hooks.builtin_function ("fast_imult",
+ build_function_type
+ (integer_type_node,
+ tree_cons (NULL_TREE, integer_type_node,
+ tree_cons (NULL_TREE,
+ integer_type_node,
+ endlink))),
+ C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL,
+ NULL_TREE);
else
{
- builtin_function ("toieee",
- build_function_type
- (double_type_node,
- tree_cons (NULL_TREE, double_type_node, endlink)),
- C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL, NULL_TREE);
- builtin_function ("frieee",
- build_function_type
- (double_type_node,
- tree_cons (NULL_TREE, double_type_node, endlink)),
- C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL, NULL_TREE);
- builtin_function ("fast_invf",
- build_function_type
- (double_type_node,
- tree_cons (NULL_TREE, double_type_node, endlink)),
- C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL, NULL_TREE);
+ lang_hooks.builtin_function ("toieee",
+ build_function_type
+ (double_type_node,
+ tree_cons (NULL_TREE, double_type_node,
+ endlink)),
+ C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL,
+ NULL_TREE);
+ lang_hooks.builtin_function ("frieee",
+ build_function_type
+ (double_type_node,
+ tree_cons (NULL_TREE, double_type_node,
+ endlink)),
+ C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL,
+ NULL_TREE);
+ lang_hooks.builtin_function ("fast_invf",
+ build_function_type
+ (double_type_node,
+ tree_cons (NULL_TREE, double_type_node,
+ endlink)),
+ C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL,
+ NULL_TREE);
}
}
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 5e4a12f..d935540 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */
#include "target-def.h"
#include "targhooks.h"
#include "integrate.h"
+#include "langhooks.h"
#ifndef FRV_INLINE
#define FRV_INLINE inline
@@ -8888,7 +8889,7 @@ frv_pack_insns (void)
#define def_builtin(name, type, code) \
- builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL)
+ lang_hooks.builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL)
struct builtin_description
{
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 02af192..b8aa661 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -12665,12 +12665,12 @@ x86_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
#endif
}
-#define def_builtin(MASK, NAME, TYPE, CODE) \
-do { \
- if ((MASK) & target_flags \
- && (!((MASK) & MASK_64BIT) || TARGET_64BIT)) \
- builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
- NULL, NULL_TREE); \
+#define def_builtin(MASK, NAME, TYPE, CODE) \
+do { \
+ if ((MASK) & target_flags \
+ && (!((MASK) & MASK_64BIT) || TARGET_64BIT)) \
+ lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
+ NULL, NULL_TREE); \
} while (0)
struct builtin_description
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 85ac56b..bee9720 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -8184,8 +8184,9 @@ ia64_init_builtins (void)
(*lang_hooks.types.register_builtin_type) (long_double_type_node,
"__float128");
-#define def_builtin(name, type, code) \
- builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL_TREE)
+#define def_builtin(name, type, code) \
+ lang_hooks.builtin_function ((name), (type), (code), BUILT_IN_MD, \
+ NULL, NULL_TREE)
def_builtin ("__sync_val_compare_and_swap_si", si_ftype_psi_si_si,
IA64_BUILTIN_VAL_COMPARE_AND_SWAP_SI);
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 0e2f7c1..b2156d6 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -45,6 +45,7 @@ Boston, MA 02111-1307, USA. */
#include "debug.h"
#include "target.h"
#include "target-def.h"
+#include "langhooks.h"
/* Enumeration for all of the relational tests, so that we can build
arrays indexed by the test type, and not worry about the order
@@ -2690,8 +2691,9 @@ iq2000_output_conditional_branch (rtx insn, rtx * operands, int two_operands_p,
return 0;
}
-#define def_builtin(NAME, TYPE, CODE) \
- builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, NULL_TREE)
+#define def_builtin(NAME, TYPE, CODE) \
+ lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
+ NULL, NULL_TREE)
static void
iq2000_init_builtins (void)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b6ee831..e81e1b3 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5618,11 +5618,11 @@ rs6000_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
/* Builtins. */
-#define def_builtin(MASK, NAME, TYPE, CODE) \
-do { \
- if ((MASK) & target_flags) \
- builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
- NULL, NULL_TREE); \
+#define def_builtin(MASK, NAME, TYPE, CODE) \
+do { \
+ if ((MASK) & target_flags) \
+ lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
+ NULL, NULL_TREE); \
} while (0)
/* Simple ternary operations: VECd = foo (VECa, VECb, VECc). */
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index cde728a..9de0350 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -6802,14 +6802,14 @@ s390_init_builtins (void)
tree ftype;
ftype = build_function_type (ptr_type_node, void_list_node);
- builtin_function ("__builtin_thread_pointer", ftype,
- S390_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function ("__builtin_thread_pointer", ftype,
+ S390_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
+ NULL, NULL_TREE);
ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
- builtin_function ("__builtin_set_thread_pointer", ftype,
- S390_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function ("__builtin_set_thread_pointer", ftype,
+ S390_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD,
+ NULL, NULL_TREE);
}
/* Expand an expression EXP that calls a built-in function,
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 7f99cab..d8e3e61 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -9291,8 +9291,8 @@ sh_media_init_builtins (void)
if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES)
shared[signature] = type;
}
- builtin_function (d->name, type, d - bdesc, BUILT_IN_MD,
- NULL, NULL_TREE);
+ lang_hooks.builtin_function (d->name, type, d - bdesc, BUILT_IN_MD,
+ NULL, NULL_TREE);
}
}
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 7f2a2fe..a5ee896 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -2109,9 +2109,9 @@ xstormy16_init_builtins (void)
else
args = tree_cons (NULL_TREE, arg, args);
}
- builtin_function (s16builtins[i].name,
- build_function_type (ret_type, args),
- i, BUILT_IN_MD, NULL, NULL);
+ lang_hooks.builtin_function (s16builtins[i].name,
+ build_function_type (ret_type, args),
+ i, BUILT_IN_MD, NULL, NULL);
}
}