Re: [PATCH v2 12/42] accel/tcg: Use cpu_ld*_code_mmu in translator.c

2025-03-21 Thread Pierrick Bouvier
On 3/20/25 17:48, Richard Henderson wrote: On 3/18/25 17:23, Pierrick Bouvier wrote:   uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc)   { -    uint64_t raw, tgt; +    uint64_t val; -    if (translator_ld(env, db, &raw, pc, sizeof(raw))) { -    tgt = tswap64(raw)

Re: [PATCH v2 12/42] accel/tcg: Use cpu_ld*_code_mmu in translator.c

2025-03-20 Thread Richard Henderson
On 3/18/25 17:23, Pierrick Bouvier wrote:   uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc)   { -    uint64_t raw, tgt; +    uint64_t val; -    if (translator_ld(env, db, &raw, pc, sizeof(raw))) { -    tgt = tswap64(raw); -    } else { -    tgt = cpu_ldq_code(en

Re: [PATCH v2 12/42] accel/tcg: Use cpu_ld*_code_mmu in translator.c

2025-03-18 Thread Pierrick Bouvier
On 3/18/25 14:31, Richard Henderson wrote: Cache the mmu index in DisasContextBase. Perform the read on host endianness, which lets us share code with the translator_ld fast path. Signed-off-by: Richard Henderson --- include/exec/translator.h | 1 + accel/tcg/translator.c| 58 ++

[PATCH v2 12/42] accel/tcg: Use cpu_ld*_code_mmu in translator.c

2025-03-18 Thread Richard Henderson
Cache the mmu index in DisasContextBase. Perform the read on host endianness, which lets us share code with the translator_ld fast path. Signed-off-by: Richard Henderson --- include/exec/translator.h | 1 + accel/tcg/translator.c| 58 ++- 2 files changed,