Short/Character.reverseBytes intrinsics

Ulf Zibis Ulf.Zibis at
Wed Apr 28 03:34:53 PDT 2010

Alternatively I think, it would be more consequent to collect all bit 
mechanics in

Following this, Type.reverseBytes should call Bits.swap(type) instead 
Additionally this would allow to place swap(float) and swap(double) in
May be the from/to raw bits mechanics code should too be better placed 

Another point:
Wouldn't the " -- Processor and memory-system properties -- " section 
better fit to class ?
Anyway, the switch block in the static initializer should be proper 


Am 28.04.2010 00:07, schrieb Ulf Zibis:
> Am 27.04.2010 19:29, schrieb Hiroshi Yamauchi:
>> Tom,
>> Thanks. It looks like it's been checked in.
>> Now, Martin and Ulf, the following patch is up to you:
> Looks perfect to me.
> Maybe you like to rename char variables to c, integers to i etc., just 
> for sugar.
> I'm not sure, if starting at offset 7/3/1 and then decrementing down 
> to 0 is the fastest way to step through the multi-byte values in 
> makeType and get/putTypeL/B methods. They are anyway intrinsified 
> little later. My guess is, we could save byte code and JIT 
> optimization load by defining those methods as native calls, and user 
> will not be confused, if those methods will perform slow on assembling 
> the multi-byte values from single bytes.
> -Ulf

More information about the hotspot-compiler-dev mailing list