[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/23] target/microblaze: Prefer fast cpu_env() over slower CP
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 12/23] target/microblaze: Prefer fast cpu_env() over slower CPU QOM cast macro |
Date: |
Fri, 26 Jan 2024 23:03:54 +0100 |
Mechanical patch produced running the command documented
in scripts/coccinelle/cpu_env.cocci_template header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/microblaze/helper.c | 3 +--
target/microblaze/translate.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
index 98bdb82de8..bf955dd425 100644
--- a/target/microblaze/helper.c
+++ b/target/microblaze/helper.c
@@ -253,8 +253,7 @@ hwaddr mb_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr
addr,
bool mb_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
- MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
- CPUMBState *env = &cpu->env;
+ CPUMBState *env = cpu_env(cs);
if ((interrupt_request & CPU_INTERRUPT_HARD)
&& (env->msr & MSR_IE)
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 49bfb4a0ea..1c6e4fcfe4 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -1800,8 +1800,7 @@ void gen_intermediate_code(CPUState *cpu,
TranslationBlock *tb, int *max_insns,
void mb_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
- MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
- CPUMBState *env = &cpu->env;
+ CPUMBState *env = cpu_env(cs);
uint32_t iflags;
int i;
--
2.41.0
- [PATCH v2 08/23] target/hppa: Prefer fast cpu_env() over slower CPU QOM cast macro, (continued)
- [PATCH v2 08/23] target/hppa: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 09/23] target/i386/hvf: Use CPUState typedef, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 10/23] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 11/23] target/m68k: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 13/23] target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 12/23] target/microblaze: Prefer fast cpu_env() over slower CPU QOM cast macro,
Philippe Mathieu-Daudé <=
- [PATCH v2 14/23] target/nios2: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 15/23] target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 16/23] target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 17/23] target/riscv: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26
- [PATCH v2 18/23] target/rx: Prefer fast cpu_env() over slower CPU QOM cast macro, Philippe Mathieu-Daudé, 2024/01/26