src/cpu/x86/vm/relocInfo_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/cpu/x86/vm/relocInfo_x86.cpp

src/cpu/x86/vm/relocInfo_x86.cpp

Print this page

        

*** 178,220 **** return *pd_address_in_code(); } void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { #ifdef _LP64 - if (!Assembler::is_polling_page_far()) { typedef Assembler::WhichOperand WhichOperand; WhichOperand which = (WhichOperand) format(); ! // This format is imm but it is really disp32 ! which = Assembler::disp32_operand; address orig_addr = old_addr_for(addr(), src, dest); NativeInstruction* oni = nativeInstruction_at(orig_addr); int32_t* orig_disp = (int32_t*) Assembler::locate_operand(orig_addr, which); // This poll_addr is incorrect by the size of the instruction it is irrelevant intptr_t poll_addr = (intptr_t)oni + *orig_disp; - - NativeInstruction* ni = nativeInstruction_at(addr()); - intptr_t new_disp = poll_addr - (intptr_t) ni; - - int32_t* disp = (int32_t*) Assembler::locate_operand(addr(), which); - * disp = (int32_t)new_disp; - } - #endif // _LP64 - } - - void poll_return_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { - #ifdef _LP64 - if (!Assembler::is_polling_page_far()) { - typedef Assembler::WhichOperand WhichOperand; - WhichOperand which = (WhichOperand) format(); - // This format is imm but it is really disp32 - which = Assembler::disp32_operand; - address orig_addr = old_addr_for(addr(), src, dest); - NativeInstruction* oni = nativeInstruction_at(orig_addr); - int32_t* orig_disp = (int32_t*) Assembler::locate_operand(orig_addr, which); - // This poll_addr is incorrect by the size of the instruction it is irrelevant - intptr_t poll_addr = (intptr_t)oni + *orig_disp; - NativeInstruction* ni = nativeInstruction_at(addr()); intptr_t new_disp = poll_addr - (intptr_t) ni; int32_t* disp = (int32_t*) Assembler::locate_operand(addr(), which); * disp = (int32_t)new_disp; --- 178,198 ---- return *pd_address_in_code(); } void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { #ifdef _LP64 typedef Assembler::WhichOperand WhichOperand; WhichOperand which = (WhichOperand) format(); ! #if !INCLUDE_JVMCI ! assert((which == Assembler::disp32_operand) == !Assembler::is_polling_page_far(), "format not set correctly"); ! #endif ! if (which == Assembler::disp32_operand) { address orig_addr = old_addr_for(addr(), src, dest); NativeInstruction* oni = nativeInstruction_at(orig_addr); int32_t* orig_disp = (int32_t*) Assembler::locate_operand(orig_addr, which); // This poll_addr is incorrect by the size of the instruction it is irrelevant intptr_t poll_addr = (intptr_t)oni + *orig_disp; NativeInstruction* ni = nativeInstruction_at(addr()); intptr_t new_disp = poll_addr - (intptr_t) ni; int32_t* disp = (int32_t*) Assembler::locate_operand(addr(), which); * disp = (int32_t)new_disp;
src/cpu/x86/vm/relocInfo_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File