Request for reviews (S): 6987555: JSR 292 unboxing to a boolean value fails on big-endian SPARC

John Rose john.r.rose at oracle.com
Tue Sep 28 12:58:55 PDT 2010


On Sep 27, 2010, at 4:43 AM, Christian Thalinger wrote:

> http://cr.openjdk.java.net/~twisti/6987555/webrev.01/
> 
> 6987555: JSR 292 unboxing to a boolean value fails on big-endian SPARC
> Reviewed-by: 

There is an and3/cmp which uses the same value for both mask and test pattern.

It happens to work, but I think you should use this value for the mask:
  (CONV_VMINFO_MASK << CONV_VMINFO_SHIFT)

Also, the value BitsPerByte-1 looks pretty magic.  For the sake of future readers, I suggest something more explicit:
  int old_shift = (boolean_shift & (BitsPerInt-1));
  int new_shift = (BitsPerInt - BitsPerByte);  // 0x01000000 => 0x00000001
  __ delayed()->xor3(vminfo, old_shift ^ new_shift, vminfo);

-- John


More information about the hotspot-compiler-dev mailing list