aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/exc_helper.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-01-29 17:45:10 +0100
committerThomas Huth <thuth@redhat.com>2024-03-12 12:04:25 +0100
commit52049266e58e534739b9d72215930d6195dfd723 (patch)
treeb92ac9f47dcf4b17cc15ad8cd438b37adfdc2248 /target/xtensa/exc_helper.c
parent39ac0bac99ac98e6e3cf7d3f8fd7958cc342175d (diff)
downloadqemu-52049266e58e534739b9d72215930d6195dfd723.zip
qemu-52049266e58e534739b9d72215930d6195dfd723.tar.gz
qemu-52049266e58e534739b9d72215930d6195dfd723.tar.bz2
target/xtensa: 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> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240129164514.73104-29-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/xtensa/exc_helper.c')
-rw-r--r--target/xtensa/exc_helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c
index 168419a..0514c2c 100644
--- a/target/xtensa/exc_helper.c
+++ b/target/xtensa/exc_helper.c
@@ -205,8 +205,7 @@ static void handle_interrupt(CPUXtensaState *env)
/* Called from cpu_handle_interrupt with BQL held */
void xtensa_cpu_do_interrupt(CPUState *cs)
{
- XtensaCPU *cpu = XTENSA_CPU(cs);
- CPUXtensaState *env = &cpu->env;
+ CPUXtensaState *env = cpu_env(cs);
if (cs->exception_index == EXC_IRQ) {
qemu_log_mask(CPU_LOG_INT,