[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function
From: |
Claudio Fontana |
Subject: |
Re: [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function |
Date: |
Tue, 25 Oct 2022 10:56:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
Reviewed-by: Claudio Fontana <cfontana@suse.de>
On 10/24/22 15:24, Richard Henderson wrote:
> All targets have been updated. Use the tcg_ops target hook
> exclusively, which allows the compat code to be removed.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> include/exec/exec-all.h | 3 ---
> accel/tcg/translate-all.c | 16 ++--------------
> 2 files changed, 2 insertions(+), 17 deletions(-)
>
> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
> index a772e8cbdc..300832bd0b 100644
> --- a/include/exec/exec-all.h
> +++ b/include/exec/exec-all.h
> @@ -39,9 +39,6 @@ typedef ram_addr_t tb_page_addr_t;
> #define TB_PAGE_ADDR_FMT RAM_ADDR_FMT
> #endif
>
> -void restore_state_to_opc(CPUArchState *env, TranslationBlock *tb,
> - target_ulong *data) __attribute__((weak));
> -
> /**
> * cpu_restore_state:
> * @cpu: the vCPU state is to be restore to
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index 19cd23e9a0..e4386b3198 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -327,7 +327,7 @@ static int encode_search(TranslationBlock *tb, uint8_t
> *block)
> static 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;
> @@ -368,19 +368,7 @@ static 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,
- Re: [PATCH 18/29] target/s390x: Convert to tcg_ops restore_state_to_opc, (continued)
- [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
- [PATCH 21/29] target/tricore: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function, Richard Henderson, 2022/10/24
- Re: [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function,
Claudio Fontana <=
- [PATCH 20/29] target/sparc: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 19/29] target/sh4: Convert to tcg_ops restore_state_to_opc, Richard Henderson, 2022/10/24
- [PATCH 26/29] target/openrisc: Always exit after mtspr npc, Richard Henderson, 2022/10/24
- [PATCH 25/29] target/i386: Use cpu_unwind_state_data for tpr access, Richard Henderson, 2022/10/24
- [PATCH 27/29] target/openrisc: Use cpu_unwind_state_data for mfspr, Richard Henderson, 2022/10/24
- [PATCH 28/29] accel/tcg: Remove will_exit argument from cpu_restore_state, Richard Henderson, 2022/10/24