mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Make sure epilogue esp adjustment is placed before any terminator and pop instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40538 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85dce6cf78
commit
fcc8793dc8
@ -1372,8 +1372,9 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
|
|
||||||
// Skip the callee-saved pop instructions.
|
// Skip the callee-saved pop instructions.
|
||||||
while (MBBI != MBB.begin()) {
|
while (MBBI != MBB.begin()) {
|
||||||
MachineBasicBlock::iterator PI = prior(MBBI);
|
MachineBasicBlock::iterator PI = prior(MBBI);
|
||||||
if (PI->getOpcode() != X86::POP32r && PI->getOpcode() != X86::POP64r)
|
unsigned Opc = PI->getOpcode();
|
||||||
|
if (Opc != X86::POP32r && Opc != X86::POP64r && !TII.isTerminatorInstr(Opc))
|
||||||
break;
|
break;
|
||||||
--MBBI;
|
--MBBI;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user