8331399: RISC-V: Don't us mv instead of la
Reviewed-by: fyang, mli, tonyp
This commit is contained in:
parent
d3bf52628e
commit
dd906ffdcb
src/hotspot/cpu/riscv
@ -2098,7 +2098,7 @@ void MacroAssembler::movoop(Register dst, jobject obj) {
|
||||
RelocationHolder rspec = oop_Relocation::spec(oop_index);
|
||||
|
||||
if (BarrierSet::barrier_set()->barrier_set_assembler()->supports_instruction_patching()) {
|
||||
mv(dst, Address((address)obj, rspec));
|
||||
la(dst, Address((address)obj, rspec));
|
||||
} else {
|
||||
address dummy = address(uintptr_t(pc()) & -wordSize); // A nearby aligned address
|
||||
ld_constant(dst, Address(dummy, rspec));
|
||||
@ -2114,7 +2114,7 @@ void MacroAssembler::mov_metadata(Register dst, Metadata* obj) {
|
||||
oop_index = oop_recorder()->find_index(obj);
|
||||
}
|
||||
RelocationHolder rspec = metadata_Relocation::spec(oop_index);
|
||||
mv(dst, Address((address)obj, rspec));
|
||||
la(dst, Address((address)obj, rspec));
|
||||
}
|
||||
|
||||
// Writes to stack successive pages until offset reached to check for
|
||||
|
@ -763,13 +763,6 @@ public:
|
||||
template<typename T, ENABLE_IF(std::is_integral<T>::value)>
|
||||
inline void mv(Register Rd, T o) { li(Rd, (int64_t)o); }
|
||||
|
||||
void mv(Register Rd, Address dest) {
|
||||
assert(dest.getMode() == Address::literal, "Address mode should be Address::literal");
|
||||
relocate(dest.rspec(), [&] {
|
||||
movptr(Rd, dest.target());
|
||||
});
|
||||
}
|
||||
|
||||
void mv(Register Rd, RegisterOrConstant src) {
|
||||
if (src.is_register()) {
|
||||
mv(Rd, src.as_register());
|
||||
|
Loading…
x
Reference in New Issue
Block a user