On 3/27/23 20:06, Song Gao wrote:
+static bool trans_vldi(DisasContext *ctx, arg_vldi *a) +{ + int sel, vece; + uint64_t value; + CHECK_SXE; + + sel = (a->imm >> 12) & 0x1; + + if (sel) { + /* VSETI.D */ + value = vldi_get_value(ctx, a->imm); + vece = MO_64; + } else { + /* + * VLDI.B/H/W/D + * a->imm bit [11:10] is vece. + * a->imm bit [9:0] is value; + */ + value = ((int32_t)(a->imm << 22)) >> 22; + vece = (a->imm >> 10) & 0x3; + } + + tcg_gen_gvec_dup_i64(vece, vreg_full_offset(a->vd), 16, 16, + tcg_constant_i64(value)); + return true; +}
I think you should finish this decode in insns.decode, especially since we are using that for disassembly. r~