llvm.org GIT mirror llvm / 5c63c6a
ARMAsmParser: Take MCInst param by const-ref (Broken out from http://reviews.llvm.org/D11167) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242160 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
1 changed file(s) with 9 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
188188 return getParser().Error(L, Msg, Ranges);
189189 }
190190
191 bool validatetLDMRegList(MCInst Inst, const OperandVector &Operands,
191 bool validatetLDMRegList(const MCInst &Inst, const OperandVector &Operands,
192192 unsigned ListNo, bool IsARPop = false);
193 bool validatetSTMRegList(MCInst Inst, const OperandVector &Operands,
193 bool validatetSTMRegList(const MCInst &Inst, const OperandVector &Operands,
194194 unsigned ListNo);
195195
196196 int tryParseRegister();
60326032 // return 'true' if register list contains non-low GPR registers,
60336033 // 'false' otherwise. If Reg is in the register list or is HiReg, set
60346034 // 'containsReg' to true.
6035 static bool checkLowRegisterList(MCInst Inst, unsigned OpNo, unsigned Reg,
6036 unsigned HiReg, bool &containsReg) {
6035 static bool checkLowRegisterList(const MCInst &Inst, unsigned OpNo,
6036 unsigned Reg, unsigned HiReg,
6037 bool &containsReg) {
60376038 containsReg = false;
60386039 for (unsigned i = OpNo; i < Inst.getNumOperands(); ++i) {
60396040 unsigned OpReg = Inst.getOperand(i).getReg();
60486049
60496050 // Check if the specified regisgter is in the register list of the inst,
60506051 // starting at the indicated operand number.
6051 static bool listContainsReg(MCInst &Inst, unsigned OpNo, unsigned Reg) {
6052 for (unsigned i = OpNo; i < Inst.getNumOperands(); ++i) {
6052 static bool listContainsReg(const MCInst &Inst, unsigned OpNo, unsigned Reg) {
6053 for (unsigned i = OpNo, e = Inst.getNumOperands(); i < e; ++i) {
60536054 unsigned OpReg = Inst.getOperand(i).getReg();
60546055 if (OpReg == Reg)
60556056 return true;
60676068
60686069 }
60696070
6070 bool ARMAsmParser::validatetLDMRegList(MCInst Inst,
6071 bool ARMAsmParser::validatetLDMRegList(const MCInst &Inst,
60716072 const OperandVector &Operands,
60726073 unsigned ListNo, bool IsARPop) {
60736074 const ARMOperand &Op = static_cast(*Operands[ListNo]);
60906091 return false;
60916092 }
60926093
6093 bool ARMAsmParser::validatetSTMRegList(MCInst Inst,
6094 bool ARMAsmParser::validatetSTMRegList(const MCInst &Inst,
60946095 const OperandVector &Operands,
60956096 unsigned ListNo) {
60966097 const ARMOperand &Op = static_cast(*Operands[ListNo]);