[9] RFR (XS): C2: Broken cmpxchgb encoding on x86
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Aug 17 19:03:05 UTC 2016
Good.
Thanks,
Vladimir
On 8/17/16 9:56 AM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8164103/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8164103
>
> Newly introduced compareAndSwapB/compareAndExchangeB rules on x64 incorrectly encodes cmpxchgb instruction when new value is in DIL (RDI) register.
>
> What was missing is REX prefix. The fix is to use REX_breg_mem which takes care of that case [1].
>
> The bug was found by new VarHandle tests on bitwise atomics [2]. So, I decided not to duplicate the failing test in hotspot repository. 8161444 will be integrated after the fix is in.
>
> Testing: failing test, VarHandle tests (existing and new), RBT (hs-tier0-comp, in progress).
>
> Thanks!
>
> Best regards,
> Vladimir Ivanov
>
> [1] http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/031f53ef620a/src/cpu/x86/vm/x86_64.ad#l2375
>
> [2] https://jbs.oracle.com/browse/JDK-8161444
More information about the hotspot-compiler-dev
mailing list