[llvm] r241597 - [WinEH] Add a report_fatal_error for 32-bit stack realignment
Reid Kleckner
reid at kleckner.net
Tue Jul 7 08:47:30 PDT 2015
Author: rnk
Date: Tue Jul 7 10:47:29 2015
New Revision: 241597
URL: http://llvm.org/viewvc/llvm-project?rev=241597&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=241597&r1=241596&r2=241597&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Jul 7 10:47:29 2015
@@ -15953,6 +15953,9 @@ static SDValue LowerSEHRESTOREFRAME(SDVa
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(SDVa
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);
More information about the llvm-commits
mailing list