RFR: 8316961: Fallback implementations for 64-bit Atomic::{add,xchg} on 32-bit platforms

Dean Long dlong at openjdk.org
Thu Oct 19 19:36:06 UTC 2023


On Wed, 18 Oct 2023 18:58:58 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See the bug for rationale. Looks like there is enough infrastructure to achieve what we want without significant fan-out. I checked all `atomic_*.hpp` headers for unimplemented `PlatformAdd<8>` and `PlatformXchg<8>`, and only these seem to be affected.
> 
> Unfortunately, we cannot test these apart from the existing gtest.
> 
> Additional testing:
>  - [x] linux-x86-server-fastdebug, atomic tests pass
>  - [x] linux-arm-server-fastdebug, atomic tests pass (with #16269 applied)

I guess on arm32 without 64-bit atomic support, the gtest operations on int64 would crash, because the _LP64 guard was removed.
It looks like C2 already requires 64-bit atomic support, so older arm32 without that would not be able to run C2.
For those older arm32, the atomic support could use AccessLocker I guess, but I think C2 would still fail unless it was changed to also use AccessLocker.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16252#issuecomment-1771590679


More information about the hotspot-dev mailing list