summary refs log tree commit diff stats
path: root/target/sparc/int64_helper.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-01-29 17:45:08 +0100
committerThomas Huth <thuth@redhat.com>2024-03-12 12:04:25 +0100
commit7797676965359a78817d35e5ed369f425e63e7db (patch)
treeddba8beead089f4a8a859dc4ee84e0dcf0dd15b5 /target/sparc/int64_helper.c
parent795bec96522356b5afb6c9ebb3ea0974fa3d4a27 (diff)
downloadfocaccia-qemu-7797676965359a78817d35e5ed369f425e63e7db.tar.gz
focaccia-qemu-7797676965359a78817d35e5ed369f425e63e7db.zip
target/sparc: Prefer fast cpu_env() over slower CPU QOM cast macro
Mechanical patch produced running the command documented
in scripts/coccinelle/cpu_env.cocci_template header.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240129164514.73104-27-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/sparc/int64_helper.c')
-rw-r--r--target/sparc/int64_helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/sparc/int64_helper.c b/target/sparc/int64_helper.c
index 27df9dba89..bd14c7a0db 100644
--- a/target/sparc/int64_helper.c
+++ b/target/sparc/int64_helper.c
@@ -130,8 +130,7 @@ void cpu_check_irqs(CPUSPARCState *env)
 
 void sparc_cpu_do_interrupt(CPUState *cs)
 {
-    SPARCCPU *cpu = SPARC_CPU(cs);
-    CPUSPARCState *env = &cpu->env;
+    CPUSPARCState *env = cpu_env(cs);
     int intno = cs->exception_index;
     trap_state *tsptr;