RFR: 8332689: RISC-V: Use load instead of trampolines [v23]
Hamlin Li
mli at openjdk.org
Wed Jul 10 20:42:06 UTC 2024
On Wed, 10 Jul 2024 14:31:23 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> _ld to ld
>
> 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!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19453#issuecomment-2221406698
More information about the hotspot-dev
mailing list