This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/25477] builtin functions should use $LDBL128 suffix on darwin when appropriate



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]