[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 20/25] target/sparc: Use explicit big-endian LD/ST API
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 20/25] target/sparc: Use explicit big-endian LD/ST API |
Date: |
Fri, 4 Oct 2024 13:30:36 -0300 |
The SPARC architectures use 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' target/sparc/); \
done
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/sparc/gdbstub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c
index ec0036e9ef6..6c82b7db8cf 100644
--- a/target/sparc/gdbstub.c
+++ b/target/sparc/gdbstub.c
@@ -110,11 +110,11 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t
*mem_buf, int n)
#if defined(TARGET_ABI32)
uint32_t tmp;
- tmp = ldl_p(mem_buf);
+ tmp = ldl_be_p(mem_buf);
#else
target_ulong tmp;
- tmp = ldtul_p(mem_buf);
+ tmp = ldtul_be_p(mem_buf);
#endif
if (n < 8) {
@@ -165,7 +165,7 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t
*mem_buf, int n)
#else
else if (n < 64) {
/* f0-f31 */
- tmp = ldl_p(mem_buf);
+ tmp = ldl_be_p(mem_buf);
if (n & 1) {
env->fpr[(n - 32) / 2].l.lower = tmp;
} else {
--
2.45.2
- Re: [PATCH v2 13/25] target/sh4: Use explicit little-endian LD/ST API, (continued)
- [PATCH v2 14/25] target/tricore: Use explicit little-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 15/25] target/rx: Use explicit little-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 16/25] target/riscv: Use explicit little-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 17/25] hw/m68k: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 18/25] target/m68k: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 20/25] target/sparc: Use explicit big-endian LD/ST API,
Philippe Mathieu-Daudé <=
- [PATCH v2 19/25] hw/sparc: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 22/25] hw/s390x: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 23/25] target/s390x: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 21/25] target/hppa: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 24/25] target/openrisc: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH v2 25/25] hw/ppc/e500: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- Re: [PATCH v2 00/25] misc: Use explicit endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/04
- Re: [PATCH v2 00/25] misc: Use explicit endian LD/ST API, Richard Henderson, 2024/10/04