aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-21 12:11:25 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-09 17:00:47 +0100
commit4c5c410ceb4e039a49a120a436cc6183831a778b (patch)
treec63aa657a8e41de564e983db4b2272576d19e4fc
parent18b3abb7224f84364bee200a10413d6be2a1c4c9 (diff)
downloadqemu-4c5c410ceb4e039a49a120a436cc6183831a778b.zip
qemu-4c5c410ceb4e039a49a120a436cc6183831a778b.tar.gz
qemu-4c5c410ceb4e039a49a120a436cc6183831a778b.tar.bz2
disas: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff87062 ("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-8-philmd@linaro.org>
-rw-r--r--disas/disas-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/disas/disas-common.c b/disas/disas-common.c
index ae3f9e4..21c2f03 100644
--- a/disas/disas-common.c
+++ b/disas/disas-common.c
@@ -62,9 +62,8 @@ void disas_initialize_debug_target(CPUDebug *s, CPUState *cpu)
s->info.print_address_func = print_address;
s->info.endian = BFD_ENDIAN_UNKNOWN;
- CPUClass *cc = CPU_GET_CLASS(cpu);
- if (cc->disas_set_info) {
- cc->disas_set_info(cpu, &s->info);
+ if (cpu->cc->disas_set_info) {
+ cpu->cc->disas_set_info(cpu, &s->info);
g_assert(s->info.endian != BFD_ENDIAN_UNKNOWN);
}
}