From df1c3b8398d1df253ebd389ac1068ec732a2f28f Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Mon, 5 Nov 2001 03:56:02 +0000 Subject: [PATCH] Make reg. numbers signed ints. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1137 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineInstr.h | 10 +++++----- lib/CodeGen/MachineInstr.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 748ae15bf71..dc68904e3c1 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -107,9 +107,9 @@ public: opType == MO_PCRelativeDisp); return value; } - inline unsigned int getMachineRegNum() const { + inline int getMachineRegNum() const { assert(opType == MO_MachineRegister); - return (unsigned) regNum; + return regNum; } inline int64_t getImmedValue () const { assert(opType == MO_SignExtendedImmed || opType == MO_UnextendedImmed); @@ -132,7 +132,7 @@ private: Value* _val); void InitializeConst (MachineOperandType operandType, int64_t intValue); - void InitializeReg (unsigned int regNum); + void InitializeReg (int regNum); friend class MachineInstr; friend class ValOpIterator; @@ -215,7 +215,7 @@ MachineOperand::InitializeConst(MachineOperandType operandType, } inline void -MachineOperand::InitializeReg(unsigned int _regNum) +MachineOperand::InitializeReg(int _regNum) { opType = MO_MachineRegister; value = NULL; @@ -309,7 +309,7 @@ public: MachineOperand::MachineOperandType operandType, int64_t intValue, bool isDef=false); void SetMachineOperand(unsigned int i, - unsigned int regNum, + int regNum, bool isDef=false); void addImplicitRef (Value* val, diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index b4f275db38c..b620fa4bfaa 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -66,7 +66,7 @@ MachineInstr::SetMachineOperand(unsigned int i, void MachineInstr::SetMachineOperand(unsigned int i, - unsigned int regNum, bool isdef=false) + int regNum, bool isdef=false) { assert(i < operands.size()); operands[i].InitializeReg(regNum);