On Thu, 5 Nov 2026 03:41:34 +0800 Max Chou <[email protected]> wrote:
> Add CPU configuration for the Zvqwbdota8i extension which depends on the > Zve32x 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 6c09685bd4b..9271f79d1b6 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(zvqwbdota8i, PRIV_VERSION_1_13_0, > + ext_zvqwbdota8i), > ISA_EXPERIMENTAL_EXT_DATA_ENTRY(zvqwdota16i, PRIV_VERSION_1_13_0, > ext_zvqwdota16i), > ISA_EXPERIMENTAL_EXT_DATA_ENTRY(zvqwdota8i, PRIV_VERSION_1_13_0, > diff --git a/target/riscv/cpu_cfg_fields.h.inc > b/target/riscv/cpu_cfg_fields.h.inc > index b18abdd8b9b..3d822432d48 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_zvqwbdota8i) > BOOL_FIELD(ext_zvqwdota16i) > BOOL_FIELD(ext_zvqwdota8i) > BOOL_FIELD(ext_sdext) > diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c > index 72ce0b4fbd0..782e38b608e 100644 > --- a/target/riscv/tcg/tcg-cpu.c > +++ b/target/riscv/tcg/tcg-cpu.c > @@ -711,6 +711,11 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, > Error **errp) > return; > } > > + if (cpu->cfg.ext_zvqwbdota8i && !cpu->cfg.ext_zve32x) { > + error_setg(errp, "Zvqwbdota8i extension depends on Zve32x > 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 5cb44326200..b1ca584f9ef 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_zvqwbdota8i || > riscv_cpu_cfg(env)->ext_zvqwdota16i || > riscv_cpu_cfg(env)->ext_zvqwdota8i) { > reserved = vtype & MAKE_64BIT_MASK(R_VTYPE_RESERVED_SHIFT, > @@ -94,6 +95,7 @@ target_ulong HELPER(vsetvl)(CPURISCVState *env, > target_ulong s1, > case MO_8: > ill_altfmt &= !(cpu->cfg.ext_zvfbfa || > cpu->cfg.ext_zvfqwdota8f || > + cpu->cfg.ext_zvqwbdota8i || > cpu->cfg.ext_zvqwdota8i); > break; > case MO_16: > -- > 2.56.0 > > > Sent using hkml (https://github.com/sjp38/hackermail)
