summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-05 00:22:13 +0000
committerEric Christopher <echristo@gmail.com>2014-06-05 00:22:13 +0000
commit7a8272d73c6b107064d97af833e2ccdf761877d8 (patch)
treea3688064bb55149259b0fa21517b7ccd0190c5e9 /lib
parent798a829eca940e0a6440cfb2b828eaf654553fdf (diff)
downloadllvm-7a8272d73c6b107064d97af833e2ccdf761877d8.tar.gz
llvm-7a8272d73c6b107064d97af833e2ccdf761877d8.tar.bz2
llvm-7a8272d73c6b107064d97af833e2ccdf761877d8.tar.xz
We've got a getSlotSize call already that we use everywhere else,
use it here too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86FrameLowering.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp
index 48ae836a78..8942566687 100644
--- a/lib/Target/X86/X86FrameLowering.cpp
+++ b/lib/Target/X86/X86FrameLowering.cpp
@@ -982,8 +982,9 @@ bool X86FrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
DebugLoc DL = MBB.findDebugLoc(MI);
MachineFunction &MF = *MBB.getParent();
-
- unsigned SlotSize = STI.is64Bit() ? 8 : 4;
+ const X86RegisterInfo *RegInfo =
+ static_cast<const X86RegisterInfo *>(MF.getTarget().getRegisterInfo());
+ unsigned SlotSize = RegInfo->getSlotSize();
unsigned FPReg = TRI->getFrameRegister(MF);
unsigned CalleeFrameSize = 0;