RFR: 8332689: RISC-V: Use load instead of trampolines [v23]
Hamlin Li
mli at openjdk.org
Thu Jul 11 10:05:02 UTC 2024
On Wed, 10 Jul 2024 20:39:24 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> Also performed tier1-3 and hotspot:tier4 on my unmatched boards. Result looks fine.
>> Just witnessed several unnecessary uses of namespace `Assembler`. Guess you might want to clean it up? Still good otherwise.
>>
>>
>> diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
>> index b39ac79be6b..e349eab3177 100644
>> --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
>> +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
>> @@ -983,9 +983,9 @@ void MacroAssembler::load_link_jump(const address source, Register temp) {
>> assert_cond(source != nullptr);
>> int64_t distance = source - pc();
>> assert(is_simm32(distance), "Must be");
>> - Assembler::auipc(temp, (int32_t)distance + 0x800);
>> - Assembler::ld(temp, temp, ((int32_t)distance << 20) >> 20);
>> - Assembler::jalr(x1, temp, 0);
>> + auipc(temp, (int32_t)distance + 0x800);
>> + ld(temp, Address(temp, ((int32_t)distance << 20) >> 20));
>> + jalr(temp);
>> }
>>
>> void MacroAssembler::jump_link(const address dest, Register temp) {
>> @@ -994,7 +994,7 @@ void MacroAssembler::jump_link(const address dest, Register temp) {
>> int64_t distance = dest - pc();
>> assert(is_simm21(distance), "Must be");
>> assert((distance % 2) == 0, "Must be");
>> - Assembler::jal(x1, distance);
>> + jal(x1, distance);
>> }
>>
>> void MacroAssembler::j(const address dest, Register temp) {
>
>> I have not seen (new) issues in testing. I would have prefered one or two more reviewers, but since RV is not the biggest platform I'll settle with just passing the bar. I'll go ahead and integrate if @RealFYang and @Hamlin-Li re-reviews (as the new rules are in-effect which require latest rev to be reviewed).
>
> Still good to me. Thanks!
> Thanks! @Hamlin-Li please re-approve, background: https://mail.openjdk.org/pipermail/jdk-dev/2024-July/009199.html
Done.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19453#issuecomment-2222529821
More information about the hotspot-dev
mailing list