[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 38/47] target/openrisc: Convert to tcg_ops restore_state_to_opc
From: |
Richard Henderson |
Subject: |
[PULL 38/47] target/openrisc: Convert to tcg_ops restore_state_to_opc |
Date: |
Wed, 26 Oct 2022 12:11:07 +1000 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/openrisc/cpu.c | 13 +++++++++++++
target/openrisc/translate.c | 10 ----------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index f6fd437785..de0176cd20 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -46,6 +46,18 @@ static void openrisc_cpu_synchronize_from_tb(CPUState *cs,
cpu->env.pc = tb_pc(tb);
}
+static void openrisc_restore_state_to_opc(CPUState *cs,
+ const TranslationBlock *tb,
+ const uint64_t *data)
+{
+ OpenRISCCPU *cpu = OPENRISC_CPU(cs);
+
+ cpu->env.pc = data[0];
+ cpu->env.dflag = data[1] & 1;
+ if (data[1] & 2) {
+ cpu->env.ppc = cpu->env.pc - 4;
+ }
+}
static bool openrisc_cpu_has_work(CPUState *cs)
{
@@ -203,6 +215,7 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = {
static const struct TCGCPUOps openrisc_tcg_ops = {
.initialize = openrisc_translate_init,
.synchronize_from_tb = openrisc_cpu_synchronize_from_tb,
+ .restore_state_to_opc = openrisc_restore_state_to_opc,
#ifndef CONFIG_USER_ONLY
.tlb_fill = openrisc_cpu_tlb_fill,
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
index 8154f9d744..2f3d7c5fd1 100644
--- a/target/openrisc/translate.c
+++ b/target/openrisc/translate.c
@@ -1726,13 +1726,3 @@ void openrisc_cpu_dump_state(CPUState *cs, FILE *f, int
flags)
(i % 4) == 3 ? '\n' : ' ');
}
}
-
-void restore_state_to_opc(CPUOpenRISCState *env, TranslationBlock *tb,
- target_ulong *data)
-{
- env->pc = data[0];
- env->dflag = data[1] & 1;
- if (data[1] & 2) {
- env->ppc = env->pc - 4;
- }
-}
--
2.34.1
- [PULL 28/47] target/avr: Convert to tcg_ops restore_state_to_opc, (continued)
- [PULL 28/47] target/avr: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 29/47] target/cris: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 30/47] target/hexagon: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 31/47] target/hppa: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 32/47] target/i386: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 33/47] target/loongarch: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 34/47] target/m68k: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 35/47] target/microblaze: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 36/47] target/mips: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 37/47] target/nios2: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 38/47] target/openrisc: Convert to tcg_ops restore_state_to_opc,
Richard Henderson <=
- [PULL 39/47] target/ppc: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 40/47] target/riscv: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 41/47] target/rx: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 42/47] target/s390x: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 43/47] target/sh4: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 45/47] target/tricore: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 47/47] accel/tcg: Remove restore_state_to_opc function, Richard Henderson, 2022/10/25
- [PULL 46/47] target/xtensa: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- [PULL 44/47] target/sparc: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/25
- Re: [PULL 00/47] tcg patch queue, Stefan Hajnoczi, 2022/10/26