[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/29] target/nios2: Convert to tcg_ops restore_state_to_opc
From: |
Richard Henderson |
Subject: |
[PATCH 13/29] target/nios2: Convert to tcg_ops restore_state_to_opc |
Date: |
Mon, 24 Oct 2022 23:24:43 +1000 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/nios2/cpu.c | 11 +++++++++++
target/nios2/translate.c | 6 ------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c
index 2b28429c08..9a5351bc81 100644
--- a/target/nios2/cpu.c
+++ b/target/nios2/cpu.c
@@ -42,6 +42,16 @@ static vaddr nios2_cpu_get_pc(CPUState *cs)
return env->pc;
}
+static void nios2_restore_state_to_opc(CPUState *cs,
+ const TranslationBlock *tb,
+ const uint64_t *data)
+{
+ Nios2CPU *cpu = NIOS2_CPU(cs);
+ CPUNios2State *env = &cpu->env;
+
+ env->pc = data[0];
+}
+
static bool nios2_cpu_has_work(CPUState *cs)
{
return cs->interrupt_request & CPU_INTERRUPT_HARD;
@@ -346,6 +356,7 @@ static const struct SysemuCPUOps nios2_sysemu_ops = {
static const struct TCGCPUOps nios2_tcg_ops = {
.initialize = nios2_tcg_init,
+ .restore_state_to_opc = nios2_restore_state_to_opc,
#ifndef CONFIG_USER_ONLY
.tlb_fill = nios2_cpu_tlb_fill,
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 8dc0a32c6c..4db8b47744 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -1110,9 +1110,3 @@ void nios2_tcg_init(void)
cpu_pc = tcg_global_mem_new(cpu_env,
offsetof(CPUNios2State, pc), "pc");
}
-
-void restore_state_to_opc(CPUNios2State *env, TranslationBlock *tb,
- target_ulong *data)
-{
- env->pc = data[0];
-}
--
2.34.1
- [PATCH 09/29] target/loongarch: Convert to tcg_ops restore_state_to_opc, (continued)
- [PATCH 09/29] target/loongarch: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [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 <=
- [PATCH 14/29] target/openrisc: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 18/29] target/s390x: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 17/29] target/rx: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 15/29] target/ppc: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 22/29] target/xtensa: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24