From 18b3abb7224f84364bee200a10413d6be2a1c4c9 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Tue, 21 Jan 2025 12:11:17 +0100 Subject: user: Prefer cached CpuClass over CPU_GET_CLASS() macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-7-philmd@linaro.org> --- bsd-user/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bsd-user/signal.c') diff --git a/bsd-user/signal.c b/bsd-user/signal.c index ab1d9ddd50..a8cfcca130 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -1034,7 +1034,7 @@ void process_pending_signals(CPUArchState *env) void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, MMUAccessType access_type, bool maperr, uintptr_t ra) { - const TCGCPUOps *tcg_ops = CPU_GET_CLASS(cpu)->tcg_ops; + const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; if (tcg_ops->record_sigsegv) { tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra); @@ -1050,7 +1050,7 @@ void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr, MMUAccessType access_type, uintptr_t ra) { - const TCGCPUOps *tcg_ops = CPU_GET_CLASS(cpu)->tcg_ops; + const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; if (tcg_ops->record_sigbus) { tcg_ops->record_sigbus(cpu, addr, access_type, ra); -- cgit 1.4.1