@@ -2532,14 +2532,14 @@ class ARMOperand : public MCParsedAsmOperand {
2532
2532
void addCondCodeOperands (MCInst &Inst, unsigned N) const {
2533
2533
assert (N == 2 && " Invalid number of operands!" );
2534
2534
Inst.addOperand (MCOperand::createImm (unsigned (getCondCode ())));
2535
- unsigned RegNum = getCondCode () == ARMCC::AL ? 0 : ARM::CPSR;
2535
+ unsigned RegNum = getCondCode () == ARMCC::AL ? ARM::NoRegister : ARM::CPSR;
2536
2536
Inst.addOperand (MCOperand::createReg (RegNum));
2537
2537
}
2538
2538
2539
2539
void addVPTPredNOperands (MCInst &Inst, unsigned N) const {
2540
2540
assert (N == 3 && " Invalid number of operands!" );
2541
2541
Inst.addOperand (MCOperand::createImm (unsigned (getVPTPred ())));
2542
- unsigned RegNum = getVPTPred () == ARMVCC::None ? 0 : ARM::P0;
2542
+ unsigned RegNum = getVPTPred () == ARMVCC::None ? ARM::NoRegister : ARM::P0;
2543
2543
Inst.addOperand (MCOperand::createReg (RegNum));
2544
2544
Inst.addOperand (MCOperand::createReg (0 ));
2545
2545
}
@@ -7164,8 +7164,8 @@ bool ARMAsmParser::parseInstruction(ParseInstructionInfo &Info, StringRef Name,
7164
7164
// Add the carry setting operand, if necessary.
7165
7165
if (CanAcceptCarrySet && CarrySetting) {
7166
7166
SMLoc Loc = SMLoc::getFromPointer (NameLoc.getPointer () + Mnemonic.size ());
7167
- Operands.push_back (
7168
- ARMOperand::CreateCCOut ( CarrySetting ? ARM::CPSR : 0 , Loc, *this ));
7167
+ Operands.push_back (ARMOperand::CreateCCOut (
7168
+ CarrySetting ? ARM::CPSR : ARM::NoRegister , Loc, *this ));
7169
7169
}
7170
7170
7171
7171
// Add the predication code operand, if necessary.
@@ -10372,7 +10372,8 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
10372
10372
case ARM::t2ASRri:
10373
10373
if (isARMLowRegister (Inst.getOperand (0 ).getReg ()) &&
10374
10374
isARMLowRegister (Inst.getOperand (1 ).getReg ()) &&
10375
- Inst.getOperand (5 ).getReg () == (inITBlock () ? 0 : ARM::CPSR) &&
10375
+ Inst.getOperand (5 ).getReg () ==
10376
+ (inITBlock () ? ARM::NoRegister : ARM::CPSR) &&
10376
10377
!HasWideQualifier) {
10377
10378
unsigned NewOpc;
10378
10379
switch (Inst.getOpcode ()) {
@@ -10422,14 +10423,14 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
10422
10423
TmpInst.addOperand (Inst.getOperand (0 )); // Rd
10423
10424
if (isNarrow)
10424
10425
TmpInst.addOperand (MCOperand::createReg (
10425
- Inst.getOpcode () == ARM::t2MOVSsr ? ARM::CPSR : 0 ));
10426
+ Inst.getOpcode () == ARM::t2MOVSsr ? ARM::CPSR : ARM::NoRegister ));
10426
10427
TmpInst.addOperand (Inst.getOperand (1 )); // Rn
10427
10428
TmpInst.addOperand (Inst.getOperand (2 )); // Rm
10428
10429
TmpInst.addOperand (Inst.getOperand (4 )); // CondCode
10429
10430
TmpInst.addOperand (Inst.getOperand (5 ));
10430
10431
if (!isNarrow)
10431
10432
TmpInst.addOperand (MCOperand::createReg (
10432
- Inst.getOpcode () == ARM::t2MOVSsr ? ARM::CPSR : 0 ));
10433
+ Inst.getOpcode () == ARM::t2MOVSsr ? ARM::CPSR : ARM::NoRegister ));
10433
10434
Inst = TmpInst;
10434
10435
return true ;
10435
10436
}
@@ -10475,15 +10476,15 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
10475
10476
TmpInst.addOperand (Inst.getOperand (0 )); // Rd
10476
10477
if (isNarrow && !isMov)
10477
10478
TmpInst.addOperand (MCOperand::createReg (
10478
- Inst.getOpcode () == ARM::t2MOVSsi ? ARM::CPSR : 0 ));
10479
+ Inst.getOpcode () == ARM::t2MOVSsi ? ARM::CPSR : ARM::NoRegister ));
10479
10480
TmpInst.addOperand (Inst.getOperand (1 )); // Rn
10480
10481
if (newOpc != ARM::t2RRX && !isMov)
10481
10482
TmpInst.addOperand (MCOperand::createImm (Amount));
10482
10483
TmpInst.addOperand (Inst.getOperand (3 )); // CondCode
10483
10484
TmpInst.addOperand (Inst.getOperand (4 ));
10484
10485
if (!isNarrow)
10485
10486
TmpInst.addOperand (MCOperand::createReg (
10486
- Inst.getOpcode () == ARM::t2MOVSsi ? ARM::CPSR : 0 ));
10487
+ Inst.getOpcode () == ARM::t2MOVSsi ? ARM::CPSR : ARM::NoRegister ));
10487
10488
Inst = TmpInst;
10488
10489
return true ;
10489
10490
}
@@ -10684,7 +10685,8 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
10684
10685
!isARMLowRegister (Inst.getOperand (0 ).getReg ()) ||
10685
10686
(Inst.getOperand (2 ).isImm () &&
10686
10687
(unsigned )Inst.getOperand (2 ).getImm () > 255 ) ||
10687
- Inst.getOperand (5 ).getReg () != (inITBlock () ? 0 : ARM::CPSR) ||
10688
+ Inst.getOperand (5 ).getReg () !=
10689
+ (inITBlock () ? ARM::NoRegister : ARM::CPSR) ||
10688
10690
HasWideQualifier)
10689
10691
break ;
10690
10692
MCInst TmpInst;
@@ -10852,7 +10854,8 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
10852
10854
if (isARMLowRegister (Inst.getOperand (0 ).getReg ()) &&
10853
10855
(Inst.getOperand (1 ).isImm () &&
10854
10856
(unsigned )Inst.getOperand (1 ).getImm () <= 255 ) &&
10855
- Inst.getOperand (4 ).getReg () == (inITBlock () ? 0 : ARM::CPSR) &&
10857
+ Inst.getOperand (4 ).getReg () ==
10858
+ (inITBlock () ? ARM::NoRegister : ARM::CPSR) &&
10856
10859
!HasWideQualifier) {
10857
10860
// The operands aren't in the same order for tMOVi8...
10858
10861
MCInst TmpInst;
@@ -10993,7 +10996,8 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
10993
10996
if ((isARMLowRegister (Inst.getOperand (1 ).getReg ()) &&
10994
10997
isARMLowRegister (Inst.getOperand (2 ).getReg ())) &&
10995
10998
Inst.getOperand (0 ).getReg () == Inst.getOperand (1 ).getReg () &&
10996
- Inst.getOperand (5 ).getReg () == (inITBlock () ? 0 : ARM::CPSR) &&
10999
+ Inst.getOperand (5 ).getReg () ==
11000
+ (inITBlock () ? ARM::NoRegister : ARM::CPSR) &&
10997
11001
!HasWideQualifier) {
10998
11002
unsigned NewOpc;
10999
11003
switch (Inst.getOpcode ()) {
@@ -11029,7 +11033,8 @@ bool ARMAsmParser::processInstruction(MCInst &Inst,
11029
11033
isARMLowRegister (Inst.getOperand (2 ).getReg ())) &&
11030
11034
(Inst.getOperand (0 ).getReg () == Inst.getOperand (1 ).getReg () ||
11031
11035
Inst.getOperand (0 ).getReg () == Inst.getOperand (2 ).getReg ()) &&
11032
- Inst.getOperand (5 ).getReg () == (inITBlock () ? 0 : ARM::CPSR) &&
11036
+ Inst.getOperand (5 ).getReg () ==
11037
+ (inITBlock () ? ARM::NoRegister : ARM::CPSR) &&
11033
11038
!HasWideQualifier) {
11034
11039
unsigned NewOpc;
11035
11040
switch (Inst.getOpcode ()) {
0 commit comments