diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-17 17:46:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-17 17:46:23 +0000 |
commit | 979d3efcbc414f53bd58c3afbc8f6fd4ee2e3880 (patch) | |
tree | 1561d673290eb404bb41c2a5161a6ff3f15f7b15 /gcc/c-common.c | |
parent | 31334434acf53787c8201bf5b050c450a5891d1b (diff) | |
download | ppe42-gcc-979d3efcbc414f53bd58c3afbc8f6fd4ee2e3880.tar.gz ppe42-gcc-979d3efcbc414f53bd58c3afbc8f6fd4ee2e3880.zip |
PR middle-end/39443
* optabs.c (set_user_assembler_libfunc): New function.
* expr.h (set_user_assembler_libfunc): New prototype.
* c-common.c: Include libfuncs.h.
(set_builtin_user_assembler_name): Call set_user_assembler_libfunc
for memcmp, memset, memcpy, memmove and abort.
* Makefile.in (c-common.o): Depend on libfuncs.h.
* gcc.dg/pr39443.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index a84113f867e..cc00511cc0c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see #include "target-def.h" #include "gimple.h" #include "fixed-value.h" +#include "libfuncs.h" cpp_reader *parse_in; /* Declared in c-pragma.h. */ @@ -4401,10 +4402,28 @@ set_builtin_user_assembler_name (tree decl, const char *asmspec) builtin = built_in_decls [DECL_FUNCTION_CODE (decl)]; set_user_assembler_name (builtin, asmspec); - if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY) - init_block_move_fn (asmspec); - else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET) - init_block_clear_fn (asmspec); + switch (DECL_FUNCTION_CODE (decl)) + { + case BUILT_IN_MEMCPY: + init_block_move_fn (asmspec); + memcpy_libfunc = set_user_assembler_libfunc ("memcpy", asmspec); + break; + case BUILT_IN_MEMSET: + init_block_clear_fn (asmspec); + memset_libfunc = set_user_assembler_libfunc ("memset", asmspec); + break; + case BUILT_IN_MEMMOVE: + memmove_libfunc = set_user_assembler_libfunc ("memmove", asmspec); + break; + case BUILT_IN_MEMCMP: + memcmp_libfunc = set_user_assembler_libfunc ("memcmp", asmspec); + break; + case BUILT_IN_ABORT: + abort_libfunc = set_user_assembler_libfunc ("abort", asmspec); + break; + default: + break; + } } /* The number of named compound-literals generated thus far. */ |