RFR: 8296447: RISC-V: Make the operands order of vrsub_vx/vrsub_vi consistent with RVV 1.0 spec [v2]
Dingli Zhang
dzhang at openjdk.org
Mon Nov 7 06:05:16 UTC 2022
> Hi,
>
> At the moment, the operands order of `vrsub_vx` and ` vrsub_vi` is not the same as in the RVV1.0 spec[1]. These instructions use the wrong assembly syntax pattern for vector binary arithmetic instructions (multiply-add)[2].
>
> `vrsub_vx` was classified as `Vector Single-Width Integer Add and Subtract` in rvv1.0 spec, but is currently classified as `Vector Single-Width Integer Multiply-Add Instructions` and generate the functions under the corresponding macros, which results in the reverse order of the operands `Vs2` and `Rs1` compared to the spec.
>
> `vrsub_vi` has its own separate macro definition to generate the corresponding function and the order of these operands(`Vs2` and `imm`) is reversed too.
>
> I think it is better to adjust the operands order of these two instructions to be consistent with the spec.
>
> Please take a look and have some reviews. Thanks a lot.
>
>
> [1] https://github.com/riscv/riscv-v-spec/blob/v1.0/v-spec.adoc
> [2] https://github.com/riscv/riscv-v-spec/blob/v1.0/v-spec.adoc#101-vector-arithmetic-instruction-encoding
>
> ## Testing:
>
> - hotspot and jdk tier1 on unmatched board without new failures
> - test/jdk/jdk/incubator/vector/Int256VectorTests.java with fastdebug on qemu
> - test/jdk/jdk/incubator/vector/Long256VectorTests.java with fastdebug on qemu
Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:
Remove duplicate macro definition
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11009/files
- new: https://git.openjdk.org/jdk/pull/11009/files/de67289b..0930a669
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11009&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11009&range=00-01
Stats: 10 lines in 1 file changed: 0 ins; 9 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/11009.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11009/head:pull/11009
PR: https://git.openjdk.org/jdk/pull/11009
More information about the hotspot-dev
mailing list