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: 1894
This commit is contained in:
parent
f9ab087be7
commit
c87f73d64e
|
@ -119,7 +119,8 @@ private:
|
||||||
Value* _val);
|
Value* _val);
|
||||||
void InitializeConst (MachineOperandType operandType,
|
void InitializeConst (MachineOperandType operandType,
|
||||||
int64_t intValue);
|
int64_t intValue);
|
||||||
void InitializeReg (int regNum);
|
void InitializeReg (int regNum,
|
||||||
|
bool isCCReg);
|
||||||
|
|
||||||
friend class MachineInstr;
|
friend class MachineInstr;
|
||||||
|
|
||||||
|
@ -198,9 +199,9 @@ MachineOperand::InitializeConst(MachineOperandType operandType,
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
MachineOperand::InitializeReg(int _regNum)
|
MachineOperand::InitializeReg(int _regNum, bool isCCReg)
|
||||||
{
|
{
|
||||||
opType = MO_MachineRegister;
|
opType = isCCReg? MO_CCRegister : MO_MachineRegister;
|
||||||
value = NULL;
|
value = NULL;
|
||||||
regNum = (int) _regNum;
|
regNum = (int) _regNum;
|
||||||
}
|
}
|
||||||
|
@ -284,15 +285,16 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// Access to set the operands when building the machine instruction
|
// Access to set the operands when building the machine instruction
|
||||||
void SetMachineOperand(unsigned i,
|
void SetMachineOperandVal(unsigned i,
|
||||||
MachineOperand::MachineOperandType operandType,
|
MachineOperand::MachineOperandType operandType,
|
||||||
Value* _val, bool isDef=false);
|
Value* _val, bool isDef=false);
|
||||||
void SetMachineOperand(unsigned i,
|
void SetMachineOperandConst(unsigned i,
|
||||||
MachineOperand::MachineOperandType operandType,
|
MachineOperand::MachineOperandType operandType,
|
||||||
int64_t intValue, bool isDef=false);
|
int64_t intValue);
|
||||||
void SetMachineOperand(unsigned i,
|
void SetMachineOperandReg(unsigned i,
|
||||||
int regNum,
|
int regNum,
|
||||||
bool isDef=false);
|
bool isDef=false,
|
||||||
|
bool isCCReg=false);
|
||||||
|
|
||||||
void addImplicitRef (Value* val,
|
void addImplicitRef (Value* val,
|
||||||
bool isDef=false);
|
bool isDef=false);
|
||||||
|
|
Loading…
Reference in New Issue