< prev index next >

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Print this page




2920 
2921   // Set an oopmap for the call site.  This oopmap will map all
2922   // oop-registers and debug-info registers as callee-saved.  This
2923   // will allow deoptimization at this safepoint to find all possible
2924   // debug-info recordings, as well as let GC find all oops.
2925 
2926   oop_maps->add_gc_map( __ pc() - start, map);
2927 
2928   Label noException;
2929 
2930   __ reset_last_Java_frame(false);
2931 
2932   __ maybe_isb();
2933   __ membar(Assembler::LoadLoad | Assembler::LoadStore);
2934 
2935   __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
2936   __ cbz(rscratch1, noException);
2937 
2938   // Exception pending
2939 
2940   RegisterSaver::restore_live_registers(masm);
2941 
2942   __ far_jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
2943 
2944   // No exception case
2945   __ bind(noException);
2946 
2947   Label no_adjust, bail;
2948   if (SafepointMechanism::uses_thread_local_poll() && !cause_return) {
2949     // If our stashed return pc was modified by the runtime we avoid touching it
2950     __ ldr(rscratch1, Address(rfp, wordSize));
2951     __ cmp(r20, rscratch1);
2952     __ br(Assembler::NE, no_adjust);
2953 
2954 #ifdef ASSERT
2955     // Verify the correct encoding of the poll we're about to skip.
2956     // See NativeInstruction::is_ldrw_to_zr()
2957     __ ldrw(rscratch1, Address(r20));
2958     __ ubfx(rscratch2, rscratch1, 22, 10);
2959     __ cmpw(rscratch2, 0b1011100101);
2960     __ br(Assembler::NE, bail);




2920 
2921   // Set an oopmap for the call site.  This oopmap will map all
2922   // oop-registers and debug-info registers as callee-saved.  This
2923   // will allow deoptimization at this safepoint to find all possible
2924   // debug-info recordings, as well as let GC find all oops.
2925 
2926   oop_maps->add_gc_map( __ pc() - start, map);
2927 
2928   Label noException;
2929 
2930   __ reset_last_Java_frame(false);
2931 
2932   __ maybe_isb();
2933   __ membar(Assembler::LoadLoad | Assembler::LoadStore);
2934 
2935   __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
2936   __ cbz(rscratch1, noException);
2937 
2938   // Exception pending
2939 
2940   RegisterSaver::restore_live_registers(masm, save_vectors);
2941 
2942   __ far_jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
2943 
2944   // No exception case
2945   __ bind(noException);
2946 
2947   Label no_adjust, bail;
2948   if (SafepointMechanism::uses_thread_local_poll() && !cause_return) {
2949     // If our stashed return pc was modified by the runtime we avoid touching it
2950     __ ldr(rscratch1, Address(rfp, wordSize));
2951     __ cmp(r20, rscratch1);
2952     __ br(Assembler::NE, no_adjust);
2953 
2954 #ifdef ASSERT
2955     // Verify the correct encoding of the poll we're about to skip.
2956     // See NativeInstruction::is_ldrw_to_zr()
2957     __ ldrw(rscratch1, Address(r20));
2958     __ ubfx(rscratch2, rscratch1, 22, 10);
2959     __ cmpw(rscratch2, 0b1011100101);
2960     __ br(Assembler::NE, bail);


< prev index next >