mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/riscv: store RISCVCPUDef struct directly in the class
Prepare for adding more fields to RISCVCPUDef and reading them in riscv_cpu_init: instead of storing the misa_mxl_max field in RISCVCPUClass, ensure that there's always a valid RISCVCPUDef struct and go through it. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
71fb3aa5eb
commit
5fd23f20e1
8 changed files with 39 additions and 29 deletions
|
@ -37,7 +37,7 @@
|
|||
bool riscv_is_32bit(RISCVHartArrayState *harts)
|
||||
{
|
||||
RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(&harts->harts[0]);
|
||||
return mcc->misa_mxl_max == MXL_RV32;
|
||||
return mcc->def->misa_mxl_max == MXL_RV32;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue