mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-09 05:13:01 +00:00
Bug fix in setting CC register.
Also use distinct names for the three types of SetMachineOperand to avoid painful overloading problems and errors. llvm-svn: 1904
This commit is contained in:
parent
b26ed73c33
commit
edc1adae11
@ -41,7 +41,7 @@ MachineInstr::MachineInstr(MachineOpCode _opCode,
|
||||
}
|
||||
|
||||
void
|
||||
MachineInstr::SetMachineOperand(unsigned int i,
|
||||
MachineInstr::SetMachineOperandVal(unsigned int i,
|
||||
MachineOperand::MachineOperandType operandType,
|
||||
Value* _val, bool isdef=false)
|
||||
{
|
||||
@ -52,22 +52,25 @@ MachineInstr::SetMachineOperand(unsigned int i,
|
||||
}
|
||||
|
||||
void
|
||||
MachineInstr::SetMachineOperand(unsigned int i,
|
||||
MachineInstr::SetMachineOperandConst(unsigned int i,
|
||||
MachineOperand::MachineOperandType operandType,
|
||||
int64_t intValue, bool isdef=false)
|
||||
int64_t intValue)
|
||||
{
|
||||
assert(i < operands.size());
|
||||
assert(TargetInstrDescriptors[opCode].resultPos != (int) i &&
|
||||
"immed. constant cannot be defined");
|
||||
operands[i].InitializeConst(operandType, intValue);
|
||||
operands[i].isDef = isdef ||
|
||||
TargetInstrDescriptors[opCode].resultPos == (int) i;
|
||||
operands[i].isDef = false;
|
||||
}
|
||||
|
||||
void
|
||||
MachineInstr::SetMachineOperand(unsigned int i,
|
||||
int regNum, bool isdef=false)
|
||||
MachineInstr::SetMachineOperandReg(unsigned int i,
|
||||
int regNum,
|
||||
bool isdef=false,
|
||||
bool isCCReg=false)
|
||||
{
|
||||
assert(i < operands.size());
|
||||
operands[i].InitializeReg(regNum);
|
||||
operands[i].InitializeReg(regNum, isCCReg);
|
||||
operands[i].isDef = isdef ||
|
||||
TargetInstrDescriptors[opCode].resultPos == (int) i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user