< prev index next >

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Print this page
rev 51719 : [mq]: 8210676


1433   __ mov(rscratch1, _thread_in_Java);
1434   __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
1435   __ stlrw(rscratch1, rscratch2);
1436 
1437   // reset_last_Java_frame
1438   __ reset_last_Java_frame(true);
1439 
1440   if (CheckJNICalls) {
1441     // clear_pending_jni_exception_check
1442     __ str(zr, Address(rthread, JavaThread::pending_jni_exception_check_fn_offset()));
1443   }
1444 
1445   // reset handle block
1446   __ ldr(t, Address(rthread, JavaThread::active_handles_offset()));
1447   __ str(zr, Address(t, JNIHandleBlock::top_offset_in_bytes()));
1448 
1449   // If result is an oop unbox and store it in frame where gc will see it
1450   // and result handler will pick it up
1451 
1452   {
1453     Label no_oop, not_weak, store_result;
1454     __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
1455     __ cmp(t, result_handler);
1456     __ br(Assembler::NE, no_oop);
1457     // Unbox oop result, e.g. JNIHandles::resolve result.
1458     __ pop(ltos);
1459     __ resolve_jobject(r0, rthread, t);
1460     __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize));
1461     // keep stack depth as expected by pushing oop which will eventually be discarded
1462     __ push(ltos);
1463     __ bind(no_oop);
1464   }
1465 
1466   {
1467     Label no_reguard;
1468     __ lea(rscratch1, Address(rthread, in_bytes(JavaThread::stack_guard_state_offset())));
1469     __ ldrw(rscratch1, Address(rscratch1));
1470     __ cmp(rscratch1, (u1)JavaThread::stack_guard_yellow_reserved_disabled);
1471     __ br(Assembler::NE, no_reguard);
1472 
1473     __ pusha(); // XXX only save smashed registers




1433   __ mov(rscratch1, _thread_in_Java);
1434   __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
1435   __ stlrw(rscratch1, rscratch2);
1436 
1437   // reset_last_Java_frame
1438   __ reset_last_Java_frame(true);
1439 
1440   if (CheckJNICalls) {
1441     // clear_pending_jni_exception_check
1442     __ str(zr, Address(rthread, JavaThread::pending_jni_exception_check_fn_offset()));
1443   }
1444 
1445   // reset handle block
1446   __ ldr(t, Address(rthread, JavaThread::active_handles_offset()));
1447   __ str(zr, Address(t, JNIHandleBlock::top_offset_in_bytes()));
1448 
1449   // If result is an oop unbox and store it in frame where gc will see it
1450   // and result handler will pick it up
1451 
1452   {
1453     Label no_oop;
1454     __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
1455     __ cmp(t, result_handler);
1456     __ br(Assembler::NE, no_oop);
1457     // Unbox oop result, e.g. JNIHandles::resolve result.
1458     __ pop(ltos);
1459     __ resolve_jobject(r0, rthread, t);
1460     __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize));
1461     // keep stack depth as expected by pushing oop which will eventually be discarded
1462     __ push(ltos);
1463     __ bind(no_oop);
1464   }
1465 
1466   {
1467     Label no_reguard;
1468     __ lea(rscratch1, Address(rthread, in_bytes(JavaThread::stack_guard_state_offset())));
1469     __ ldrw(rscratch1, Address(rscratch1));
1470     __ cmp(rscratch1, (u1)JavaThread::stack_guard_yellow_reserved_disabled);
1471     __ br(Assembler::NE, no_reguard);
1472 
1473     __ pusha(); // XXX only save smashed registers


< prev index next >