mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 07:31:53 +00:00
Explicitly check for the different SUB instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7c2a4a30e0
commit
84d518af19
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user