mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 05:51:53 -06:00
target-sparc: Use sparc_cpu_parse_features() directly
Make SPARC target use sparc_cpu_parse_features() directly so it won't get in the way of switching other propertified targets to handling features as global properties. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
adae837d40
commit
fb02d56e96
1 changed files with 4 additions and 3 deletions
|
@ -101,9 +101,11 @@ static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sparc_cpu_parse_features(CPUState *cs, char *features,
|
||||||
|
Error **errp);
|
||||||
|
|
||||||
static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model)
|
static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model)
|
||||||
{
|
{
|
||||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
|
||||||
CPUSPARCState *env = &cpu->env;
|
CPUSPARCState *env = &cpu->env;
|
||||||
char *s = g_strdup(cpu_model);
|
char *s = g_strdup(cpu_model);
|
||||||
char *featurestr, *name = strtok(s, ",");
|
char *featurestr, *name = strtok(s, ",");
|
||||||
|
@ -119,7 +121,7 @@ static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model)
|
||||||
memcpy(env->def, def, sizeof(*def));
|
memcpy(env->def, def, sizeof(*def));
|
||||||
|
|
||||||
featurestr = strtok(NULL, ",");
|
featurestr = strtok(NULL, ",");
|
||||||
cc->parse_features(CPU(cpu), featurestr, &err);
|
sparc_cpu_parse_features(CPU(cpu), featurestr, &err);
|
||||||
g_free(s);
|
g_free(s);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report_err(err);
|
error_report_err(err);
|
||||||
|
@ -840,7 +842,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data)
|
||||||
scc->parent_reset = cc->reset;
|
scc->parent_reset = cc->reset;
|
||||||
cc->reset = sparc_cpu_reset;
|
cc->reset = sparc_cpu_reset;
|
||||||
|
|
||||||
cc->parse_features = sparc_cpu_parse_features;
|
|
||||||
cc->has_work = sparc_cpu_has_work;
|
cc->has_work = sparc_cpu_has_work;
|
||||||
cc->do_interrupt = sparc_cpu_do_interrupt;
|
cc->do_interrupt = sparc_cpu_do_interrupt;
|
||||||
cc->cpu_exec_interrupt = sparc_cpu_exec_interrupt;
|
cc->cpu_exec_interrupt = sparc_cpu_exec_interrupt;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue