RFR: 8332689: RISC-V: Use load instead of trampolines [v14]
Robbin Ehn
rehn at openjdk.org
Mon Jun 24 15:17:13 UTC 2024
On Fri, 21 Jun 2024 07:35:38 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 22 commits:
>>
>> - Minor review comments
>> - Merge branch 'master' into 8332689
>> - To be pushed
>> - Merge branch 'master' into 8332689
>> - 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
>> - ... and 12 more: https://git.openjdk.org/jdk/compare/d7dad50a...e47f2454
>
> src/hotspot/cpu/riscv/riscv.ad line 1244:
>
>> 1242: return 1 * NativeInstruction::instruction_size; // jal
>> 1243: }
>> 1244: return 3 * NativeInstruction::instruction_size; // auipc + ld + jalr
>
> Question: As we will only patch the address in the stub, do we still need the handling in compute_padding (`CallStaticJavaDirectNode::compute_padding` & `CallDynamicJavaDirectNode::compute_padding`) when `UseTrampolines` is false?
No, not that I know of. But we need additional fixes, some asserts needs to tweaked and PostCallNop expects aligned calls (as we want to patch nop -> trap not crossing pages) so we instead need padding after.
I think we can either have:
`c.nop, auipc, ld, jalr, nop (cmodx to trap), nop`
`auipc, ld, jalr, c.nop, nop (cmodx to trap), nop`
It seems to me keeping what we have is just simplest.
What you reckon?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19453#discussion_r1651211204
More information about the hotspot-dev
mailing list