r239822 - [SystemZ] Mangle long double as __float128
Ulrich Weigand
ulrich.weigand at de.ibm.com
Tue Jun 16 08:21:48 PDT 2015
Author: uweigand
Date: Tue Jun 16 10:21:47 2015
New Revision: 239822
URL: http://llvm.org/viewvc/llvm-project?rev=239822&view=rev
Log:
[SystemZ] Mangle long double as __float128
In r239421, the mangling of long double on PowerPC Linux targets
was changed to use "g" instead of "e". This same change also needs
to be done for SystemZ (all targets, since we support only Linux
on SystemZ anyway).
This is because an old ABI variant set "long double" to a 64-bit
type equivalent to "double", and the "e" mangling code is still
used to refer to that old ABI for compatibility reasons.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/CodeGenCXX/mangle-long-double.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=239822&r1=239821&r2=239822&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Jun 16 10:21:47 2015
@@ -5694,6 +5694,10 @@ public:
return "vector";
return "";
}
+
+ bool useFloat128ManglingForLongDouble() const override {
+ return true;
+ }
};
const Builtin::Info SystemZTargetInfo::BuiltinInfo[] = {
Modified: cfe/trunk/test/CodeGenCXX/mangle-long-double.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-long-double.cpp?rev=239822&r1=239821&r2=239822&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-long-double.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-long-double.cpp Tue Jun 16 10:21:47 2015
@@ -2,9 +2,11 @@
// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=POWER-LINUX
// RUN: %clang_cc1 -triple powerpc64-apple-darwin9 %s -emit-llvm -o - | FileCheck %s --check-prefix=POWER64-DARWIN
// RUN: %clang_cc1 -triple powerpc-apple-darwin9 %s -emit-llvm -o - | FileCheck %s --check-prefix=POWER-DARWIN
+// RUN: %clang_cc1 -triple s390x-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=S390X-LINUX
void f(long double) {}
// POWER64-LINUX: _Z1fg
// POWER-LINUX: _Z1fg
// POWER64-DARWIN: _Z1fe
// POWER-DARWIN: _Z1fe
+// S390X-LINUX: _Z1fg
More information about the cfe-commits
mailing list