@@ -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;
}
@@ -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)
{
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(-)