mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
target/riscv: refactor (anonymous struct) RISCVCPU.cfg into 'struct RISCVCPUConfig'
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220202005249.3566542-2-philipp.tomsich@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
6c3a924725
commit
466292bd4a
1 changed files with 41 additions and 37 deletions
|
@ -303,24 +303,7 @@ struct RISCVCPUClass {
|
|||
DeviceReset parent_reset;
|
||||
};
|
||||
|
||||
/**
|
||||
* RISCVCPU:
|
||||
* @env: #CPURISCVState
|
||||
*
|
||||
* A RISCV CPU.
|
||||
*/
|
||||
struct RISCVCPU {
|
||||
/*< private >*/
|
||||
CPUState parent_obj;
|
||||
/*< public >*/
|
||||
CPUNegativeOffsetState neg;
|
||||
CPURISCVState env;
|
||||
|
||||
char *dyn_csr_xml;
|
||||
char *dyn_vreg_xml;
|
||||
|
||||
/* Configuration Settings */
|
||||
struct {
|
||||
struct RISCVCPUConfig {
|
||||
bool ext_i;
|
||||
bool ext_e;
|
||||
bool ext_g;
|
||||
|
@ -356,7 +339,28 @@ struct RISCVCPU {
|
|||
bool pmp;
|
||||
bool epmp;
|
||||
uint64_t resetvec;
|
||||
} cfg;
|
||||
};
|
||||
|
||||
typedef struct RISCVCPUConfig RISCVCPUConfig;
|
||||
|
||||
/**
|
||||
* RISCVCPU:
|
||||
* @env: #CPURISCVState
|
||||
*
|
||||
* A RISCV CPU.
|
||||
*/
|
||||
struct RISCVCPU {
|
||||
/*< private >*/
|
||||
CPUState parent_obj;
|
||||
/*< public >*/
|
||||
CPUNegativeOffsetState neg;
|
||||
CPURISCVState env;
|
||||
|
||||
char *dyn_csr_xml;
|
||||
char *dyn_vreg_xml;
|
||||
|
||||
/* Configuration Settings */
|
||||
RISCVCPUConfig cfg;
|
||||
};
|
||||
|
||||
static inline int riscv_has_ext(CPURISCVState *env, target_ulong ext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue