4 typedef unsigned int UInt
;
5 typedef unsigned long long ULong
;
7 #if defined(__x86_64__)
9 #define BSWAPQ(_lval) \
11 __asm__ __volatile__("bswapq %0" \
12 : /*out*/ "+r"(_lval) ); \
15 ULong
bswapq ( ULong x
)
53 #endif /* defined(__x86_64__) */
55 #define BSWAPL(_lval) \
57 __asm__ __volatile__("bswapl %0" \
58 : /*out*/ "+r"(_lval) ); \
61 UInt
bswapl ( UInt x
)
101 #if defined(__x86_64__)
102 printf("0x%llx\n", bswapq( 0x8877665544332211ULL
));
104 printf("0x%x\n", bswapl( 0x44332211ULL
));