[PATCH] D149891: [RISCV] Add DecoderNamespace to Zcmt instructions.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 12:34:40 PDT 2023
craig.topper updated this revision to Diff 519608.
craig.topper added a comment.
Update comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149891/new/
https://reviews.llvm.org/D149891
Files:
llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoZc.td
Index: llvm/lib/Target/RISCV/RISCVInstrInfoZc.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoZc.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoZc.td
@@ -125,8 +125,8 @@
Sched<[WriteSTH, ReadStoreData, ReadMemBase]>;
}
-let Predicates = [HasStdExtZcmt],
-hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
+let DecoderNamespace = "RVZcmt", Predicates = [HasStdExtZcmt],
+ hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
def CM_JT : RVInst16CJ<0b101, 0b10, (outs), (ins uimm5:$index),
"cm.jt", "$index">{
bits<5> index;
@@ -142,7 +142,7 @@
let Inst{12-10} = 0b000;
let Inst{9-2} = index;
}
-} // Predicates = [HasStdExtZcmt]
+} // DecoderNamespace = "RVZcmt", Predicates = [HasStdExtZcmt]...
let Predicates = [HasStdExtZcb, HasStdExtMOrZmmul] in{
Index: llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
===================================================================
--- llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+++ llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
@@ -605,6 +605,14 @@
if (Result != MCDisassembler::Fail)
return Result;
}
+ if (STI.hasFeature(RISCV::FeatureStdExtZcmt)) {
+ LLVM_DEBUG(
+ dbgs() << "Trying Zcmt table (16-bit Table Jump Instructions):\n");
+ Result = decodeInstruction(DecoderTableRVZcmt16, MI, Insn, Address,
+ this, STI);
+ if (Result != MCDisassembler::Fail)
+ return Result;
+ }
LLVM_DEBUG(dbgs() << "Trying RISCV_C table (16-bit Instruction):\n");
// Calling the auto-generated decoder function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149891.519608.patch
Type: text/x-patch
Size: 1665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230504/5bc5336e/attachment.bin>
More information about the llvm-commits
mailing list