RFR: 8307495: Specialize atomic bitset functions for aix-ppc [v6]

Richard Reingruber rrich at openjdk.org
Fri Oct 10 08:08:48 UTC 2025


On Fri, 10 Oct 2025 07:51:45 GMT, David Briemann <dbriemann at openjdk.org> wrote:

>> Add atomic bitset functions for PPC64.
>> Refactor so that inline assembler code is shared for all PPC64 platforms.
>> Add back a missing "simple guard" to PlatformCpmxchg<1>. Remove some dead Power7 code.
>
> David Briemann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   cast compare_value to unsigned

Nice job! 👍

src/hotspot/cpu/ppc/atomicAccess_ppc.hpp line 186:

> 184:     : [dest]            "b"     (dest),
> 185:       [exchange_value]  "r"     (exchange_value),
> 186:                         "m"     (*dest)

The memory operands with constraint 'm' are unused. I think the intent was to express that `dest` is dereferenced to read and write memory at that location. But that's expressed with `memory` in the `clobber` section.
These operands should be removed.

src/hotspot/cpu/ppc/atomicAccess_ppc.hpp line 224:

> 222:     : [dest]            "b"     (dest),
> 223:       [exchange_value]  "r"     (exchange_value),
> 224:                         "m"     (*dest)

Unused operands with memory constraint can be removed.

src/hotspot/cpu/ppc/atomicAccess_ppc.hpp line 274:

> 272:       [masked_compare_value]   "r"     (masked_compare_value),
> 273:       [exchange_value]         "r"     (exchange_value),
> 274:                                "m"     (*dest)

Unused operands with memory constraint can be removed.

src/hotspot/cpu/ppc/atomicAccess_ppc.hpp line 322:

> 320:       [compare_value]   "r"     (compare_value),
> 321:       [exchange_value]  "r"     (exchange_value),
> 322:                         "m"     (*dest)

Unused operands with memory constraint can be removed.

src/hotspot/cpu/ppc/atomicAccess_ppc.hpp line 370:

> 368:       [compare_value]   "r"     (compare_value),
> 369:       [exchange_value]  "r"     (exchange_value),
> 370:                         "m"     (*dest)

Unused operands with memory constraint can be removed.

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

Changes requested by rrich (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27650#pullrequestreview-3321853903
PR Review Comment: https://git.openjdk.org/jdk/pull/27650#discussion_r2418839142
PR Review Comment: https://git.openjdk.org/jdk/pull/27650#discussion_r2418841888
PR Review Comment: https://git.openjdk.org/jdk/pull/27650#discussion_r2418842744
PR Review Comment: https://git.openjdk.org/jdk/pull/27650#discussion_r2418843479
PR Review Comment: https://git.openjdk.org/jdk/pull/27650#discussion_r2418844290


More information about the hotspot-dev mailing list