RFR: 8319716: RISC-V: Add SHA-2 [v2]

Hamlin Li mli at openjdk.org
Tue Dec 5 14:20:40 UTC 2023


On Mon, 4 Dec 2023 15:48:02 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 3895:
>> 
>>> 3893:       __ enter();
>>> 3894: 
>>> 3895:       __ push_reg(saved_regs, sp);
>> 
>> Not sure if we need to push and pop `saved_regs `, as t2 is the only register in it, or maybe I miss something?
>
> t2 is used by C2 as general register, see R7 in riscv.ad.
> As this may be inlined directly into the graph IR, i.e. no call to get here, t2 may be a live register.
> saved_regs only contains t2 so there is just one spill and one restore.
> 
> No?

I see, thanks for explanation!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16562#discussion_r1415687071


More information about the hotspot-dev mailing list