aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-03-18 03:10:17 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-03-18 03:10:17 +0000
commit9558b4a29290d951b339424a9205610015451c9a (patch)
tree904985dfacf9a36df72e61ba7104149a80662e75
parente76af29edc69724df1f4cd2548adaa27151df14e (diff)
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@1894 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/MachineInstr.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 5ce77f2828..729d37b911 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -119,7 +119,8 @@ private:
Value* _val);
void InitializeConst (MachineOperandType operandType,
int64_t intValue);
- void InitializeReg (int regNum);
+ void InitializeReg (int regNum,
+ bool isCCReg);
friend class MachineInstr;
@@ -198,9 +199,9 @@ MachineOperand::InitializeConst(MachineOperandType operandType,
}
inline void
-MachineOperand::InitializeReg(int _regNum)
+MachineOperand::InitializeReg(int _regNum, bool isCCReg)
{
- opType = MO_MachineRegister;
+ opType = isCCReg? MO_CCRegister : MO_MachineRegister;
value = NULL;
regNum = (int) _regNum;
}
@@ -284,15 +285,16 @@ public:
// Access to set the operands when building the machine instruction
- void SetMachineOperand(unsigned i,
+ void SetMachineOperandVal(unsigned i,
MachineOperand::MachineOperandType operandType,
Value* _val, bool isDef=false);
- void SetMachineOperand(unsigned i,
+ void SetMachineOperandConst(unsigned i,
MachineOperand::MachineOperandType operandType,
- int64_t intValue, bool isDef=false);
- void SetMachineOperand(unsigned i,
- int regNum,
- bool isDef=false);
+ int64_t intValue);
+ void SetMachineOperandReg(unsigned i,
+ int regNum,
+ bool isDef=false,
+ bool isCCReg=false);
void addImplicitRef (Value* val,
bool isDef=false);