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

Tom Rodriguez tom.rodriguez at oracle.com
Mon Sep 27 15:27:45 PDT 2010


Why is the shift 31 bits?  T_BOOLEAN isn't a bit field, it's 8 bits wide in our implementation.

tom

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: 
> 
> On a big-endian SPARC machine an unboxed true boolean value looks like
> 0x01000000 but the shift is 31 bits, which results in a wrong value.
> 
> The fix is to check for a boolean destination type before we do the
> shift and adjust the shift value.
> 
> Tested with test.java.dyn.MethodHandlesTest.
> 
> Additionally this change includes some SPARC-specific changes which
> were part of 6984311.
> 



More information about the hotspot-compiler-dev mailing list