2219 __ call_VM_leaf( 2220 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), 2221 thread, rax); 2222 restore_native_result(masm, ret_type, stack_slots); 2223 } 2224 2225 // We can finally stop using that last_Java_frame we setup ages ago 2226 2227 __ reset_last_Java_frame(thread, false, true); 2228 2229 // Unpack oop result 2230 if (ret_type == T_OBJECT || ret_type == T_ARRAY) { 2231 Label L; 2232 __ cmpptr(rax, (int32_t)NULL_WORD); 2233 __ jcc(Assembler::equal, L); 2234 __ movptr(rax, Address(rax, 0)); 2235 __ bind(L); 2236 __ verify_oop(rax); 2237 } 2238 2239 if (!is_critical_native) { 2240 // reset handle block 2241 __ movptr(rcx, Address(thread, JavaThread::active_handles_offset())); 2242 __ movl(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD); 2243 2244 // Any exception pending? 2245 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD); 2246 __ jcc(Assembler::notEqual, exception_pending); 2247 } 2248 2249 // no exception, we're almost done 2250 2251 // check that only result value is on FPU stack 2252 __ verify_FPU(ret_type == T_FLOAT || ret_type == T_DOUBLE ? 1 : 0, "native_wrapper normal exit"); 2253 2254 // Fixup floating pointer results so that result looks like a return from a compiled method 2255 if (ret_type == T_FLOAT) { 2256 if (UseSSE >= 1) { 2257 // Pop st0 and store as float and reload into xmm register 2258 __ fstp_s(Address(rbp, -4)); | 2219 __ call_VM_leaf( 2220 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), 2221 thread, rax); 2222 restore_native_result(masm, ret_type, stack_slots); 2223 } 2224 2225 // We can finally stop using that last_Java_frame we setup ages ago 2226 2227 __ reset_last_Java_frame(thread, false, true); 2228 2229 // Unpack oop result 2230 if (ret_type == T_OBJECT || ret_type == T_ARRAY) { 2231 Label L; 2232 __ cmpptr(rax, (int32_t)NULL_WORD); 2233 __ jcc(Assembler::equal, L); 2234 __ movptr(rax, Address(rax, 0)); 2235 __ bind(L); 2236 __ verify_oop(rax); 2237 } 2238 2239 if (CheckJNICalls) { 2240 // clear_pending_jni_exception_check 2241 __ movptr(Address(thread, JavaThread::pending_jni_exception_check_fn_offset()), NULL_WORD); 2242 } 2243 2244 if (!is_critical_native) { 2245 // reset handle block 2246 __ movptr(rcx, Address(thread, JavaThread::active_handles_offset())); 2247 __ movl(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD); 2248 2249 // Any exception pending? 2250 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD); 2251 __ jcc(Assembler::notEqual, exception_pending); 2252 } 2253 2254 // no exception, we're almost done 2255 2256 // check that only result value is on FPU stack 2257 __ verify_FPU(ret_type == T_FLOAT || ret_type == T_DOUBLE ? 1 : 0, "native_wrapper normal exit"); 2258 2259 // Fixup floating pointer results so that result looks like a return from a compiled method 2260 if (ret_type == T_FLOAT) { 2261 if (UseSSE >= 1) { 2262 // Pop st0 and store as float and reload into xmm register 2263 __ fstp_s(Address(rbp, -4)); |