equal
deleted
inserted
replaced
58 #endif // AMD64 |
58 #endif // AMD64 |
59 } |
59 } |
60 |
60 |
61 #ifdef AMD64 |
61 #ifdef AMD64 |
62 inline u8 Bytes::swap_u8(u8 x) { |
62 inline u8 Bytes::swap_u8(u8 x) { |
|
63 #ifdef SPARC_WORKS |
|
64 // workaround for SunStudio12 CR6615391 |
|
65 __asm__ __volatile__ ( |
|
66 "bswapq %0" |
|
67 :"=r" (x) // output : register 0 => x |
|
68 :"0" (x) // input : x => register 0 |
|
69 :"0" // clobbered register |
|
70 ); |
|
71 return x; |
|
72 #else |
63 return bswap_64(x); |
73 return bswap_64(x); |
|
74 #endif |
64 } |
75 } |
65 #else |
76 #else |
66 // Helper function for swap_u8 |
77 // Helper function for swap_u8 |
67 inline u8 Bytes::swap_u8_base(u4 x, u4 y) { |
78 inline u8 Bytes::swap_u8_base(u4 x, u4 y) { |
68 return (((u8)swap_u4(x))<<32) | swap_u4(y); |
79 return (((u8)swap_u4(x))<<32) | swap_u4(y); |