RFR: 8367692: RISC-V: Align post call nop [v5]
Hamlin Li
mli at openjdk.org
Fri Sep 26 13:28:05 UTC 2025
On Thu, 25 Sep 2025 12:44:01 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 incrementally with one additional commit since the last revision:
>
> Use relocation spec as marker.
src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp line 1353:
> 1351:
> 1352: void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
> 1353: Assembler::IncompressibleScope scope(_masm);
Is an alignment needed here?
src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp line 1364:
> 1362:
> 1363: void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
> 1364: Assembler::IncompressibleScope scope(_masm);
Is an alignment needed here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27467#discussion_r2382427866
PR Review Comment: https://git.openjdk.org/jdk/pull/27467#discussion_r2382428132
More information about the hotspot-dev
mailing list