Mercurial > hg > truffle
diff src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp @ 50:485d403e94e1
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
Summary: (for Serguei) Allow for Linux builds with Sun Studio Linux compilers
Reviewed-by: sspitsyn, ohair
author | dcubed |
---|---|
date | Wed, 12 Mar 2008 18:37:03 -0700 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp Wed Mar 12 18:09:34 2008 -0700 +++ b/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp Wed Mar 12 18:37:03 2008 -0700 @@ -60,7 +60,18 @@ #ifdef AMD64 inline u8 Bytes::swap_u8(u8 x) { +#ifdef SPARC_WORKS + // workaround for SunStudio12 CR6615391 + __asm__ __volatile__ ( + "bswapq %0" + :"=r" (x) // output : register 0 => x + :"0" (x) // input : x => register 0 + :"0" // clobbered register + ); + return x; +#else return bswap_64(x); +#endif } #else // Helper function for swap_u8