[llvm] r197501 - Fix the pointer size for the PS3 datalayout.
Rafael Espindola
rafael.espindola at gmail.com
Tue Dec 17 07:29:48 PST 2013
Author: rafael
Date: Tue Dec 17 09:29:48 2013
New Revision: 197501
URL: http://llvm.org/viewvc/llvm-project?rev=197501&view=rev
Log:
Fix the pointer size for the PS3 datalayout.
This will be tested from clang.
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=197501&r1=197500&r2=197501&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Tue Dec 17 09:29:48 2013
@@ -35,11 +35,14 @@ extern "C" void LLVMInitializePowerPCTar
/// Return the datalayout string of a subtarget.
static std::string getDataLayoutString(const PPCSubtarget &ST) {
+ const Triple &T = ST.getTargetTriple();
+
// PPC is big endian.
std::string Ret = "E";
- // PPC32 has 32 bit pointers.
- if (!ST.isPPC64())
+ // PPC32 has 32 bit pointers. The PS3 (OS Lv2) is a PPC64 machine with 32 bit
+ // pointers.
+ if (!ST.isPPC64() || T.getOS() == Triple::Lv2)
Ret += "-p:32:32";
// Note, the alignment values for f64 and i64 on ppc64 in Darwin
More information about the llvm-commits
mailing list