@@ -380,8 +380,8 @@ static DecodeStatus decodeRVCInstrRdRs1ImmZero(MCInst &Inst, uint32_t Insn,
380
380
uint64_t Address,
381
381
const MCDisassembler *Decoder) {
382
382
uint32_t Rd = fieldFromInstruction (Insn, 7 , 5 );
383
- DecodeStatus Result = DecodeGPRNoX0RegisterClass (Inst, Rd, Address, Decoder);
384
- ( void )Result ;
383
+ [[maybe_unused]] DecodeStatus Result =
384
+ DecodeGPRNoX0RegisterClass (Inst, Rd, Address, Decoder) ;
385
385
assert (Result == MCDisassembler::Success && " Invalid register" );
386
386
Inst.addOperand (Inst.getOperand (0 ));
387
387
Inst.addOperand (MCOperand::createImm (0 ));
@@ -392,8 +392,8 @@ static DecodeStatus decodeCSSPushPopchk(MCInst &Inst, uint32_t Insn,
392
392
uint64_t Address,
393
393
const MCDisassembler *Decoder) {
394
394
uint32_t Rs1 = fieldFromInstruction (Insn, 7 , 5 );
395
- DecodeStatus Result = DecodeGPRX1X5RegisterClass (Inst, Rs1, Address, Decoder);
396
- ( void )Result ;
395
+ [[maybe_unused]] DecodeStatus Result =
396
+ DecodeGPRX1X5RegisterClass (Inst, Rs1, Address, Decoder) ;
397
397
assert (Result == MCDisassembler::Success && " Invalid register" );
398
398
return MCDisassembler::Success;
399
399
}
@@ -404,8 +404,8 @@ static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, uint32_t Insn,
404
404
Inst.addOperand (MCOperand::createReg (RISCV::X0));
405
405
uint32_t SImm6 =
406
406
fieldFromInstruction (Insn, 12 , 1 ) << 5 | fieldFromInstruction (Insn, 2 , 5 );
407
- DecodeStatus Result = decodeSImmOperand< 6 >(Inst, SImm6, Address, Decoder);
408
- ( void )Result ;
407
+ [[maybe_unused]] DecodeStatus Result =
408
+ decodeSImmOperand< 6 >(Inst, SImm6, Address, Decoder) ;
409
409
assert (Result == MCDisassembler::Success && " Invalid immediate" );
410
410
return MCDisassembler::Success;
411
411
}
@@ -417,8 +417,8 @@ static DecodeStatus decodeRVCInstrRdRs1UImm(MCInst &Inst, uint32_t Insn,
417
417
Inst.addOperand (Inst.getOperand (0 ));
418
418
uint32_t UImm6 =
419
419
fieldFromInstruction (Insn, 12 , 1 ) << 5 | fieldFromInstruction (Insn, 2 , 5 );
420
- DecodeStatus Result = decodeUImmOperand< 6 >(Inst, UImm6, Address, Decoder);
421
- ( void )Result ;
420
+ [[maybe_unused]] DecodeStatus Result =
421
+ decodeUImmOperand< 6 >(Inst, UImm6, Address, Decoder) ;
422
422
assert (Result == MCDisassembler::Success && " Invalid immediate" );
423
423
return MCDisassembler::Success;
424
424
}
@@ -454,8 +454,8 @@ static DecodeStatus decodeXTHeadMemPair(MCInst &Inst, uint32_t Insn,
454
454
DecodeGPRRegisterClass (Inst, Rd1, Address, Decoder);
455
455
DecodeGPRRegisterClass (Inst, Rd2, Address, Decoder);
456
456
DecodeGPRRegisterClass (Inst, Rs1, Address, Decoder);
457
- DecodeStatus Result = decodeUImmOperand< 2 >(Inst, UImm2, Address, Decoder);
458
- ( void )Result ;
457
+ [[maybe_unused]] DecodeStatus Result =
458
+ decodeUImmOperand< 2 >(Inst, UImm2, Address, Decoder) ;
459
459
assert (Result == MCDisassembler::Success && " Invalid immediate" );
460
460
461
461
// Disassemble the final operand which is implicit.
0 commit comments