diff options
author | Rafael Ávila de Espíndola <rafael.espindola@gmail.com> | 2006-10-23 19:47:58 +0000 |
---|---|---|
committer | Rafael Espindola <espindola@gcc.gnu.org> | 2006-10-23 19:47:58 +0000 |
commit | c79efc4d2a3f51f42e2b120c9536a262776f2840 (patch) | |
tree | db6d791ee7b718303aa5b8c1eacfff0daaa114c9 /gcc/config | |
parent | 1c2fc017ede084a3cd3e638f06525bc68c0a7ccc (diff) | |
download | gcc-c79efc4d2a3f51f42e2b120c9536a262776f2840.zip gcc-c79efc4d2a3f51f42e2b120c9536a262776f2840.tar.gz gcc-c79efc4d2a3f51f42e2b120c9536a262776f2840.tar.bz2 |
decl.c: Include langhooks.h.
* gcc/java/decl.c: Include langhooks.h.
(builtin_function): Remove.
(java_init_decl_processing): Replace calls to builtin_function
with add_builtin_function.
* gcc/java/Make-lang.in (jc1$(exeext)): Depend on and link with
attribs.o.
(java/decl.o): Depend on langhooks.h.
* gcc/java/java-tree.h (builtin_function): Remove.
* gcc/tree.c (local_define_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/objc/objc-act.c (synth_module_prologue): Replace calls to
builtin_function with add_builtin_function.
(build_next_objc_exception_stuff): Replace calls to
builtin_function with add_builtin_function.
(build_objc_exception_stuff): Replace calls to
builtin_function with add_builtin_function.
* gcc/objcp/objcp-decl.h (objcp_builtin_function): Remove.
* gcc/cp/decl.c (builtin_function_1): Move common code to
add_builtin_function.
(builtin_function): Rename to cxx_builtin_function.
Change the signature.
* gcc/cp/call.c: Include langhooks.h.
(build_java_interface_fn_ref): Replace calls to
builtin_function with add_builtin_function.
* gcc/cp/Make-lang.in (cp/call.o): Depend on langhooks.h.
* gcc/cp/cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
cxx_builtin_function.
* gcc/cp/cp-tree.h (builtin_function): Rename to cxx_builtin_function.
Change the signature.
* gcc/c-objc-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
c_builtin_function.
* gcc/c-tree.h (builtin_function): Rename to c_builtin_function. Change
the signature.
* gcc/ada/utils.c (builtin_function): Rename to gnat_builtin_function.
Move common code to add_builtin_function.
* gcc/ada/misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
gnat_builtin_function.
* gcc/ada/gigi.h (builtin_function): Rename to gnat_builtin_function.
Change the signature.
* gcc/c-decl.c (builtin_function): Rename to c_builtin_function. Move
common code to add_builtin_function.
* gcc/fortran/Make-lang.in (f951$(exeext)): Depend on and link with
attribs.o.
* gcc/fortran/trans.h (builtin_function): Rename to
gfc_builtin_function. Change the signature.
* gcc/fortran/f95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
gfc_builtin_function.
(builtin_function): Rename to gfc_builtin_function. Move common
code to builtin_function.
(gfc_define_builtin): Replace calls to builtin_function with
gfc_define_builtin.
* gcc/langhooks.c (add_builtin_function): New function.
(lhd_builtin_function): New function.
* gcc/langhooks.h (struct lang_hooks): Change the signature of
builtin_function.
(add_builtin_function): New function.
* gcc/treelang/treetree.c (builtin_function): Remove.
* gcc/tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Replace
calls to lang_hooks.builtin_function with add_builtin_function.
* gcc/c-common.c (decl_builtin_1): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/alpha/alpha.c (alpha_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/frv/frv.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/s390/s390.c (s390_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/sparc/sparc.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/i386/i386.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
(def_builtin): Replace calls to lang_hooks.builtin_function with
add_builtin_function.
* gcc/config/sh/sh.c (sh_media_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/c4x/c4x.c (c4x_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/stormy16/stormy16.c (xstormy16_init_builtins):
Replace calls to lang_hooks.builtin_function with
add_builtin_function.
* gcc/config/iq2000/iq2000.c (def_builtin):
Replace calls to lang_hooks.builtin_function with
add_builtin_function.
* gcc/config/ia64/ia64.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/rs6000/rs6000.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
(altivec_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/arm/arm.c (def_mbuiltin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
(arm_init_tls_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/mips/mips.c (mips_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/bfin/bfin.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/langhooks-def.h (lhd_builtin_function): New function.
(LANG_HOOKS_BUILTIN_FUNCTION): Define as lhd_builtin_function.
From-SVN: r117981
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/alpha/alpha.c | 24 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 10 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.c | 4 | ||||
-rw-r--r-- | gcc/config/c4x/c4x.c | 86 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 4 | ||||
-rw-r--r-- | gcc/config/iq2000/iq2000.c | 4 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 16 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 12 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 4 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 4 | ||||
-rw-r--r-- | gcc/config/stormy16/stormy16.c | 6 |
14 files changed, 93 insertions, 93 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 0b3da82..88fed92 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -6523,8 +6523,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) - lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD, - NULL, attrs[p->is_const]); + add_builtin_function (p->name, ftype, p->code, BUILT_IN_MD, + NULL, attrs[p->is_const]); ftype = build_function_type_list (dimode_integer_type_node, dimode_integer_type_node, NULL_TREE); @@ -6532,8 +6532,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) - lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD, - NULL, attrs[p->is_const]); + add_builtin_function (p->name, ftype, p->code, BUILT_IN_MD, + NULL, attrs[p->is_const]); ftype = build_function_type_list (dimode_integer_type_node, dimode_integer_type_node, @@ -6542,18 +6542,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) - lang_hooks.builtin_function (p->name, ftype, p->code, BUILT_IN_MD, - NULL, attrs[p->is_const]); + add_builtin_function (p->name, ftype, p->code, BUILT_IN_MD, + NULL, attrs[p->is_const]); ftype = build_function_type (ptr_type_node, void_list_node); - lang_hooks.builtin_function ("__builtin_thread_pointer", ftype, - ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD, - NULL, attrs[0]); + add_builtin_function ("__builtin_thread_pointer", ftype, + ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD, + NULL, attrs[0]); ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); - lang_hooks.builtin_function ("__builtin_set_thread_pointer", ftype, - ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, - NULL, attrs[0]); + add_builtin_function ("__builtin_set_thread_pointer", ftype, + ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, + NULL, attrs[0]); alpha_v8qi_u = build_vector_type (unsigned_intQI_type_node, 8); alpha_v8qi_s = build_vector_type (intQI_type_node, 8); diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index d6f11be..1d646c7 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12060,8 +12060,8 @@ arm_debugger_arg_offset (int value, rtx addr) do \ { \ if ((MASK) & insn_flags) \ - lang_hooks.builtin_function ((NAME), (TYPE), (CODE), \ - BUILT_IN_MD, NULL, NULL_TREE); \ + add_builtin_function ((NAME), (TYPE), (CODE), \ + BUILT_IN_MD, NULL, NULL_TREE); \ } \ while (0) @@ -12533,9 +12533,9 @@ arm_init_tls_builtins (void) tree const_nothrow = tree_cons (get_identifier ("const"), NULL, nothrow); ftype = build_function_type (ptr_type_node, void_list_node); - lang_hooks.builtin_function ("__builtin_thread_pointer", ftype, - ARM_BUILTIN_THREAD_POINTER, BUILT_IN_MD, - NULL, const_nothrow); + add_builtin_function ("__builtin_thread_pointer", ftype, + ARM_BUILTIN_THREAD_POINTER, BUILT_IN_MD, + NULL, const_nothrow); } static void diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index f7cf020..fd056a2 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -3915,8 +3915,8 @@ enum bfin_builtins #define def_builtin(NAME, TYPE, CODE) \ do { \ - lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ - NULL, NULL_TREE); \ + add_builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ + NULL, NULL_TREE); \ } while (0) /* Set up all builtin functions for this target. */ diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 3757523..6e831c7 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -4339,52 +4339,52 @@ c4x_init_builtins (void) { tree endlink = void_list_node; - 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); + add_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); + add_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) - 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); + add_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 { - 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); + add_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); + add_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); + add_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 82b7cbf..d7e0613 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -8148,7 +8148,7 @@ frv_reorg (void) } #define def_builtin(name, type, code) \ - lang_hooks.builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL) + add_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 d72120c..d3223a4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14536,8 +14536,8 @@ enum ix86_builtins do { \ if ((MASK) & target_flags \ && (!((MASK) & MASK_64BIT) || TARGET_64BIT)) \ - lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ - NULL, NULL_TREE); \ + add_builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ + NULL, NULL_TREE); \ } while (0) /* Bits for builtin_description.flag. */ diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 8a98b24..418f9a1 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -9114,8 +9114,8 @@ ia64_init_builtins (void) "__float128"); #define def_builtin(name, type, code) \ - lang_hooks.builtin_function ((name), (type), (code), BUILT_IN_MD, \ - NULL, NULL_TREE) + add_builtin_function ((name), (type), (code), BUILT_IN_MD, \ + NULL, NULL_TREE) def_builtin ("__builtin_ia64_bsp", build_function_type (ptr_type_node, void_list_node), diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 4b1cb3e..42b7c176 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -2436,8 +2436,8 @@ iq2000_output_conditional_branch (rtx insn, rtx * operands, int two_operands_p, } #define def_builtin(NAME, TYPE, CODE) \ - lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ - NULL, NULL_TREE) + add_builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ + NULL, NULL_TREE) static void iq2000_init_builtins (void) diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 05498c2..ea5ec26 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -10603,9 +10603,9 @@ mips_init_builtins (void) if (m->proc == PROCESSOR_MAX || (m->proc == mips_arch)) for (d = m->bdesc; d < &m->bdesc[m->size]; d++) if ((d->target_flags & target_flags) == d->target_flags) - lang_hooks.builtin_function (d->name, types[d->function_type], - d - m->bdesc + offset, - BUILT_IN_MD, NULL, NULL); + add_builtin_function (d->name, types[d->function_type], + d - m->bdesc + offset, + BUILT_IN_MD, NULL, NULL); offset += m->size; } } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d8d0db1..5d4b889 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6053,8 +6053,8 @@ def_builtin (int mask, const char *name, tree type, int code) abort (); rs6000_builtin_decls[code] = - lang_hooks.builtin_function (name, type, code, BUILT_IN_MD, - NULL, NULL_TREE); + add_builtin_function (name, type, code, BUILT_IN_MD, + NULL, NULL_TREE); } } @@ -8578,12 +8578,12 @@ altivec_init_builtins (void) /* Initialize target builtin that implements targetm.vectorize.builtin_mask_for_load. */ - decl = lang_hooks.builtin_function ("__builtin_altivec_mask_for_load", - v16qi_ftype_long_pcvoid, - ALTIVEC_BUILTIN_MASK_FOR_LOAD, - BUILT_IN_MD, NULL, - tree_cons (get_identifier ("const"), - NULL_TREE, NULL_TREE)); + decl = add_builtin_function ("__builtin_altivec_mask_for_load", + v16qi_ftype_long_pcvoid, + ALTIVEC_BUILTIN_MASK_FOR_LOAD, + BUILT_IN_MD, NULL, + tree_cons (get_identifier ("const"), + NULL_TREE, NULL_TREE)); /* Record the decl. Will be used by rs6000_builtin_mask_for_load. */ altivec_builtin_mask_for_load = decl; } diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index b6aeee1..3fd3638 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -8169,14 +8169,14 @@ s390_init_builtins (void) tree ftype; ftype = build_function_type (ptr_type_node, void_list_node); - lang_hooks.builtin_function ("__builtin_thread_pointer", ftype, - S390_BUILTIN_THREAD_POINTER, BUILT_IN_MD, - NULL, NULL_TREE); + add_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); - lang_hooks.builtin_function ("__builtin_set_thread_pointer", ftype, - S390_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, - NULL, NULL_TREE); + add_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 65b2daa1..30b8748 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -9476,8 +9476,8 @@ sh_media_init_builtins (void) if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES) shared[signature] = type; } - lang_hooks.builtin_function (d->name, type, d - bdesc, BUILT_IN_MD, - NULL, NULL_TREE); + add_builtin_function (d->name, type, d - bdesc, BUILT_IN_MD, + NULL, NULL_TREE); } } diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 692e46e..7ee5bcd 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -7868,8 +7868,8 @@ sparc_init_libfuncs (void) } #define def_builtin(NAME, CODE, TYPE) \ - lang_hooks.builtin_function((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, \ - NULL_TREE) + add_builtin_function((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, \ + NULL_TREE) /* Implement the TARGET_INIT_BUILTINS target hook. Create builtin functions for special SPARC instructions. */ diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 32513d2..04617f5 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -2334,9 +2334,9 @@ xstormy16_init_builtins (void) else args = tree_cons (NULL_TREE, arg, args); } - lang_hooks.builtin_function (s16builtins[i].name, - build_function_type (ret_type, args), - i, BUILT_IN_MD, NULL, NULL); + add_builtin_function (s16builtins[i].name, + build_function_type (ret_type, args), + i, BUILT_IN_MD, NULL, NULL); } } |