RFR: 8362515: RISC-V: cleanup NativeFarCall
    Fei Yang 
    fyang at openjdk.org
       
    Mon Jul 21 07:55:43 UTC 2025
    
    
  
On Thu, 17 Jul 2025 14:17:45 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Hi,
> Can you help to review this patch?
> 
> By https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp#L1270, there are far call, indirect call, reloc call.
> NativeFarCall is in fact a reloc call, the name is confusing, better to rename it to RelocCall.
> Also add some comments and do some other simple cleanup.
> 
> Thanks!
src/hotspot/cpu/riscv/nativeInst_riscv.cpp line 131:
> 129: }
> 130: 
> 131: bool RelocCall::set_destination_mt_safe(address dest, bool assert_lock) {
Seens you need to merge latest HEAD and rebase. The `assert_lock` param of `NativeFarCall::set_destination_mt_safe` has been removed recently.
src/hotspot/cpu/riscv/nativeInst_riscv.cpp line 190:
> 188:   assert(code != nullptr, "Could not find the containing code blob");
> 189: 
> 190:   address dest = MacroAssembler::target_addr_for_insn(call_addr);
Is this change safe? Seems it modifies the original logic.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26370#discussion_r2218446799
PR Review Comment: https://git.openjdk.org/jdk/pull/26370#discussion_r2218444040
    
    
More information about the hotspot-compiler-dev
mailing list