1377 __ maybe_isb(); 1378 __ get_method(rmethod); 1379 // result potentially in r0 or v0 1380 1381 // make room for the pushes we're about to do 1382 __ sub(rscratch1, esp, 4 * wordSize); 1383 __ andr(sp, rscratch1, -16); 1384 1385 // NOTE: The order of these pushes is known to frame::interpreter_frame_result 1386 // in order to extract the result of a method call. If the order of these 1387 // pushes change or anything else is added to the stack then the code in 1388 // interpreter_frame_result must also change. 1389 __ push(dtos); 1390 __ push(ltos); 1391 1392 // change thread state 1393 __ mov(rscratch1, _thread_in_native_trans); 1394 __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset())); 1395 __ stlrw(rscratch1, rscratch2); 1396 1397 if (os::is_MP()) { 1398 if (UseMembar) { 1399 // Force this write out before the read below 1400 __ dmb(Assembler::ISH); 1401 } else { 1402 // Write serialization page so VM thread can do a pseudo remote membar. 1403 // We use the current thread pointer to calculate a thread specific 1404 // offset to write to within the page. This minimizes bus traffic 1405 // due to cache line collision. 1406 __ serialize_memory(rthread, rscratch2); 1407 } 1408 } 1409 1410 // check for safepoint operation in progress and/or pending suspend requests 1411 { 1412 Label L, Continue; 1413 __ safepoint_poll_acquire(L); 1414 __ ldrw(rscratch2, Address(rthread, JavaThread::suspend_flags_offset())); 1415 __ cbz(rscratch2, Continue); 1416 __ bind(L); 1417 1418 // Don't use call_VM as it will see a possible pending exception 1419 // and forward it and never return here preventing us from 1420 // clearing _last_native_pc down below. So we do a runtime call by 1421 // hand. 1422 // 1423 __ mov(c_rarg0, rthread); 1424 __ mov(rscratch2, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)); 1425 __ blrt(rscratch2, 1, 0, 0); 1426 __ maybe_isb(); 1427 __ get_method(rmethod); | 1377 __ maybe_isb(); 1378 __ get_method(rmethod); 1379 // result potentially in r0 or v0 1380 1381 // make room for the pushes we're about to do 1382 __ sub(rscratch1, esp, 4 * wordSize); 1383 __ andr(sp, rscratch1, -16); 1384 1385 // NOTE: The order of these pushes is known to frame::interpreter_frame_result 1386 // in order to extract the result of a method call. If the order of these 1387 // pushes change or anything else is added to the stack then the code in 1388 // interpreter_frame_result must also change. 1389 __ push(dtos); 1390 __ push(ltos); 1391 1392 // change thread state 1393 __ mov(rscratch1, _thread_in_native_trans); 1394 __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset())); 1395 __ stlrw(rscratch1, rscratch2); 1396 1397 if (UseMembar) { 1398 // Force this write out before the read below 1399 __ dmb(Assembler::ISH); 1400 } else { 1401 // Write serialization page so VM thread can do a pseudo remote membar. 1402 // We use the current thread pointer to calculate a thread specific 1403 // offset to write to within the page. This minimizes bus traffic 1404 // due to cache line collision. 1405 __ serialize_memory(rthread, rscratch2); 1406 } 1407 1408 // check for safepoint operation in progress and/or pending suspend requests 1409 { 1410 Label L, Continue; 1411 __ safepoint_poll_acquire(L); 1412 __ ldrw(rscratch2, Address(rthread, JavaThread::suspend_flags_offset())); 1413 __ cbz(rscratch2, Continue); 1414 __ bind(L); 1415 1416 // Don't use call_VM as it will see a possible pending exception 1417 // and forward it and never return here preventing us from 1418 // clearing _last_native_pc down below. So we do a runtime call by 1419 // hand. 1420 // 1421 __ mov(c_rarg0, rthread); 1422 __ mov(rscratch2, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)); 1423 __ blrt(rscratch2, 1, 0, 0); 1424 __ maybe_isb(); 1425 __ get_method(rmethod); |