diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.cpp | 5 |
2 files changed, 10 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"; diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp index 7dd878e8a90..585d5433e62 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.cpp +++ b/llvm/lib/Target/X86/X86TargetMachine.cpp @@ -109,6 +109,11 @@ static std::string computeDataLayout(const Triple &TT) { 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 (TT.isArch64Bit() && TT.isOSLinux()) + Ret += "-i128:128"; + // Some ABIs align long double to 128 bits, others to 32. if (TT.isOSNaCl() || TT.isOSIAMCU()) ; // No f80 |

