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

Ludovic Henry luhenry at openjdk.org
Wed Oct 19 10:28:20 UTC 2022


On Tue, 18 Oct 2022 13:09:27 GMT, Yadong Wang <yadongwang at openjdk.org> wrote:

>> Given it's only made to be called from `StubRoutine::zero_blocks` stub routine and `t0-t1` are temporary registers and `t2` (aka `x7`) is caller-saved, I don't understand why it needs to be made aware for C2?
>> 
>> I'll add them as `tmp0-tmp3` arguments to `MacroAssembler::dcache_zero_blocks` to make sure any future caller of this will be aware.
>
> C2 generates ClearArrayNodes, which emit zero_words -> zero_blocks directly. I don't find any caller-saving logic there. t0 is free to use (not participating in register allocation), but t1 is used as condition code in C2. base and cnt registers can be colloberred safely because they were indentified as USE_KILL.

I've updated it to use `x29`, `x30`, and `x7`, and to explicit `TEMP` them in `riscv.ad`.

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

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


More information about the hotspot-dev mailing list