Skip to content

Commit 5ca914b

Browse files
committed
Zicfilp: Support lpad instruction in disassembler
1 parent 6408a0f commit 5ca914b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

disasm/disasm.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,12 @@ void disassembler_t::add_instructions(const isa_parser_t* isa)
868868
DEFINE_XAMO(amocas_h)
869869
}
870870

871+
if (isa->extension_enabled(EXT_ZICFILP)) {
872+
// lpad encodes as `auipc x0, label`, so it needs to be added before auipc
873+
// for higher disassembling priority
874+
DISASM_INSN("lpad", lpad, 0, {&bigimm});
875+
}
876+
871877
add_insn(new disasm_insn_t("j", match_jal, mask_jal | mask_rd, {&jump_target}));
872878
add_insn(new disasm_insn_t("jal", match_jal | match_rd_ra, mask_jal | mask_rd, {&jump_target}));
873879
add_insn(new disasm_insn_t("jal", match_jal, mask_jal, {&xrd, &jump_target}));

0 commit comments

Comments
 (0)