r243133 - Correct x86_64 Android fp128 mangled name
Chih-hung Hsieh
chh at google.com
Mon Jul 27 12:11:52 PDT 2015
It should work with 3.7 ff useFloat128ManglingForLongDouble is there,
although I don't know any project needing this patch alone.
In additional to this patch,
http://reviews.llvm.org/D11437 and http://reviews.llvm.org/D11438
are required to replace gcc with clang/llvm to compile libm for Android.
On Mon, Jul 27, 2015 at 11:39 AM, Hans Wennborg <hans at chromium.org> wrote:
> Should this be merged to 3.7?
>
> On Fri, Jul 24, 2015 at 11:12 AM, Chih-Hung Hsieh <chh at google.com> wrote:
> > Author: chh
> > Date: Fri Jul 24 13:12:54 2015
> > New Revision: 243133
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=243133&view=rev
> > Log:
> > Correct x86_64 Android fp128 mangled name
> >
> > These changes are for Android x86_64 targets to be compatible with
> current Android g++.
> > https://llvm.org/bugs/show_bug.cgi?id=23897
> > Use 'g' and 'Cg' for "long double" and "long double _Complex" mangled
> type names.
> >
> > Differential Revision: http://reviews.llvm.org/D11466
> >
> > Added:
> > cfe/trunk/test/CodeGen/long_double_fp128.cpp
> > Modified:
> > cfe/trunk/lib/Basic/Targets.cpp
> >
> > Modified: cfe/trunk/lib/Basic/Targets.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=243133&r1=243132&r2=243133&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/lib/Basic/Targets.cpp (original)
> > +++ cfe/trunk/lib/Basic/Targets.cpp Fri Jul 24 13:12:54 2015
> > @@ -7071,6 +7071,10 @@ public:
> > : LinuxTargetInfo<X86_64TargetInfo>(Triple) {
> > LongDoubleFormat = &llvm::APFloat::IEEEquad;
> > }
> > +
> > + bool useFloat128ManglingForLongDouble() const override {
> > + return true;
> > + }
> > };
> > } // end anonymous namespace
> >
> >
> > Added: cfe/trunk/test/CodeGen/long_double_fp128.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/long_double_fp128.cpp?rev=243133&view=auto
> >
> ==============================================================================
> > --- cfe/trunk/test/CodeGen/long_double_fp128.cpp (added)
> > +++ cfe/trunk/test/CodeGen/long_double_fp128.cpp Fri Jul 24 13:12:54 2015
> > @@ -0,0 +1,22 @@
> > +// RUN: %clang_cc1 -triple x86_64-linux-android -emit-llvm -o - %s \
> > +// RUN: | FileCheck %s --check-prefix=A64
> > +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s \
> > +// RUN: | FileCheck %s --check-prefix=G64
> > +// RUN: %clang_cc1 -triple powerpc64-linux-gnu -emit-llvm -o - %s \
> > +// RUN: | FileCheck %s --check-prefix=P64
> > +// RUN: %clang_cc1 -triple i686-linux-android -emit-llvm -o - %s \
> > +// RUN: | FileCheck %s --check-prefix=A32
> > +// RUN: %clang_cc1 -triple i686-linux-gnu -emit-llvm -o - %s \
> > +// RUN: | FileCheck %s --check-prefix=G32
> > +// RUN: %clang_cc1 -triple powerpc-linux-gnu -emit-llvm -o - %s \
> > +// RUN: | FileCheck %s --check-prefix=P32
> > +
> > +// Check mangled name of long double.
> > +// Android's gcc and llvm use fp128 for long double.
> > +void test(long, float, double, long double, long double _Complex) { }
> > +// A64: define void @_Z4testlfdgCg(i64, float, double, fp128, { fp128,
> fp128 }*
> > +// G64: define void @_Z4testlfdeCe(i64, float, double, x86_fp80, {
> x86_fp80, x86_fp80 }*
> > +// P64: define void @_Z4testlfdgCg(i64, float, double, ppc_fp128,
> ppc_fp128 {{.*}}, ppc_fp128
> > +// A32: define void @_Z4testlfdeCe(i32, float, double, double, {
> double, double }*
> > +// G32: define void @_Z4testlfdeCe(i32, float, double, x86_fp80, {
> x86_fp80, x86_fp80 }*
> > +// P32: define void @_Z4testlfdgCg(i32, float, double, ppc_fp128, {
> ppc_fp128, ppc_fp128 }*
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/598a3967/attachment.html>
More information about the cfe-commits
mailing list