Re: [PATCH 4/4] hw/cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()

2023-09-10 Thread Gavin Shan
On 9/8/23 21:22, Philippe Mathieu-Daudé wrote: Leverage the public CPUClass::cpu_resolving_type field and call object_class_dynamic_cast() once in cpu_class_by_name(). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 3 ++- target/alpha/cpu.c | 3 +-- target/arm/cpu.

Re: [PATCH 4/4] hw/cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()

2023-09-09 Thread Richard Henderson
On 9/8/23 04:22, Philippe Mathieu-Daudé wrote: +++ b/hw/core/cpu-common.c @@ -157,7 +157,8 @@ ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model) cc = CPU_CLASS(oc); assert(cc->cpu_resolving_type && cc->class_by_name); oc = cc->class_by_name(cpu_model);

[PATCH 4/4] hw/cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()

2023-09-08 Thread Philippe Mathieu-Daudé
Leverage the public CPUClass::cpu_resolving_type field and call object_class_dynamic_cast() once in cpu_class_by_name(). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 3 ++- target/alpha/cpu.c | 3 +-- target/arm/cpu.c | 4 +--- target/avr/cpu.c | 4 +--- tar