RFR: 8346478: RISC-V: Refactor add/sub assembler routines [v2]

Fei Yang fyang at openjdk.org
Thu Dec 19 03:19:06 UTC 2024


> Hi, please consider this cleanup change.
> 
> Currently, we have mixed use of `addi` and `add(int64_t)`/`sub(int64_t)`. The former adds a 12-bit immediate while the latter
> does not have a constraint on the immediate range. We should use `addi` when possible, which would help save one runtime check
> about the immediate range and save the tmp register used by the latter as well. In order to make the code more readable, this
> also introduces helper routines `subi`/`subiw` and adapts callsites of `addi`/`addiw` with negative immediates.
> 
> Testing: tier1-3 and gtest:all are clean on Premier-P550 SBC running Ubuntu-24.04.

Fei Yang 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 two additional commits since the last revision:

 - Merge branch 'master' into JDK-8346478
 - 8346478: RISC-V: Refactor add/sub assembler routines

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22804/files
  - new: https://git.openjdk.org/jdk/pull/22804/files/22d2397f..58e9a0eb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22804&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22804&range=00-01

  Stats: 3103 lines in 121 files changed: 1813 ins; 1008 del; 282 mod
  Patch: https://git.openjdk.org/jdk/pull/22804.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22804/head:pull/22804

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


More information about the shenandoah-dev mailing list