aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/InstSelectSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-07 19:21:28 +0000
committerChris Lattner <sabre@nondot.org>2003-05-07 19:21:28 +0000
commitc248903b2a11aadd7098b604024456b0f77f51b0 (patch)
treef080ad0bbb6e9debf8f6d9ea04a233914d3660c6 /lib/Target/X86/InstSelectSimple.cpp
parentdff780f0466d824e775dd748d9880f0389be7260 (diff)
IMPLICIT_DEF was not the beautiful elegant solution I thought it was going
to be. In fact, it made stuff worse. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r--lib/Target/X86/InstSelectSimple.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index 3a12d5e2c9..0df00e2f94 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -79,9 +79,6 @@ namespace {
BB = &F->front();
- // Declare that the stack pointer is live on entrance to the function
- BuildMI(BB, X86::IMPLICIT_DEF, 0, X86::ESP);
-
// Copy incoming arguments off of the stack...
LoadArgumentsToVirtualRegs(Fn);
@@ -677,18 +674,18 @@ void ISel::visitReturnInst(ReturnInst &I) {
case cInt:
promote32(X86::EAX, ValueRecord(RetReg, RetVal->getType()));
// Declare that EAX is live on exit
- BuildMI(BB, X86::IMPLICIT_USE, 1).addReg(X86::EAX);
+ BuildMI(BB, X86::IMPLICIT_USE, 2).addReg(X86::EAX).addReg(X86::ESP);
break;
case cFP: // Floats & Doubles: Return in ST(0)
BuildMI(BB, X86::FpSETRESULT, 1).addReg(RetReg);
// Declare that top-of-stack is live on exit
- BuildMI(BB, X86::IMPLICIT_USE, 1).addReg(X86::ST0);
+ BuildMI(BB, X86::IMPLICIT_USE, 2).addReg(X86::ST0).addReg(X86::ESP);
break;
case cLong:
BuildMI(BB, X86::MOVrr32, 1, X86::EAX).addReg(RetReg);
BuildMI(BB, X86::MOVrr32, 1, X86::EDX).addReg(RetReg+1);
// Declare that EAX & EDX are live on exit
- BuildMI(BB, X86::IMPLICIT_USE, 2).addReg(X86::EAX).addReg(X86::EDX);
+ BuildMI(BB, X86::IMPLICIT_USE, 3).addReg(X86::EAX).addReg(X86::EDX).addReg(X86::ESP);
break;
default:
visitInstruction(I);