|
|
@ -560,6 +560,12 @@ struct : public arg_t { |
|
|
} |
|
|
} |
|
|
} p_imm6; |
|
|
} p_imm6; |
|
|
|
|
|
|
|
|
|
|
|
struct : public arg_t { |
|
|
|
|
|
std::string to_string(insn_t insn) const { |
|
|
|
|
|
return std::to_string((int)insn.b_imm5()); |
|
|
|
|
|
} |
|
|
|
|
|
} b_imm5; |
|
|
|
|
|
|
|
|
struct : public arg_t { |
|
|
struct : public arg_t { |
|
|
std::string to_string(insn_t insn) const { |
|
|
std::string to_string(insn_t insn) const { |
|
|
return std::to_string((int)insn.bs()); |
|
|
return std::to_string((int)insn.bs()); |
|
|
@ -655,6 +661,11 @@ static void NOINLINE add_btype_insn(disassembler_t* d, const char* name, uint32_ |
|
|
d->add_insn(new disasm_insn_t(name, match, mask, {&xrs1, &xrs2, &branch_target})); |
|
|
d->add_insn(new disasm_insn_t(name, match, mask, {&xrs1, &xrs2, &branch_target})); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void NOINLINE add_bimmtype_insn(disassembler_t* d, const char* name, uint32_t match, uint32_t mask) |
|
|
|
|
|
{ |
|
|
|
|
|
d->add_insn(new disasm_insn_t(name, match, mask, {&xrs1, &b_imm5, &branch_target})); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
static void NOINLINE add_b1type_insn(disassembler_t* d, const char* name, uint32_t match, uint32_t mask) |
|
|
static void NOINLINE add_b1type_insn(disassembler_t* d, const char* name, uint32_t match, uint32_t mask) |
|
|
{ |
|
|
{ |
|
|
const uint32_t mask_rs2 = 0x1fUL << 20; |
|
|
const uint32_t mask_rs2 = 0x1fUL << 20; |
|
|
@ -833,6 +844,7 @@ void disassembler_t::add_instructions(const isa_parser_t* isa, bool strict) |
|
|
#define DEFINE_PREFETCH(code) DISASM_INSN(#code, code, 0, {&store_address}) |
|
|
#define DEFINE_PREFETCH(code) DISASM_INSN(#code, code, 0, {&store_address}) |
|
|
#define DEFINE_LTYPE(code) DISASM_INSN(#code, code, 0, {&xrd, &bigimm}) |
|
|
#define DEFINE_LTYPE(code) DISASM_INSN(#code, code, 0, {&xrd, &bigimm}) |
|
|
#define DEFINE_BTYPE(code) add_btype_insn(this, #code, match_##code, mask_##code); |
|
|
#define DEFINE_BTYPE(code) add_btype_insn(this, #code, match_##code, mask_##code); |
|
|
|
|
|
#define DEFINE_BIMMTYPE(code) add_bimmtype_insn(this, #code, match_##code, mask_##code); |
|
|
#define DEFINE_B1TYPE(name, code) add_b1type_insn(this, name, match_##code, mask_##code); |
|
|
#define DEFINE_B1TYPE(name, code) add_b1type_insn(this, name, match_##code, mask_##code); |
|
|
#define DEFINE_XLOAD(code) add_xload_insn(this, #code, match_##code, mask_##code); |
|
|
#define DEFINE_XLOAD(code) add_xload_insn(this, #code, match_##code, mask_##code); |
|
|
#define DEFINE_XSTORE(code) add_xstore_insn(this, #code, match_##code, mask_##code); |
|
|
#define DEFINE_XSTORE(code) add_xstore_insn(this, #code, match_##code, mask_##code); |
|
|
@ -1368,6 +1380,11 @@ void disassembler_t::add_instructions(const isa_parser_t* isa, bool strict) |
|
|
//DEFINE_R1TYPE(fcvt_q_h);
|
|
|
//DEFINE_R1TYPE(fcvt_q_h);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (ext_enabled(EXT_ZIBI)) { |
|
|
|
|
|
DEFINE_BIMMTYPE(beqi) |
|
|
|
|
|
DEFINE_BIMMTYPE(bnei) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (ext_enabled('Q')) { |
|
|
if (ext_enabled('Q')) { |
|
|
DEFINE_FLOAD(flq) |
|
|
DEFINE_FLOAD(flq) |
|
|
DEFINE_FSTORE(fsq) |
|
|
DEFINE_FSTORE(fsq) |
|
|
|