diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-29 17:45:07 +0100 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-03-12 12:04:24 +0100 |
| commit | 795bec96522356b5afb6c9ebb3ea0974fa3d4a27 (patch) | |
| tree | f28ff925fbcd021d003893a0bad443795c129661 /target/sh4/gdbstub.c | |
| parent | f2a4459db93dee8f333d6f1e85acac53e5a8609e (diff) | |
| download | focaccia-qemu-795bec96522356b5afb6c9ebb3ea0974fa3d4a27.tar.gz focaccia-qemu-795bec96522356b5afb6c9ebb3ea0974fa3d4a27.zip | |
target/sh4: 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-26-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/sh4/gdbstub.c')
| -rw-r--r-- | target/sh4/gdbstub.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/target/sh4/gdbstub.c b/target/sh4/gdbstub.c index d8e199fc06..75926d4e04 100644 --- a/target/sh4/gdbstub.c +++ b/target/sh4/gdbstub.c @@ -26,8 +26,7 @@ int superh_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { - SuperHCPU *cpu = SUPERH_CPU(cs); - CPUSH4State *env = &cpu->env; + CPUSH4State *env = cpu_env(cs); switch (n) { case 0 ... 7: @@ -76,8 +75,7 @@ int superh_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) int superh_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { - SuperHCPU *cpu = SUPERH_CPU(cs); - CPUSH4State *env = &cpu->env; + CPUSH4State *env = cpu_env(cs); switch (n) { case 0 ... 7: |