mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
[WinEH] Add a report_fatal_error for 32-bit stack realignment
This type of prologue isn't supported yet. Implementing it should be a matter of copying the adjusted incoming EBP into ESI (the base pointer) instead of EBP. The original EBP can be saved and restored from other memory afterwards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41e59a6d7b
commit
db38d7657a
@ -15953,6 +15953,9 @@ static SDValue LowerSEHRESTOREFRAME(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SDLoc dl(Op);
|
||||
SDValue Chain = Op.getOperand(0);
|
||||
|
||||
assert(Subtarget->getFrameLowering()->hasFP(MF) &&
|
||||
"using llvm.x86.seh.restoreframe requires a frame pointer");
|
||||
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
MVT VT = TLI.getPointerTy();
|
||||
|
||||
@ -15974,6 +15977,8 @@ static SDValue LowerSEHRESTOREFRAME(SDValue Op, const X86Subtarget *Subtarget,
|
||||
Chain = DAG.getCopyToReg(Chain, dl, SPReg, NewSP);
|
||||
|
||||
// FIXME: Restore the base pointer in case of stack realignment!
|
||||
if (RegInfo->needsStackRealignment(MF))
|
||||
report_fatal_error("SEH with stack realignment not yet implemented");
|
||||
|
||||
// Adjust EBP to point back to the original frame position.
|
||||
SDValue NewFP = recoverFramePointer(DAG, MF.getFunction(), IncomingEBP);
|
||||
|
Loading…
Reference in New Issue
Block a user