RFR: 8317721: RISC-V: Implement CRC32 intrinsic [v2]

Hamlin Li mli at openjdk.org
Thu Dec 21 11:40:53 UTC 2023


On Wed, 20 Dec 2023 13:24:23 GMT, ArsenyBochkarev <duke at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp line 1643:
>> 
>>> 1641:   __ zero_extend(crc, crc, 32);
>>> 1642:   __ update_byte_crc32(crc, val, res);
>>> 1643:   __ notr(res, crc); // ~crc
>> 
>> Do you miss the `zero_extend(crc, crc, 32)`?
>
> As far as I can see this is unneeded, actually. I used the `test/hotspot/jtreg/compiler/codegen/CRCTest.java` test as a sanity check (it uses the `emit_updatecrc32` stub) and it's ok.

> Do you miss the zero_extend(crc, crc, 32)?

seems not, it needs 32 bits only.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17046#discussion_r1433956324


More information about the hotspot-compiler-dev mailing list