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);
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);
switch (Desc.TSFlags & X86II::FormMask) {
default: assert(0 && "Unknown FormMask value in X86 MachineCodeEmitter!");
case X86II::Pseudo:
- if (Opcode != X86::IMPLICIT_DEF && Opcode != X86::IMPLICIT_USE)
+ if (Opcode != X86::IMPLICIT_USE)
std::cerr << "X86 Machine Code Emitter: No 'form', not emitting: " << MI;
break;
switch (Desc.TSFlags & X86II::FormMask) {
default: assert(0 && "Unknown FormMask value in X86 MachineCodeEmitter!");
case X86II::Pseudo:
- if (Opcode != X86::IMPLICIT_DEF && Opcode != X86::IMPLICIT_USE)
+ if (Opcode != X86::IMPLICIT_USE)
std::cerr << "X86 Machine Code Emitter: No 'form', not emitting: " << MI;
break;
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);
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);
// instruction after the call.
I(ADJCALLSTACKUP , "adjcallstackup" , 0, 0, X86II::Pseudo, NoIR, NoIR)
-// This pseudo-instruction is used to record implicit definitions of physical
-// registers: registers that are live on input to the function (currently just
-// the stack pointer, eventually could include arguments passed in registers).
-//
-I(IMPLICIT_DEF, "implicit_def", 0, 0, X86II::Pseudo, NoIR, NoIR)
-
// This pseudo-instruction is used to record implicit uses of physical registers
// at the end of the function. This ensures that bad things aren't done to
// registes that are live on exit from the function (for example, EAX).