Skip to content

Commit 424521f

Browse files
authored
[RISCV] Correct the OperandType for simm8_unsigned and simm10_unsigned. (#154667)
1 parent 1b9e9e2 commit 424521f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,10 @@ enum OperandType : unsigned {
347347
OPERAND_SIMM6,
348348
OPERAND_SIMM6_NONZERO,
349349
OPERAND_SIMM8,
350+
OPERAND_SIMM8_UNSIGNED,
350351
OPERAND_SIMM10,
351352
OPERAND_SIMM10_LSB0000_NONZERO,
353+
OPERAND_SIMM10_UNSIGNED,
352354
OPERAND_SIMM11,
353355
OPERAND_SIMM12,
354356
OPERAND_SIMM12_LSB00000,

llvm/lib/Target/RISCV/RISCVInstrInfoP.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def simm8_unsigned : RISCVOp {
3030
let ParserMatchClass = SImm8UnsignedAsmOperand;
3131
let EncoderMethod = "getImmOpValue";
3232
let DecoderMethod = "decodeSImmOperand<8>";
33-
let OperandType = "OPERAND_SIMM10";
33+
let OperandType = "OPERAND_SIMM8_UNSIGNED";
3434
let MCOperandPredicate = [{
3535
int64_t Imm;
3636
if (!MCOp.evaluateAsConstantImm(Imm))
@@ -49,7 +49,7 @@ def simm10_unsigned : RISCVOp {
4949
let ParserMatchClass = SImm10UnsignedAsmOperand;
5050
let EncoderMethod = "getImmOpValue";
5151
let DecoderMethod = "decodeSImmOperand<10>";
52-
let OperandType = "OPERAND_SIMM10";
52+
let OperandType = "OPERAND_SIMM10_UNSIGNED";
5353
let MCOperandPredicate = [{
5454
int64_t Imm;
5555
if (!MCOp.evaluateAsConstantImm(Imm))

0 commit comments

Comments
 (0)