]> granicus.if.org Git - clang/commitdiff
[SystemZ] Mangle long double as __float128
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 16 Jun 2015 15:21:47 +0000 (15:21 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 16 Jun 2015 15:21:47 +0000 (15:21 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/CodeGenCXX/mangle-long-double.cpp

index 3100243f3f2abbf6d38c5b8e1668dbdc0a78c169..8975c917e754f5aa4bbe5c943f8a374d52b83a85 100644 (file)
@@ -5694,6 +5694,10 @@ public:
       return "vector";
     return "";
   }
+
+  bool useFloat128ManglingForLongDouble() const override {
+    return true;
+  }
 };
 
 const Builtin::Info SystemZTargetInfo::BuiltinInfo[] = {
index 4a476fb0fd78432154f15db59fceb2bd7bbde292..e248c474a2e781a240b8332c8150f4b370287b82 100644 (file)
@@ -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