langhooks.h (builtin_function): New langhook.
authorJoseph Myers <jsm@polyomino.org.uk>
Sat, 17 Jul 2004 19:35:04 +0000 (20:35 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 17 Jul 2004 19:35:04 +0000 (20:35 +0100)
* 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

26 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gigi.h
gcc/c-common.c
gcc/c-tree.h
gcc/config/alpha/alpha.c
gcc/config/arm/arm.c
gcc/config/c4x/c4x.c
gcc/config/frv/frv.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/config/iq2000/iq2000.c
gcc/config/rs6000/rs6000.c
gcc/config/s390/s390.c
gcc/config/sh/sh.c
gcc/config/stormy16/stormy16.c
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/doc/tm.texi
gcc/fortran/ChangeLog
gcc/fortran/trans.h
gcc/java/ChangeLog
gcc/java/java-tree.h
gcc/langhooks-def.h
gcc/langhooks.h
gcc/tree.h

index f90423bd73aa0f109274a00aca5da24cd710e556..f71c9050dc3720b2ce98987037a78ec23fcc33c2 100644 (file)
@@ -1,3 +1,18 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * 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.
+
 2004-07-17  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR target/16556
index 5b5a0e9eade41e884594f241e10d6c0d76f2309b..5af5ee3142012e4bd438dc4d8397328bdac41060 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * gigi.h (builtin_function): Declare.
+
 2004-07-15  Robert Dewar  <dewar@gnat.com>
 
        * makegpr.adb, s-secsta.ads, sem_ch3.adb, sem_case.adb: Minor
index e63334189ad265ea16c1a23fec938ea12f36e065..78a2f2b6f7322764bb853abdaf03118473bb0610 100644 (file)
@@ -693,6 +693,10 @@ extern tree fill_vms_descriptor (tree, Entity_Id);
    should not be allocated in a register.  Return true if successful.  */
 extern bool gnat_mark_addressable (tree);
 
+/* Implementation of the builtin_function langhook.  */
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
+
 /* This function is called by the front end to enumerate all the supported
    modes for the machine.  We pass a function which is called back with
    the following integer parameters:
index e177d884b2bbbdc5db28133879102cd110eb906a..cc743cc9da82d1a3951f66d51a4e022eadf2cce7 100644 (file)
@@ -3106,7 +3106,8 @@ c_common_nodes_and_builtins (void)
        abort ();                                                       \
                                                                        \
       if (!BOTH_P)                                                     \
-       decl = builtin_function (NAME, builtin_types[TYPE], ENUM,       \
+       decl = lang_hooks.builtin_function (NAME, builtin_types[TYPE],  \
+                                ENUM,                                  \
                                 CLASS,                                 \
                                 (FALLBACK_P                            \
                                  ? (NAME + strlen ("__builtin_"))      \
@@ -3214,12 +3215,14 @@ builtin_function_2 (const char *builtin_name, const char *name,
   tree decl = NULL_TREE;
 
   if (builtin_name != 0)
-    bdecl = builtin_function (builtin_name, builtin_type, function_code,
-                             class, library_name_p ? name : NULL, attrs);
+    bdecl = lang_hooks.builtin_function (builtin_name, builtin_type,
+                                        function_code, class,
+                                        library_name_p ? name : NULL, attrs);
 
   if (name != 0 && !flag_no_builtin && !builtin_function_disabled_p (name)
       && !(nonansi_p && flag_no_nonansi_builtin))
-    decl = builtin_function (name, type, function_code, class, NULL, attrs);
+    decl = lang_hooks.builtin_function (name, type, function_code, class,
+                                       NULL, attrs);
 
   return (bdecl != 0 ? bdecl : decl);
 }
index 5eb2e81e4795fb80e5641e4d20f72dc7fd2e7283..7cb69baf41558c93cdae96d1337d44d9bb6d0ac2 100644 (file)
@@ -180,6 +180,8 @@ extern void c_pop_function_context (struct function *);
 extern void push_parm_decl (tree);
 extern tree pushdecl_top_level (tree);
 extern tree set_array_declarator_type (tree, tree, int);
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
 extern void shadow_tag (tree);
 extern void shadow_tag_warned (tree, int);
 extern tree start_enum (tree);
index e10468b8eaf8f23e219c4e13e88c0f1f3d7d8455..102cbb1b2b9b5a92ce807858cd0fb1e97d1e4340 100644 (file)
@@ -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,
index 1de284e1d621c598d91f7da9ba866a826836da62..f342a802453492470d6cdb0410948591bdf6423b 100644 (file)
@@ -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)
 
index 4e6dd8f5484e12ca4d9f7ea151ff216266798203..4011a51591aed718fe2c822966affc111a6ae24e 100644 (file)
@@ -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);
     }
 }
 
index 5e4a12f5c4a3aa5967aeb9aa60f7c6ef450dd02e..d9355408110253022b6010b483256b21bed3205b 100644 (file)
@@ -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)
 
 \f
 #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
 {
index 02af192d01064a5080d0675a6bbb963ebae5ba13..b8aa661fdafadbd2a155f3d04f88a7306cf9012d 100644 (file)
@@ -12665,12 +12665,12 @@ x86_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
 #endif
 }
 \f
-#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
index 85ac56b1d7f7ca3f6fb33cd5d05a9a428ab94216..bee9720d443b84f287ad175359bd4c15b8a37145 100644 (file)
@@ -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);
index 0e2f7c146f6360632afed4c3acff28db7f074fb7..b2156d678a6655ab6643c709bcb698aa7d041a95 100644 (file)
@@ -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)
index b6ee8313b14a3586b169c87e4991cdecf8707292..e81e1b379009c535fda4019bc4a96a34007df71b 100644 (file)
@@ -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).  */
index cde728a4a3aabeba8f4222c7c85950905d619eb9..9de035051e2cea8e0419dcffa9da35175b5b6566 100644 (file)
@@ -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,
index 7f99cab4ab6faf855c01dfb838a55a723ec05c2e..d8e3e610f959889175ce081a2300e8b9865c9503 100644 (file)
@@ -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);
     }
 }
 
index 7f2a2feb7fe80dd3060d31de912e26559b278784..a5ee896ee56b94d7156f029bf0edf0d44753e0a9 100644 (file)
@@ -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);
     }
 }
 
index a67bfc37713892a20caf0e444c2e0aa2bb082451..1e0bec12ccbf61ae95d2083c421eb21027392f8a 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * cp-tree.h (builtin_function): Declare.
+
 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
 
        * class.c (finish_struct_methods): Remove unncessary code.
index a7d35d46ecd0a6a4f0b24b401e92d13bbb75ba3c..7ed1d5f0de4b2a31a4b93fc26ecfffde64366365 100644 (file)
@@ -3763,6 +3763,8 @@ extern tree declare_global_var                  (tree, tree);
 extern void register_dtor_fn                    (tree);
 extern tmpl_spec_kind current_tmpl_spec_kind    (int);
 extern tree cp_fname_init                      (const char *, tree *);
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
 extern tree check_elaborated_type_specifier     (enum tag_types, tree, bool);
 extern void warn_extern_redeclared_static (tree, tree);
 extern bool cp_missing_noreturn_ok_p           (tree);
index 30c58d6511e7747118523c6210cf407a59c56bb4..ca5c995528727c0f68e5aaa78044b5989b083bfc 100644 (file)
@@ -9110,7 +9110,8 @@ instructions that would otherwise not normally be generated because
 they have no equivalent in the source language (for example, SIMD vector
 instructions or prefetch instructions).
 
-To create a built-in function, call the function @code{builtin_function}
+To create a built-in function, call the function
+@code{lang_hooks.builtin_function}
 which is defined by the language front end.  You can use any type nodes set
 up by @code{build_common_tree_nodes} and @code{build_common_tree_nodes_2};
 only language front ends that use those two functions will call
index 925b45c45d4a29f01bf6b8fd93428db9dd156e7b..819d7357feabe43913556d2a80045d58a1372af0 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * trans.h (builtin_function): Declare.
+
 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/16404
index fe8db4e370d91b247282391a2c71b58049d088b2..9d6473486c28ff2b5f1fd0f647fb524412d45ff4 100644 (file)
@@ -427,6 +427,8 @@ void pushlevel (int);
 tree poplevel (int, int, int);
 tree getdecls (void);
 tree gfc_truthvalue_conversion (tree);
+tree builtin_function (const char *, tree, int, enum built_in_class,
+                      const char *, tree);
 
 /* Runtime library function decls.  */
 extern GTY(()) tree gfor_fndecl_internal_malloc;
index 5cd390e2dfc469709d8c2d4a00ca67fcd9ed066e..f06412333cb22b16034d126ed740fcc1c46fb511 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * java-tree.h (builtin_function): Declare.
+
 2004-07-16  Steven Bosscher  <stevenb@suse.de>
 
        * parse.y (java_complete_expand_methods, java_expand_classes): Don't
index 89599764c891c37878c15bbf36708bb1774fc9c1..5f33ec5a54d9a2e30356612be44cac7dfc20ee34 100644 (file)
@@ -1355,6 +1355,8 @@ extern void gen_indirect_dispatch_tables (tree type);
 extern int split_qualified_name (tree *left, tree *right, tree source);
 extern int in_same_package (tree, tree);
 
+extern tree builtin_function (const char *, tree, int, enum built_in_class,
+                             const char *, tree);
 
 #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
 
index ae8dcd2ef95f21c4e08c99866da9f22ddd8b42e1..1f7f32c6b76501f778d957fb895e40581f49ff84 100644 (file)
@@ -126,6 +126,7 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *);
 #define LANG_HOOKS_EXPR_SIZE           lhd_expr_size
 #define LANG_HOOKS_TREE_SIZE           lhd_tree_size
 #define LANG_HOOKS_TYPES_COMPATIBLE_P  lhd_types_compatible_p
+#define LANG_HOOKS_BUILTIN_FUNCTION    builtin_function
 
 #define LANG_HOOKS_FUNCTION_INIT       lhd_do_nothing_f
 #define LANG_HOOKS_FUNCTION_FINAL      lhd_do_nothing_f
@@ -301,6 +302,7 @@ extern tree lhd_make_node (enum tree_code);
   LANG_HOOKS_FOR_TYPES_INITIALIZER, \
   LANG_HOOKS_GIMPLIFY_EXPR, \
   LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
+  LANG_HOOKS_BUILTIN_FUNCTION, \
 }
 
 #endif /* GCC_LANG_HOOKS_DEF_H */
index 345e89c5047e10f1f7fa0e24b1ae79840bf23b12..349c450a0cd11a72172867117f7ced1843e35812 100644 (file)
@@ -407,6 +407,18 @@ struct lang_hooks
      KNOWN_TYPE carries the true type of the OBJ_TYPE_REF_OBJECT.  */
   tree (*fold_obj_type_ref) (tree, tree);
 
+  /* Return a definition for a builtin function named NAME and whose data type
+     is TYPE.  TYPE should be a function type with argument types.
+     FUNCTION_CODE tells later passes how to compile calls to this function.
+     See tree.h for its possible values.
+
+     If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
+     the name to be called if we can't opencode the function.  If
+     ATTRS is nonzero, use that for the function's attribute list.  */
+  tree (*builtin_function) (const char *name, tree type, int function_code,
+                           enum built_in_class class,
+                           const char *library_name, tree attrs);
+
   /* Whenever you add entries here, make sure you adjust langhooks-def.h
      and langhooks.c accordingly.  */
 };
index 0c308686b61dbc217b799b9f5951441917b815b7..31e117312fa8e2d6b71971dafa66ab00e3fa556f 100644 (file)
@@ -3306,11 +3306,6 @@ extern GTY(()) tree current_function_func_begin_label;
    chain of FILE_DECLs; currently only C uses it.  */
 
 extern GTY(()) tree current_file_decl;
-
-/* Declare a predefined function.  Return the declaration.  This function is
-   provided by each language frontend.  */
-extern tree builtin_function (const char *, tree, int, enum built_in_class,
-                             const char *, tree);
 \f
 /* In tree.c */
 extern unsigned crc32_string (unsigned, const char *);