diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-29 17:45:05 +0100 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-03-12 12:04:24 +0100 |
| commit | f2a4459db93dee8f333d6f1e85acac53e5a8609e (patch) | |
| tree | 9d7ae000955354be2a78e400c402bc4e79efa95d /target/rx/cpu.c | |
| parent | 794511bc51bc89f384063103653e5f40c75cd49e (diff) | |
| download | focaccia-qemu-f2a4459db93dee8f333d6f1e85acac53e5a8609e.tar.gz focaccia-qemu-f2a4459db93dee8f333d6f1e85acac53e5a8609e.zip | |
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>
Diffstat (limited to 'target/rx/cpu.c')
| -rw-r--r-- | target/rx/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 26ff822e71..da673a595d 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -71,9 +71,9 @@ static int riscv_cpu_mmu_index(CPUState *cs, bool ifunc) static void rx_cpu_reset_hold(Object *obj) { - RXCPU *cpu = RX_CPU(obj); + CPUState *cs = CPU(obj); RXCPUClass *rcc = RX_CPU_GET_CLASS(obj); - CPURXState *env = &cpu->env; + CPURXState *env = cpu_env(cs); uint32_t *resetvec; if (rcc->parent_phases.hold) { |