< prev index next >

hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp

Print this page




1338     // clearing _last_native_pc down below. So we do a runtime call by
1339     // hand.
1340     //
1341     __ mov(c_rarg0, rthread);
1342     __ mov(rscratch2, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans));
1343     __ blrt(rscratch2, 1, 0, 0);
1344     __ maybe_isb();
1345     __ get_method(rmethod);
1346     __ reinit_heapbase();
1347     __ bind(Continue);
1348   }
1349 
1350   // change thread state
1351   __ mov(rscratch1, _thread_in_Java);
1352   __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
1353   __ stlrw(rscratch1, rscratch2);
1354 
1355   // reset_last_Java_frame
1356   __ reset_last_Java_frame(true, true);
1357 





1358   // reset handle block
1359   __ ldr(t, Address(rthread, JavaThread::active_handles_offset()));
1360   __ str(zr, Address(t, JNIHandleBlock::top_offset_in_bytes()));
1361 
1362   // If result is an oop unbox and store it in frame where gc will see it
1363   // and result handler will pick it up
1364 
1365   {
1366     Label no_oop, store_result;
1367     __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
1368     __ cmp(t, result_handler);
1369     __ br(Assembler::NE, no_oop);
1370     // retrieve result
1371     __ pop(ltos);
1372     __ cbz(r0, store_result);
1373     __ ldr(r0, Address(r0, 0));
1374     __ bind(store_result);
1375     __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize));
1376     // keep stack depth as expected by pushing oop which will eventually be discarded
1377     __ push(ltos);




1338     // clearing _last_native_pc down below. So we do a runtime call by
1339     // hand.
1340     //
1341     __ mov(c_rarg0, rthread);
1342     __ mov(rscratch2, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans));
1343     __ blrt(rscratch2, 1, 0, 0);
1344     __ maybe_isb();
1345     __ get_method(rmethod);
1346     __ reinit_heapbase();
1347     __ bind(Continue);
1348   }
1349 
1350   // change thread state
1351   __ mov(rscratch1, _thread_in_Java);
1352   __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
1353   __ stlrw(rscratch1, rscratch2);
1354 
1355   // reset_last_Java_frame
1356   __ reset_last_Java_frame(true, true);
1357 
1358   if (CheckJNICalls) {
1359     // clear_pending_jni_exception_check
1360     __ str(zr, Address(rthread, JavaThread::pending_jni_exception_check_fn_offset());
1361   }
1362 
1363   // reset handle block
1364   __ ldr(t, Address(rthread, JavaThread::active_handles_offset()));
1365   __ str(zr, Address(t, JNIHandleBlock::top_offset_in_bytes()));
1366 
1367   // If result is an oop unbox and store it in frame where gc will see it
1368   // and result handler will pick it up
1369 
1370   {
1371     Label no_oop, store_result;
1372     __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
1373     __ cmp(t, result_handler);
1374     __ br(Assembler::NE, no_oop);
1375     // retrieve result
1376     __ pop(ltos);
1377     __ cbz(r0, store_result);
1378     __ ldr(r0, Address(r0, 0));
1379     __ bind(store_result);
1380     __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize));
1381     // keep stack depth as expected by pushing oop which will eventually be discarded
1382     __ push(ltos);


< prev index next >