aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-13 18:00:54 +0000
committerChris Lattner <sabre@nondot.org>2006-01-13 18:00:54 +0000
commit9edba7605e48aaf2b99cf0c8204db3fa1bd4d2f8 (patch)
tree3eabdb517b6e67c102e060f88569a25143005172 /lib
parentcadd7420f9e705735b794e61cd24aab16ce2fa18 (diff)
downloadexternal_llvm-9edba7605e48aaf2b99cf0c8204db3fa1bd4d2f8.zip
external_llvm-9edba7605e48aaf2b99cf0c8204db3fa1bd4d2f8.tar.gz
external_llvm-9edba7605e48aaf2b99cf0c8204db3fa1bd4d2f8.tar.bz2
Enable X86 support for savestack/restorestack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp1
-rw-r--r--lib/Target/X86/X86ISelPattern.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 6a2fb68..776780f 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -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);
diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp
index cb18354..c5d5a26 100644
--- a/lib/Target/X86/X86ISelPattern.cpp
+++ b/lib/Target/X86/X86ISelPattern.cpp
@@ -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;
}