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

Aleksey Shipilev shade at openjdk.org
Thu Oct 19 13:35:40 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
>  - [ ] linux-arm-server-fastdebug, atomic tests pass

ARM32 comes back with a massive wrinkle: even though `PlatformCmpxchg<8>` is defined for it, it would assert later, either in `reorder_cmpxchg_long_func` that checks `VM_Version::supports_cx8()`, or later in the stub what would not know what to do on the platform where there is no way to do the 64-bit stub. I guess in that case we would need to go  a do a lock, like Access API does it with `AccessLocker`. (I was hoping it does not come to that, but...)

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

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


More information about the hotspot-dev mailing list