diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-10-24 20:05:02 +1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-10-26 11:11:28 +1000 |
commit | f06c1ad4c62b8c91608c36cd3c870524979a278e (patch) | |
tree | 7a5238b9647645e61cf9e1be147ffb937a3ec2f4 /target | |
parent | 56c6c98df85cb03b1e72ef92111c4f9dde542d74 (diff) | |
download | qemu-f06c1ad4c62b8c91608c36cd3c870524979a278e.zip qemu-f06c1ad4c62b8c91608c36cd3c870524979a278e.tar.gz qemu-f06c1ad4c62b8c91608c36cd3c870524979a278e.tar.bz2 |
target/avr: Convert to tcg_ops restore_state_to_opc
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/avr/cpu.c | 11 | ||||
-rw-r--r-- | target/avr/translate.c | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 0d28611..c7295b4 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -57,6 +57,16 @@ static void avr_cpu_synchronize_from_tb(CPUState *cs, env->pc_w = tb_pc(tb) / 2; /* internally PC points to words */ } +static void avr_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + AVRCPU *cpu = AVR_CPU(cs); + CPUAVRState *env = &cpu->env; + + env->pc_w = data[0]; +} + static void avr_cpu_reset(DeviceState *ds) { CPUState *cs = CPU(ds); @@ -202,6 +212,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = { static const struct TCGCPUOps avr_tcg_ops = { .initialize = avr_cpu_tcg_init, .synchronize_from_tb = avr_cpu_synchronize_from_tb, + .restore_state_to_opc = avr_restore_state_to_opc, .cpu_exec_interrupt = avr_cpu_exec_interrupt, .tlb_fill = avr_cpu_tlb_fill, .do_interrupt = avr_cpu_do_interrupt, diff --git a/target/avr/translate.c b/target/avr/translate.c index e65b600..2bed56f 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -3055,9 +3055,3 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns, DisasContext dc = { }; translator_loop(cs, tb, max_insns, pc, host_pc, &avr_tr_ops, &dc.base); } - -void restore_state_to_opc(CPUAVRState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc_w = data[0]; -} |