diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-28 12:10:35 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-28 12:10:35 +0000 |
commit | c49500936c013140a0cb95dcc6d1dcd170c2c080 (patch) | |
tree | 724aa570916638d254b686a7dfa1cfb24f55c7f2 /gcc/builtins.def | |
parent | 11a311051f05fa534d3f07ef2f134467238bb4ef (diff) | |
download | gcc-c49500936c013140a0cb95dcc6d1dcd170c2c080.tar.gz |
* builtins.def (BUILT_IN_BCOPY, BUILT_IN_MEMMOVE): New.
* builtin-types.def (BT_FN_VOID_CONST_PTR_PTR_SIZE): New.
* builtins.c (expand_builtin_memmove, expand_builtin_bcopy): New
functions.
(expand_builtin): Handle BUILT_IN_BCOPY and BUILT_IN_MEMMOVE.
* gcc.c-torture/execute/string-opt-19.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r-- | gcc/builtins.def | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def index f0d118b0dc3..1806434b1ab 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -286,9 +286,9 @@ DEF_C99_BUILTIN(BUILT_IN_CIMAGL, BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, ATTR_CONST_NOTHROW_LIST) -/* The system prototypes for `bzero' and `bcmp' functions have many - variations, so don't specify parameters to avoid conflicts. The - expand_* functions check the argument types anyway. */ +/* The system prototypes for `bzero', 'bcopy' and `bcmp' functions + have many variations, so don't specify parameters to avoid conflicts. + The expand_* functions check the argument types anyway. */ DEF_BUILTIN (BUILT_IN_BZERO, "__builtin_bzero", BUILT_IN_NORMAL, @@ -296,6 +296,13 @@ DEF_BUILTIN (BUILT_IN_BZERO, BT_FN_VOID_VAR, true, true, true, ATTR_NOTHROW_LIST, false) +DEF_BUILTIN (BUILT_IN_BCOPY, + "__builtin_bcopy", + BUILT_IN_NORMAL, + BT_FN_VOID_CONST_PTR_PTR_SIZE, + BT_FN_VOID_VAR, + true, true, true, + ATTR_NOTHROW_LIST, false) DEF_BUILTIN (BUILT_IN_BCMP, "__builtin_bcmp", BUILT_IN_NORMAL, @@ -380,6 +387,10 @@ DEF_LIB_BUILTIN(BUILT_IN_MEMCPY, "__builtin_memcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_NOTHROW_LIST) +DEF_LIB_BUILTIN(BUILT_IN_MEMMOVE, + "__builtin_memmove", + BT_FN_PTR_PTR_CONST_PTR_SIZE, + ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_MEMCMP, "__builtin_memcmp", BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, |