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

Fei Yang fyang at openjdk.org
Wed Nov 6 03:18:07 UTC 2024


On Tue, 5 Nov 2024 02:38:46 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Hi, please consider this cleanup change.
>> 
>> The old trampoline call on linux-riscv64 is disabled by default after: https://bugs.openjdk.org/browse/JDK-8332689.
>> And the new solution (load target address from stub and call) has been baked in jdk master for quite some time.
>> This propose to remove the old trampoline call related logic so that the code will be cleaner and easier to maintain.
>> As we are still using `trampoline_stub_Relocation` for the stub, I kept using the original `emit_trampoline_stub` name.
>> 
>> Testing on linux-riscv64:
>> - [x] tier1-tier3 (release)
>> - [x] hotspot:tier1 (fastdebug)
>
> Fei Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Minor

Hi, I just pushed a small change addressing two remaining issues which I think should be resolved in this PR.

1. The distance calculation in MacroAssembler::reloc_call is confusing and is not necessary;
   We are not doing a pc-relative loading from the target, but from the stub.

2. The reloc_call in riscv_enc_java_to_runtime could be further simplified into a simple far_call.
   This reloc_call is there for the old trampoline call. Also updated related code comment.

@robehn @Hamlin-Li  : I hope that still looks good to you. Thanks.

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

PR Comment: https://git.openjdk.org/jdk/pull/21822#issuecomment-2458645669


More information about the hotspot-dev mailing list