diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.cpp b/src/hotspot/cpu/x86/macroAssembler_x86.cpp index b54f6adc263..2d46a50d426 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp @@ -961,7 +961,7 @@ void MacroAssembler::call(AddressLiteral entry, Register rscratch) { void MacroAssembler::ic_call(address entry, jint method_index) { RelocationHolder rh = virtual_call_Relocation::spec(pc(), method_index); // Needs full 64-bit immediate for later patching. - mov64(rax, (int64_t)Universe::non_oop_word()); + Assembler::mov64(rax, (int64_t)Universe::non_oop_word()); call(AddressLiteral(entry, rh)); } @@ -1961,6 +1961,20 @@ void MacroAssembler::movflt(XMMRegister dst, AddressLiteral src, Register rscrat } } +void MacroAssembler::mov64(Register dst, int64_t imm64) { + if (is_uimm32(imm64)) { + movl(dst, checked_cast(imm64)); + } else if (is_simm32(imm64)) { + movq(dst, checked_cast(imm64)); + } else { + Assembler::mov64(dst, imm64); + } +} + +void MacroAssembler::mov64(Register dst, int64_t imm64, relocInfo::relocType rtype, int format) { + Assembler::mov64(dst, imm64, rtype, format); +} + void MacroAssembler::movptr(Register dst, Register src) { movq(dst, src); } @@ -1971,13 +1985,7 @@ void MacroAssembler::movptr(Register dst, Address src) { // src should NEVER be a real pointer. Use AddressLiteral for true pointers void MacroAssembler::movptr(Register dst, intptr_t src) { - if (is_uimm32(src)) { - movl(dst, checked_cast(src)); - } else if (is_simm32(src)) { - movq(dst, checked_cast(src)); - } else { - mov64(dst, src); - } + mov64(dst, src); } void MacroAssembler::movptr(Address dst, Register src) { diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.hpp b/src/hotspot/cpu/x86/macroAssembler_x86.hpp index 5c049f710e2..8469deaa8be 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp @@ -1869,6 +1869,9 @@ public: void mov_metadata(Register dst, Metadata* obj); void mov_metadata(Address dst, Metadata* obj, Register rscratch); + void mov64(Register dst, int64_t imm64); + void mov64(Register dst, int64_t imm64, relocInfo::relocType rtype, int format); + void movptr(Register dst, Register src); void movptr(Register dst, Address src); void movptr(Register dst, AddressLiteral src);