mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/riscv: Move misa_mxl_max to class
misa_mxl_max is common for all instances of a RISC-V CPU class so they are better put into class. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20240203-riscv-v11-2-a23f4848a628@daynix.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
0e350c1ada
commit
742cc269c7
8 changed files with 112 additions and 99 deletions
|
@ -178,10 +178,9 @@ static const VMStateDescription vmstate_pointermasking = {
|
|||
|
||||
static bool rv128_needed(void *opaque)
|
||||
{
|
||||
RISCVCPU *cpu = opaque;
|
||||
CPURISCVState *env = &cpu->env;
|
||||
RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(opaque);
|
||||
|
||||
return env->misa_mxl_max == MXL_RV128;
|
||||
return mcc->misa_mxl_max == MXL_RV128;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_rv128 = {
|
||||
|
@ -372,7 +371,7 @@ const VMStateDescription vmstate_riscv_cpu = {
|
|||
VMSTATE_UINTTL(env.vext_ver, RISCVCPU),
|
||||
VMSTATE_UINT32(env.misa_mxl, RISCVCPU),
|
||||
VMSTATE_UINT32(env.misa_ext, RISCVCPU),
|
||||
VMSTATE_UINT32(env.misa_mxl_max, RISCVCPU),
|
||||
VMSTATE_UNUSED(4),
|
||||
VMSTATE_UINT32(env.misa_ext_mask, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.priv, RISCVCPU),
|
||||
VMSTATE_BOOL(env.virt_enabled, RISCVCPU),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue