diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2020-12-14 11:33:46 -0600 |
---|---|---|
committer | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2020-12-14 11:34:16 -0600 |
commit | bfdc19e77868b849b5c636bf0512970264aef571 (patch) | |
tree | 5871c9428a00d2422a902683a71f401a551583bf /clang/lib/Lex/ModuleMap.cpp | |
parent | ecab63894bb5aebcbbe694839779f346e6fbe9e2 (diff) | |
download | llvm-bfdc19e77868b849b5c636bf0512970264aef571.zip llvm-bfdc19e77868b849b5c636bf0512970264aef571.tar.gz llvm-bfdc19e77868b849b5c636bf0512970264aef571.tar.bz2 |
[PowerPC] Restore stack ptr from frame ptr with setjmp
If a function happens to:
- call setjmp
- do a 16-byte stack allocation
- call a function that sets up a stack frame and longjmp's back
The stack pointer that is restores by setjmp will no longer point to a valid
back chain. According to the ABI, stack accesses in such a function are to be
frame pointer based - so it is an error (quite obviously) to restore the stack
from the back chain.
We already restore the stack from the frame pointer when there are calls to
fast_cc functions. We just need to also do that when there are calls to setjmp.
This patch simply does that.
This was pointed out by the Julia team.
Differential revision: https://reviews.llvm.org/D92906
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions