@samitouri / QOSamiQemu / commits / 96afb74bad

target/arm: Ignore endianness when setting MTE tags

As mentioned by Richard in [*]: We don't actually need any specific endianness here, because every byte has the same value. So we could simply drop MO_TE. That would produce a store in host-endianness, which will be fractionally more efficient on some hosts. [*] https://lore.kernel.org/qemu-devel/d64d3576-9188-4e74-afdc-3492c9feb8e0@linaro.org/ Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20260414005348.4767-2-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Philippe Mathieu-Daudé committed Apr 14, 2026 at 02:53 UTC 96afb74bad7fa6c81c976bb48008914d69fc5d6a
1 file changed +1 -1
target/arm/tcg/helper-a64.c
+1 -1
@@ -1019,7 +1019,7 @@ static uint64_t set_step_tags(CPUARMState *env, uint64_t toaddr,
1019 * the page dirty and will use the fast path.
1020 */
1021 uint64_t repldata = data * 0x0101010101010101ULL;
1022 - MemOpIdx oi16 = make_memop_idx(MO_TE | MO_128, memidx);
1022 + MemOpIdx oi16 = make_memop_idx(MO_128, memidx);
1023 cpu_st16_mmu(env, toaddr, int128_make128(repldata, repldata), oi16, ra);
1024 mte_mops_set_tags(env, toaddr, 16, *mtedesc);
1025 return 16;