aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/m68k
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2001-01-17 15:54:57 +0000
committerAndreas Schwab <schwab@suse.de>2001-01-17 15:54:57 +0000
commit76aaa352946a3dcf2d004f1263492682f3e88ecb (patch)
tree27e5ba7d15b0d1aa1fe541a4df2498c30fc21426 /sysdeps/m68k
parentd26253b410b1b536057b1ae9b9fdda9ed89a065a (diff)
downloadglibc-76aaa352946a3dcf2d004f1263492682f3e88ecb.zip
glibc-76aaa352946a3dcf2d004f1263492682f3e88ecb.tar.gz
glibc-76aaa352946a3dcf2d004f1263492682f3e88ecb.tar.bz2
(__bswap_32): Add cast to avoid invalid asm.
Diffstat (limited to 'sysdeps/m68k')
-rw-r--r--sysdeps/m68k/bits/byteswap.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index e828fc6..efdc7af 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -34,16 +34,16 @@
#if defined __GNUC__ && __GNUC__ >= 2
# define __bswap_32(x) \
- __extension__ \
- ({ unsigned int __bswap_32_v; \
- if (__builtin_constant_p (x)) \
- __bswap_32_v = __bswap_constant_32 (x); \
- else \
- __asm__ __volatile__ ("ror%.w %#8, %0;" \
- "swap %0;" \
- "ror%.w %#8, %0" \
- : "=d" (__bswap_32_v) \
- : "0" (x)); \
+ __extension__ \
+ ({ unsigned int __bswap_32_v; \
+ if (__builtin_constant_p (x)) \
+ __bswap_32_v = __bswap_constant_32 (x); \
+ else \
+ __asm__ __volatile__ ("ror%.w %#8, %0;" \
+ "swap %0;" \
+ "ror%.w %#8, %0" \
+ : "=d" (__bswap_32_v) \
+ : "0" ((unsigned int) (x))); \
__bswap_32_v; })
#else
# define __bswap_32(x) __bswap_constant_32 (x)