ByteBuffer and ByteOrder

Paul Thio p.thio at
Thu Feb 10 13:44:50 PST 2011


I have a question about the compilation of a test program, which uses a ByteBuffer. The program set the byte order to little endian and uses the method ByteBuffer.getLong. The program runs on Linux x86_64, which is also little endian. The compiler assembler output contains a block for little endian conversion and a block for big endian conversion. This block contains bswap instructions.  I am wondering if the code for big endian conversion can be eliminated.
I attached the test program.



-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 768 bytes
Desc: not available
Url : 

More information about the hotspot-compiler-dev mailing list