< prev index next >

src/hotspot/cpu/ppc/methodHandles_ppc.cpp

Print this page

127     Label run_compiled_code;
128     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
129     // compiled code in threads for which the event is enabled.  Check here for
130     // interp_only_mode if these events CAN be enabled.
131     __ lwz(temp, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
132     __ cmplwi(CR0, temp, 0);
133     __ beq(CR0, run_compiled_code);
134     // Null method test is replicated below in compiled case.
135     __ cmplwi(CR0, R19_method, 0);
136     __ beq(CR0, L_no_such_method);
137     __ ld(target, in_bytes(Method::interpreter_entry_offset()), R19_method);
138     __ mtctr(target);
139     __ bctr();
140     __ BIND(run_compiled_code);
141   }
142 
143   // Compiled case, either static or fall-through from runtime conditional
144   __ cmplwi(CR0, R19_method, 0);
145   __ beq(CR0, L_no_such_method);
146 
147   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :




148                                                      Method::from_interpreted_offset();
149   __ ld(target, in_bytes(entry_offset), R19_method);
150   __ mtctr(target);
151   __ bctr();
152 
153   __ bind(L_no_such_method);
154   assert(SharedRuntime::throw_AbstractMethodError_entry() != nullptr, "not yet generated!");
155   __ load_const_optimized(target, SharedRuntime::throw_AbstractMethodError_entry());
156   __ mtctr(target);
157   __ bctr();
158 }
159 
160 
161 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
162                                         Register recv, Register method_temp,
163                                         Register temp2, Register temp3,
164                                         bool for_compiler_entry) {
165   BLOCK_COMMENT("jump_to_lambda_form {");
166   // This is the initial entry point of a lazy method handle.
167   // After type checking, it picks up the invoker from the LambdaForm.

127     Label run_compiled_code;
128     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
129     // compiled code in threads for which the event is enabled.  Check here for
130     // interp_only_mode if these events CAN be enabled.
131     __ lwz(temp, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
132     __ cmplwi(CR0, temp, 0);
133     __ beq(CR0, run_compiled_code);
134     // Null method test is replicated below in compiled case.
135     __ cmplwi(CR0, R19_method, 0);
136     __ beq(CR0, L_no_such_method);
137     __ ld(target, in_bytes(Method::interpreter_entry_offset()), R19_method);
138     __ mtctr(target);
139     __ bctr();
140     __ BIND(run_compiled_code);
141   }
142 
143   // Compiled case, either static or fall-through from runtime conditional
144   __ cmplwi(CR0, R19_method, 0);
145   __ beq(CR0, L_no_such_method);
146 
147   // The following jump might pass an inline type argument that was erased to Object as oop to a
148   // callee that expects inline type arguments to be passed as fields. We need to call the compiled
149   // value entry (_code->inline_entry_point() or _adapter->c2i_inline_entry()) which will take care
150   // of translating between the calling conventions.
151   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_inline_offset() :
152                                                      Method::from_interpreted_offset();
153   __ ld(target, in_bytes(entry_offset), R19_method);
154   __ mtctr(target);
155   __ bctr();
156 
157   __ bind(L_no_such_method);
158   assert(SharedRuntime::throw_AbstractMethodError_entry() != nullptr, "not yet generated!");
159   __ load_const_optimized(target, SharedRuntime::throw_AbstractMethodError_entry());
160   __ mtctr(target);
161   __ bctr();
162 }
163 
164 
165 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
166                                         Register recv, Register method_temp,
167                                         Register temp2, Register temp3,
168                                         bool for_compiler_entry) {
169   BLOCK_COMMENT("jump_to_lambda_form {");
170   // This is the initial entry point of a lazy method handle.
171   // After type checking, it picks up the invoker from the LambdaForm.
< prev index next >