RFR: 8362515: RISC-V: cleanup NativeFarCall [v3]

Hamlin Li mli at openjdk.org
Tue Jul 22 11:59:25 UTC 2025


On Tue, 22 Jul 2025 11:52:44 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> There seems to be a subtle differnece here. I see `MacroAssembler::pd_call_destination` delegates work to `NativeFarCall::reloc_destination` which calls `MacroAssembler::target_addr_for_insn` under condition `if (stub_addr != nullptr)`. After this change, that condition is gone. I haven't looked into how this may make a difference.
>> 
>> I see this function was introduce by JDK-8332689, maybe @robehn could comment?
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/nativeInst_riscv.cpp#L112
>
>> I see `MacroAssembler::pd_call_destination` delegates work to `NativeFarCall::reloc_destination` which calls `MacroAssembler::target_addr_for_insn` under condition `if (stub_addr != nullptr)`.
> 
> Can you clarify "`MacroAssembler::pd_call_destination` delegates work to `NativeFarCall::reloc_destination`"?
> Robbin is on vacation for weeks, so I'm afraid he's not going to reponse in time.

I don't think this pr changes the logic in `NativeFarCall::reloc_destination`, am I right?
Or maybe you're misled by the name change from `stub_address` to `reloc_destination_without_check` and existing method `reloc_destination()`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26370#discussion_r2222291033


More information about the hotspot-compiler-dev mailing list