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

Robbin Ehn rehn at openjdk.org
Fri Sep 26 16:15:45 UTC 2025


On Fri, 26 Sep 2025 13:29:47 GMT, Hamlin Li <mli at openjdk.org> wrote:

> There is an assert here: https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L4998
> 
> ```
>   if (entry.rspec().type() != relocInfo::runtime_call_type) {
>     assert_alignment(call_pc);
>   }
> ```
> 
> It's only asserted if it's not `runtime_call_type`, should this condition be adjusted/removed?

Runtime calls don't have an interrupt point and used for calling stub and such.
E.g. C2_MacroAssembler::string_compare calls StubRoutines::riscv::compare_long_string_LL.
There is not post_call_nops as we can't deoptimize the caller while running this stub.
So it's still true that they don't need to be aligned.

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

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


More information about the hotspot-dev mailing list