[X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 3 Nov 2015 08:17:25 +0000 (08:17 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 3 Nov 2015 08:17:25 +0000 (08:17 +0000)
commita64f17562f974f53233acce589e984e1861828e8
tree86a8ff676c38fbfadeed265ca4d68e448a1cba54
parent5a1297dc77a3cc762d623d8d4d26f17daec0b107
[X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments

When push instructions are being used to pass function arguments on
the stack, and either EH or debugging are enabled, we need to generate
.cfi_adjust_cfa_offset directives appropriately. For (synch) EH, it is
enough for the CFA offset to be correct at every call site, while
for debugging we want to be correct after every push.

Darwin does not support this well, so don't use pushes whenever it
would be required.

Differential Revision: http://reviews.llvm.org/D13767

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251904 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineModuleInfo.h
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/Target/X86/X86CallFrameOptimization.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
test/CodeGen/X86/debugloc-argsize.ll
test/CodeGen/X86/fold-push.ll
test/CodeGen/X86/pop-stack-cleanup.ll
test/CodeGen/X86/push-cfi-debug.ll [new file with mode: 0644]
test/CodeGen/X86/push-cfi-obj.ll
test/CodeGen/X86/push-cfi.ll