aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
diff options
context:
space:
mode:
authorMatheus Izvekov <mizvekov@gmail.com>2021-02-05 10:51:47 +0800
committerWang, Pengfei <pengfei.wang@intel.com>2021-02-05 11:36:54 +0800
commit1ac98044dfc250a0454762eb49f138b1f3f035e7 (patch)
tree5946dc7bf9dbaa7edd3ea2f0380c60b83854db4f /llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
parent11ef356d9e3a957fdee16b004c7b8c530ca68a9a (diff)
downloadllvm-1ac98044dfc250a0454762eb49f138b1f3f035e7.zip
llvm-1ac98044dfc250a0454762eb49f138b1f3f035e7.tar.gz
llvm-1ac98044dfc250a0454762eb49f138b1f3f035e7.tar.bz2
[X86] Generate unaligned access for fixed slots in unaligned stack
loadRegFromStackSlot()/storeRegToStackSlot() can generate aligned access instructions for stack slots even if the stack is unaligned, based on the assumption that the stack can be realigned. However, this doesn't work for fixed slots, which are e.g. used for spilling XMM registers in a non-leaf function with `__attribute__((preserve_all))`. When compiling such code with `-mstack-alignment=8`, this causes general protection faults. Fix it by only considering stack realignment for non-fixed slots. Note that this changes the output of three existing tests which spill AVX registers, since AVX requires higher alignment than the ABI provides on stack frame entry. Reviewed By: rnk, jyknight Differential Revision: https://reviews.llvm.org/D73126
Diffstat (limited to 'llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions