aboutsummaryrefslogtreecommitdiff
path: root/disasm
diff options
context:
space:
mode:
authorVed Shanbhogue <ved@rivosinc.com>2023-09-23 11:17:48 -0500
committerAndrew Waterman <andrew@sifive.com>2023-10-18 08:52:02 -0700
commit762ed3f5c849d1c7f7e9fff6da3712531663d7a8 (patch)
tree2409875db1fe86c225e3e0d8e2f1267d4d55e371 /disasm
parent4eb1cceb3d7ddb73a695fd58ee7a819641de2522 (diff)
downloadriscv-isa-sim-762ed3f5c849d1c7f7e9fff6da3712531663d7a8.zip
riscv-isa-sim-762ed3f5c849d1c7f7e9fff6da3712531663d7a8.tar.gz
riscv-isa-sim-762ed3f5c849d1c7f7e9fff6da3712531663d7a8.tar.bz2
add zcmop extension instructions
Diffstat (limited to 'disasm')
-rw-r--r--disasm/disasm.cc13
-rw-r--r--disasm/isa_parser.cc2
2 files changed, 14 insertions, 1 deletions
diff --git a/disasm/disasm.cc b/disasm/disasm.cc
index 8188b08..4f9937f 100644
--- a/disasm/disasm.cc
+++ b/disasm/disasm.cc
@@ -2149,6 +2149,17 @@ void disassembler_t::add_instructions(const isa_parser_t* isa)
DEFINE_RTYPE(czero_nez);
}
+ if (isa->extension_enabled(EXT_ZCMOP)) {
+ DISASM_INSN("c.mop.1", c_mop_1, 0, {});
+ DISASM_INSN("c.mop.3", c_mop_3, 0, {});
+ DISASM_INSN("c.mop.5", c_mop_5, 0, {});
+ DISASM_INSN("c.mop.7", c_mop_7, 0, {});
+ DISASM_INSN("c.mop.9", c_mop_9, 0, {});
+ DISASM_INSN("c.mop.11", c_mop_11, 0, {});
+ DISASM_INSN("c.mop.13", c_mop_13, 0, {});
+ DISASM_INSN("c.mop.15", c_mop_15, 0, {});
+ }
+
if (isa->extension_enabled(EXT_ZKND) ||
isa->extension_enabled(EXT_ZKNE)) {
DISASM_INSN("aes64ks1i", aes64ks1i, 0, {&xrd, &xrs1, &rcon});
@@ -2302,7 +2313,7 @@ disassembler_t::disassembler_t(const isa_parser_t *isa)
// next-highest priority: other instructions in same base ISA
std::string fallback_isa_string = std::string("rv") + std::to_string(isa->get_max_xlen()) +
- "gqchv_zfh_zba_zbb_zbc_zbs_zcb_zicbom_zicboz_zicond_zkn_zkr_zks_svinval";
+ "gqchv_zfh_zba_zbb_zbc_zbs_zcb_zicbom_zicboz_zicond_zkn_zkr_zks_svinval_zcmop";
isa_parser_t fallback_isa(fallback_isa_string.c_str(), DEFAULT_PRIV);
add_instructions(&fallback_isa);
diff --git a/disasm/isa_parser.cc b/disasm/isa_parser.cc
index d5dc439..3291f7d 100644
--- a/disasm/isa_parser.cc
+++ b/disasm/isa_parser.cc
@@ -292,6 +292,8 @@ isa_parser_t::isa_parser_t(const char* str, const char *priv)
extension_table[EXT_SSCSRIND] = true;
} else if (ext_str == "smcntrpmf") {
extension_table[EXT_SMCNTRPMF] = true;
+ } else if (ext_str == "zcmop") {
+ extension_table[EXT_ZCMOP] = true;
} else if (ext_str[0] == 'x') {
extension_table['X'] = true;
if (ext_str.size() == 1) {