<div dir="ltr">It should work with 3.7 ff <span style="font-size:12.8000001907349px">useFloat128ManglingForLongDoub</span><span style="font-size:12.8000001907349px">le is there</span>,<div>although I don't know any project needing this patch alone.</div><div><br><div>In additional to this patch,</div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11437&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=VZVAngCqp8QwuAhcJNCtbf6bukMxfwa-wk8hDVRrqo0&e=">http://reviews.llvm.org/D11437</a> and <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11438&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=EbNAy4yOtMZbPnhB-tFeSeSsDIawa9y7wPyz1lGMYAU&e=">http://reviews.llvm.org/D11438</a></div><div>are required to replace gcc with clang/llvm to compile libm for Android.</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 27, 2015 at 11:39 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Should this be merged to 3.7?<br>
<br>
On Fri, Jul 24, 2015 at 11:12 AM, Chih-Hung Hsieh <<a href="mailto:chh@google.com">chh@google.com</a>> wrote:<br>
> Author: chh<br>
> Date: Fri Jul 24 13:12:54 2015<br>
> New Revision: 243133<br>
><br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D243133-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=02nxVfasn4xEKV-wjWEu7Cuh7wCYF5WrwYLN0cZyOGQ&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=243133&view=rev</a><br>
> Log:<br>
> Correct x86_64 Android fp128 mangled name<br>
><br>
> These changes are for Android x86_64 targets to be compatible with current Android g++.<br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23897&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=JbxIt1gQQm8OIEN7WsbbK2g_z3HC1SLlgKuEEeULSmo&e=" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=23897</a><br>
> Use 'g' and 'Cg' for "long double" and "long double _Complex" mangled type names.<br>
><br>
> Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11466&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=4QVLv88i4bdV1gyyzTgDeL603XhZ0-FyAzV3Mp28WfM&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11466</a><br>
><br>
> Added:<br>
> cfe/trunk/test/CodeGen/long_double_fp128.cpp<br>
> Modified:<br>
> cfe/trunk/lib/Basic/Targets.cpp<br>
><br>
> Modified: cfe/trunk/lib/Basic/Targets.cpp<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_Basic_Targets.cpp-3Frev-3D243133-26r1-3D243132-26r2-3D243133-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=puKuLp0qJaNtRAU8hP4wR09RdQcEUg2I4fM9Sf99BpM&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=243133&r1=243132&r2=243133&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Basic/Targets.cpp (original)<br>
> +++ cfe/trunk/lib/Basic/Targets.cpp Fri Jul 24 13:12:54 2015<br>
> @@ -7071,6 +7071,10 @@ public:<br>
> : LinuxTargetInfo<X86_64TargetInfo>(Triple) {<br>
> LongDoubleFormat = &llvm::APFloat::IEEEquad;<br>
> }<br>
> +<br>
> + bool useFloat128ManglingForLongDouble() const override {<br>
> + return true;<br>
> + }<br>
> };<br>
> } // end anonymous namespace<br>
><br>
><br>
> Added: cfe/trunk/test/CodeGen/long_double_fp128.cpp<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_test_CodeGen_long-5Fdouble-5Ffp128.cpp-3Frev-3D243133-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=kWcPL0THgYbnC3zrBcecV5x_FnEXJUZFKn9HOtf3jeI&s=e6SpP5sD9ZkZ5Nk7Iqd0j0yPfNYBBe6H8quCwpSMWyg&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/long_double_fp128.cpp?rev=243133&view=auto</a><br>
> ==============================================================================<br>
> --- cfe/trunk/test/CodeGen/long_double_fp128.cpp (added)<br>
> +++ cfe/trunk/test/CodeGen/long_double_fp128.cpp Fri Jul 24 13:12:54 2015<br>
> @@ -0,0 +1,22 @@<br>
> +// RUN: %clang_cc1 -triple x86_64-linux-android -emit-llvm -o - %s \<br>
> +// RUN: | FileCheck %s --check-prefix=A64<br>
> +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s \<br>
> +// RUN: | FileCheck %s --check-prefix=G64<br>
> +// RUN: %clang_cc1 -triple powerpc64-linux-gnu -emit-llvm -o - %s \<br>
> +// RUN: | FileCheck %s --check-prefix=P64<br>
> +// RUN: %clang_cc1 -triple i686-linux-android -emit-llvm -o - %s \<br>
> +// RUN: | FileCheck %s --check-prefix=A32<br>
> +// RUN: %clang_cc1 -triple i686-linux-gnu -emit-llvm -o - %s \<br>
> +// RUN: | FileCheck %s --check-prefix=G32<br>
> +// RUN: %clang_cc1 -triple powerpc-linux-gnu -emit-llvm -o - %s \<br>
> +// RUN: | FileCheck %s --check-prefix=P32<br>
> +<br>
> +// Check mangled name of long double.<br>
> +// Android's gcc and llvm use fp128 for long double.<br>
> +void test(long, float, double, long double, long double _Complex) { }<br>
> +// A64: define void @_Z4testlfdgCg(i64, float, double, fp128, { fp128, fp128 }*<br>
> +// G64: define void @_Z4testlfdeCe(i64, float, double, x86_fp80, { x86_fp80, x86_fp80 }*<br>
> +// P64: define void @_Z4testlfdgCg(i64, float, double, ppc_fp128, ppc_fp128 {{.*}}, ppc_fp128<br>
> +// A32: define void @_Z4testlfdeCe(i32, float, double, double, { double, double }*<br>
> +// G32: define void @_Z4testlfdeCe(i32, float, double, x86_fp80, { x86_fp80, x86_fp80 }*<br>
> +// P32: define void @_Z4testlfdgCg(i32, float, double, ppc_fp128, { ppc_fp128, ppc_fp128 }*<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>