diff options
author | Matthias Braun <matze@braunis.de> | 2011-08-12 19:57:41 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2011-10-27 14:42:16 +0300 |
commit | cbb21eed186647716b9e8404a9e90d3fc5c6c467 (patch) | |
tree | f02e1908ef5ecb968a058adbe82cea772a4b2ea9 /linux-user/qemu-types.h | |
parent | 6cafd027be3a6cad710d99bde4a2b3b662869e5d (diff) | |
download | qemu-cbb21eed186647716b9e8404a9e90d3fc5c6c467.tar.gz |
linux-user: fix abi_(u)long, target_ulong mismatch
abi_(u)long might be different from target_ulong, so don't use tswapl
but introduce a new tswapal
Signed-off-by: Matthias Braun <matze@braunis.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/qemu-types.h')
-rw-r--r-- | linux-user/qemu-types.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux-user/qemu-types.h b/linux-user/qemu-types.h index 1adda9fbdb..fe7f6624f9 100644 --- a/linux-user/qemu-types.h +++ b/linux-user/qemu-types.h @@ -9,6 +9,12 @@ typedef int32_t abi_long; #define TARGET_ABI_FMT_ld "%d" #define TARGET_ABI_FMT_lu "%u" #define TARGET_ABI_BITS 32 + +static inline abi_ulong tswapal(abi_ulong v) +{ + return tswap32(v); +} + #else typedef target_ulong abi_ulong; typedef target_long abi_long; @@ -20,5 +26,11 @@ typedef target_long abi_long; #if TARGET_ABI_BITS == 32 #define TARGET_ABI32 1 #endif + +static inline abi_ulong tswapal(abi_ulong v) +{ + return tswapl(v); +} + #endif #endif |