diff options
author | Matt Austern <austern@apple.com> | 2004-12-20 20:11:41 +0000 |
---|---|---|
committer | Matt Austern <austern@gcc.gnu.org> | 2004-12-20 20:11:41 +0000 |
commit | b482789cca42c2e1c3d0c7dd1c140fe3e5e320a2 (patch) | |
tree | a8c54e7d5be9f8fb754934d667e66e6346bf3f62 /gcc/c-common.c | |
parent | 90e34bd6374760bfdd0a8807e8323eaa50a749f1 (diff) | |
download | gcc-b482789cca42c2e1c3d0c7dd1c140fe3e5e320a2.zip gcc-b482789cca42c2e1c3d0c7dd1c140fe3e5e320a2.tar.gz gcc-b482789cca42c2e1c3d0c7dd1c140fe3e5e320a2.tar.bz2 |
re PR c++/19044 (Alternate asm name for atan ignored when calling __builtin_atan)
PR c++/19044
* c-common.c (set_builtin_user_assembler_name): New.
* c-common.h (set_builtin_user_assembler_name): Declare.
* c-decl.c (finish_decl): Use set_builtin_user_assembler_name
* decl.c (make_rtl_for_nonlocal_decl): Use set_builtin_user_assembler_name
* g++.dg/ext/builtin6.C: New
From-SVN: r92428
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index bf48029..b4c6349 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -3223,6 +3223,26 @@ c_common_nodes_and_builtins (void) main_identifier_node = get_identifier ("main"); } +/* Look up the function in built_in_decls that corresponds to DECL + and set ASMSPEC as its user assembler name. DECL must be a + function decl that declares a builtin. */ + +void +set_builtin_user_assembler_name (tree decl, const char *asmspec) +{ + tree builtin; + gcc_assert (TREE_CODE (decl) == FUNCTION_DECL + && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL + && asmspec != 0); + + 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); +} + tree build_va_arg (tree expr, tree type) { |