From 77b535cfdd1abf2d528fa04a83d925a8f8a86c92 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Fri, 4 Oct 2024 13:30:33 -0300 Subject: hw/m68k: Use explicit big-endian LD/ST API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The M68K architecture uses big endianness. Directly use the big-endian LD/ST API. Mechanical change using: $ end=be; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(ld|st)t?u?[wlq]_p' hw/m68k/); \ done Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-ID: <20241004163042.85922-18-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/m68k/next-cube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/m68k/next-cube.c') diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index 9b78767ea8..9832213e7e 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -1036,7 +1036,7 @@ static void next_cube_init(MachineState *machine) /* Initial PC is always at offset 4 in firmware binaries */ ptr = rom_ptr(0x01000004, 4); g_assert(ptr != NULL); - env->pc = ldl_p(ptr); + env->pc = ldl_be_p(ptr); if (env->pc >= 0x01020000) { error_report("'%s' does not seem to be a valid firmware image.", bios_name); -- cgit 1.4.1