As per the "Load and Store APIs" documentation (docs/devel/loads-stores.rst), "No signed load operations are provided." Update lduw_he_p() to return as unsigned.
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- include/qemu/bswap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 3f28f661b1..613978f838 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -330,9 +330,9 @@ static inline void stw_he_p(void *ptr, uint16_t v) memcpy(ptr, &v, sizeof(v)); } -static inline int ldl_he_p(const void *ptr) +static inline uint32_t ldl_he_p(const void *ptr) { - int32_t r; + uint32_t r; memcpy(&r, ptr, sizeof(r)); return r; } -- 2.17.0