bulk: Call in place single use cpu_env()
commit94956d7b510d18f4449d1392b86e1a8f3e467612
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 29 Jan 2024 16:44:46 +0000 (29 17:44 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 12 Mar 2024 10:46:16 +0000 (12 11:46 +0100)
treea3366429557d71ed9a4a8b77a1a2d0ce540dacaa
parent97e03106018301969f9e7c1eb22d3838adbe0bcc
bulk: Call in place single use cpu_env()

Avoid CPUArchState local variable when cpu_env() is used once.

Mechanical patch using the following Coccinelle spatch script:

 @@
 type CPUArchState;
 identifier env;
 expression cs;
 @@
  {
 -    CPUArchState *env = cpu_env(cs);
      ... when != env
 -     env
 +     cpu_env(cs)
      ... when != env
  }

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240129164514.73104-5-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
accel/tcg/cpu-exec.c
linux-user/i386/cpu_loop.c
target/hppa/mem_helper.c
target/hppa/translate.c
target/i386/nvmm/nvmm-all.c
target/i386/whpx/whpx-all.c
target/loongarch/tcg/translate.c
target/rx/translate.c
target/sh4/op_helper.c