Index: lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp |
diff --git a/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp b/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp |
index db7f0ae914eb48c8771a786c1275005b670acaf2..b76ce5e6d5bb920240b90ed4b4ebc15c1a5d8aaa 100644 |
--- a/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp |
+++ b/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp |
@@ -90,10 +90,15 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) { |
bool is64Bit = T.getArch() == Triple::x86_64; |
bool isX32 = T.getEnvironment() == Triple::GNUX32; |
+ // @LOCALMOD-BEGIN(eliben) |
+ // Until Nacl implies x32, we add &&!isNaCl in the PointerSize condition |
+ bool isNaCl = T.isOSNaCl(); |
+ |
// For ELF, x86-64 pointer size depends on the ABI. |
// For x86-64 without the x32 ABI, pointer size is 8. For x86 and for x86-64 |
// with the x32 ABI, pointer size remains the default 4. |
- PointerSize = (is64Bit && !isX32) ? 8 : 4; |
+ PointerSize = (is64Bit && !isX32 && !isNaCl) ? 8 : 4; |
+ // @LOCALMOD-END |
// OTOH, stack slot size is always 8 for x86-64, even with the x32 ABI. |
CalleeSaveStackSlotSize = is64Bit ? 8 : 4; |