[PATCH] D30049: x86 interrupt calling convention: re-align stack pointer on 64-bit if an error code was pushed
Philipp Oppermann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 09:04:09 PST 2017
phil-opp marked an inline comment as done.
phil-opp added a comment.
> No, there is no need to realign stack in 64-bit mode.
I'm not sure if I understand you correctly. Yes, there is no need to //dynamically// realign the stack in 64-bit mode since the CPU aligns the stack on a 16 byte boundary on interrupt entry. However, for some exceptions, the CPU pushes an 8 byte error code afterwards. In that case it is necessary to subtract another 8 bytes from RSP to restore the 16-byte alignment.
More information about the llvm-commits