diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-05-29 21:58:11 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-05-29 21:58:11 +0000 |
commit | 173a72524f5b028d48fd40fa3a5d8c0dcce86e7c (patch) | |
tree | 76518a8e043ac1e505d5c1f436ba212ea7ea35d2 /llvm/lib/Target/X86/X86WinEHState.cpp | |
parent | 246ccc5f518f0126648f8d9421d348307b3cbf1c (diff) | |
download | llvm-173a72524f5b028d48fd40fa3a5d8c0dcce86e7c.zip llvm-173a72524f5b028d48fd40fa3a5d8c0dcce86e7c.tar.gz llvm-173a72524f5b028d48fd40fa3a5d8c0dcce86e7c.tar.bz2 |
Disable FP elimination in funcs using 32-bit MSVC EH personalities
The value in 'ebp' acts as an implicit argument to the outlined
handlers, and is recovered with frameaddress(1).
llvm-svn: 238619
Diffstat (limited to 'llvm/lib/Target/X86/X86WinEHState.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86WinEHState.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86WinEHState.cpp b/llvm/lib/Target/X86/X86WinEHState.cpp index 1a205e8..8a4a816 100644 --- a/llvm/lib/Target/X86/X86WinEHState.cpp +++ b/llvm/lib/Target/X86/X86WinEHState.cpp @@ -155,6 +155,11 @@ bool WinEHStatePass::runOnFunction(Function &F) { if (!isMSVCEHPersonality(Personality)) return false; + // Disable frame pointer elimination in this function. + // FIXME: Do the nested handlers need to keep the parent ebp in ebp, or can we + // use an arbitrary register? + F.addFnAttr("no-frame-pointer-elim", "true"); + emitExceptionRegistrationRecord(&F); auto *MMIPtr = getAnalysisIfAvailable<MachineModuleInfo>(); |