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
|
@ -29,8 +29,7 @@
|
|||
|
||||
void openrisc_cpu_do_interrupt(CPUState *cs)
|
||||
{
|
||||
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
|
||||
CPUOpenRISCState *env = &cpu->env;
|
||||
CPUOpenRISCState *env = cpu_env(cs);
|
||||
int exception = cs->exception_index;
|
||||
|
||||
env->epcr = env->pc;
|
||||
|
@ -105,8 +104,7 @@ void openrisc_cpu_do_interrupt(CPUState *cs)
|
|||
|
||||
bool openrisc_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||
{
|
||||
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
|
||||
CPUOpenRISCState *env = &cpu->env;
|
||||
CPUOpenRISCState *env = cpu_env(cs);
|
||||
int idx = -1;
|
||||
|
||||
if ((interrupt_request & CPU_INTERRUPT_HARD) && (env->sr & SR_IEE)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue