< prev index next >

src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp

Print this page

144 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
145                                             bool for_compiler_entry, vmIntrinsics::ID iid) {
146   assert(method == rmethod, "interpreter calling convention");
147   Label L_no_such_method;
148   __ cbz(rmethod, L_no_such_method);
149   verify_method(_masm, method, iid);
150 
151   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
152     Label run_compiled_code;
153     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
154     // compiled code in threads for which the event is enabled.  Check here for
155     // interp_only_mode if these events CAN be enabled.
156 
157     __ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
158     __ cbzw(rscratch1, run_compiled_code);
159     __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
160     __ br(rscratch1);
161     __ BIND(run_compiled_code);
162   }
163 
164   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :




165                                                      Method::from_interpreted_offset();
166   __ ldr(rscratch1,Address(method, entry_offset));
167   __ br(rscratch1);
168   __ bind(L_no_such_method);
169   __ far_jump(RuntimeAddress(SharedRuntime::throw_AbstractMethodError_entry()));
170 }
171 
172 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
173                                         Register recv, Register method_temp,
174                                         Register temp2,
175                                         bool for_compiler_entry) {
176   BLOCK_COMMENT("jump_to_lambda_form {");
177   // This is the initial entry point of a lazy method handle.
178   // After type checking, it picks up the invoker from the LambdaForm.
179   assert_different_registers(recv, method_temp, temp2);
180   assert(recv != noreg, "required register");
181   assert(method_temp == rmethod, "required register for loading method");
182 
183   // Load the invoker, as MH -> MH.form -> LF.vmentry
184   __ verify_oop(recv);

144 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
145                                             bool for_compiler_entry, vmIntrinsics::ID iid) {
146   assert(method == rmethod, "interpreter calling convention");
147   Label L_no_such_method;
148   __ cbz(rmethod, L_no_such_method);
149   verify_method(_masm, method, iid);
150 
151   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
152     Label run_compiled_code;
153     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
154     // compiled code in threads for which the event is enabled.  Check here for
155     // interp_only_mode if these events CAN be enabled.
156 
157     __ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
158     __ cbzw(rscratch1, run_compiled_code);
159     __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
160     __ br(rscratch1);
161     __ BIND(run_compiled_code);
162   }
163 
164   // The following jump might pass an inline type argument that was erased to Object as oop to a
165   // callee that expects inline type arguments to be passed as fields. We need to call the compiled
166   // value entry (_code->inline_entry_point() or _adapter->c2i_inline_entry()) which will take care
167   // of translating between the calling conventions.
168   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_inline_offset() :
169                                                      Method::from_interpreted_offset();
170   __ ldr(rscratch1,Address(method, entry_offset));
171   __ br(rscratch1);
172   __ bind(L_no_such_method);
173   __ far_jump(RuntimeAddress(SharedRuntime::throw_AbstractMethodError_entry()));
174 }
175 
176 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
177                                         Register recv, Register method_temp,
178                                         Register temp2,
179                                         bool for_compiler_entry) {
180   BLOCK_COMMENT("jump_to_lambda_form {");
181   // This is the initial entry point of a lazy method handle.
182   // After type checking, it picks up the invoker from the LambdaForm.
183   assert_different_registers(recv, method_temp, temp2);
184   assert(recv != noreg, "required register");
185   assert(method_temp == rmethod, "required register for loading method");
186 
187   // Load the invoker, as MH -> MH.form -> LF.vmentry
188   __ verify_oop(recv);
< prev index next >