|
@@ -52,7 +52,10 @@ __bswap_variable_64 ( uint64_t x ) {
|
52
|
52
|
|
53
|
53
|
static inline __attribute__ (( always_inline )) void
|
54
|
54
|
__bswap_64s ( uint64_t *x ) {
|
55
|
|
- uint32_t __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
|
|
55
|
+ struct {
|
|
56
|
+ uint32_t low;
|
|
57
|
+ uint32_t high;
|
|
58
|
+ } __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
|
56
|
59
|
uint32_t discard;
|
57
|
60
|
|
58
|
61
|
__asm__ ( "movl %0,%2\n\t"
|
|
@@ -60,8 +63,9 @@ __bswap_64s ( uint64_t *x ) {
|
60
|
63
|
"xchgl %2,%1\n\t"
|
61
|
64
|
"bswapl %2\n\t"
|
62
|
65
|
"movl %2,%0\n\t"
|
63
|
|
- : "=g" ( dwords[0] ), "=g" ( dwords[1] ), "=r" ( discard )
|
64
|
|
- : "0" ( dwords[0] ), "1" ( dwords[1] ) );
|
|
66
|
+ : "=g" ( dwords->low ), "=g" ( dwords->high ),
|
|
67
|
+ "=r" ( discard )
|
|
68
|
+ : "0" ( dwords->low ), "1" ( dwords->high ) );
|
65
|
69
|
}
|
66
|
70
|
|
67
|
71
|
#endif /* _BITS_BYTESWAP_H */
|