Skip to content

Commit

Permalink
Use li instead of movptr
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed May 6, 2024
1 parent 6b3e4c4 commit d8fbb00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,10 @@ void MacroAssembler::la(Register Rd, const address addr, int32_t &offset) {
offset = ((int32_t)distance << 20) >> 20;
} else {
assert(!CodeCache::contains(addr), "Must be");
movptr(Rd, addr, offset);
// The load of the address will be generated with
// position independent instruction.
// Hence relocations will not change them.
mv(Rd, addr, offset); // li
}
}

Expand Down

0 comments on commit d8fbb00

Please sign in to comment.