From 10b297c5882a79732ba9263a5c787660f04cbd61 Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Thu, 11 Apr 2024 17:57:11 +0200 Subject: [PATCH] Additional --- src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp index 659cd90239487..0dfd37c13a5f6 100644 --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp @@ -343,7 +343,7 @@ void MacroAssembler::call_VM_base(Register oop_result, relocate(target.rspec(), [&] { int32_t offset; la(t0, target.target(), offset); - Assembler::jalr(x0, t0, offset); + jr(t0, offset); }); bind(ok); } @@ -645,7 +645,7 @@ void MacroAssembler::emit_static_call_stub() { // Jump to the entry point of the c2i stub. int32_t offset = 0; movptr(t0, 0, offset); - Assembler::jalr(x0, t0, offset); + jr(t0, offset); } void MacroAssembler::call_VM_leaf_base(address entry_point, @@ -894,7 +894,7 @@ void MacroAssembler::j(const address dest, Register temp) { assert(temp != noreg && temp != x0, "expecting a register"); int32_t offset = 0; la(temp, dest, offset); - Assembler::jalr(x0, temp, offset); + jr(temp, offset); } } @@ -910,7 +910,7 @@ void MacroAssembler::j(const Address &adr, Register temp) { // TODO: This case 'never' happens, as is for now. int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); - Assembler::jalr(x0, temp, offset); + jr(temp, offset); break; } default: @@ -3181,7 +3181,7 @@ void MacroAssembler::far_jump(const Address &entry, Register tmp) { relocate(entry.rspec(), [&] { int32_t offset; la(tmp, entry.target(), offset); - Assembler::jalr(x0, tmp, offset); + jr(tmp, offset); }); } @@ -3195,9 +3195,7 @@ void MacroAssembler::far_call(const Address &entry, Register tmp) { // We can use auipc + jalr here because we know that the total size of // the code cache cannot exceed 2Gb. relocate(entry.rspec(), [&] { - int32_t offset; - la(tmp, entry.target(), offset); - Assembler::jalr(x1, tmp, offset); // link + call(entry.target(), tmp); }); } @@ -3457,7 +3455,7 @@ void MacroAssembler::reserved_stack_check() { relocate(target.rspec(), [&] { int32_t offset; movptr(t0, target.target(), offset); - Assembler::jalr(x0, t0, offset); + jr(t0, offset); }); should_not_reach_here();