Integrated: 8344382: RISC-V: CASandCAEwithNegExpected fails with Zacas
Robbin Ehn
rehn at openjdk.org
Tue Nov 26 08:54:48 UTC 2024
On Thu, 21 Nov 2024 13:56:32 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
> Hi, please consider.
>
> There are two issues with narrow amocas:
> - weak_cmpxchg_narrow_value don't load from aligned address.
> - cmpxchg_narrow_value compared new to loaded value, not to expected value.
>
> This addresses these two issues and makes some minor cleanups by:
> - Weak and strong are now identical for easier debugging (and in futre code sharing).
> - t1 was set by cmpxchg_narrow_value_helper but not passed.
> - To free up a register, not_mask is now a scratch register. Hence if amocas fails we need to re-create not mask.
> - Subjective change: a register containing temporary value is best named scratch, as the register it self is not temporary.
>
> Same as other PR, here be dragons.
> But with a working baseline we can start improving this code.
>
> Passes test/hotspot/jtreg/compiler/unsafe/ with +/-UseZacas.
> And I'm running tier1 +/-UseZacas (I'll run tests over the weekend).
>
> Thanks, Robbin
This pull request has now been integrated.
Changeset: 57d35f98
Author: Robbin Ehn <rehn at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/57d35f98f6966485c034cf096ddefcf0c7569627
Stats: 81 lines in 2 files changed: 29 ins; 13 del; 39 mod
8344382: RISC-V: CASandCAEwithNegExpected fails with Zacas
Reviewed-by: fyang, mli
-------------
PR: https://git.openjdk.org/jdk/pull/22293
More information about the hotspot-dev
mailing list