mirror of https://gitee.com/openkylin/qemu.git
target/riscv: Add J extension state description
Signed-off-by: Alexey Baturo <space.monkey.delivers@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20211025173609.2724490-5-space.monkey.delivers@gmail.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
4bbe8033fc
commit
b1c279e135
|
@ -84,6 +84,14 @@ static bool vector_needed(void *opaque)
|
|||
return riscv_has_ext(env, RVV);
|
||||
}
|
||||
|
||||
static bool pointermasking_needed(void *opaque)
|
||||
{
|
||||
RISCVCPU *cpu = opaque;
|
||||
CPURISCVState *env = &cpu->env;
|
||||
|
||||
return riscv_has_ext(env, RVJ);
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_vector = {
|
||||
.name = "cpu/vector",
|
||||
.version_id = 1,
|
||||
|
@ -100,6 +108,24 @@ static const VMStateDescription vmstate_vector = {
|
|||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_pointermasking = {
|
||||
.name = "cpu/pointer_masking",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = pointermasking_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINTTL(env.mmte, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.mpmmask, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.mpmbase, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.spmmask, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.spmbase, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.upmmask, RISCVCPU),
|
||||
VMSTATE_UINTTL(env.upmbase, RISCVCPU),
|
||||
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_hyper = {
|
||||
.name = "cpu/hyper",
|
||||
.version_id = 1,
|
||||
|
@ -191,6 +217,7 @@ const VMStateDescription vmstate_riscv_cpu = {
|
|||
&vmstate_pmp,
|
||||
&vmstate_hyper,
|
||||
&vmstate_vector,
|
||||
&vmstate_pointermasking,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue