[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/29] target/mips: Convert to tcg_ops restore_state_to_opc
From: |
Richard Henderson |
Subject: |
[PATCH 12/29] target/mips: Convert to tcg_ops restore_state_to_opc |
Date: |
Mon, 24 Oct 2022 23:24:42 +1000 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/mips/tcg/tcg-internal.h | 3 +++
target/mips/cpu.c | 1 +
target/mips/tcg/translate.c | 8 ++++++--
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/target/mips/tcg/tcg-internal.h b/target/mips/tcg/tcg-internal.h
index 1d27fa2ff9..aef032c48d 100644
--- a/target/mips/tcg/tcg-internal.h
+++ b/target/mips/tcg/tcg-internal.h
@@ -21,6 +21,9 @@ void mips_cpu_synchronize_from_tb(CPUState *cs, const
TranslationBlock *tb);
G_NORETURN void mips_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
MMUAccessType access_type, int
mmu_idx,
uintptr_t retaddr);
+void mips_restore_state_to_opc(CPUState *cs,
+ const TranslationBlock *tb,
+ const uint64_t *data);
const char *mips_exception_name(int32_t exception);
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index da58eb8892..e997c1b9cb 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -538,6 +538,7 @@ static const struct SysemuCPUOps mips_sysemu_ops = {
static const struct TCGCPUOps mips_tcg_ops = {
.initialize = mips_tcg_init,
.synchronize_from_tb = mips_cpu_synchronize_from_tb,
+ .restore_state_to_opc = mips_restore_state_to_opc,
#if !defined(CONFIG_USER_ONLY)
.tlb_fill = mips_cpu_tlb_fill,
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index c3f92ea652..2f2d707a12 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -16229,9 +16229,13 @@ void mips_tcg_init(void)
}
}
-void restore_state_to_opc(CPUMIPSState *env, TranslationBlock *tb,
- target_ulong *data)
+void mips_restore_state_to_opc(CPUState *cs,
+ const TranslationBlock *tb,
+ const uint64_t *data)
{
+ MIPSCPU *cpu = MIPS_CPU(cs);
+ CPUMIPSState *env = &cpu->env;
+
env->active_tc.PC = data[0];
env->hflags &= ~MIPS_HFLAG_BMASK;
env->hflags |= data[1];
--
2.34.1
- [PATCH 05/29] target/cris: Convert to tcg_ops restore_state_to_opc, (continued)
- [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, 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 <=
- [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
- [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