RFR: 8295282: Use Zicboz/cbo.zero to zero-out memory on RISC-V [v11]

Fei Yang fyang at openjdk.org
Mon Oct 24 08:43:57 UTC 2022


On Mon, 24 Oct 2022 08:19:11 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 696:
>> 
>>> 694:       __ mv(tmp1, MacroAssembler::zero_words_block_size);
>>> 695:       __ bind(loop);
>>> 696:       __ blt(cnt, tmp1, done);
>> 
>> Can we avoid adding this one-extra "blt" instruction into the loop here?
>
> It replaces the `bgez` from line 691. It's also required since there is no guarantee that there will be at least `MacroAssembler::zero_words_block_size` left.

How about keeping the original 'bltz' check before the loop and 'bgez' check in the loop?

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

PR: https://git.openjdk.org/jdk/pull/10718


More information about the hotspot-dev mailing list