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

Feilong Jiang fjiang at openjdk.java.net
Fri Jan 7 07:34:35 UTC 2022


On Fri, 7 Jan 2022 01:22:01 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: c7944edf
Author:    Feilong Jiang <fjiang at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.java.net/riscv-port/commit/c7944edf3626c9167ca77f05b1dfd53d3d98e062
Stats:     1845 lines in 10 files changed: 877 ins; 865 del; 103 mod

8279565: riscv: RVB: Add byte reverse instruction

Reviewed-by: fyang

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

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


More information about the riscv-port-dev mailing list