RFR: 8364150: RISC-V: Leftover for JDK-8343430 removing old trampoline call [v3]

Fei Yang fyang at openjdk.org
Mon Jul 28 13:17:15 UTC 2025


> Hi, please consider this small change.
> 
> JDK-8343430 removed the old trampoline call on RISC-V. And the new solution (reloc call) loads a target address from stub section and do an indirect call. This means the stub is always there for a NativeCall. So there's no need to check existence of the stub when doing `CallRelocation::fix_relocation_after_move` [1].
> 
> We can always return the stub address in `NativeCall::reloc_destination` and use that address in `NativeCall::reloc_set_destination`. This helps simplify the code and saves one `MacroAssembler::target_addr_for_insn` call
> and one `trampoline_stub_Relocation::get_trampoline_for` call in these two functions respectively.
> 
> Testing on linux-riscv64:
> - [x] tier1-tier3 (release build)
> - [x] hs:tier1-hs:tier3 (fastdebug build)
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/relocInfo.cpp#L404-L406

Fei Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge remote-tracking branch 'upstream/master' into JDK-8364150
 - Comment
 - 8364150: RISC-V: Leftover for JDK-8343430 removing old trampoline call

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26495/files
  - new: https://git.openjdk.org/jdk/pull/26495/files/473b9fe1..01949774

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26495&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26495&range=01-02

  Stats: 590 lines in 4 files changed: 332 ins; 220 del; 38 mod
  Patch: https://git.openjdk.org/jdk/pull/26495.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26495/head:pull/26495

PR: https://git.openjdk.org/jdk/pull/26495


More information about the hotspot-compiler-dev mailing list