aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMSubtarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp
index 6562600202..d2f0a28f78 100644
--- a/lib/Target/ARM/ARMSubtarget.cpp
+++ b/lib/Target/ARM/ARMSubtarget.cpp
@@ -137,6 +137,12 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU,
}
// @LOCALMOD-BEGIN
+ // Advanced SIMD and Q registers are part of the NaCl ARM ABI. The ARM
+ // EABI specifies only an 8 byte alignment, which can result in poor
+ // performance for these 16 byte data types if they straddle cache lines, etc.
+ // Therefore, NaCl aligns stack frames 0mod16.
+ if (isTargetNaCl())
+ stackAlignment = 16;
// NaCl uses MovT to avoid generating constant islands.
if (isTargetNaCl() && !useConstPool())
UseMovt = true;