[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 27/27] accel/tcg: Remove check on TARGET_HAS_CPU_GET_TB_C
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 27/27] accel/tcg: Remove check on TARGET_HAS_CPU_GET_TB_CPU_STATE |
Date: |
Tue, 19 Mar 2024 16:42:56 +0100 |
All targets have been converted to TCGCPUOps::get_cpu_state(),
there is no more use of TARGET_HAS_CPU_GET_TB_CPU_STATE in the
tree. Remove the check on TARGET_HAS_CPU_GET_TB_CPU_STATE, but
add an assertion in tcg_exec_realizefn() so new target won't
miss to implement this handler.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/tcg/cpu-exec.c | 1 +
accel/tcg/translate-all.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 987e6164f7..6167bd3159 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -1072,6 +1072,7 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp)
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
assert(tcg_ops->restore_state_to_opc);
+ assert(tcg_ops->get_cpu_state);
tcg_ops->initialize();
tcg_target_initialized = true;
}
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 7b538d2b9c..3c9fafba69 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -221,7 +221,6 @@ void cpu_restore_state_from_tb(CPUState *cpu,
TranslationBlock *tb,
cpu->cc->tcg_ops->restore_state_to_opc(cpu, tb, data);
}
-#ifndef TARGET_HAS_CPU_GET_TB_CPU_STATE
void cpu_get_tb_cpu_state(CPUArchState *env, vaddr *pc,
uint64_t *cs_base, uint32_t *flags)
{
@@ -229,7 +228,6 @@ void cpu_get_tb_cpu_state(CPUArchState *env, vaddr *pc,
cpu->cc->tcg_ops->get_cpu_state(env, pc, cs_base, flags);
}
-#endif
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc)
{
--
2.41.0
- [PATCH-for-9.1 21/27] target/s390x: Restrict TCG-specific declarations, (continued)
- [PATCH-for-9.1 21/27] target/s390x: Restrict TCG-specific declarations, Philippe Mathieu-Daudé, 2024/03/19
- [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
- [PATCH-for-9.1 27/27] accel/tcg: Remove check on TARGET_HAS_CPU_GET_TB_CPU_STATE,
Philippe Mathieu-Daudé <=
- Re: [PATCH-for-9.1 00/27] accel/tcg: Introduce TCGCPUOps::get_cpu_state() handler, Philippe Mathieu-Daudé, 2024/03/19
- Re: [PATCH-for-9.1 00/27] accel/tcg: Introduce TCGCPUOps::get_cpu_state() handler, Richard Henderson, 2024/03/19