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

src/cpu/x86/vm/compiledIC_x86.cpp

Print this page

        

*** 48,64 **** } // ---------------------------------------------------------------------------- #define __ _masm. ! address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // Stub is fixed up when the corresponding call is converted from // calling compiled code to calling interpreted code. // movq rbx, 0 // jmp -5 # to self ! address mark = cbuf.insts_mark(); // Get mark within main instrs section. // Note that the code buffer's insts_mark is always relative to insts. // That's why we must use the macroassembler to generate a stub. MacroAssembler _masm(&cbuf); --- 48,66 ---- } // ---------------------------------------------------------------------------- #define __ _masm. ! address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) { // Stub is fixed up when the corresponding call is converted from // calling compiled code to calling interpreted code. // movq rbx, 0 // jmp -5 # to self ! if (mark == NULL) { ! mark = cbuf.insts_mark(); // Get mark within main instrs section. ! } // Note that the code buffer's insts_mark is always relative to insts. // That's why we must use the macroassembler to generate a stub. MacroAssembler _masm(&cbuf);
*** 71,80 **** --- 73,84 ---- // Static stub relocation also tags the Method* in the code-stream. __ mov_metadata(rbx, (Metadata*) NULL); // Method is zapped till fixup time. // This is recognized as unresolved by relocs/nativeinst/ic code. __ jump(RuntimeAddress(__ pc())); + assert(__ pc() - base <= to_interp_stub_size(), "wrong stub size"); + // Update current stubs pointer and restore insts_end. __ end_a_stub(); return base; } #undef __
*** 102,115 **** // Creation also verifies the object. NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); ! assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(), "a) MT-unsafe modification of inline cache"); ! assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry, "b) MT-unsafe modification of inline cache"); // Update stub. method_holder->set_data((intptr_t)callee()); jump->set_jump_destination(entry); --- 106,124 ---- // Creation also verifies the object. NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); ! #ifdef ASSERT ! // read the value once ! intptr_t data = method_holder->data(); ! address destination = jump->jump_destination(); ! assert(data == 0 || data == (intptr_t)callee(), "a) MT-unsafe modification of inline cache"); ! assert(destination == (address)-1 || destination == entry, "b) MT-unsafe modification of inline cache"); + #endif // Update stub. method_holder->set_data((intptr_t)callee()); jump->set_jump_destination(entry);
*** 122,136 **** // Reset stub. address stub = static_stub->addr(); assert(stub != NULL, "stub not found"); // Creation also verifies the object. NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); method_holder->set_data(0); jump->set_jump_destination((address)-1); } //----------------------------------------------------------------------------- // Non-product mode code #ifndef PRODUCT void CompiledStaticCall::verify() { --- 131,146 ---- // Reset stub. address stub = static_stub->addr(); assert(stub != NULL, "stub not found"); // Creation also verifies the object. NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); method_holder->set_data(0); + NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); jump->set_jump_destination((address)-1); } + //----------------------------------------------------------------------------- // Non-product mode code #ifndef PRODUCT void CompiledStaticCall::verify() {
*** 148,154 **** NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); // Verify state. assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted(), "sanity check"); } - #endif // !PRODUCT --- 158,163 ----
src/cpu/x86/vm/compiledIC_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File