summaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-07-01 23:07:19 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2002-07-01 23:07:19 +0000
commit6a2dd09a650e117e1590752c2f0bba82bdb43b20 (patch)
tree07ad9c28c137e09be00ed739a192154beed604d3 /gcc/java/decl.c
parenteebd288ac720138a113ebc3c7d5f41651701472d (diff)
downloadgcc-6a2dd09a650e117e1590752c2f0bba82bdb43b20.tar.gz
tree.h: Modify builtin_function interface to take an extra argument ATTRS...
* tree.h: Modify builtin_function interface to take an extra argument ATTRS, which is a tree representing an attribute list. * c-decl.c (builtin_function): Accept additional parameter. * objc/objc-act.c (builtin_function): Likewise. * f/com.c (builtin_function): Likewise. * java/decl.c (builtin_function): Likewise. * ada/utils.c (builtin_function): Likewise. * cp/decl.c (builtin_function): Likewise. (builtin_function_1): Likewise. * c-common.c (c_common_nodes_and_builtins): Pass an additional NULL_TREE argument to builtin_function. (builtin_function_2): Likewise. * cp/call.c (build_java_interface_fn_ref): Likewise. * objc/objc-act.c (synth_module_prologue): Likewise. * java/decl.c (java_init_decl_processing): Likewise. * f/com.c (ffe_com_init_0): Likewise. * config/alpha/alpha.c (alpha_init_builtins): Pass an additional NULL_TREE argument builtin_function. * config/arm/arm.c (def_builtin): Likewise. * config/c4x/c4x.c (c4x_init_builtins): Likewise. * config/i386/i386.c (def_builtin): Likewise. * config/ia64/ia64.c (def_builtin): Likewise. * config/rs6000/rs6000.c (def_builtin): Likewise. From-SVN: r55161
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c56
1 files changed, 30 insertions, 26 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index e289001b646..bf5e5ff5192 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -358,15 +358,17 @@ push_promoted_type (name, actual_type)
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. */
+ 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 (name, type, function_code, class, library_name)
+builtin_function (name, type, function_code, class, library_name, attrs)
const char *name;
tree type;
int function_code;
enum built_in_class class;
const char *library_name;
+ tree attrs ATTRIBUTE_UNUSED;
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
@@ -750,39 +752,41 @@ java_init_decl_processing ()
tree_cons (NULL_TREE, int_type_node, endlink));
alloc_object_node = builtin_function ("_Jv_AllocObject",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (alloc_object_node) = 1;
alloc_no_finalizer_node =
builtin_function ("_Jv_AllocObjectNoFinalizer",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (alloc_no_finalizer_node) = 1;
t = tree_cons (NULL_TREE, ptr_type_node, endlink);
soft_initclass_node = builtin_function ("_Jv_InitClass",
build_function_type (void_type_node,
t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
throw_node = builtin_function ("_Jv_Throw",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark throw_nodes as `noreturn' functions with side effects. */
TREE_THIS_VOLATILE (throw_node) = 1;
TREE_SIDE_EFFECTS (throw_node) = 1;
t = build_function_type (int_type_node, endlink);
soft_monitorenter_node
- = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN, NULL);
+ = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
+ NULL, NULL_TREE);
soft_monitorexit_node
- = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN, NULL);
+ = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN,
+ NULL, NULL_TREE);
t = tree_cons (NULL_TREE, int_type_node,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_newarray_node
= builtin_function ("_Jv_NewPrimArray",
build_function_type(ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (soft_newarray_node) = 1;
t = tree_cons (NULL_TREE, int_type_node,
@@ -791,7 +795,7 @@ java_init_decl_processing ()
soft_anewarray_node
= builtin_function ("_Jv_NewObjectArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (soft_anewarray_node) = 1;
t = tree_cons (NULL_TREE, ptr_type_node,
@@ -799,14 +803,14 @@ java_init_decl_processing ()
soft_multianewarray_node
= builtin_function ("_Jv_NewMultiArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (soft_multianewarray_node) = 1;
t = build_function_type (void_type_node,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_badarrayindex_node
= builtin_function ("_Jv_ThrowBadArrayIndex", t,
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark soft_badarrayindex_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_badarrayindex_node) = 1;
@@ -815,7 +819,7 @@ java_init_decl_processing ()
soft_nullpointer_node
= builtin_function ("_Jv_ThrowNullPointerException",
build_function_type (void_type_node, endlink),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark soft_nullpointer_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_nullpointer_node) = 1;
@@ -826,26 +830,26 @@ java_init_decl_processing ()
soft_checkcast_node
= builtin_function ("_Jv_CheckCast",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, class_ptr_type, endlink));
soft_instanceof_node
= builtin_function ("_Jv_IsInstanceOf",
build_function_type (boolean_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, object_ptr_type_node, endlink));
soft_checkarraystore_node
= builtin_function ("_Jv_CheckArrayStore",
build_function_type (void_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, int_type_node, endlink)));
soft_lookupinterfacemethod_node
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
@@ -853,23 +857,23 @@ java_init_decl_processing ()
soft_lookupjnimethod_node
= builtin_function ("_Jv_LookupJNIMethod",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, ptr_type_node, endlink);
soft_getjnienvnewframe_node
= builtin_function ("_Jv_GetJNIEnvNewFrame",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
soft_jnipopsystemframe_node
= builtin_function ("_Jv_JNI_PopSystemFrame",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, double_type_node,
tree_cons (NULL_TREE, double_type_node, endlink));
soft_fmod_node
= builtin_function ("__builtin_fmod",
build_function_type (double_type_node, t),
- BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod");
+ BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod", NULL_TREE);
#if 0
t = tree_cons (NULL_TREE, float_type_node,
@@ -877,28 +881,28 @@ java_init_decl_processing ()
soft_fmodf_node
= builtin_function ("__builtin_fmodf",
build_function_type (float_type_node, t),
- BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmodf");
+ BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmodf", NULL_TREE);
#endif
soft_idiv_node
= builtin_function ("_Jv_divI",
build_function_type (int_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
soft_irem_node
= builtin_function ("_Jv_remI",
build_function_type (int_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
soft_ldiv_node
= builtin_function ("_Jv_divJ",
build_function_type (long_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
soft_lrem_node
= builtin_function ("_Jv_remJ",
build_function_type (long_type_node, t),
- 0, NOT_BUILT_IN, NULL);
+ 0, NOT_BUILT_IN, NULL, NULL_TREE);
/* Initialize variables for except.c. */
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS