summaryrefslogtreecommitdiffstats
path: root/bswap.h
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-05 13:04:54 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-05 13:04:54 +0000
commit5c90181715fdd56fd7f0fd898bb986dda6f49a5b (patch)
tree50b7d25eb386f9bf1cac39831df535e3828ab658 /bswap.h
parentfb8b0be71f288995928edd4e5ffb0dae62b9ac66 (diff)
downloadmpv-5c90181715fdd56fd7f0fd898bb986dda6f49a5b.tar.bz2
mpv-5c90181715fdd56fd7f0fd898bb986dda6f49a5b.tar.xz
Bswap fixes for 64bit cpus, thx to Falk Hueffner for the hint.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6923 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'bswap.h')
-rw-r--r--bswap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bswap.h b/bswap.h
index 2318afdbb8..66e542cb0d 100644
--- a/bswap.h
+++ b/bswap.h
@@ -40,7 +40,7 @@ inline static unsigned int ByteSwap32(unsigned int x)
inline static unsigned long long int ByteSwap64(unsigned long long int x)
{
register union { __extension__ unsigned long long int __ll;
- unsigned long int __l[2]; } __x;
+ unsigned int __l[2]; } __x;
asm("xchgl %0,%1":
"=r"(__x.__l[0]),"=r"(__x.__l[1]):
"0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32))));
@@ -61,7 +61,7 @@ inline static unsigned long long int ByteSwap64(unsigned long long int x)
#define bswap_64(x) \
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
- unsigned long int __l[2]; } __w, __r; \
+ unsigned int __l[2]; } __w, __r; \
__w.__ll = (x); \
__r.__l[0] = bswap_32 (__w.__l[1]); \
__r.__l[1] = bswap_32 (__w.__l[0]); \