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

Feilong Jiang fjiang at openjdk.java.net
Fri Jan 7 07:30:31 UTC 2022


On Fri, 7 Jan 2022 06:14:13 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
>
> Feilong Jiang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
> 
>   8279565: riscv: RVB: Add byte reverse instruction

Thanks for your reviews, Felix.

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

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


More information about the riscv-port-dev mailing list