diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-03-17 18:46:23 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-03-17 18:46:23 +0100 |
commit | 6b2b88712792698e1348e585ab91fa8518a250f0 (patch) | |
tree | 1561d673290eb404bb41c2a5161a6ff3f15f7b15 /gcc/optabs.c | |
parent | 16e60c1706a8abf971d1ae216a33cc7e2f29e3c5 (diff) | |
download | gcc-6b2b88712792698e1348e585ab91fa8518a250f0.tar.gz |
re PR middle-end/39443 (Builtin redirection no longer working for memcmp)
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.
From-SVN: r144910
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index ed59f5e1e7f..f7e44db48c2 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -6072,6 +6072,24 @@ init_one_libfunc (const char *name) return XEXP (DECL_RTL (decl), 0); } +/* Adjust the assembler name of libfunc NAME to ASMSPEC. */ + +rtx +set_user_assembler_libfunc (const char *name, const char *asmspec) +{ + tree id, decl; + void **slot; + hashval_t hash; + + id = get_identifier (name); + hash = htab_hash_string (name); + slot = htab_find_slot_with_hash (libfunc_decls, id, hash, NO_INSERT); + gcc_assert (slot); + decl = (tree) *slot; + set_user_assembler_name (decl, asmspec); + return XEXP (DECL_RTL (decl), 0); +} + /* Call this to reset the function entry for one optab (OPTABLE) in mode MODE to NAME, which should be either 0 or a string constant. */ void |