mirror of
https://github.com/qemu/qemu.git
synced 2026-05-21 07:37:14 +00:00
user: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff8706
("cpu: cache CPUClass in CPUState for hot code paths"),
use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250122093028.52416-7-philmd@linaro.org>
This commit is contained in:
@@ -15,7 +15,7 @@ static int open_cpuinfo(CPUArchState *cpu_env, int fd)
|
||||
const char *p, *q;
|
||||
int t;
|
||||
|
||||
p = object_class_get_name(OBJECT_CLASS(CPU_GET_CLASS(env_cpu(cpu_env))));
|
||||
p = object_class_get_name(OBJECT_CLASS(env_cpu(cpu_env)->cc));
|
||||
q = strchr(p, '-');
|
||||
t = q - p;
|
||||
assert(t < sizeof(model));
|
||||
|
||||
Reference in New Issue
Block a user