diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-21 16:33:00 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-21 16:33:00 -0800 |
commit | 6198caf10c3640721f70fca49671fd4081f0064e (patch) | |
tree | f5b9c5eae3d8704ee4150171e6d008423c26c206 /lib/Transforms | |
parent | e47b58ae8a841d7cdf9bb026595e6b668a84d7d8 (diff) |
align varargs stack writes to the proper 4-byte boundaries
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/NaCl/ExpandVarArgs.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/NaCl/ExpandVarArgs.cpp b/lib/Transforms/NaCl/ExpandVarArgs.cpp index 0fd1a3cb44..578ea4cc0e 100644 --- a/lib/Transforms/NaCl/ExpandVarArgs.cpp +++ b/lib/Transforms/NaCl/ExpandVarArgs.cpp @@ -257,7 +257,9 @@ static bool ExpandVarArgCall(InstType *Call, DataLayout *DL) { DL->getTypeAllocSize((*Iter)->getType()->getPointerElementType()), /* Align= */ 1); } else { - CopyDebug(new StoreInst(*Iter, Ptr, Call), Call); + StoreInst *S = new StoreInst(*Iter, Ptr, Call); + CopyDebug(S, Call); + S->setAlignment(4); // EMSCRIPTEN: pnacl stack is only 4-byte aligned } } |