mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
* sysdeps/m68k/bits/byteswap.h (__bswap_32): Rename local variable
__v to __bswap_32_v. (__bswap_64): Rename local variables __v and __r to __bswap_64_v and __bswap_64_r to avoid clash with __bswap_32 macro.
This commit is contained in:
parent
e486b034c7
commit
15e4660f05
@ -35,16 +35,16 @@
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
# define __bswap_32(x) \
|
||||
__extension__ \
|
||||
({ unsigned int __v; \
|
||||
({ unsigned int __bswap_32_v; \
|
||||
if (__builtin_constant_p (x)) \
|
||||
__v = __bswap_constant_32 (x); \
|
||||
__bswap_32_v = __bswap_constant_32 (x); \
|
||||
else \
|
||||
__asm__ __volatile__ ("ror%.w %#8, %0;" \
|
||||
"swap %0;" \
|
||||
"ror%.w %#8, %0" \
|
||||
: "=d" (__v) \
|
||||
: "=d" (__bswap_32_v) \
|
||||
: "0" (x)); \
|
||||
__v; })
|
||||
__bswap_32_v; })
|
||||
#else
|
||||
# define __bswap_32(x) __bswap_constant_32 (x)
|
||||
#endif
|
||||
@ -54,9 +54,9 @@
|
||||
# define __bswap_64(x) \
|
||||
__extension__ \
|
||||
({ union { unsigned long long int __ll; \
|
||||
unsigned long int __l[2]; } __v, __r; \
|
||||
__v.__ll = (x); \
|
||||
__r.__l[0] = __bswap_32 (__v.__l[1]); \
|
||||
__r.__l[1] = __bswap_32 (__v.__l[0]); \
|
||||
__r.__ll; })
|
||||
unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \
|
||||
__bswap_64_v.__ll = (x); \
|
||||
__bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \
|
||||
__bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \
|
||||
__bswap_64_r.__ll; })
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user