diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-10-07 07:01:31 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-10-07 07:01:31 +0000 |
commit | 259f1508f08f662eb2ecfab5155cd92e0c03eff8 (patch) | |
tree | 5cf2fc329842d2039ab61ece0d8978b35cb2b946 /llvm/lib/MC/MCDwarf.cpp | |
parent | 1a6fd1cc0f3dea144ac6bd6291de48283f990745 (diff) | |
download | bcm5719-llvm-259f1508f08f662eb2ecfab5155cd92e0c03eff8.tar.gz bcm5719-llvm-259f1508f08f662eb2ecfab5155cd92e0c03eff8.zip |
[X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls
When outgoing function arguments are passed using push instructions, and EH
is enabled, we may need to indicate to the stack unwinder that the stack
pointer was adjusted before the call.
This should fix the exception handling issues in PR24792.
Differential Revision: http://reviews.llvm.org/D13132
llvm-svn: 249522
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 58cf652b68f..e964032b9d2 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -1147,6 +1147,11 @@ void FrameEmitterImpl::EmitCFIInstruction(MCObjectStreamer &Streamer, Streamer.EmitIntValue(dwarf::DW_CFA_restore | Reg, 1); return; } + case MCCFIInstruction::OpGnuArgsSize: { + Streamer.EmitIntValue(dwarf::DW_CFA_GNU_args_size, 1); + Streamer.EmitULEB128IntValue(Instr.getOffset()); + return; + } case MCCFIInstruction::OpEscape: Streamer.EmitBytes(Instr.getValues()); return; |