RFR: 8332689: RISC-V: Use load instead of trampolines [v16]
Robbin Ehn
rehn at openjdk.org
Tue Jun 25 08:48:18 UTC 2024
On Tue, 25 Jun 2024 02:05:42 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Missed in merge-fixes, minor revert
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 3718:
>
>> 3716: // is secondary_supers[r_array_index]. Bits 0 and 1 in the bitmap
>> 3717: // have been checked.
>> 3718: rt_call(StubRoutines::lookup_secondary_supers_table_slow_path_stub());
>
> Why not make use of the `stub_is_near` param and do a simpler `jump_link` when the slow path stub is near?
As there was no users of jump_link, before this merge, except trampoline call, it always emit JAL as that is the only encoding we need. Hence we only have one place where we use JAL for calls, trampoline call.
If we think we should use JAL for very short calls, manully adding it to one place is not the right approach IMHO.
Instead we should have rt_call emit JAL for runtime addresses, i.e. fixed address in libjvm.so or fixed address in code cache if reachable.
For exampel, I think this site, in gen_continuation_enter():
`__ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw()));`
Could be benficial to use JAL in.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19453#discussion_r1652279798
More information about the hotspot-dev
mailing list