RFR: 8058255: Native jbyte Atomic::cmpxchg for supported x86 platforms

Erik Österlund erik.osterlund at lnu.se
Thu Sep 11 21:48:43 UTC 2014


These changes aim at replacing the awkward old jbyte Atomic::cmpxchg implementation for all the supported x86 platforms. It previously emulated the behaviour of cmpxchgb using a loop of cmpxchgl and some dynamic alignment of the destination address.

This code is called by remembered sets to manipulate card entries.

The implementation has now been replaced with a bunch of assembly, appropriate for all platforms. Yes, for windows too.

Implementations include:
bsd x86/x86_64: inline asm
linux x86/x86_64: inline asm
solaris x86/x86_64: .il files
windows x86_64 without GNU source: stubGenerator and manual code emission and hence including new Assembler::cmpxchgb support
Windows x86 + x86_64 with GNU source: inline asm

Bug: https://bugs.openjdk.java.net/browse/JDK-8058255

Webrev: http://cr.openjdk.java.net/~jwilhelm/8058255/webrev/

Improvements can be made for other architectures can as well, but this should be a good start.


More information about the hotspot-dev mailing list