]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/openrisc: Use explicit big-endian LD/ST API
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 4 Oct 2024 10:02:02 +0000 (12:02 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 12 Jan 2026 22:47:57 +0000 (23:47 +0100)
The OpenRISC architecture uses big endianness. Directly
use the big-endian LD/ST API.

Mechanical change running:

  $ for a in uw w l q; do \
      sed -i -e "s/ld${a}_p(/ld${a}_be_p(/" \
        $(git grep -wlE '(ld|st)u?[wlq]_p' target/openrisc/);
    done

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251224161804.90064-3-philmd@linaro.org>

target/openrisc/gdbstub.c

index 45bba80d8789d7297d8e5d2cafcbc60407f2f486..ca1592c6200177afc5e8d5f50bf0b72ad1ad33b2 100644 (file)
@@ -50,7 +50,7 @@ int openrisc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     CPUOpenRISCState *env = cpu_env(cs);
     uint32_t tmp;
 
-    tmp = ldl_p(mem_buf);
+    tmp = ldl_be_p(mem_buf);
 
     if (n < 32) {
         cpu_set_gpr(env, n, tmp);