Skip to content

Commit

Permalink
Check far call
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Apr 15, 2024
1 parent e700389 commit 60a514f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3195,6 +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(), [&] {
assert(in_range_auipc_12bit(entry.target() - pc()), "Far call using wrong instructions.");
call(entry.target(), tmp);
});
}
Expand Down

0 comments on commit 60a514f

Please sign in to comment.