[llvm] r197574 - Fix f64 and f128 for ppc-darwin.
Rafael Espindola
rafael.espindola at gmail.com
Wed Dec 18 07:06:25 PST 2013
Author: rafael
Date: Wed Dec 18 09:06:25 2013
New Revision: 197574
URL: http://llvm.org/viewvc/llvm-project?rev=197574&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=197574&r1=197573&r2=197574&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Dec 18 09:06:25 2013
@@ -49,9 +49,11 @@ static std::string getDataLayoutString(c
// 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.
More information about the llvm-commits
mailing list