RFR: 8344010: RISC-V: Zacas do not work with LW locking

Robbin Ehn rehn at openjdk.org
Fri Nov 15 13:06:19 UTC 2024


Hi all, please consider.

Light weight locking fails:
- We need to add cas acquire.
- Register _result_ may shadow _new_val_ (same register).
  (NOTE this second item can effect many other cases, unclear)

As the code becomes much cleaner by calling amocas_d/w directly I removed the aliases.
Which fixes the first issue with cas acquire.

By using t0 instead of _result_ we fix the other issue.

This is a short bugfix, there are so many dragons here that I do not want to address them while fixing the bug.
There are also several performance optimizations we can do here, specially for LR/SC case.
So I'll do a couple of more iterations of this code in seperate PR's.

Testing a bunch of local cherry-picked tests which failed.
I'll start tier1 over the weekend.

Thanks, Robbin

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

Commit messages:
 - 8344010 fixed

Changes: https://git.openjdk.org/jdk/pull/22149/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22149&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8344010
  Stats: 104 lines in 2 files changed: 17 ins; 79 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/22149.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22149/head:pull/22149

PR: https://git.openjdk.org/jdk/pull/22149


More information about the hotspot-dev mailing list