summaryrefslogtreecommitdiff
path: root/gcc/fortran/f95-lang.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-10 00:22:25 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-10 00:22:25 +0000
commit9cfddb70e5959f3c656f6eb99cb737a63dc2a0c8 (patch)
tree4ed79a7176ee65e1fb619e14384a1bc2dd57d091 /gcc/fortran/f95-lang.c
parent451528dcdf7cb40350106f4a010bf68bc6d83118 (diff)
downloadgcc-9cfddb70e5959f3c656f6eb99cb737a63dc2a0c8.tar.gz
* builtins.c (DEF_BUILTIN): Add COND argument.
* tree.h (DEF_BUILTIN): Likewise. * builtins.def (DEF_GCC_BUILTIN, DEF_LIB_BUILTIN, DEF_EXT_LIB_BUILTIN, DEF_C94_BUILTIN, DEF_C99_BUILTIN, DEF_C99_C90RES_BUILTIN): Update to match. (DEF_BUILTIN_STUB): New. (BUILT_IN_STACK_SAVE, BUILT_IN_STACK_RESTORE, BUILT_IN_INIT_TRAMPOLINE, BUILT_IN_ADJUST_TRAMPOLINE, BUILT_IN_NONLOCAL_GOTO, BUILT_IN_PROFILE_FUNC_ENTER, BUILT_IN_PROFILE_FUNC_EXIT): Use it. * c-common.c (DEF_BUILTIN): Add COND argument. * tree.c (local_define_builtin): New. (build_common_builtin_nodes): New. ada/ * utils.c (gnat_define_builtin): Remove. (gnat_install_builtins): Use build_common_builtin_nodes. fortran/ * f95-lang.c (gfc_init_builtin_functions): Call build_common_builtin_nodes; do not define any functions handled by it. java/ * builtins.c (initialize_builtins): Call build_common_builtin_nodes. * decl.c (java_init_decl_processing): Initialize const_ptr_type_node. treelang/ * treetree.c (treelang_init_decl_processing): Call build_common_builtin_nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r--gcc/fortran/f95-lang.c62
1 files changed, 14 insertions, 48 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index b406bf041a0..7f04b7ca261 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -794,8 +794,7 @@ gfc_init_builtin_functions (void)
BUILT_IN_CABS, "cabs", true);
gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
BUILT_IN_CABSF, "cabsf", true);
-
-
+
gfc_define_builtin ("__builtin_copysign", mfunc_double[1],
BUILT_IN_COPYSIGN, "copysign", true);
gfc_define_builtin ("__builtin_copysignf", mfunc_float[1],
@@ -809,61 +808,28 @@ gfc_init_builtin_functions (void)
/* Other builtin functions we use. */
- tmp = tree_cons (NULL_TREE, long_integer_type_node, void_list_node);
- tmp = tree_cons (NULL_TREE, long_integer_type_node, tmp);
- ftype = build_function_type (long_integer_type_node, tmp);
- gfc_define_builtin ("__builtin_expect", ftype, BUILT_IN_EXPECT,
- "__builtin_expect", true);
-
- tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
- tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
- tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
- ftype = build_function_type (pvoid_type_node, tmp);
- gfc_define_builtin ("__builtin_memcpy", ftype, BUILT_IN_MEMCPY,
- "memcpy", false);
-
tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node);
ftype = build_function_type (integer_type_node, tmp);
- gfc_define_builtin ("__builtin_clz", ftype, BUILT_IN_CLZ, "clz", true);
+ gfc_define_builtin ("__builtin_clz", ftype, BUILT_IN_CLZ,
+ "__builtin_clz", true);
tmp = tree_cons (NULL_TREE, long_integer_type_node, void_list_node);
ftype = build_function_type (integer_type_node, tmp);
- gfc_define_builtin ("__builtin_clzl", ftype, BUILT_IN_CLZL, "clzl", true);
+ gfc_define_builtin ("__builtin_clzl", ftype, BUILT_IN_CLZL,
+ "__builtin_clzl", true);
tmp = tree_cons (NULL_TREE, long_long_integer_type_node, void_list_node);
ftype = build_function_type (integer_type_node, tmp);
- gfc_define_builtin ("__builtin_clzll", ftype, BUILT_IN_CLZLL, "clzll", true);
-
- tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
- tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
- tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
- ftype = build_function_type (void_type_node, tmp);
- gfc_define_builtin ("__builtin_init_trampoline", ftype,
- BUILT_IN_INIT_TRAMPOLINE, "init_trampoline", false);
-
- tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
- ftype = build_function_type (pvoid_type_node, tmp);
- gfc_define_builtin ("__builtin_adjust_trampoline", ftype,
- BUILT_IN_ADJUST_TRAMPOLINE, "adjust_trampoline", true);
-
- /* The stack_save, stack_restore, and alloca builtins aren't used directly.
- They are inserted during gimplification to implement variable sized
- stack allocation. */
-
- ftype = build_function_type (pvoid_type_node, void_list_node);
- gfc_define_builtin ("__builtin_stack_save", ftype, BUILT_IN_STACK_SAVE,
- "stack_save", false);
-
- tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
- ftype = build_function_type (void_type_node, tmp);
- gfc_define_builtin ("__builtin_stack_restore", ftype, BUILT_IN_STACK_RESTORE,
- "stack_restore", false);
-
- tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
- ftype = build_function_type (pvoid_type_node, tmp);
- gfc_define_builtin ("__builtin_alloca", ftype, BUILT_IN_ALLOCA,
- "alloca", false);
+ gfc_define_builtin ("__builtin_clzll", ftype, BUILT_IN_CLZLL,
+ "__builtin_clzll", true);
+
+ tmp = tree_cons (NULL_TREE, long_integer_type_node, void_list_node);
+ tmp = tree_cons (NULL_TREE, long_integer_type_node, tmp);
+ ftype = build_function_type (long_integer_type_node, tmp);
+ gfc_define_builtin ("__builtin_expect", ftype, BUILT_IN_EXPECT,
+ "__builtin_expect", true);
+ build_common_builtin_nodes ();
targetm.init_builtins ();
}