From: Rafael Espindola Date: Wed, 18 Dec 2013 15:06:25 +0000 (+0000) Subject: Fix f64 and f128 for ppc-darwin. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ebd63ff5004fe8aadb6709da3ab586cac5fb1fb1;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197574 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 9e3f14ccaf0..705dd783fc3 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/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.