RFR: 8339910: RISC-V: crc32 intrinsic with carry-less multiplication
Andrew Haley
aph at openjdk.org
Mon Dec 2 11:05:38 UTC 2024
On Mon, 2 Dec 2024 10:00:11 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Hi,
> Can you review this patch to implement CRC32 with `vclmul` (Zvbc)?
> Thanks!
>
>
> ## Test
> test/hotspot/jtreg/compiler/intrinsics/zip/TestCRC32.java,
> test/jdk/java/util/zip/TestCRC32.java
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 1761:
> 1759: bind(L_16_bytes_loop);
> 1760: {
> 1761: #define CRC32_VCLMUL_FOLD_16_BYTES(vx, vt, vtmp1, vtmp2, vtmp3, vtmp4) \
It makes no sense for this to be a macro, because it's called infrequently. Making it a function would save space.
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 1833:
> 1831: vslideup_vi(vy, vtmp1, 1); \
> 1832: vmv_x_s(tmp2, vtmp3); \
> 1833: vmv_s_x(vy, tmp2);
Again, not a macro.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22475#discussion_r1865652614
PR Review Comment: https://git.openjdk.org/jdk/pull/22475#discussion_r1865653545
More information about the hotspot-dev
mailing list