[9] RFR(S): 8036851: volatile double accesses are not explicitly atomic in C2
Aleksey Shipilev
aleksey.shipilev at oracle.com
Fri May 2 13:53:24 UTC 2014
Glad to see this addressed. The patch looks fine to me (not a Reviewer).
I remember seeing places in C1 where we special-case T_LONG, so we
probably need an additional work to fix it there as well. See e.g.
LIRGenerator::volatile_field_store.
-Aleksey
On 05/02/2014 04:15 PM, Tobias Hartmann wrote:
> Hi,
>
> please review the following patch for bug 8036851.
>
> *Problem*
> Volatile double accesses are not treated different from normal accesses
> in the C2 compiler with respect to atomicity because on x86 and sparc
> double accesses were always atomic. However, this may not be case on
> other architectures. On an architecture where there are atomic and
> non-atomic double accesses, we would have to implement all accesses to
> be atomic, because the C2 compiler does not distinguish between the two
> cases.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8036851
>
> *Solution*
> The C2 structure is adapted to distinguish between volatile and
> non-volatile double accesses.
> Webrev: http://cr.openjdk.java.net/~anoll/8036851/webrev.00/
> <http://cr.openjdk.java.net/%7Eanoll/8036851/webrev.00/>
>
> *Tests*
> JPRT
>
> Thanks,
> Tobias
>
More information about the hotspot-compiler-dev
mailing list