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: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2008 14:36:39 -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 #39 from bonzini at gnu dot org 2008-02-22 14:36 -------
Subject: Re: builtin functions should use $LDBL128 suffix
on darwin when appropriate
>> I think you should use set_user_assembler_name instead of
>> SET_DECL_ASSEMBLER_NAME.
>
> Nope. Doing this gives, for you C testcase with test and test_:
>
> Undefined symbols:
> "sinl$LDBL128", referenced from:
> _test_ in ccYtxtFH.o
And for Fortran?
Actually, I think we're almost there. You have to prepend an
underscore. Symbols in my
/System/Library/Frameworks/System.framework/Versions/Current/System look
like this:
90175020 T _cosl$LDBL128
901751c0 T _sinl$LDBL128
90175350 T _tanl$LDBL128
90176140 T _cbrtl$LDBL128
901764d0 T _sqrtl$LDBL128
90176c00 T _nanl$LDBL128
90176e70 T _nanl$LDBL64
You have to use set_user_assembler_name because: 1) that's what the
__asm__ ("_sinl$LDBL128") directives do; 2) the assembler name is right,
but the DECL_RTL is wrong in your dumps, and set_user_assembler_name
resets the DECL_RTL so that it is recomputed.
Paolo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25477