The Windows ARM64 runtime passes the establisher frame to funclets as the first argument. This change just copies x1 to fp in that case.
The test case depends on https://reviews.llvm.org/D53540, which lowers the localaddr intrinsic.
Differential D56528
[SEH] [ARM64] Retrieve the frame pointer from SEH funclets ssijaric on Jan 9 2019, 6:29 PM. Authored by
Details The Windows ARM64 runtime passes the establisher frame to funclets as the first argument. This change just copies x1 to fp in that case. The test case depends on https://reviews.llvm.org/D53540, which lowers the localaddr intrinsic.
Diff Detail
Event Timeline
Comment Actions Cleanup per Eli's comments. Checking for the personality function is probably not necessary. I could add an assert instead of the check?
Comment Actions Clarify the comment. By looking at cl.exe generated code, it looks like only the frame pointer is passed in x1. The base pointer, if needed, is used directly (e.g. x19). I will verify with a more complicated test case. Comment Actions LGTM
Comment Actions Committed under https://reviews.llvm.org/rL351404. Forgot to add a Different Revision line. |
Do we need to do anything special to recover the base pointer in SEH funclets? (If not, probably worth adding an explicit comment.)