[9] RFR (XS): C2: Broken cmpxchgb encoding on x86

Aleksey Shipilev aleksey.shipilev at gmail.com
Wed Aug 17 17:48:07 UTC 2016


On 08/17/2016 07:56 PM, 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].

Ah, oops! I remember chasing and fixing a relevant bug in the original
VH byte/short xchg. x86_64 8-bit accesses are weird.

The fix looks good to me.

Thanks,
-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160817/9b627586/signature-0001.asc>


More information about the hotspot-compiler-dev mailing list