< prev index next >

src/hotspot/cpu/x86/methodHandles_x86.cpp

Print this page

177 
178    Label L_no_such_method;
179    __ testptr(rbx, rbx);
180    __ jcc(Assembler::zero, L_no_such_method);
181 
182   verify_method(_masm, method, temp, iid);
183 
184   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
185     Label run_compiled_code;
186     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
187     // compiled code in threads for which the event is enabled.  Check here for
188     // interp_only_mode if these events CAN be enabled.
189     // interp_only is an int, on little endian it is sufficient to test the byte only
190     // Is a cmpl faster?
191     __ cmpb(Address(r15_thread, JavaThread::interp_only_mode_offset()), 0);
192     __ jccb(Assembler::zero, run_compiled_code);
193     __ jmp(Address(method, Method::interpreter_entry_offset()));
194     __ BIND(run_compiled_code);
195   }
196 
197   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :




198                                                      Method::from_interpreted_offset();
199   __ jmp(Address(method, entry_offset));
200 
201   __ bind(L_no_such_method);
202   __ jump(RuntimeAddress(SharedRuntime::throw_AbstractMethodError_entry()));
203 }
204 
205 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
206                                         Register recv, Register method_temp,
207                                         Register temp2,
208                                         bool for_compiler_entry) {
209   BLOCK_COMMENT("jump_to_lambda_form {");
210   // This is the initial entry point of a lazy method handle.
211   // After type checking, it picks up the invoker from the LambdaForm.
212   assert_different_registers(recv, method_temp, temp2);
213   assert(recv != noreg, "required register");
214   assert(method_temp == rbx, "required register for loading method");
215 
216   // Load the invoker, as MH -> MH.form -> LF.vmentry
217   __ verify_oop(recv);

177 
178    Label L_no_such_method;
179    __ testptr(rbx, rbx);
180    __ jcc(Assembler::zero, L_no_such_method);
181 
182   verify_method(_masm, method, temp, iid);
183 
184   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
185     Label run_compiled_code;
186     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
187     // compiled code in threads for which the event is enabled.  Check here for
188     // interp_only_mode if these events CAN be enabled.
189     // interp_only is an int, on little endian it is sufficient to test the byte only
190     // Is a cmpl faster?
191     __ cmpb(Address(r15_thread, JavaThread::interp_only_mode_offset()), 0);
192     __ jccb(Assembler::zero, run_compiled_code);
193     __ jmp(Address(method, Method::interpreter_entry_offset()));
194     __ BIND(run_compiled_code);
195   }
196 
197   // The following jump might pass an inline type argument that was erased to Object as oop to a
198   // callee that expects inline type arguments to be passed as fields. We need to call the compiled
199   // value entry (_code->inline_entry_point() or _adapter->c2i_inline_entry()) which will take care
200   // of translating between the calling conventions.
201   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_inline_offset() :
202                                                      Method::from_interpreted_offset();
203   __ jmp(Address(method, entry_offset));
204 
205   __ bind(L_no_such_method);
206   __ jump(RuntimeAddress(SharedRuntime::throw_AbstractMethodError_entry()));
207 }
208 
209 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
210                                         Register recv, Register method_temp,
211                                         Register temp2,
212                                         bool for_compiler_entry) {
213   BLOCK_COMMENT("jump_to_lambda_form {");
214   // This is the initial entry point of a lazy method handle.
215   // After type checking, it picks up the invoker from the LambdaForm.
216   assert_different_registers(recv, method_temp, temp2);
217   assert(recv != noreg, "required register");
218   assert(method_temp == rbx, "required register for loading method");
219 
220   // Load the invoker, as MH -> MH.form -> LF.vmentry
221   __ verify_oop(recv);
< prev index next >