Teach reginfo how to deal with ADJSTACKPTRri, allowing us to generate:

add %ESP, 20
        jmp %EDX  # TAIL CALL

instead of:
        add %ESP, -8
        add %ESP, 28
        jmp %EDX  # TAIL CALL

llvm-svn: 22047
This commit is contained in:
Chris Lattner 2005-05-15 05:49:58 +00:00
parent dd66a41e0e
commit 97e3b65652
1 changed files with 3 additions and 0 deletions

View File

@ -544,6 +544,9 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF,
PI->getOperand(0).getReg() == X86::ESP) {
NumBytes -= PI->getOperand(1).getImmedValue();
MBB.erase(PI);
} else if (PI->getOpcode() == X86::ADJSTACKPTRri) {
NumBytes += PI->getOperand(1).getImmedValue();
MBB.erase(PI);
}
}