diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-11-03 08:17:25 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-11-03 08:17:25 +0000 |
commit | 73dc85293f003c0e81b1f3e6a255a24f1f8b6db6 (patch) | |
tree | d47c802239005955de6518927110703828608564 /llvm/lib/Target/X86/X86FrameLowering.h | |
parent | 4ec5abffae8cd3957f69d247b92212ae92a43036 (diff) | |
download | bcm5719-llvm-73dc85293f003c0e81b1f3e6a255a24f1f8b6db6.tar.gz bcm5719-llvm-73dc85293f003c0e81b1f3e6a255a24f1f8b6db6.zip |
[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
llvm-svn: 251904
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.h')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.h b/llvm/lib/Target/X86/X86FrameLowering.h index 59c6a062810..261eade9173 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.h +++ b/llvm/lib/Target/X86/X86FrameLowering.h @@ -125,13 +125,13 @@ public: /// \p MBB will be correctly handled by the target. bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override; -private: - uint64_t calculateMaxStackAlign(const MachineFunction &MF) const; - /// Wraps up getting a CFI index and building a MachineInstr for it. void BuildCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, MCCFIInstruction CFIInst) const; +private: + uint64_t calculateMaxStackAlign(const MachineFunction &MF) const; + /// Aligns the stack pointer by ANDing it with -MaxAlign. void BuildStackAlignAND(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, |