RFR: 8326306: RISC-V: Re-structure MASM calls and jumps [v2]
Robbin Ehn
rehn at openjdk.org
Fri Apr 26 11:21:35 UTC 2024
On Fri, 26 Apr 2024 10:07:40 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Corrected method name
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 5456:
>
>> 5454: __ mv(c_rarg0, xthread);
>> 5455: BLOCK_COMMENT("call runtime_entry");
>> 5456: __ rt_call(runtime_entry);
>
> I agree it's better to use `call_VM_leaf` for the Shenandoah cases. Then what about the changes in this file and templateInterpreterGenerator_riscv.cpp? Any reason to switch to `rt_call`?
Old call():
int32_t offset = 0;
mv(temp, dest, offset); // =>li();
jalr(x1, temp, offset);
To keep the sites the same (for non-code-cache calls)
New rt_call():
movptr(tmp, target.target(), offset);
Assembler::jalr(x1, tmp, offset);
Same here means absolute calls, no reloc required.
So I have tried to keep the calls the same. As you say we can optimize this by using reloc + la().
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18942#discussion_r1580883353
More information about the hotspot-dev
mailing list