@@ -215,10 +215,10 @@ class RISCVAsmParser : public MCTargetAsmParser {
215215 ParseStatus parseGPRPair (OperandVector &Operands, bool IsRV64Inst);
216216 ParseStatus parseFRMArg (OperandVector &Operands);
217217 ParseStatus parseFenceArg (OperandVector &Operands);
218- ParseStatus parseReglist (OperandVector &Operands) {
218+ ParseStatus parseRegList (OperandVector &Operands) {
219219 return parseRegListCommon (Operands, /* MustIncludeS0=*/ false );
220220 }
221- ParseStatus parseReglistS0 (OperandVector &Operands) {
221+ ParseStatus parseRegListS0 (OperandVector &Operands) {
222222 return parseRegListCommon (Operands, /* MustIncludeS0=*/ true );
223223 }
224224 ParseStatus parseRegListCommon (OperandVector &Operands, bool MustIncludeS0);
@@ -349,7 +349,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
349349 VType,
350350 FRM,
351351 Fence,
352- Rlist ,
352+ RegList ,
353353 Spimm,
354354 RegReg,
355355 } Kind;
@@ -388,8 +388,8 @@ struct RISCVOperand final : public MCParsedAsmOperand {
388388 unsigned Val;
389389 };
390390
391- struct RlistOp {
392- unsigned Val ;
391+ struct RegListOp {
392+ unsigned Encoding ;
393393 };
394394
395395 struct SpimmOp {
@@ -411,7 +411,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
411411 VTypeOp VType;
412412 FRMOp FRM;
413413 FenceOp Fence;
414- RlistOp Rlist ;
414+ RegListOp RegList ;
415415 SpimmOp Spimm;
416416 RegRegOp RegReg;
417417 };
@@ -448,8 +448,8 @@ struct RISCVOperand final : public MCParsedAsmOperand {
448448 case KindTy::Fence:
449449 Fence = o.Fence ;
450450 break ;
451- case KindTy::Rlist :
452- Rlist = o.Rlist ;
451+ case KindTy::RegList :
452+ RegList = o.RegList ;
453453 break ;
454454 case KindTy::Spimm:
455455 Spimm = o.Spimm ;
@@ -482,9 +482,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
482482 bool isMem () const override { return false ; }
483483 bool isSystemRegister () const { return Kind == KindTy::SystemRegister; }
484484 bool isRegReg () const { return Kind == KindTy::RegReg; }
485- bool isRlist () const { return Kind == KindTy::Rlist ; }
486- bool isRlistS0 () const {
487- return Kind == KindTy::Rlist && Rlist. Val != RISCVZC::RA;
485+ bool isRegList () const { return Kind == KindTy::RegList ; }
486+ bool isRegListS0 () const {
487+ return Kind == KindTy::RegList && RegList. Encoding != RISCVZC::RA;
488488 }
489489 bool isSpimm () const { return Kind == KindTy::Spimm; }
490490
@@ -1009,9 +1009,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
10091009 OS << getFence ();
10101010 OS << ' >' ;
10111011 break ;
1012- case KindTy::Rlist :
1013- OS << " <rlist : " ;
1014- RISCVZC::printRlist (Rlist. Val , OS);
1012+ case KindTy::RegList :
1013+ OS << " <reglist : " ;
1014+ RISCVZC::printRegList (RegList. Encoding , OS);
10151015 OS << ' >' ;
10161016 break ;
10171017 case KindTy::Spimm:
@@ -1098,10 +1098,10 @@ struct RISCVOperand final : public MCParsedAsmOperand {
10981098 return Op;
10991099 }
11001100
1101- static std::unique_ptr<RISCVOperand> createRlist (unsigned RlistEncode,
1101+ static std::unique_ptr<RISCVOperand> createRegList (unsigned RlistEncode,
11021102 SMLoc S) {
1103- auto Op = std::make_unique<RISCVOperand>(KindTy::Rlist );
1104- Op->Rlist . Val = RlistEncode;
1103+ auto Op = std::make_unique<RISCVOperand>(KindTy::RegList );
1104+ Op->RegList . Encoding = RlistEncode;
11051105 Op->StartLoc = S;
11061106 return Op;
11071107 }
@@ -1183,9 +1183,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
11831183 Inst.addOperand (MCOperand::createImm (Imm));
11841184 }
11851185
1186- void addRlistOperands (MCInst &Inst, unsigned N) const {
1186+ void addRegListOperands (MCInst &Inst, unsigned N) const {
11871187 assert (N == 1 && " Invalid number of operands!" );
1188- Inst.addOperand (MCOperand::createImm (Rlist. Val ));
1188+ Inst.addOperand (MCOperand::createImm (RegList. Encoding ));
11891189 }
11901190
11911191 void addRegRegOperands (MCInst &Inst, unsigned N) const {
@@ -2569,13 +2569,13 @@ ParseStatus RISCVAsmParser::parseRegReg(OperandVector &Operands) {
25692569
25702570ParseStatus RISCVAsmParser::parseRegListCommon (OperandVector &Operands,
25712571 bool MustIncludeS0) {
2572- // Rlist : {ra [, s0[-sN]]}
2573- // XRlist : {x1 [, x8[-x9][, x18[-xN]]]}
2572+ // RegList : {ra [, s0[-sN]]}
2573+ // XRegList : {x1 [, x8[-x9][, x18[-xN]]]}
25742574
25752575 // When MustIncludeS0 = true (not the default) (used for `qc.cm.pushfp`) which
25762576 // must include `fp`/`s0` in the list:
2577- // Rlist : {ra, s0[-sN]}
2578- // XRlist : {x1, x8[-x9][, x18[-xN]]}
2577+ // RegList : {ra, s0[-sN]}
2578+ // XRegList : {x1, x8[-x9][, x18[-xN]]}
25792579
25802580 if (getTok ().isNot (AsmToken::LCurly))
25812581 return ParseStatus::NoMatch;
@@ -2656,13 +2656,13 @@ ParseStatus RISCVAsmParser::parseRegListCommon(OperandVector &Operands,
26562656 return Error (S, " invalid register list, {ra, s0-s10} or {x1, x8-x9, "
26572657 " x18-x26} is not supported" );
26582658
2659- auto Encode = RISCVZC::encodeRlist (RegEnd, IsRVE);
2659+ auto Encode = RISCVZC::encodeRegList (RegEnd, IsRVE);
26602660 assert (Encode != RISCVZC::INVALID_RLIST);
26612661
26622662 if (MustIncludeS0 && Encode == RISCVZC::RA)
26632663 return Error (S, " register list must include 's0' or 'x8'" );
26642664
2665- Operands.push_back (RISCVOperand::createRlist (Encode, S));
2665+ Operands.push_back (RISCVOperand::createRegList (Encode, S));
26662666
26672667 return ParseStatus::Success;
26682668}
@@ -2677,14 +2677,14 @@ ParseStatus RISCVAsmParser::parseZcmpStackAdj(OperandVector &Operands,
26772677
26782678 int64_t StackAdjustment = getTok ().getIntVal ();
26792679
2680- auto *RListOp = static_cast <RISCVOperand *>(Operands.back ().get ());
2681- if (!RListOp-> isRlist ())
2680+ auto *RegListOp = static_cast <RISCVOperand *>(Operands.back ().get ());
2681+ if (!RegListOp-> isRegList ())
26822682 return ParseStatus::NoMatch;
26832683
2684- unsigned RlistVal = RListOp-> Rlist . Val ;
2684+ unsigned RlistEncode = RegListOp-> RegList . Encoding ;
26852685
2686- assert (RlistVal != RISCVZC::INVALID_RLIST);
2687- unsigned StackAdjBase = RISCVZC::getStackAdjBase (RlistVal , isRV64 ());
2686+ assert (RlistEncode != RISCVZC::INVALID_RLIST);
2687+ unsigned StackAdjBase = RISCVZC::getStackAdjBase (RlistEncode , isRV64 ());
26882688 if (Negative != ExpectNegative || StackAdjustment % 16 != 0 ||
26892689 StackAdjustment < StackAdjBase || (StackAdjustment - StackAdjBase) > 48 ) {
26902690 int64_t Lower = StackAdjBase;
0 commit comments