diff mbox series

[v2,01/25] gdbstub/helpers: Have ldtul_p() definition use ldn_p()

Message ID 20241004163042.85922-2-philmd@linaro.org
State New
Headers show
Series misc: Use explicit endian LD/ST API | expand

Commit Message

Philippe Mathieu-Daudé Oct. 4, 2024, 4:30 p.m. UTC
Use ldn_p(TARGET_LONG_SIZE) instead of ldl_p() / ldq_p().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/gdbstub/helpers.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h
index 26140ef1ac0..fd83e366a51 100644
--- a/include/gdbstub/helpers.h
+++ b/include/gdbstub/helpers.h
@@ -94,10 +94,10 @@  static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf, int len)
 
 #if TARGET_LONG_BITS == 64
 #define gdb_get_regl(buf, val) gdb_get_reg64(buf, val)
-#define ldtul_p(addr) ldq_p(addr)
 #else
 #define gdb_get_regl(buf, val) gdb_get_reg32(buf, val)
-#define ldtul_p(addr) ldl_p(addr)
 #endif
 
+#define ldtul_p(addr) ldn_p(addr, TARGET_LONG_SIZE)
+
 #endif /* _GDBSTUB_HELPERS_H_ */