This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/25477] builtin functions should use $LDBL128 suffix on darwin when appropriate
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2008 09:28:04 -0000
- Subject: [Bug target/25477] builtin functions should use $LDBL128 suffix on darwin when appropriate
- References: <bug-25477-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #24 from ubizjak at gmail dot com 2008-02-22 09:28 -------
Hm, for some reason the obvious approach from c#16 doesn't work:
The patch:
--cut here--
Index: langhooks.c
===================================================================
--- langhooks.c (revision 132541)
+++ langhooks.c (working copy)
@@ -559,7 +559,18 @@
if (library_name)
{
- tree libname = get_identifier (library_name);
+ tree libname;
+
+ printf ("library_name = %s\n", library_name);
+ if (function_code == BUILT_IN_SINL)
+ {
+ printf ("PATCHING\n");
+ library_name = "sinl$LDBL128";
+ }
+
+ libname = get_identifier (library_name);
+ debug_tree (libname);
+
SET_DECL_ASSEMBLER_NAME (decl, libname);
}
--cut here--
the testcase:
long double test(long double x)
{
return sinl(x);
}
debug output:
library_name = sinl
PATCHING
<identifier_node 0xb7c893a8 sinl$LDBL128>
But still:
test:
pushl %ebp
movl %esp, %ebp
popl %ebp
jmp sinl
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25477