1108 const Register thread = LP64_ONLY(r15_thread) NOT_LP64(rdi); |
1108 const Register thread = LP64_ONLY(r15_thread) NOT_LP64(rdi); |
1109 const Register t = InterpreterRuntime::SignatureHandlerGenerator::temp(); // rcx|rscratch1 |
1109 const Register t = InterpreterRuntime::SignatureHandlerGenerator::temp(); // rcx|rscratch1 |
1110 |
1110 |
1111 // allocate space for parameters |
1111 // allocate space for parameters |
1112 __ movptr(method, STATE(_method)); |
1112 __ movptr(method, STATE(_method)); |
1113 __ verify_oop(method); |
1113 __ verify_method_ptr(method); |
1114 __ load_unsigned_short(t, Address(method, Method::size_of_parameters_offset())); |
1114 __ load_unsigned_short(t, Address(method, Method::size_of_parameters_offset())); |
1115 __ shll(t, 2); |
1115 __ shll(t, 2); |
1116 #ifdef _LP64 |
1116 #ifdef _LP64 |
1117 __ subptr(rsp, t); |
1117 __ subptr(rsp, t); |
1118 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows |
1118 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows |
1132 __ jcc(Assembler::notZero, L); |
1132 __ jcc(Assembler::notZero, L); |
1133 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), method, false); |
1133 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), method, false); |
1134 __ movptr(method, STATE(_method)); |
1134 __ movptr(method, STATE(_method)); |
1135 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
1135 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
1136 __ jcc(Assembler::notEqual, pending_exception_present); |
1136 __ jcc(Assembler::notEqual, pending_exception_present); |
1137 __ verify_oop(method); |
1137 __ verify_method_ptr(method); |
1138 __ movptr(t, Address(method, Method::signature_handler_offset())); |
1138 __ movptr(t, Address(method, Method::signature_handler_offset())); |
1139 __ bind(L); |
1139 __ bind(L); |
1140 } |
1140 } |
1141 #ifdef ASSERT |
1141 #ifdef ASSERT |
1142 { |
1142 { |
1160 // each time here. The slow-path generator will blow RBX |
1160 // each time here. The slow-path generator will blow RBX |
1161 // sometime, so we must reload it after the call. |
1161 // sometime, so we must reload it after the call. |
1162 __ movptr(from_ptr, STATE(_locals)); // get the from pointer |
1162 __ movptr(from_ptr, STATE(_locals)); // get the from pointer |
1163 __ call(t); |
1163 __ call(t); |
1164 __ movptr(method, STATE(_method)); |
1164 __ movptr(method, STATE(_method)); |
1165 __ verify_oop(method); |
1165 __ verify_method_ptr(method); |
1166 |
1166 |
1167 // result handler is in rax |
1167 // result handler is in rax |
1168 // set result handler |
1168 // set result handler |
1169 __ movptr(STATE(_result_handler), rax); |
1169 __ movptr(STATE(_result_handler), rax); |
1170 |
1170 |
1174 __ movptr(rax, Address(method, Method::native_function_offset())); |
1174 __ movptr(rax, Address(method, Method::native_function_offset())); |
1175 __ testptr(rax, rax); |
1175 __ testptr(rax, rax); |
1176 __ jcc(Assembler::notZero, L); |
1176 __ jcc(Assembler::notZero, L); |
1177 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), method); |
1177 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), method); |
1178 __ movptr(method, STATE(_method)); |
1178 __ movptr(method, STATE(_method)); |
1179 __ verify_oop(method); |
1179 __ verify_method_ptr(method); |
1180 __ movptr(rax, Address(method, Method::native_function_offset())); |
1180 __ movptr(rax, Address(method, Method::native_function_offset())); |
1181 __ bind(L); |
1181 __ bind(L); |
1182 } |
1182 } |
1183 |
1183 |
1184 // pass mirror handle if static call |
1184 // pass mirror handle if static call |
1349 ((MacroAssembler*)_masm)->call_VM_leaf(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans), |
1349 ((MacroAssembler*)_masm)->call_VM_leaf(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans), |
1350 thread); |
1350 thread); |
1351 __ increment(rsp, wordSize); |
1351 __ increment(rsp, wordSize); |
1352 |
1352 |
1353 __ movptr(method, STATE(_method)); |
1353 __ movptr(method, STATE(_method)); |
1354 __ verify_oop(method); |
1354 __ verify_method_ptr(method); |
1355 __ movptr(thread, STATE(_thread)); // get thread |
1355 __ movptr(thread, STATE(_thread)); // get thread |
1356 |
1356 |
1357 __ bind(Continue); |
1357 __ bind(Continue); |
1358 } |
1358 } |
1359 |
1359 |