summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAmjad Aboud <amjad.aboud@intel.com>2017-04-03 20:28:45 +0000
committerAmjad Aboud <amjad.aboud@intel.com>2017-04-03 20:28:45 +0000
commit0389f62879fc9162fae12e57b93ae3565c915356 (patch)
treef3cf5519ed3b9533f9d72177a870ee1e7b6f22ed /llvm/lib/Transforms
parent27b71e5b1b40a908f970b11ac6a1b7730ab1ed36 (diff)
downloadbcm5719-llvm-0389f62879fc9162fae12e57b93ae3565c915356.tar.gz
bcm5719-llvm-0389f62879fc9162fae12e57b93ae3565c915356.zip
x86 interrupt calling convention: re-align stack pointer on 64-bit if an error code was pushed
The x86_64 ABI requires that the stack is 16 byte aligned on function calls. Thus, the 8-byte error code, which is pushed by the CPU for certain exceptions, leads to a misaligned stack. This results in bugs such as Bug 26413, where misaligned movaps instructions are generated. This commit fixes the misalignment by adjusting the stack pointer in these cases. The adjustment is done at the beginning of the prologue generation by subtracting another 8 bytes from the stack pointer. These additional bytes are popped again in the function epilogue. Fixes Bug 26413 Patch by Philipp Oppermann. Differential Revision: https://reviews.llvm.org/D30049 llvm-svn: 299383
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud