Message ID | 20241004163042.85922-2-philmd@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | misc: Use explicit endian LD/ST API | expand |
On 10/4/24 09:30, Philippe Mathieu-Daudé wrote: > 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 --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) This does not aid anything in the short term. r~
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_ */
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(-)