[RFC-PATCH-for-11.0 0/5] accel/tcg: Remove some MO_TE uses in cpu_ld{uw, l, q}_code()

Philippe Mathieu-Daudé posted 5 patches 2 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251120175914.6515-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Song Gao <gaosong@loongson.cn>, David Hildenbrand <david@kernel.org>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
There is a newer version of this series
include/accel/tcg/cpu-ldst.h   | 43 +++++++++++++++++++++++++++++-----
target/alpha/mem_helper.c      |  2 +-
target/loongarch/tcg/tcg_cpu.c |  2 +-
target/s390x/tcg/mem_helper.c  |  6 ++---
target/sparc/int32_helper.c    |  2 +-
5 files changed, 43 insertions(+), 12 deletions(-)
[RFC-PATCH-for-11.0 0/5] accel/tcg: Remove some MO_TE uses in cpu_ld{uw, l, q}_code()
Posted by Philippe Mathieu-Daudé 2 months, 2 weeks ago
Hi Richard,

Quick attempt to remove MO_TE uses for fixed-endianness targets.

For the other targets I started to propagate MemOp in the call
chain, but since IIUC it is constant, I wonder if it isn't simpler
to have a CPUClass::code_endian_mo field, set once with a
target_big_endian() call. I can post another RFC to show, WDYT?

Regards,

Phil.

Philippe Mathieu-Daudé (5):
  accel/tcg: Add endianness variants of cpu_ld{uw,l,q}_code()
  target/alpha: Use little-endian variant of cpu_ldl_code()
  target/loongarch: Use little-endian variant of cpu_ldl_code()
  target/sparc: Use big-endian variant of cpu_ldl_code()
  target/s390x: Use big-endian variant of cpu_ld{uw,l}_code()

 include/accel/tcg/cpu-ldst.h   | 43 +++++++++++++++++++++++++++++-----
 target/alpha/mem_helper.c      |  2 +-
 target/loongarch/tcg/tcg_cpu.c |  2 +-
 target/s390x/tcg/mem_helper.c  |  6 ++---
 target/sparc/int32_helper.c    |  2 +-
 5 files changed, 43 insertions(+), 12 deletions(-)

-- 
2.51.0


Re: [RFC-PATCH-for-11.0 0/5] accel/tcg: Remove some MO_TE uses in cpu_ld{uw, l, q}_code()
Posted by Philippe Mathieu-Daudé 2 months, 2 weeks ago
On Thu, 20 Nov 2025 at 18:59, Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:

> Hi Richard,
>
> Quick attempt to remove MO_TE uses for fixed-endianness targets.
>
> For the other targets I started to propagate MemOp in the call
> chain, but since IIUC it is constant, I wonder if it isn't simpler
> to have a CPUClass::code_endian_mo field, set once with a
> target_big_endian() call. I can post another RFC to show, WDYT?
>

Not needed, figured a simpler way, posted as v2.