[riscv-port] RFR: 8279565: riscv: RVB: Add byte reverse instruction [v2]

Feilong Jiang fjiang at openjdk.java.net
Fri Jan 7 02:01:28 UTC 2022


> This PR has the following changes:
> 1. Implement byte-reverse instruction `rev8` of RISC-V BitManipulation Extension.
> 2. Code improvement of existing byte reverse methods. 
> 3. Merge assembler_riscv_b.hpp and assembler_riscv_v.hpp into assembler_riscv.hpp
> 
> Renaming of byte reverse methods is based on BitManipulation v0.93 [[1]], which provides `rev8.h`, `rev8.w` and `rev8` to reverse bytes in halfwords, words, and doubleword respectively. However, there are still some byte reverse operations that are not covered by spec, for example, "reverse bytes in halfword in lower 16 bits and sign extend". Base on the existing instructions naming style, we use `rev8.h.h` to represent it.
> 
> New C2 instructions under riscv_b.ad are covered by the following JTREG tests:
> - test/hotspot/jtreg/compiler/codegen/Test6431242.java
> - test/hotspot/jtreg/compiler/c2/TestCharShortByteSwap.java
> 
> Hotspot and jdk tier1 tests on QEMU (with and without UseRVB) are passed without new failures.
> 
> [1]: https://github.com/riscv/riscv-bitmanip/releases/download/v0.93/bitmanip-0.93.pdf

Feilong Jiang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  8279565: riscv: RVB: Add byte reverse instruction

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

Changes:
  - all: https://git.openjdk.java.net/riscv-port/pull/42/files
  - new: https://git.openjdk.java.net/riscv-port/pull/42/files/79753194..46022206

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=riscv-port&pr=42&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=riscv-port&pr=42&range=00-01

  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/riscv-port/pull/42.diff
  Fetch: git fetch https://git.openjdk.java.net/riscv-port pull/42/head:pull/42

PR: https://git.openjdk.java.net/riscv-port/pull/42


More information about the riscv-port-dev mailing list