aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-10-24 21:17:39 +1000
committerRichard Henderson <richard.henderson@linaro.org>2022-10-26 11:11:28 +1000
commit04f105758b0089f73ee47260671580cde35f96cc (patch)
treef7385bd29a75ad8c99e9c760bd302aaf30d249b2 /accel
parent044dcfc5aab2f2679148c9eca41441dd6cf276a0 (diff)
downloadqemu-04f105758b0089f73ee47260671580cde35f96cc.zip
qemu-04f105758b0089f73ee47260671580cde35f96cc.tar.gz
qemu-04f105758b0089f73ee47260671580cde35f96cc.tar.bz2
accel/tcg: Remove restore_state_to_opc function
All targets have been updated. Use the tcg_ops target hook exclusively, which allows the compat code to be removed. Reviewed-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/translate-all.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 4d8783e..f185356 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -254,7 +254,7 @@ static int encode_search(TranslationBlock *tb, uint8_t *block)
int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
uintptr_t searched_pc, bool reset_icount)
{
- target_ulong data[TARGET_INSN_START_WORDS];
+ uint64_t data[TARGET_INSN_START_WORDS];
uintptr_t host_pc = (uintptr_t)tb->tc.ptr;
const uint8_t *p = tb->tc.ptr + tb->tc.size;
int i, j, num_insns = tb->icount;
@@ -295,19 +295,7 @@ int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
cpu_neg(cpu)->icount_decr.u16.low += num_insns - i;
}
- {
- const struct TCGCPUOps *ops = cpu->cc->tcg_ops;
- __typeof(ops->restore_state_to_opc) restore = ops->restore_state_to_opc;
- if (restore) {
- uint64_t d64[TARGET_INSN_START_WORDS];
- for (i = 0; i < TARGET_INSN_START_WORDS; ++i) {
- d64[i] = data[i];
- }
- restore(cpu, tb, d64);
- } else {
- restore_state_to_opc(cpu->env_ptr, tb, data);
- }
- }
+ cpu->cc->tcg_ops->restore_state_to_opc(cpu, tb, data);
#ifdef CONFIG_PROFILER
qatomic_set(&prof->restore_time,