RFR: 8367692: RISC-V: Align post call nop [v6]
Hamlin Li
mli at openjdk.org
Mon Sep 29 13:11:46 UTC 2025
On Mon, 29 Sep 2025 12:38:10 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 363:
>>
>>> 361: return;
>>> 362: }
>>> 363: relocate(post_call_nop_Relocation::spec());
>>
>> What's the reason for this change? Does it make difference from the previous code?
>
> The code is location independent, meaning it will be the exact same encoding regardless of what addresses it's placed on. But we need a reloc spec to keep track of where we did place them.
> So we don't need to regenerate the instructions after move.
Just checked the code, seems either `relocate` w/wo `Callback` will be treated in the same way when relocation happens.
For the version with `Callback` argument, the code will be in an `IncompressibleScope`.
But this pr you put an `assert(!in_compressible_scope()` at the beginning, so seems it's also fine.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27467#discussion_r2387899135
More information about the hotspot-dev
mailing list