RFR: 8343430: RISC-V: C2: Remove old trampoline call [v6]

Hamlin Li mli at openjdk.org
Fri Nov 8 15:10:47 UTC 2024


On Fri, 8 Nov 2024 15:03:43 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Fei Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More naming
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 4227:
> 
>> 4225:     auipc(tmp, (int32_t)distance + 0x800);
>> 4226:     ld(tmp, Address(tmp, ((int32_t)distance << 20) >> 20));
>> 4227:     jalr(tmp);
> 
> Seems we can totally remove the usage of `distance`? could be something like below:
> 
> auipc(tmp, 0);
> ld(tmp, Address(tmp, 0));
> jalr(tmp);

If the above simplication make sense, then what we're doing here is to load from pc as the destination addr, then jump to the addr? I could be misunderstanding.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21822#discussion_r1834550104


More information about the hotspot-dev mailing list