diff options
Diffstat (limited to 'target/riscv')
-rw-r--r-- | target/riscv/cpu.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 13ff37250e..1ecb82bb5d 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1141,50 +1141,6 @@ static void riscv_cpu_finalize_features(RISCVCPU *cpu, Error **errp) #endif } -static void riscv_cpu_sync_misa_cfg(CPURISCVState *env) -{ - uint32_t ext = 0; - - if (riscv_has_ext(env, RVI)) { - ext |= RVI; - } - if (riscv_has_ext(env, RVE)) { - ext |= RVE; - } - if (riscv_has_ext(env, RVM)) { - ext |= RVM; - } - if (riscv_has_ext(env, RVA)) { - ext |= RVA; - } - if (riscv_has_ext(env, RVF)) { - ext |= RVF; - } - if (riscv_has_ext(env, RVD)) { - ext |= RVD; - } - if (riscv_has_ext(env, RVC)) { - ext |= RVC; - } - if (riscv_has_ext(env, RVS)) { - ext |= RVS; - } - if (riscv_has_ext(env, RVU)) { - ext |= RVU; - } - if (riscv_has_ext(env, RVH)) { - ext |= RVH; - } - if (riscv_has_ext(env, RVV)) { - ext |= RVV; - } - if (riscv_has_ext(env, RVJ)) { - ext |= RVJ; - } - - env->misa_ext = env->misa_ext_mask = ext; -} - static void riscv_cpu_validate_misa_priv(CPURISCVState *env, Error **errp) { if (riscv_has_ext(env, RVH) && env->priv_ver < PRIV_VERSION_1_12_0) { @@ -1228,14 +1184,6 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp) set_priv_version(env, priv_version); } - /* - * We can't be sure of whether we set defaults during cpu_init() - * or whether the user enabled/disabled some bits via cpu->cfg - * flags. Sync env->misa_ext with cpu->cfg now to allow us to - * use just env->misa_ext later. - */ - riscv_cpu_sync_misa_cfg(env); - riscv_cpu_validate_misa_priv(env, &local_err); if (local_err != NULL) { error_propagate(errp, local_err); |