RFR: 8340241: RISC-V: Returns mispredicted [v4]

Fei Yang fyang at openjdk.org
Mon Oct 14 10:55:12 UTC 2024


On Mon, 14 Oct 2024 10:14:30 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 1192:
>> 
>>> 1190:     Label L_continue;
>>> 1191:     __ bltu(t0, t1, L_continue);
>>> 1192:     __ j(nooverlap_target, t1);
>> 
>> Can we make use of the default param `t1`?
>> 
>>   void j(const address dest, Register temp = t1);
>>   void j(const Address &adr, Register temp = t1);
>
> Yes, we can, but in some cases the use of t1 is not obvious therefore I was unsure if I should make t1 default or not.
> I'll change then.

Sorry I didn't mention that there are some other occurrences like changes made in file src/hotspot/cpu/riscv/stubGenerator_riscv.cpp. I would prefer to use the default param where possible just for consistency with other callsites. As I remembered, it's very rare that `t0` / `t1` is alive at the jump target.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21406#discussion_r1799257769


More information about the hotspot-dev mailing list