@samitouri / QOSamiQemu / commits / a5eb38f291

target/microblaze: Replace translator_ldl_swap() -> translator_ldl_end()

In preparation of removing the translator_ld[uw,l,q]() methods, inline them for the microblaze targets, using mo_endian(ctx) -- which we introduced in commit 2c9e8ddd7699 -- instead of MO_TE. Remove mb_cpu_is_big_endian() which is now unused. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Message-Id: <20260423100612.27278-4-philmd@linaro.org>

Philippe Mathieu-Daudé committed Nov 27, 2025 at 17:01 UTC a5eb38f2918fcd189006a50d13f3de12a8e93713
2 files changed +2 -9
target/microblaze/cpu.h
-7
@@ -412,13 +412,6 @@ void mb_translate_code(CPUState *cs, TranslationBlock *tb,
412 /* Ensure there is no overlap between the two masks. */
413 QEMU_BUILD_BUG_ON(MSR_TB_MASK & IFLAGS_TB_MASK);
414
415 -static inline bool mb_cpu_is_big_endian(CPUState *cs)
416 -{
417 - MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
418 -
419 - return !cpu->cfg.endi;
420 -}
421 -
415 #if !defined(CONFIG_USER_ONLY)
416 bool mb_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
417 MMUAccessType access_type, int mmu_idx,
target/microblaze/translate.c
+2 -2
@@ -1646,8 +1646,8 @@ static void mb_tr_translate_insn(DisasContextBase *dcb, CPUState *cs)
1646
1647 dc->tb_flags_to_set = 0;
1648
1649 - ir = translator_ldl_swap(cpu_env(cs), &dc->base, dc->base.pc_next,
1650 - mb_cpu_is_big_endian(cs) != TARGET_BIG_ENDIAN);
1649 + ir = translator_ldl_end(cpu_env(cs), &dc->base, dc->base.pc_next,
1650 + mo_endian(dc));
1651 if (!decode(dc, ir)) {
1652 trap_illegal(dc, true);
1653 }