target/microblaze: Set disassemble_info::endian value in disas_set_info
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 26 Jan 2025 13:31:15 +0000 (14:31 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 6 Mar 2025 14:46:18 +0000 (15:46 +0100)
Have the CPUClass::disas_set_info() callback set the
disassemble_info::endian field.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250210212931.62401-5-philmd@linaro.org>

target/microblaze/cpu.c

index 13d194cef88075dfd0ca33277dd054c6d47ca436..d5ee1244cad756e76518095a8fe664a9b55391a8 100644 (file)
@@ -224,6 +224,8 @@ static void mb_disas_set_info(CPUState *cpu, disassemble_info *info)
 {
     info->mach = bfd_arch_microblaze;
     info->print_insn = print_insn_microblaze;
+    info->endian = TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG
+                                     : BFD_ENDIAN_LITTLE;
 }
 
 static void mb_cpu_realizefn(DeviceState *dev, Error **errp)