On 1/27/24 08:03, Philippe Mathieu-Daudé wrote:
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);
...
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