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

src/cpu/x86/vm/compiledIC_x86.cpp

Print this page




 105 }
 106 #undef __
 107 
 108 int CompiledStaticCall::to_interp_stub_size() {
 109   return NOT_LP64(10)    // movl; jmp
 110          LP64_ONLY(15);  // movq (1+1+8); jmp (1+4)
 111 }
 112 
 113 // Relocation entries for call stub, compiled java to interpreter.
 114 int CompiledStaticCall::reloc_to_interp_stub() {
 115   return 4; // 3 in emit_to_interp_stub + 1 in emit_call
 116 }
 117 
 118 void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) {
 119   address stub = find_stub();
 120   guarantee(stub != NULL, "stub not found");
 121 
 122   if (TraceICs) {
 123     ResourceMark rm;
 124     tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
 125                   instruction_address(),
 126                   callee->name_and_sig_as_C_string());
 127   }
 128 
 129   // Creation also verifies the object.
 130   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
 131   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 132 
 133   assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(),
 134          "a) MT-unsafe modification of inline cache");
 135   assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry,
 136          "b) MT-unsafe modification of inline cache");
 137 
 138   // Update stub.
 139   method_holder->set_data((intptr_t)callee());
 140   jump->set_jump_destination(entry);
 141 
 142   // Update jump to call.
 143   set_destination_mt_safe(stub);
 144 }
 145 




 105 }
 106 #undef __
 107 
 108 int CompiledStaticCall::to_interp_stub_size() {
 109   return NOT_LP64(10)    // movl; jmp
 110          LP64_ONLY(15);  // movq (1+1+8); jmp (1+4)
 111 }
 112 
 113 // Relocation entries for call stub, compiled java to interpreter.
 114 int CompiledStaticCall::reloc_to_interp_stub() {
 115   return 4; // 3 in emit_to_interp_stub + 1 in emit_call
 116 }
 117 
 118 void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) {
 119   address stub = find_stub();
 120   guarantee(stub != NULL, "stub not found");
 121 
 122   if (TraceICs) {
 123     ResourceMark rm;
 124     tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
 125                   p2i(instruction_address()),
 126                   callee->name_and_sig_as_C_string());
 127   }
 128 
 129   // Creation also verifies the object.
 130   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
 131   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 132 
 133   assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(),
 134          "a) MT-unsafe modification of inline cache");
 135   assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry,
 136          "b) MT-unsafe modification of inline cache");
 137 
 138   // Update stub.
 139   method_holder->set_data((intptr_t)callee());
 140   jump->set_jump_destination(entry);
 141 
 142   // Update jump to call.
 143   set_destination_mt_safe(stub);
 144 }
 145 


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