RFR: 8356159: RISC-V: Add Zabha [v9]

Robbin Ehn rehn at openjdk.org
Mon May 26 13:39:13 UTC 2025


> Hi, please consider.
> 
> This adds the byte and halfword atomic memory operations (Zabha) - https://github.com/riscv/riscv-zabha.
> All amo-instructions, except load-reserve and store-conditional, can also be performed on natural aligned half-words and bytes. (i.e. the extension do not add lr.h/b or sc.h/b) This includes amocas if zacas extension is present.
> 
> The majority of this patch is to support amocas.h/b. We are now starting to really feel the pain of all these extensions, as CAS:ing 16/8-bits can now be done in three different ways:
> - lr.w/sc.w 'narrow' CAS (no extension)
> - amocas.w 'narrow' CAS (Zacas)
> - amocas.h/b (Zacas + Zabha)
> 
> There is no hwprobe support yet.
> 
> Ran t1-3 with Zacas+Zabha and t1 without Zabha in qemu.
> 
> Thanks, Robbin

Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 15 additional commits since the last revision:

 - Reg limits fixed
 - Merge branch 'master' into 8356159
 - Fixed reg selection
 - More indention
 - Indention
 - Merge branch 'master' into 8356159
 - Review comments
 - Merge branch 'master' into 8356159
 - Review fix
 - Bug and review fixes
 - ... and 5 more: https://git.openjdk.org/jdk/compare/ab99bff6...27fc528d

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25252/files
  - new: https://git.openjdk.org/jdk/pull/25252/files/82f17c49..27fc528d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25252&range=08
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25252&range=07-08

  Stats: 6355 lines in 77 files changed: 4313 ins; 1622 del; 420 mod
  Patch: https://git.openjdk.org/jdk/pull/25252.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25252/head:pull/25252

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


More information about the hotspot-dev mailing list