diff --git a/src/hotspot/cpu/riscv/.macroAssembler_riscv.hpp.swp b/src/hotspot/cpu/riscv/.macroAssembler_riscv.hpp.swp new file mode 100644 index 0000000000000..3a77ebe926a1b Binary files /dev/null and b/src/hotspot/cpu/riscv/.macroAssembler_riscv.hpp.swp differ diff --git a/src/hotspot/cpu/riscv/gc/shenandoah/.shenandoahBarrierSetAssembler_riscv.cpp.swp b/src/hotspot/cpu/riscv/gc/shenandoah/.shenandoahBarrierSetAssembler_riscv.cpp.swp new file mode 100644 index 0000000000000..fa5135b6a5ce1 Binary files /dev/null and b/src/hotspot/cpu/riscv/gc/shenandoah/.shenandoahBarrierSetAssembler_riscv.cpp.swp differ diff --git a/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp b/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp index 26d60441c2d2c..3486af30079b5 100644 --- a/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp @@ -300,7 +300,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, assert(!is_narrow, "phantom access cannot be narrow"); target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak); } - __ call(target); + __ call_mig(target); __ mv(t0, x10); __ pop_call_clobbered_registers(); __ mv(x10, t0); @@ -703,7 +703,7 @@ void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_s assert(is_native, "phantom must only be called off-heap"); target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom); } - __ call(target); + __ call_mig(target); __ mv(t0, x10); __ pop_call_clobbered_registers(); __ mv(x10, t0); diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp index 33c97a14b7e26..b6f9183ad8c75 100644 --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp @@ -613,6 +613,10 @@ class MacroAssembler: public Assembler { la(temp, dest, offset); jalr(x1, temp, offset); } + + void call_mig(const address dest, Register temp = t0) { + call(dest, temp); + } inline void ret() { jalr(x0, x1, 0); diff --git a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp index df447abaa068a..bfa05b65e8719 100644 --- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp +++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp @@ -5432,7 +5432,7 @@ static const int64_t right_3_bits = right_n_bits(3); } __ mv(c_rarg0, xthread); BLOCK_COMMENT("call runtime_entry"); - __ call(runtime_entry); + __ call_mig(runtime_entry); // Generate oop map OopMap* map = new OopMap(framesize, 0);