RFR: 8314124: RISC-V: implement Base64 intrinsic - decoding [v3]
Hamlin Li
mli at openjdk.org
Thu Aug 22 15:53:06 UTC 2024
On Thu, 22 Aug 2024 14:46:26 GMT, Antonios Printezis <tonyp at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> revert misc
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 5462:
>
>> 5460: __ sub(length, send, soff);
>> 5461: // it's not guaranteed by java level, so do it explicitly
>> 5462: __ andi(length, length, -4);
>
> Is it possible for `length == 0` here?
No, this is guaranteed at java level.
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 5470:
>
>> 5468:
>> 5469: // load the codec base address
>> 5470: __ la(codec, ExternalAddress((address) fromBase64));
>
> any way to avoid the double `la` when `isURL == true`? I guess you'd need one more label and an extra branch? Not sure it's worth it.
Seems not necessary, and I see other places, also on other cpus do the similar things.
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 5497:
>
>> 5495:
>> 5496: // load 4 bytes encoded src data
>> 5497: __ lbu(byte0, Address(src, 0));
>
> Is it faster to issue four 8-bit loads instead of one 32-bit load and getting the four values with shifting and masking?
Yeh, it could be, I will test it later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20026#discussion_r1727403705
PR Review Comment: https://git.openjdk.org/jdk/pull/20026#discussion_r1727401431
PR Review Comment: https://git.openjdk.org/jdk/pull/20026#discussion_r1727399419
More information about the hotspot-dev
mailing list