target/i386: Constify X86CPUModel uses
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250210133134.90879-2-philmd@linaro.org>
This commit is contained in:
parent
ae24e13a9f
commit
0048035a87
@ -6563,7 +6563,7 @@ void x86_cpu_apply_props(X86CPU *cpu, PropValue *props)
|
|||||||
* Only for builtin_x86_defs models initialized with x86_register_cpudef_types.
|
* Only for builtin_x86_defs models initialized with x86_register_cpudef_types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void x86_cpu_apply_version_props(X86CPU *cpu, X86CPUModel *model)
|
static void x86_cpu_apply_version_props(X86CPU *cpu, const X86CPUModel *model)
|
||||||
{
|
{
|
||||||
const X86CPUVersionDefinition *vdef;
|
const X86CPUVersionDefinition *vdef;
|
||||||
X86CPUVersion version = x86_cpu_model_resolve_version(model);
|
X86CPUVersion version = x86_cpu_model_resolve_version(model);
|
||||||
@ -6592,7 +6592,7 @@ static void x86_cpu_apply_version_props(X86CPU *cpu, X86CPUModel *model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const CPUCaches *x86_cpu_get_versioned_cache_info(X86CPU *cpu,
|
static const CPUCaches *x86_cpu_get_versioned_cache_info(X86CPU *cpu,
|
||||||
X86CPUModel *model)
|
const X86CPUModel *model)
|
||||||
{
|
{
|
||||||
const X86CPUVersionDefinition *vdef;
|
const X86CPUVersionDefinition *vdef;
|
||||||
X86CPUVersion version = x86_cpu_model_resolve_version(model);
|
X86CPUVersion version = x86_cpu_model_resolve_version(model);
|
||||||
@ -6620,7 +6620,7 @@ static const CPUCaches *x86_cpu_get_versioned_cache_info(X86CPU *cpu,
|
|||||||
* Load data from X86CPUDefinition into a X86CPU object.
|
* Load data from X86CPUDefinition into a X86CPU object.
|
||||||
* Only for builtin_x86_defs models initialized with x86_register_cpudef_types.
|
* Only for builtin_x86_defs models initialized with x86_register_cpudef_types.
|
||||||
*/
|
*/
|
||||||
static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model)
|
static void x86_cpu_load_model(X86CPU *cpu, const X86CPUModel *model)
|
||||||
{
|
{
|
||||||
const X86CPUDefinition *def = model->cpudef;
|
const X86CPUDefinition *def = model->cpudef;
|
||||||
CPUX86State *env = &cpu->env;
|
CPUX86State *env = &cpu->env;
|
||||||
@ -6690,7 +6690,7 @@ static const gchar *x86_gdb_arch_name(CPUState *cs)
|
|||||||
|
|
||||||
static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data)
|
static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data)
|
||||||
{
|
{
|
||||||
X86CPUModel *model = data;
|
const X86CPUModel *model = data;
|
||||||
X86CPUClass *xcc = X86_CPU_CLASS(oc);
|
X86CPUClass *xcc = X86_CPU_CLASS(oc);
|
||||||
CPUClass *cc = CPU_CLASS(oc);
|
CPUClass *cc = CPU_CLASS(oc);
|
||||||
|
|
||||||
|
@ -2327,7 +2327,7 @@ struct X86CPUClass {
|
|||||||
* CPU definition, automatically loaded by instance_init if not NULL.
|
* CPU definition, automatically loaded by instance_init if not NULL.
|
||||||
* Should be eventually replaced by subclass-specific property defaults.
|
* Should be eventually replaced by subclass-specific property defaults.
|
||||||
*/
|
*/
|
||||||
X86CPUModel *model;
|
const X86CPUModel *model;
|
||||||
|
|
||||||
bool host_cpuid_required;
|
bool host_cpuid_required;
|
||||||
int ordering;
|
int ordering;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user