Commit 52a8b7b8 by J"orn Rennecke Committed by Joern Rennecke

c-decl.c (finish_decl): When setting the DECL_ASSEMBLER_NAME of a function using…

c-decl.c (finish_decl): When setting the DECL_ASSEMBLER_NAME of a function using ASMSPEC, prepend a star.

	* c-decl.c (finish_decl): When setting the DECL_ASSEMBLER_NAME
	of a function using ASMSPEC, prepend a star.

From-SVN: r66965
parent 68594ce7
2003-05-19 J"orn Rennecke <joern.rennecke@superh.com>
* c-decl.c (finish_decl): When setting the DECL_ASSEMBLER_NAME
of a function using ASMSPEC, prepend a star.
2003-05-19 Jason Merrill <jason@redhat.com> 2003-05-19 Jason Merrill <jason@redhat.com>
* tree-inline.c (copy_body_r): Avoid generating &* during inline * tree-inline.c (copy_body_r): Avoid generating &* during inline
......
...@@ -2874,25 +2874,31 @@ finish_decl (decl, init, asmspec_tree) ...@@ -2874,25 +2874,31 @@ finish_decl (decl, init, asmspec_tree)
was a normal built-in. */ was a normal built-in. */
if (TREE_CODE (decl) == FUNCTION_DECL && asmspec) if (TREE_CODE (decl) == FUNCTION_DECL && asmspec)
{ {
/* ASMSPEC is given, and not the name of a register. Mark the
name with a star so assemble_name won't munge it. */
char *starred = alloca (strlen (asmspec) + 2);
starred[0] = '*';
strcpy (starred + 1, asmspec);
if (DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL) if (DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
{ {
tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)]; tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
SET_DECL_RTL (builtin, NULL_RTX); SET_DECL_RTL (builtin, NULL_RTX);
SET_DECL_ASSEMBLER_NAME (builtin, get_identifier (asmspec)); SET_DECL_ASSEMBLER_NAME (builtin, get_identifier (starred));
#ifdef TARGET_MEM_FUNCTIONS #ifdef TARGET_MEM_FUNCTIONS
if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY) if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
init_block_move_fn (asmspec); init_block_move_fn (starred);
else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET) else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET)
init_block_clear_fn (asmspec); init_block_clear_fn (starred);
#else #else
if (DECL_FUNCTION_CODE (decl) == BUILT_IN_BCOPY) if (DECL_FUNCTION_CODE (decl) == BUILT_IN_BCOPY)
init_block_move_fn (asmspec); init_block_move_fn (starred);
else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_BZERO) else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_BZERO)
init_block_clear_fn (asmspec); init_block_clear_fn (starred);
#endif #endif
} }
SET_DECL_RTL (decl, NULL_RTX); SET_DECL_RTL (decl, NULL_RTX);
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec)); SET_DECL_ASSEMBLER_NAME (decl, get_identifier (starred));
} }
/* Output the assembler code and/or RTL code for variables and functions, /* Output the assembler code and/or RTL code for variables and functions,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment