Skip to content

Commit

Permalink
Additional
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Apr 11, 2024
1 parent e129118 commit 10b297c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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:
Expand Down Expand Up @@ -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);
});
}

Expand All @@ -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);
});
}

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 10b297c

Please sign in to comment.