]> sourceware.org Git - glibc.git/commitdiff
(__bswap_32): Add cast to avoid invalid asm.
authorAndreas Schwab <schwab@suse.de>
Wed, 17 Jan 2001 15:54:57 +0000 (15:54 +0000)
committerAndreas Schwab <schwab@suse.de>
Wed, 17 Jan 2001 15:54:57 +0000 (15:54 +0000)
sysdeps/m68k/bits/byteswap.h

index e828fc6554811ce39ff1433020f40d72b3d8d76c..efdc7af0dfca8f19902ecf0a172834556a8dca64 100644 (file)
 
 #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)
This page took 0.037407 seconds and 5 git commands to generate.