RFR: 8058255: Native jbyte Atomic::cmpxchg for supported x86 platforms
david.holmes at oracle.com
Fri Sep 12 01:40:33 UTC 2014
Can we pause and give some more thought to a clean mechanism for
allowing a shared implementation if desired with the ability to override
if desired. I really do not like to see CPU specific ifdefs being added
to shared code. (And I would also not like to see all platforms being
forced to reimplement this natively).
I'm not saying we will find a simple solution, but it would be nice if
we could get a few folk to think about it before proceeding with the
On 12/09/2014 7:48 AM, Erik Österlund wrote:
> 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