mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
target/openrisc: 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-21-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
6fed7e43fa
commit
074bd799e7
3 changed files with 6 additions and 12 deletions
|
@ -23,8 +23,7 @@
|
|||
|
||||
int openrisc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
|
||||
{
|
||||
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
|
||||
CPUOpenRISCState *env = &cpu->env;
|
||||
CPUOpenRISCState *env = cpu_env(cs);
|
||||
|
||||
if (n < 32) {
|
||||
return gdb_get_reg32(mem_buf, cpu_get_gpr(env, n));
|
||||
|
@ -48,9 +47,8 @@ int openrisc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
|
|||
|
||||
int openrisc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
||||
{
|
||||
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
|
||||
CPUClass *cc = CPU_GET_CLASS(cs);
|
||||
CPUOpenRISCState *env = &cpu->env;
|
||||
CPUOpenRISCState *env = cpu_env(cs);
|
||||
uint32_t tmp;
|
||||
|
||||
if (n > cc->gdb_num_core_regs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue