RFR: 8314124: RISC-V: implement Base64 intrinsic - decoding [v3]
Antonios Printezis
tonyp at openjdk.org
Thu Aug 22 17:04:05 UTC 2024
On Thu, 22 Aug 2024 15:50:05 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> 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.
Great. Maybe add a comment to that effect here?
>> 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.
OK!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20026#discussion_r1727509181
PR Review Comment: https://git.openjdk.org/jdk/pull/20026#discussion_r1727509434
More information about the hotspot-dev
mailing list