Enable X86 support for savestack/restorestack

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25278 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-01-13 18:00:54 +00:00
parent cadd7420f9
commit 9edba7605e
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
setSetCCResultType(MVT::i8);
setSetCCResultContents(ZeroOrOneSetCCResult);
setShiftAmountFlavor(Mask); // shl X, 32 == shl X, 0
setStackPointerRegisterToSaveRestore(X86::ESP);
// Set up the register classes.
addRegisterClass(MVT::i8, X86::R8RegisterClass);

View File

@ -1229,7 +1229,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
cast<RegisterSDNode>(Node->getOperand(1))->getReg() :
cast<RegisterSDNode>(Node)->getReg();
// Just use the specified register as our input if we can.
if (MRegisterInfo::isVirtualRegister(Reg) || Reg == X86::ESP)
if (MRegisterInfo::isVirtualRegister(Reg))
return Reg;
}