summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMTargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetMachine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index 5afc7ccedf1..7f387ec466d 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -102,8 +102,11 @@ static std::string computeDataLayout(ARMSubtarget &ST) {
// Integer registers are 32 bits.
Ret += "-n32";
- // The stack is 64 bit aligned on AAPCS and 32 bit aligned everywhere else.
- if (ST.isAAPCS_ABI())
+ // The stack is 128 bit aligned on NaCl, 64 bit aligned on AAPCS and 32 bit
+ // aligned everywhere else.
+ if (ST.isTargetNaCl())
+ Ret += "-S128";
+ else if (ST.isAAPCS_ABI())
Ret += "-S64";
else
Ret += "-S32";
OpenPOWER on IntegriCloud