diff options
author | Michael Liao <michael.liao@intel.com> | 2012-10-25 06:29:14 +0000 |
---|---|---|
committer | Michael Liao <michael.liao@intel.com> | 2012-10-25 06:29:14 +0000 |
commit | aa3c2c09d9d5bc67c6ca2fbc6697257b15476684 (patch) | |
tree | e99e9eb4d21b83f14c52eaaf640150e451012461 /lib/Target/X86/X86FrameLowering.cpp | |
parent | a2b88163af30f59d12ae0172565f3406bdbf6c45 (diff) | |
download | llvm-aa3c2c09d9d5bc67c6ca2fbc6697257b15476684.tar.gz llvm-aa3c2c09d9d5bc67c6ca2fbc6697257b15476684.tar.bz2 llvm-aa3c2c09d9d5bc67c6ca2fbc6697257b15476684.tar.xz |
Clean up where SlotSize should be used instead of pointer size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r-- | lib/Target/X86/X86FrameLowering.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp index e7f817e3a9..369589d469 100644 --- a/lib/Target/X86/X86FrameLowering.cpp +++ b/lib/Target/X86/X86FrameLowering.cpp @@ -313,11 +313,11 @@ void X86FrameLowering::emitCalleeSavedFrameMoves(MachineFunction &MF, if (CSI.empty()) return; std::vector<MachineMove> &Moves = MMI.getFrameMoves(); - const DataLayout *TD = TM.getDataLayout(); + const X86RegisterInfo *RegInfo = TM.getRegisterInfo(); bool HasFP = hasFP(MF); // Calculate amount of bytes used for return address storing. - int stackGrowth = -TD->getPointerSize(0); + int stackGrowth = -RegInfo->getSlotSize(); // FIXME: This is dirty hack. The code itself is pretty mess right now. // It should be rewritten from scratch and generalized sometimes. @@ -715,9 +715,8 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const { // ELSE => DW_CFA_offset_extended std::vector<MachineMove> &Moves = MMI.getFrameMoves(); - const DataLayout *TD = MF.getTarget().getDataLayout(); uint64_t NumBytes = 0; - int stackGrowth = -TD->getPointerSize(0); + int stackGrowth = -SlotSize; if (HasFP) { // Calculate required stack adjustment. |