aboutsummaryrefslogtreecommitdiff
path: root/disas/riscv.h
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2023-06-12 13:10:34 +0200
committerAlistair Francis <alistair.francis@wdc.com>2023-07-10 22:29:14 +1000
commit318df7238b9f842af96aad01ec183012c8fecab9 (patch)
tree7a1a7c1e60875c973c7010443f6103b8c800e220 /disas/riscv.h
parentf6f72338d80ec6f15a6b18643797bc10901aadf3 (diff)
disas/riscv: Add support for XThead* instructions
Support for emulating XThead* instruction has been added recently. This patch adds support for these instructions to the RISC-V disassembler. Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230612111034.3955227-9-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'disas/riscv.h')
-rw-r--r--disas/riscv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/disas/riscv.h b/disas/riscv.h
index 460196510c..052a0c4281 100644
--- a/disas/riscv.h
+++ b/disas/riscv.h
@@ -159,6 +159,12 @@ typedef enum {
rv_codec_zcmp_cm_pushpop,
rv_codec_zcmp_cm_mv,
rv_codec_zcmt_jt,
+ rv_codec_r2_imm5,
+ rv_codec_r2,
+ rv_codec_r2_imm6,
+ rv_codec_r_imm2,
+ rv_codec_r2_immhl,
+ rv_codec_r2_imm2_imm5,
} rv_codec;
/* structures */
@@ -185,6 +191,7 @@ typedef struct {
uint64_t inst;
const rv_opcode_data *opcode_data;
int32_t imm;
+ int32_t imm1;
uint16_t op;
uint8_t codec;
uint8_t rd;
@@ -283,5 +290,10 @@ enum {
#define rv_fmt_push_rlist "O\tx,-i"
#define rv_fmt_pop_rlist "O\tx,i"
#define rv_fmt_zcmt_index "O\ti"
+#define rv_fmt_rd_rs1_rs2_imm "O\t0,1,2,i"
+#define rv_fmt_frd_rs1_rs2_imm "O\t3,1,2,i"
+#define rv_fmt_rd_rs1_immh_imml "O\t0,1,i,j"
+#define rv_fmt_rd_rs1_immh_imml_addr "O\t0,(1),i,j"
+#define rv_fmt_rd2_imm "O\t0,2,(1),i"
#endif /* DISAS_RISCV_H */