Message ID | 20241009150855.804605-19-richard.henderson@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | accel/tcg: Convert victim tlb to IntervalTree | expand |
On 9/10/24 12:08, Richard Henderson wrote: > Ensure a common entry point for all code lookups. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > accel/tcg/cputlb.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On 10/9/24 08:08, Richard Henderson wrote: > Ensure a common entry point for all code lookups. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > accel/tcg/cputlb.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c > index 59ee766d51..61daa89e06 100644 > --- a/accel/tcg/cputlb.c > +++ b/accel/tcg/cputlb.c > @@ -2954,28 +2954,28 @@ uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) > { > CPUState *cs = env_cpu(env); > MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); > - return do_ld1_mmu(cs, addr, oi, 0, MMU_INST_FETCH); > + return cpu_ldb_code_mmu(env, addr, oi, 0); > } > > uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) > { > CPUState *cs = env_cpu(env); > MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); > - return do_ld2_mmu(cs, addr, oi, 0, MMU_INST_FETCH); > + return cpu_ldw_code_mmu(env, addr, oi, 0); > } > > uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) > { > CPUState *cs = env_cpu(env); > MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); > - return do_ld4_mmu(cs, addr, oi, 0, MMU_INST_FETCH); > + return cpu_ldl_code_mmu(env, addr, oi, 0); > } > > uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) > { > CPUState *cs = env_cpu(env); > MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); > - return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); > + return cpu_ldq_code_mmu(env, addr, oi, 0); > } > > uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, This will still call the same functions behind _code_mmu variants, but I guess it's more coherent overall. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
On 10/9/24 17:23, Pierrick Bouvier wrote: > On 10/9/24 08:08, Richard Henderson wrote: >> Ensure a common entry point for all code lookups. >> >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >> --- >> accel/tcg/cputlb.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c >> index 59ee766d51..61daa89e06 100644 >> --- a/accel/tcg/cputlb.c >> +++ b/accel/tcg/cputlb.c >> @@ -2954,28 +2954,28 @@ uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) >> { >> CPUState *cs = env_cpu(env); >> MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); >> - return do_ld1_mmu(cs, addr, oi, 0, MMU_INST_FETCH); >> + return cpu_ldb_code_mmu(env, addr, oi, 0); >> } >> uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) >> { >> CPUState *cs = env_cpu(env); >> MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); >> - return do_ld2_mmu(cs, addr, oi, 0, MMU_INST_FETCH); >> + return cpu_ldw_code_mmu(env, addr, oi, 0); >> } >> uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) >> { >> CPUState *cs = env_cpu(env); >> MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); >> - return do_ld4_mmu(cs, addr, oi, 0, MMU_INST_FETCH); >> + return cpu_ldl_code_mmu(env, addr, oi, 0); >> } >> uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) >> { >> CPUState *cs = env_cpu(env); >> MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); >> - return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); >> + return cpu_ldq_code_mmu(env, addr, oi, 0); >> } >> uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, > > This will still call the same functions behind _code_mmu variants, but I guess it's more > coherent overall. > > Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Previously, I was modifying cpu_ld*_code_mmu, so this mattered. But I dropped that, so I should drop this as well. r~
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 59ee766d51..61daa89e06 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2954,28 +2954,28 @@ uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) { CPUState *cs = env_cpu(env); MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); - return do_ld1_mmu(cs, addr, oi, 0, MMU_INST_FETCH); + return cpu_ldb_code_mmu(env, addr, oi, 0); } uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) { CPUState *cs = env_cpu(env); MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); - return do_ld2_mmu(cs, addr, oi, 0, MMU_INST_FETCH); + return cpu_ldw_code_mmu(env, addr, oi, 0); } uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) { CPUState *cs = env_cpu(env); MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); - return do_ld4_mmu(cs, addr, oi, 0, MMU_INST_FETCH); + return cpu_ldl_code_mmu(env, addr, oi, 0); } uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) { CPUState *cs = env_cpu(env); MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); - return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); + return cpu_ldq_code_mmu(env, addr, oi, 0); } uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr,
Ensure a common entry point for all code lookups. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- accel/tcg/cputlb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)