MicroBlaze CPU model has a "little-endian" property, pointing to
the @endi internal field. Commit
c36ec3a9655 ("hw/microblaze:
Explicit CPU endianness") took care of having all MicroBlaze
boards with an explicit default endianness (similarly with
commit
91fc6d8101d for linux-user binaries), so later commit
415aae543ed ("target/microblaze: Consider endianness while
translating code") could infer the endianness at runtime from
the @endi field, and not a compile time via the TARGET_BIG_ENDIAN
definition. Doing so, we forgot to propagate that runtime change
to the disassemble_info structure. Do it now to display the
opcodes in correct endianness order.
Cc: qemu-stable@nongnu.org
Fixes: 415aae543ed ("target/microblaze: Consider endianness while translating code")
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-3-philmd@linaro.org>
{
info->mach = bfd_arch_microblaze;
info->print_insn = print_insn_microblaze;
- info->endian = TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG
- : BFD_ENDIAN_LITTLE;
+ info->endian = MICROBLAZE_CPU(cpu)->cfg.endi ? BFD_ENDIAN_LITTLE
+ : BFD_ENDIAN_BIG;
}
static void mb_cpu_realizefn(DeviceState *dev, Error **errp)