On Thu,  5 Nov 2026 03:41:37 +0800 Max Chou <[email protected]> wrote:

> Adds support to disassemble Zvqwbdota8i instructions.
> - vqwbdotau.vv
> - vqwbdotas.vv
> 
> Zvbdota instructions encode the batch-column immediate (ci) in rs2[2:0]
> and the vs2 base-register group in rs2[7:3].
> Add rv_codec_v_r_ci that splits rs2 into dec->rs2 (base register) and
> dec->imm (ci), and add rv_fmt_vd_vs2_vs1_ci_vm to print them separately.
> 
> Signed-off-by: Max Chou <[email protected]>
Reviewed-by: Chao Liu <[email protected]>

Thanks,
Chao
> ---
>  disas/riscv-op.c.inc | 2 ++
>  disas/riscv.c        | 9 +++++++++
>  disas/riscv.h        | 2 ++
>  3 files changed, 13 insertions(+)
> 
> diff --git a/disas/riscv-op.c.inc b/disas/riscv-op.c.inc
> index 5ba29f52976..bb01ebb8a6c 100644
> --- a/disas/riscv-op.c.inc
> +++ b/disas/riscv-op.c.inc
> @@ -773,6 +773,8 @@ OP(vnsrl_wx, "vnsrl.wx", rv_codec_v_r, 
> rv_fmt_vd_vs2_rs1_vm)
>  OP(vor_vi, "vor.vi", rv_codec_v_i, rv_fmt_vd_vs2_imm_vm)
>  OP(vor_vv, "vor.vv", rv_codec_v_r, rv_fmt_vd_vs2_vs1_vm)
>  OP(vor_vx, "vor.vx", rv_codec_v_r, rv_fmt_vd_vs2_rs1_vm)
> +OP(vqwbdotas_vv, "vqwbdotas.vv", rv_codec_v_r_ci, rv_fmt_vd_vs2_vs1_ci_vm)
> +OP(vqwbdotau_vv, "vqwbdotau.vv", rv_codec_v_r_ci, rv_fmt_vd_vs2_vs1_ci_vm)
>  OP(vqwdotas_vv, "vqwdotas.vv", rv_codec_v_r, rv_fmt_vd_vs2_vs1_vm)
>  OP(vqwdotau_vv, "vqwdotau.vv", rv_codec_v_r, rv_fmt_vd_vs2_vs1_vm)
>  OP(vredand_vs, "vredand.vs", rv_codec_v_r, rv_fmt_vd_vs2_vs1_vm)
> diff --git a/disas/riscv.c b/disas/riscv.c
> index 0f609cc06b4..0534b8f4d64 100644
> --- a/disas/riscv.c
> +++ b/disas/riscv.c
> @@ -2638,6 +2638,8 @@ static const rv_opcode_data 
> *decode_inst_opcode(rv_decode *dec, rv_isa isa)
>                  switch ((inst >> 26) & 0b111111) {
>                  case 38: return &op_vqwdotau_vv;
>                  case 39: return &op_vqwdotas_vv;
> +                case 46: return &op_vqwbdotau_vv;
> +                case 47: return &op_vqwbdotas_vv;
>                  }
>              }
>              if (((inst >> 12) & 0b111) == 1) {
> @@ -2999,6 +3001,13 @@ static void decode_inst_operands(rv_decode *dec, 
> rv_isa isa,
>          dec->rs2 = operand_rs2(inst);
>          dec->vm = operand_vm(inst);
>          break;
> +    case rv_codec_v_r_ci:
> +        dec->rd = operand_rd(inst);
> +        dec->rs1 = operand_rs1(inst);
> +        dec->rs2 = operand_rs2(inst) & ~0x7;
> +        dec->imm = (operand_rs2(inst) & 0x7) << 3;
> +        dec->vm = operand_vm(inst);
> +        break;
>      case rv_codec_v_ldst:
>          dec->rd = operand_rd(inst);
>          dec->rs1 = operand_rs1(inst);
> diff --git a/disas/riscv.h b/disas/riscv.h
> index 4f1ffc4ae02..34050583c96 100644
> --- a/disas/riscv.h
> +++ b/disas/riscv.h
> @@ -138,6 +138,7 @@ typedef enum {
>      rv_codec_k_bs,
>      rv_codec_k_rnum,
>      rv_codec_v_r,
> +    rv_codec_v_r_ci,
>      rv_codec_v_ldst,
>      rv_codec_v_i,
>      rv_codec_v_i_u,
> @@ -254,6 +255,7 @@ typedef struct {
>  #define rv_fmt_vd_vs2_vs1             "O\tD,F,E"
>  #define rv_fmt_vd_vs2_vs1_vl          "O\tD,F,El"
>  #define rv_fmt_vd_vs2_vs1_vm          "O\tD,F,Em"
> +#define rv_fmt_vd_vs2_vs1_ci_vm       "O\tD,F,E,im"
>  #define rv_fmt_vd_vs2_rs1_vl          "O\tD,F,1l"
>  #define rv_fmt_vd_vs2_fs1_vl          "O\tD,F,4l"
>  #define rv_fmt_vd_vs2_rs1_vm          "O\tD,F,1m"
> -- 
> 2.56.0
> 
> 
> 

Sent using hkml (https://github.com/sjp38/hackermail)

Reply via email to