summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FrameLowering.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-12-06 22:14:27 +0000
committerBill Wendling <isanbard@gmail.com>2011-12-06 22:14:27 +0000
commit67a70c995a85117e11f31358fa6a0e2dc6f6c238 (patch)
tree788278e0d94d96db690cbfd6fd474c8cdcaab57b /llvm/lib/Target/X86/X86FrameLowering.cpp
parent2a81dd4a3c21457c7272b07c86c44885a974ab1e (diff)
downloadbcm5719-llvm-67a70c995a85117e11f31358fa6a0e2dc6f6c238.tar.gz
bcm5719-llvm-67a70c995a85117e11f31358fa6a0e2dc6f6c238.zip
Explicitly check for the different SUB instructions.
llvm-svn: 145976
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FrameLowering.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index 6e2b3df7a4a..f8371e000d5 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -475,9 +475,6 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
unsigned FramePtr = RegInfo->getFrameRegister(MF);
unsigned StackPtr = RegInfo->getStackRegister();
- X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
- int TailCallReturnAddrDelta = X86FI->getTCReturnAddrDelta();
-
bool Is64Bit = STI.is64Bit();
bool HasFP = hasFP(MF);
@@ -490,7 +487,6 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
unsigned PushInstrSize = 1;
unsigned MoveInstr = (Is64Bit ? X86::MOV64rr : X86::MOV32rr);
unsigned MoveInstrSize = (Is64Bit ? 3 : 2);
- unsigned SubtractInstr = getSUBriOpcode(Is64Bit, -TailCallReturnAddrDelta);
unsigned SubtractInstrIdx = (Is64Bit ? 3 : 2);
unsigned StackDivide = (Is64Bit ? 8 : 4);
@@ -529,7 +525,8 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
memset(SavedRegs, 0, sizeof(SavedRegs));
SavedRegIdx = CU_NUM_SAVED_REGS;
InstrOffset += MoveInstrSize;
- } else if (Opc == SubtractInstr) {
+ } else if (Opc == X86::SUB64ri32 || Opc == X86::SUB64ri8 ||
+ Opc == X86::SUB32ri || Opc == X86::SUB32ri8) {
if (StackSize)
// We already have a stack size.
return 0;
OpenPOWER on IntegriCloud