[PATCH] D110307: [RISCV] Add missing op type OPERAND_UIMM2, OPERAND_UIMM3 and OPERAND_UIMM7 for verifyInstruction
Jim Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 22 23:19:26 PDT 2021
Jim created this revision.
Herald added subscribers: vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
Jim requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110307
Files:
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Index: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+++ llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
@@ -919,12 +919,21 @@
switch (OpType) {
default:
llvm_unreachable("Unexpected operand type");
+ case RISCVOp::OPERAND_UIMM2:
+ Ok = isUInt<2>(Imm);
+ break;
+ case RISCVOp::OPERAND_UIMM3:
+ Ok = isUInt<3>(Imm);
+ break;
case RISCVOp::OPERAND_UIMM4:
Ok = isUInt<4>(Imm);
break;
case RISCVOp::OPERAND_UIMM5:
Ok = isUInt<5>(Imm);
break;
+ case RISCVOp::OPERAND_UIMM7:
+ Ok = isUInt<7>(Imm);
+ break;
case RISCVOp::OPERAND_UIMM12:
Ok = isUInt<12>(Imm);
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110307.374446.patch
Type: text/x-patch
Size: 859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210923/7bb4950c/attachment-0001.bin>
More information about the llvm-commits
mailing list