RFR: 8367692: RISC-V: Align post call nop [v6]

Hamlin Li mli at openjdk.org
Mon Sep 29 13:33:34 UTC 2025


On Mon, 29 Sep 2025 09:17:02 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Hi please, consider.
>> 
>> As ziccif require instructions to natural aligned to be atomic the 4 byte post call nop must be aligned.
>> But I don't want to add a c.nop(2b) to align the nop(4b) which means the jal(r) must also be algined.
>> As we have no utility to aligned the end of an instruction sequence the call it self is aligned and uses only 4 byte instructions. Only in the case where we could use an two c-instruction we may loose space.
>> 
>> Thanks, Robbin
>
> Robbin Ehn 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 seven additional commits since the last revision:
> 
>  - Merge branch 'master' into align_post_nops
>  - Use relocation spec as marker.
>  - Revert "Removed relocate for post call nops"
>    
>    This reverts commit 033ecd4ab3d62c1ccc7845d8bc9e62fc6574e05d.
>  - Removed relocate for post call nops
>  - Merge branch 'master' into align_post_nops
>  - Review comments
>  - init

I got another question, it' not a comment on this pr.

In `nmethod::make_deoptimized`, it will only `make_deopt` virtual_call_type/static_call_type/opt_virtual_call_type.
But in riscv.ad, `post_call_nop`s are appended to calls which are not virtual_call_type/static_call_type/opt_virtual_call_type, are all these `post_call_nop`s necessary?

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

PR Comment: https://git.openjdk.org/jdk/pull/27467#issuecomment-3346971831


More information about the hotspot-dev mailing list