comparison src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp @ 52:75b0f3cb1943

Merge
author dcubed
date Thu, 13 Mar 2008 14:17:48 -0700
parents 485d403e94e1
children d1605aabd0a1
comparison
equal deleted inserted replaced
46:8b6e49187640 52:75b0f3cb1943
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);