mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
42f632041d
commit
c356e565a6
@ -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…
x
Reference in New Issue
Block a user