[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/29] target/loongarch: Convert to tcg_ops restore_state_to_opc
From: |
Richard Henderson |
Subject: |
[PATCH 09/29] target/loongarch: Convert to tcg_ops restore_state_to_opc |
Date: |
Mon, 24 Oct 2022 23:24:39 +1000 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/loongarch/cpu.c | 11 +++++++++++
target/loongarch/translate.c | 6 ------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 1722ed2a4d..49393d95d8 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -319,6 +319,16 @@ static void loongarch_cpu_synchronize_from_tb(CPUState *cs,
env->pc = tb_pc(tb);
}
+
+static void loongarch_restore_state_to_opc(CPUState *cs,
+ const TranslationBlock *tb,
+ const uint64_t *data)
+{
+ LoongArchCPU *cpu = LOONGARCH_CPU(cs);
+ CPULoongArchState *env = &cpu->env;
+
+ env->pc = data[0];
+}
#endif /* CONFIG_TCG */
static bool loongarch_cpu_has_work(CPUState *cs)
@@ -651,6 +661,7 @@ void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int
flags)
static struct TCGCPUOps loongarch_tcg_ops = {
.initialize = loongarch_translate_init,
.synchronize_from_tb = loongarch_cpu_synchronize_from_tb,
+ .restore_state_to_opc = loongarch_restore_state_to_opc,
#ifndef CONFIG_USER_ONLY
.tlb_fill = loongarch_cpu_tlb_fill,
diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c
index 95b37ea180..6091772349 100644
--- a/target/loongarch/translate.c
+++ b/target/loongarch/translate.c
@@ -272,9 +272,3 @@ void loongarch_translate_init(void)
cpu_llval = tcg_global_mem_new(cpu_env,
offsetof(CPULoongArchState, llval), "llval");
}
-
-void restore_state_to_opc(CPULoongArchState *env, TranslationBlock *tb,
- target_ulong *data)
-{
- env->pc = data[0];
-}
--
2.34.1
- Re: [PATCH 01/29] accel/tcg: Add restore_state_to_opc to TCGCPUOps, (continued)
- [PATCH 06/29] target/hexagon: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 05/29] target/cris: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 08/29] target/i386: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 07/29] target/hppa: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 09/29] target/loongarch: Convert to tcg_ops restore_state_to_opc,
Richard Henderson <=
- [PATCH 10/29] target/m68k: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 12/29] target/mips: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 11/29] target/microblaze: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 16/29] target/riscv: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 13/29] target/nios2: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24