[PATCH] D117889: [RISCV][RFC] add support for zbkx subextension in MC layer.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 09:35:57 PST 2022


craig.topper added a comment.

Please upload patches with full context using -U99999 as described here https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface



================
Comment at: llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp:432
+    if (STI.getFeatureBits()[RISCV::FeatureStdExtZbkx]) {
+      LLVM_DEBUG(dbgs() << "Trying RVK table (Float in Integer):\n");
+      // Calling the auto-generated decoder function.
----------------
"Float in Integer"?


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoZk.td:9
+//
+// This file describes the RISC-V instructions from the standard 'K',
+// Cryptography Instructions extension, version 1.0.0
----------------
This should be Zk not K. But since I think these should be in Zb. It doesn't really matter.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoZk.td:19
+let DecoderNamespace = "RVK" in {
+let Predicates = [HasStdExtZbkx] in {
+def XPERM8 : ALU_rr<0b0010100, 0b100, "xperm8">, Sched<[]>;
----------------
This extension name starts with Zb so I think it should be in RISCVInstrInfoZb.


================
Comment at: llvm/test/MC/RISCV/rv32zbkx-valid.s:12
+
+# CHECK-ASM-AND-OBJ: xperm8 t0, t1, t2
+# CHECK-ASM: encoding: [0xb3,0x42,0x73,0x28]
----------------
How do these get disassembled when Zbkx and Zbp are both enabled?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117889/new/

https://reviews.llvm.org/D117889



More information about the llvm-commits mailing list