mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 20:29:30 +00:00
X86: Explain why we cannot use a 'mov' in a Win64 epilogue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
10c4458d7d
commit
16ae406776
@ -1048,6 +1048,12 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
if (RegInfo->needsStackRealignment(MF))
|
||||
MBBI = FirstCSPop;
|
||||
if (IsWinEH) {
|
||||
// There are only two legal forms of epilogue:
|
||||
// - add SEHAllocationSize, %rsp
|
||||
// - lea SEHAllocationSize(%FramePtr), %rsp
|
||||
//
|
||||
// We are *not* permitted to use 'mov %FramePtr, %rsp' because the Win64
|
||||
// unwinder will not recognize 'mov' as an epilogue instruction.
|
||||
unsigned SEHFrameOffset = calculateSetFPREG(SEHStackAllocAmt);
|
||||
addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::LEA64r), StackPtr),
|
||||
FramePtr, false, SEHStackAllocAmt - SEHFrameOffset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user