diff options
author | Reid Kleckner <rnk@google.com> | 2015-10-16 23:43:27 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-10-16 23:43:27 +0000 |
commit | 28e490342b570ca1f261811e98f31b52e7111cec (patch) | |
tree | eef4a798a32aab53eb3653bf976bd9a170e3a0f6 /llvm/lib/Target/X86/X86FrameLowering.h | |
parent | 02b74368ce181614741c7f5aa3a39a86df78f9af (diff) | |
download | bcm5719-llvm-28e490342b570ca1f261811e98f31b52e7111cec.tar.gz bcm5719-llvm-28e490342b570ca1f261811e98f31b52e7111cec.zip |
[WinEH] Fix stack alignment in funclets and ParentFrameOffset calculation
Our previous value of "16 + 8 + MaxCallFrameSize" for ParentFrameOffset
is incorrect when CSRs are involved. We were supposed to have a test
case to catch this, but it wasn't very rigorous.
The main effect here is that calling _CxxThrowException inside a
catchpad doesn't immediately crash on MOVAPS when you have an odd number
of CSRs.
llvm-svn: 250583
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.h')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.h b/llvm/lib/Target/X86/X86FrameLowering.h index b9cf3a99bb3..59c6a062810 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.h +++ b/llvm/lib/Target/X86/X86FrameLowering.h @@ -101,6 +101,8 @@ public: MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override; + unsigned getWinEHParentFrameOffset(const MachineFunction &MF) const override; + /// Check the instruction before/after the passed instruction. If /// it is an ADD/SUB/LEA instruction it is deleted argument and the /// stack adjustment is returned as a positive value for ADD/LEA and @@ -152,6 +154,8 @@ private: restoreWin32EHStackPointers(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, bool RestoreSP = false) const; + + unsigned getWinEHFuncletFrameSize(const MachineFunction &MF) const; }; } // End llvm namespace |