[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-dev
Subject:    Re: RFR: 8145096: Undefined behaviour in HotSpot
From:       Vladimir Kozlov <vladimir.kozlov () oracle ! com>
Date:       2015-12-29 10:04:08
Message-ID: 56825A98.5020603 () oracle ! com
[Download RAW message or body]

Looks fine to me too. I am pushing it.

Thanks,
Vladimir

On 12/21/15 9:07 AM, Andrew Haley wrote:
> I've analysed the last remaining changes and I'm now convinced that
> it's safe to make this change:
>
> --- a/src/share/vm/opto/mulnode.cpp
> +++ b/src/share/vm/opto/mulnode.cpp
> @@ -574,7 +574,8 @@
>       // Masking off high bits which are always zero is useless.
>       const TypeLong* t1 = phase->type( in(1) )->isa_long();
>       if (t1 != NULL && t1->_lo >= 0) {
> -      jlong t1_support = ((jlong)1 << (1 + log2_long(t1->_hi))) - 1;
> +      int bit_count = log2_long(t1->_hi) + 1;
> +      jlong t1_support = jlong(max_julong >> (BitsPerJavaLong - bit_count));
>         if ((t1_support & con) == t1_support)
>           return usr;
>       }
>
> Webrev at http://cr.openjdk.java.net/~aph/8145096-4/
>
> Andrew.
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic