summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-02-10 03:32:21 +0000
committerEric Christopher <echristo@gmail.com>2017-02-10 03:32:21 +0000
commit42b9248803e5b95274011a1ab8ec8e3df3cb6f84 (patch)
tree9818fb365e0b68a269966d4ef0f9065c3f3dc6d4 /llvm/lib/Target/PowerPC
parenta2c581f42fd050bb4818de0cca4340614e81746f (diff)
downloadbcm5719-llvm-42b9248803e5b95274011a1ab8ec8e3df3cb6f84.tar.gz
bcm5719-llvm-42b9248803e5b95274011a1ab8ec8e3df3cb6f84.zip
For X86-64 linux and PPC64 linux align int128 to 16 bytes.
For other platforms we should find out what they need and likely make the same change, however, a smaller additional change is easier for platforms we know have it specified in the ABI. As part of this rewrite some of the handling in the backends for data layout and update a bunch of testcases. Based on a patch by Simonas Kazlauskas! llvm-svn: 294702
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 5d68f32ccc5..8df1a89308f 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -120,6 +120,11 @@ static std::string getDataLayoutString(const Triple &T) {
else
Ret += "-f64:32:64";
+ // 128 bit integers are always aligned to 128 bits, but only 64-bit matters,
+ // because __int128 is only supoprted on 64-bit targets.
+ if (is64Bit && T.isOSLinux())
+ Ret += "-i128:128";
+
// PPC64 has 32 and 64 bit registers, PPC32 has only 32 bit ones.
if (is64Bit)
Ret += "-n32:64";
OpenPOWER on IntegriCloud