target/rx: 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.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240129164514.73104-24-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2024-01-29 17:45:05 +01:00 committed by Thomas Huth
parent 794511bc51
commit f2a4459db9
4 changed files with 7 additions and 12 deletions

View file

@ -21,8 +21,7 @@
int rx_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
{
RXCPU *cpu = RX_CPU(cs);
CPURXState *env = &cpu->env;
CPURXState *env = cpu_env(cs);
switch (n) {
case 0 ... 15:
@ -53,8 +52,7 @@ int rx_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
int rx_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
{
RXCPU *cpu = RX_CPU(cs);
CPURXState *env = &cpu->env;
CPURXState *env = cpu_env(cs);
uint32_t psw;
switch (n) {
case 0 ... 15: