On Thu, 5 Nov 2026 03:41:38 +0800 Max Chou <[email protected]> wrote:
> Add CPU configuration property of Zvqwbdota16i extension which depends on > the Zve64x extension per the specification. > > Signed-off-by: Max Chou <[email protected]> Reviewed-by: Chao Liu <[email protected]> Thanks, Chao > --- > target/riscv/cpu.c | 2 ++ > target/riscv/cpu_cfg_fields.h.inc | 1 + > target/riscv/tcg/tcg-cpu.c | 5 +++++ > target/riscv/tcg/vector_helper.c | 2 ++ > 4 files changed, 10 insertions(+) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index 26d5ac69c75..99c82b898f0 100644 > --- a/target/riscv/cpu.c > +++ b/target/riscv/cpu.c > @@ -254,6 +254,8 @@ const RISCVIsaExtData isa_edata_arr[] = { > ISA_EXT_DATA_ENTRY(zvksg, PRIV_VERSION_1_12_0, ext_zvksg), > ISA_EXT_DATA_ENTRY(zvksh, PRIV_VERSION_1_12_0, ext_zvksh), > ISA_EXT_DATA_ENTRY(zvkt, PRIV_VERSION_1_12_0, ext_zvkt), > + ISA_EXPERIMENTAL_EXT_DATA_ENTRY(zvqwbdota16i, PRIV_VERSION_1_13_0, > + ext_zvqwbdota16i), > ISA_EXPERIMENTAL_EXT_DATA_ENTRY(zvqwbdota8i, PRIV_VERSION_1_13_0, > ext_zvqwbdota8i), > ISA_EXPERIMENTAL_EXT_DATA_ENTRY(zvqwdota16i, PRIV_VERSION_1_13_0, > diff --git a/target/riscv/cpu_cfg_fields.h.inc > b/target/riscv/cpu_cfg_fields.h.inc > index 3d822432d48..83a3d8a7f9d 100644 > --- a/target/riscv/cpu_cfg_fields.h.inc > +++ b/target/riscv/cpu_cfg_fields.h.inc > @@ -108,6 +108,7 @@ BOOL_FIELD(ext_zvfh) > BOOL_FIELD(ext_zvfhmin) > BOOL_FIELD(ext_zvfqwdota8f) > BOOL_FIELD(ext_zvfwdota16bf) > +BOOL_FIELD(ext_zvqwbdota16i) > BOOL_FIELD(ext_zvqwbdota8i) > BOOL_FIELD(ext_zvqwdota16i) > BOOL_FIELD(ext_zvqwdota8i) > diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c > index 782e38b608e..8735cf94f35 100644 > --- a/target/riscv/tcg/tcg-cpu.c > +++ b/target/riscv/tcg/tcg-cpu.c > @@ -716,6 +716,11 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, > Error **errp) > return; > } > > + if (cpu->cfg.ext_zvqwbdota16i && !cpu->cfg.ext_zve64x) { > + error_setg(errp, "Zvqwbdota16i extension depends on Zve64x > extension"); > + return; > + } > + > if ((cpu->cfg.ext_zdinx || cpu->cfg.ext_zhinxmin) && > !cpu->cfg.ext_zfinx) { > error_setg(errp, "Zdinx/Zhinx/Zhinxmin extensions require Zfinx"); > return; > diff --git a/target/riscv/tcg/vector_helper.c > b/target/riscv/tcg/vector_helper.c > index 9e872eccaeb..5ea073b6d76 100644 > --- a/target/riscv/tcg/vector_helper.c > +++ b/target/riscv/tcg/vector_helper.c > @@ -42,6 +42,7 @@ static target_ulong vtype_reserved(CPURISCVState *env, > target_ulong vtype) > if (riscv_cpu_cfg(env)->ext_zvfbfa || > riscv_cpu_cfg(env)->ext_zvfqwdota8f || > riscv_cpu_cfg(env)->ext_zvfwdota16bf || > + riscv_cpu_cfg(env)->ext_zvqwbdota16i || > riscv_cpu_cfg(env)->ext_zvqwbdota8i || > riscv_cpu_cfg(env)->ext_zvqwdota16i || > riscv_cpu_cfg(env)->ext_zvqwdota8i) { > @@ -101,6 +102,7 @@ target_ulong HELPER(vsetvl)(CPURISCVState *env, > target_ulong s1, > case MO_16: > ill_altfmt &= !(cpu->cfg.ext_zvfbfa || > cpu->cfg.ext_zvfwdota16bf || > + cpu->cfg.ext_zvqwbdota16i || > cpu->cfg.ext_zvqwdota16i); > break; > default: > -- > 2.56.0 > > > Sent using hkml (https://github.com/sjp38/hackermail)
