[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 20/27] target/rx: Convert to TCGCPUOps::get_cpu_state()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 20/27] target/rx: Convert to TCGCPUOps::get_cpu_state() |
Date: |
Tue, 19 Mar 2024 16:42:49 +0100 |
Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/rx/cpu.h | 11 -----------
target/rx/cpu.c | 10 ++++++++++
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/target/rx/cpu.h b/target/rx/cpu.h
index 996f121bcd..dcda762212 100644
--- a/target/rx/cpu.h
+++ b/target/rx/cpu.h
@@ -149,17 +149,6 @@ void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int
rte);
#define RX_CPU_IRQ 0
#define RX_CPU_FIR 1
-#define TARGET_HAS_CPU_GET_TB_CPU_STATE
-
-static inline void cpu_get_tb_cpu_state(CPURXState *env, vaddr *pc,
- uint64_t *cs_base, uint32_t *flags)
-{
- *pc = env->pc;
- *cs_base = 0;
- *flags = FIELD_DP32(0, PSW, PM, env->psw_pm);
- *flags = FIELD_DP32(*flags, PSW, U, env->psw_u);
-}
-
static inline uint32_t rx_cpu_pack_psw(CPURXState *env)
{
uint32_t psw = 0;
diff --git a/target/rx/cpu.c b/target/rx/cpu.c
index da673a595d..3b55b09e64 100644
--- a/target/rx/cpu.c
+++ b/target/rx/cpu.c
@@ -58,6 +58,15 @@ static void rx_restore_state_to_opc(CPUState *cs,
cpu->env.pc = data[0];
}
+static void rx_get_cpu_state(CPURXState *env, vaddr *pc,
+ uint64_t *cs_base, uint32_t *flags)
+{
+ *pc = env->pc;
+ *cs_base = 0;
+ *flags = FIELD_DP32(0, PSW, PM, env->psw_pm);
+ *flags = FIELD_DP32(*flags, PSW, U, env->psw_u);
+}
+
static bool rx_cpu_has_work(CPUState *cs)
{
return cs->interrupt_request &
@@ -187,6 +196,7 @@ static const TCGCPUOps rx_tcg_ops = {
.initialize = rx_translate_init,
.synchronize_from_tb = rx_cpu_synchronize_from_tb,
.restore_state_to_opc = rx_restore_state_to_opc,
+ .get_cpu_state = rx_get_cpu_state,
.tlb_fill = rx_cpu_tlb_fill,
#ifndef CONFIG_USER_ONLY
--
2.41.0
- [PATCH-for-9.1 15/27] target/nios2: Convert to TCGCPUOps::get_cpu_state(), (continued)
- [PATCH-for-9.1 15/27] target/nios2: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 16/27] target/openrisc: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 18/27] target/ppc: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 17/27] target/ppc: Indent ppc_tcg_ops[] with 4 spaces, Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 19/27] target/riscv: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 21/27] target/s390x: Restrict TCG-specific declarations, Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 20/27] target/rx: Convert to TCGCPUOps::get_cpu_state(),
Philippe Mathieu-Daudé <=
- [PATCH-for-9.1 22/27] target/s390x: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 23/27] target/sh4: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 24/27] target/sparc: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 25/27] target/tricore: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19
- [PATCH-for-9.1 26/27] target/xtensa: Convert to TCGCPUOps::get_cpu_state(), Philippe Mathieu-Daudé, 2024/03/19