aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-06-28 14:32:39 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-06-28 14:32:39 -0400
commitb71e9de07c8ce5245b6489470d389b042c6aee69 (patch)
treea9975e6287aaa2f8fdc209125bce8dde1b29333e
parent2d226eb101981e1c00dba984fc282b28ed6ff82f (diff)
downloadgcc-b71e9de07c8ce5245b6489470d389b042c6aee69.zip
gcc-b71e9de07c8ce5245b6489470d389b042c6aee69.tar.gz
gcc-b71e9de07c8ce5245b6489470d389b042c6aee69.tar.bz2
(init_decl_processing): Register __builtin_memset and memset as
builtin functions. From-SVN: r12362
-rw-r--r--gcc/c-decl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 8e04798..09013de 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2818,7 +2818,7 @@ init_decl_processing ()
/* Either char* or void*. */
tree traditional_ptr_type_node;
/* Data types of memcpy and strlen. */
- tree memcpy_ftype, strlen_ftype;
+ tree memcpy_ftype, memset_ftype, strlen_ftype;
tree void_ftype_any;
int wchar_type_size;
tree temp;
@@ -3125,6 +3125,14 @@ init_decl_processing ()
sizetype,
endlink))));
+ memset_ftype /* memset prototype */
+ = build_function_type (traditional_ptr_type_node,
+ tree_cons (NULL_TREE, ptr_type_node,
+ tree_cons (NULL_TREE, integer_type_node,
+ tree_cons (NULL_TREE,
+ sizetype,
+ endlink))));
+
builtin_function ("__builtin_constant_p", default_function_type,
BUILT_IN_CONSTANT_P, NULL_PTR);
@@ -3233,6 +3241,8 @@ init_decl_processing ()
BUILT_IN_MEMCPY, "memcpy");
builtin_function ("__builtin_memcmp", int_ftype_cptr_cptr_sizet,
BUILT_IN_MEMCMP, "memcmp");
+ builtin_function ("__builtin_memset", memset_ftype,
+ BUILT_IN_MEMSET, NULL_PTR);
builtin_function ("__builtin_strcmp", int_ftype_string_string,
BUILT_IN_STRCMP, "strcmp");
builtin_function ("__builtin_strcpy", string_ftype_ptr_ptr,
@@ -3286,6 +3296,7 @@ init_decl_processing ()
builtin_function ("memcpy", memcpy_ftype, BUILT_IN_MEMCPY, NULL_PTR);
builtin_function ("memcmp", int_ftype_cptr_cptr_sizet, BUILT_IN_MEMCMP,
NULL_PTR);
+ builtin_function ("memset", memset_ftype, BUILT_IN_MEMSET, NULL_PTR);
builtin_function ("strcmp", int_ftype_string_string, BUILT_IN_STRCMP,
NULL_PTR);
builtin_function ("strcpy", string_ftype_ptr_ptr, BUILT_IN_STRCPY,