[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/11] target/arm: Prefer cached CpuClass over CPU_GET_CLASS() ma
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 09/11] target/arm: Prefer cached CpuClass over CPU_GET_CLASS() macro |
Date: |
Tue, 21 Jan 2025 12:40:54 +0100 |
CpuState caches its CPUClass since commit 6fbdff87062
("cpu: cache CPUClass in CPUState for hot code paths"),
use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/cpu.c | 3 +--
target/arm/tcg/cpu-v7m.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index dc0231233a6..048b825a006 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -846,7 +846,6 @@ static inline bool arm_excp_unmasked(CPUState *cs, unsigned
int excp_idx,
static bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
- CPUClass *cc = CPU_GET_CLASS(cs);
CPUARMState *env = cpu_env(cs);
uint32_t cur_el = arm_current_el(env);
bool secure = arm_is_secure(env);
@@ -946,7 +945,7 @@ static bool arm_cpu_exec_interrupt(CPUState *cs, int
interrupt_request)
found:
cs->exception_index = excp_idx;
env->exception.target_el = target_el;
- cc->tcg_ops->do_interrupt(cs);
+ cs->cc->tcg_ops->do_interrupt(cs);
return true;
}
diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c
index 03acdf83e00..d2d0b94b630 100644
--- a/target/arm/tcg/cpu-v7m.c
+++ b/target/arm/tcg/cpu-v7m.c
@@ -19,7 +19,6 @@
static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
- CPUClass *cc = CPU_GET_CLASS(cs);
ARMCPU *cpu = ARM_CPU(cs);
CPUARMState *env = &cpu->env;
bool ret = false;
@@ -35,7 +34,7 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int
interrupt_request)
if (interrupt_request & CPU_INTERRUPT_HARD
&& (armv7m_nvic_can_take_pending_exception(env->nvic))) {
cs->exception_index = EXCP_IRQ;
- cc->tcg_ops->do_interrupt(cs);
+ cs->cc->tcg_ops->do_interrupt(cs);
ret = true;
}
return ret;
--
2.47.1
- Re: [PATCH 02/11] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro, (continued)
- [PATCH 05/11] disas: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 04/11] user: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 06/11] gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 07/11] hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 09/11] target/arm: Prefer cached CpuClass over CPU_GET_CLASS() macro,
Philippe Mathieu-Daudé <=
- [PATCH 11/11] target/openrisc: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 08/11] hw/core/generic-loader: Prefer cached CpuClass over CPU_GET_CLASS macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 10/11] target/microblaze: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21