[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:
Reid Kleckner 2015-07-07 15:47:29 +00:00
parent 41e59a6d7b
commit db38d7657a

View File

@ -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);