]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/alpha: Use explicit little-endian LD/ST API
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 4 Oct 2024 10:09:54 +0000 (12:09 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 15 Oct 2024 14:55:09 +0000 (11:55 -0300)
The Alpha architecture uses little endianness. Directly use
the little-endian LD/ST API.

Mechanical change using:

  $ end=le; \
    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' target/alpha/); \
    done

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241004163042.85922-7-philmd@linaro.org>

target/alpha/gdbstub.c

index bf5091c2a6e6035d124bf681b075587c3e22337c..1a7e2dd920239968c801c5bd24c05d1255a2dedc 100644 (file)
@@ -59,7 +59,7 @@ int alpha_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 int alpha_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
 {
     CPUAlphaState *env = cpu_env(cs);
-    target_ulong tmp = ldq_p(mem_buf);
+    target_ulong tmp = ldq_le_p(mem_buf);
     CPU_DoubleU d;
 
     switch (n) {