mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 07:00:45 +00:00
This is the real fix for the previous register allocator problem.
Physical registers should not float around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7587 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b10cea86a9
commit
02beda1221
@ -646,6 +646,8 @@ bool ISel::EmitComparisonGetSignedness(unsigned OpNum, Value *Op0, Value *Op1) {
|
|||||||
BuildMI(BB, SetCCOpcodeTab[0][OpNum], 0, X86::AL);
|
BuildMI(BB, SetCCOpcodeTab[0][OpNum], 0, X86::AL);
|
||||||
BuildMI(BB, X86::CMPrr32, 2).addReg(Op0r+1).addReg(Op1r+1);
|
BuildMI(BB, X86::CMPrr32, 2).addReg(Op0r+1).addReg(Op1r+1);
|
||||||
BuildMI(BB, SetCCOpcodeTab[isSigned][OpNum], 0, X86::BL);
|
BuildMI(BB, SetCCOpcodeTab[isSigned][OpNum], 0, X86::BL);
|
||||||
|
BuildMI(BB, X86::IMPLICIT_DEF, 0, X86::BH);
|
||||||
|
BuildMI(BB, X86::IMPLICIT_DEF, 0, X86::AH);
|
||||||
BuildMI(BB, X86::CMOVErr16, 2, X86::BX).addReg(X86::BX).addReg(X86::AX);
|
BuildMI(BB, X86::CMOVErr16, 2, X86::BX).addReg(X86::BX).addReg(X86::AX);
|
||||||
// NOTE: visitSetCondInst knows that the value is dumped into the BL
|
// NOTE: visitSetCondInst knows that the value is dumped into the BL
|
||||||
// register at this point for long values...
|
// register at this point for long values...
|
||||||
|
@ -470,7 +470,7 @@ void Emitter::emitInstruction(MachineInstr &MI) {
|
|||||||
switch (Desc.TSFlags & X86II::FormMask) {
|
switch (Desc.TSFlags & X86II::FormMask) {
|
||||||
default: assert(0 && "Unknown FormMask value in X86 MachineCodeEmitter!");
|
default: assert(0 && "Unknown FormMask value in X86 MachineCodeEmitter!");
|
||||||
case X86II::Pseudo:
|
case X86II::Pseudo:
|
||||||
if (Opcode != X86::IMPLICIT_USE)
|
if (Opcode != X86::IMPLICIT_USE && Opcode != X86::IMPLICIT_DEF)
|
||||||
std::cerr << "X86 Machine Code Emitter: No 'form', not emitting: " << MI;
|
std::cerr << "X86 Machine Code Emitter: No 'form', not emitting: " << MI;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -646,6 +646,8 @@ bool ISel::EmitComparisonGetSignedness(unsigned OpNum, Value *Op0, Value *Op1) {
|
|||||||
BuildMI(BB, SetCCOpcodeTab[0][OpNum], 0, X86::AL);
|
BuildMI(BB, SetCCOpcodeTab[0][OpNum], 0, X86::AL);
|
||||||
BuildMI(BB, X86::CMPrr32, 2).addReg(Op0r+1).addReg(Op1r+1);
|
BuildMI(BB, X86::CMPrr32, 2).addReg(Op0r+1).addReg(Op1r+1);
|
||||||
BuildMI(BB, SetCCOpcodeTab[isSigned][OpNum], 0, X86::BL);
|
BuildMI(BB, SetCCOpcodeTab[isSigned][OpNum], 0, X86::BL);
|
||||||
|
BuildMI(BB, X86::IMPLICIT_DEF, 0, X86::BH);
|
||||||
|
BuildMI(BB, X86::IMPLICIT_DEF, 0, X86::AH);
|
||||||
BuildMI(BB, X86::CMOVErr16, 2, X86::BX).addReg(X86::BX).addReg(X86::AX);
|
BuildMI(BB, X86::CMOVErr16, 2, X86::BX).addReg(X86::BX).addReg(X86::AX);
|
||||||
// NOTE: visitSetCondInst knows that the value is dumped into the BL
|
// NOTE: visitSetCondInst knows that the value is dumped into the BL
|
||||||
// register at this point for long values...
|
// register at this point for long values...
|
||||||
|
@ -107,6 +107,7 @@ def NOOP : X86Inst<"nop", 0x90, RawFrm, NoArg>; // nop
|
|||||||
def ADJCALLSTACKDOWN : X86Inst<"ADJCALLSTACKDOWN", 0, Pseudo, NoArg>;
|
def ADJCALLSTACKDOWN : X86Inst<"ADJCALLSTACKDOWN", 0, Pseudo, NoArg>;
|
||||||
def ADJCALLSTACKUP : X86Inst<"ADJCALLSTACKUP", 0, Pseudo, NoArg>;
|
def ADJCALLSTACKUP : X86Inst<"ADJCALLSTACKUP", 0, Pseudo, NoArg>;
|
||||||
def IMPLICIT_USE : X86Inst<"IMPLICIT_USE", 0, Pseudo, NoArg>;
|
def IMPLICIT_USE : X86Inst<"IMPLICIT_USE", 0, Pseudo, NoArg>;
|
||||||
|
def IMPLICIT_DEF : X86Inst<"IMPLICIT_DEF", 0, Pseudo, NoArg>;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Control Flow Instructions...
|
// Control Flow Instructions...
|
||||||
|
Loading…
Reference in New Issue
Block a user