diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-18 15:06:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-18 15:06:25 +0000 |
commit | 988f35e999a8f45aedfe8d4c53337d8bd6920e50 (patch) | |
tree | f5ea24d0daf58827659e351d4b2d0560d0d42c8b /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | |
parent | caf7c0cdcdb3287e64389085cd9609553c0e6452 (diff) | |
download | bcm5719-llvm-988f35e999a8f45aedfe8d4c53337d8bd6920e50.tar.gz bcm5719-llvm-988f35e999a8f45aedfe8d4c53337d8bd6920e50.zip |
Fix f64 and f128 for ppc-darwin.
This patch adds -f64:32:64 to 32 bit ppc darwin since a f64 inside a
structure are only 32 bit aligned.
The patch also drop -f128:64:128 from all ppc darwin, since f128 is
128 bit aligned.
llvm-svn: 197574
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 9e3f14ccaf0..705dd783fc3 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -49,9 +49,11 @@ static std::string getDataLayoutString(const PPCSubtarget &ST) { // documentation are wrong; these are correct (i.e. "what gcc does"). if (ST.isPPC64() || ST.isSVR4ABI()) Ret += "-i64:64"; + else + Ret += "-f64:32:64"; // Set support for 128 floats depending on the ABI. - if (!ST.isPPC64() || !ST.isSVR4ABI()) + if (!ST.isPPC64() && ST.isSVR4ABI()) Ret += "-f128:64:128"; // PPC64 has 32 and 64 bit registers, PPC32 has only 32 bit ones. |