RFR: 8332689: RISC-V: Use load instead of trampolines [v12]
Robbin Ehn
rehn at openjdk.org
Thu Jun 20 11:20:17 UTC 2024
On Mon, 17 Jun 2024 08:07:57 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits:
>>
>> - Review comments, removed dead code.
>> - Merge branch 'master' into 8332689
>> - Merge branch 'master' into 8332689
>> - Merge branch 'master' into 8332689
>> - Merge branch 'master' into 8332689
>> - Merge branch 'master' into 8332689
>> - Remove tmp file
>> - Prepare for dynamic NativeCall size
>> - Only allow one calling convetion, i.e. fixed sized
>> - Merge branch 'master' into 8332689
>> - ... and 8 more: https://git.openjdk.org/jdk/compare/cc64aeac...f1dd3e16
>
> src/hotspot/cpu/riscv/codeBuffer_riscv.cpp line 74:
>
>> 72:
>> 73: assert(requests->number_of_entries() >= 1, "at least one");
>> 74: const int total_requested_size = MacroAssembler::max_patchable_far_call_stub_size() * requests->number_of_entries();
>
> I see mixed uses of bot `MacroAssembler::max_patchable_far_call_stub_size()` and `MacroAssembler::NativeShortCall::trampoline_size` in this function. As this is only used under `UseTrampolines`, seems more reasonable to use `MacroAssembler::NativeShortCall::trampoline_size`.
As you see in diff the mixing is pre-exsisting, I only changed names.
Fixed.
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 3932:
>
>> 3930: return instruction_size + MacroAssembler::NativeShortCall::trampoline_size;
>> 3931: }
>> 3932: return 2 * wordSize;
>
> Seems to me that this should be `instruction_size + wordSize`? That is one possible nop for alignment and an address of size `wordSize`.
Yes, thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19453#discussion_r1647412264
PR Review Comment: https://git.openjdk.org/jdk/pull/19453#discussion_r1647410894
More information about the hotspot-dev
mailing list