< prev index next >

src/hotspot/cpu/arm/templateTable_arm.cpp

Print this page




2827 }
2828 
2829 
2830 void TemplateTable::_return(TosState state) {
2831   transition(state, state);
2832   assert(_desc->calls_vm(), "inconsistent calls_vm information"); // call in remove_activation
2833 
2834   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
2835     Label skip_register_finalizer;
2836     assert(state == vtos, "only valid state");
2837     __ ldr(R1, aaddress(0));
2838     __ load_klass(Rtemp, R1);
2839     __ ldr_u32(Rtemp, Address(Rtemp, Klass::access_flags_offset()));
2840     __ tbz(Rtemp, exact_log2(JVM_ACC_HAS_FINALIZER), skip_register_finalizer);
2841 
2842     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), R1);
2843 
2844     __ bind(skip_register_finalizer);
2845   }
2846 
2847   // Explicitly reset last_sp, for handling special case in TemplateInterpreter::deopt_reexecute_entry
2848 #ifdef ASSERT
2849   if (state == vtos) {
2850 #ifndef AARCH64
2851     __ mov(Rtemp, 0);
2852     __ str(Rtemp, Address(FP, frame::interpreter_frame_last_sp_offset * wordSize));
2853 #else
2854     __ restore_sp_after_call(Rtemp);
2855     __ restore_stack_top();
2856 #endif
2857   }
2858 #endif
2859 
2860   // Narrow result if state is itos but result type is smaller.
2861   // Need to narrow in the return bytecode rather than in generate_return_entry
2862   // since compiled code callers expect the result to already be narrowed.
2863   if (state == itos) {
2864     __ narrow(R0_tos);
2865   }
2866   __ remove_activation(state, LR);
2867 
2868   __ interp_verify_oop(R0_tos, state, __FILE__, __LINE__);
2869 
2870 #ifndef AARCH64
2871   // According to interpreter calling conventions, result is returned in R0/R1,
2872   // so ftos (S0) and dtos (D0) are moved to R0/R1.
2873   // This conversion should be done after remove_activation, as it uses
2874   // push(state) & pop(state) to preserve return value.
2875   __ convert_tos_to_retval(state);
2876 #endif // !AARCH64
2877 
2878   __ ret();
2879 




2827 }
2828 
2829 
2830 void TemplateTable::_return(TosState state) {
2831   transition(state, state);
2832   assert(_desc->calls_vm(), "inconsistent calls_vm information"); // call in remove_activation
2833 
2834   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
2835     Label skip_register_finalizer;
2836     assert(state == vtos, "only valid state");
2837     __ ldr(R1, aaddress(0));
2838     __ load_klass(Rtemp, R1);
2839     __ ldr_u32(Rtemp, Address(Rtemp, Klass::access_flags_offset()));
2840     __ tbz(Rtemp, exact_log2(JVM_ACC_HAS_FINALIZER), skip_register_finalizer);
2841 
2842     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), R1);
2843 
2844     __ bind(skip_register_finalizer);
2845   }
2846 













2847   // Narrow result if state is itos but result type is smaller.
2848   // Need to narrow in the return bytecode rather than in generate_return_entry
2849   // since compiled code callers expect the result to already be narrowed.
2850   if (state == itos) {
2851     __ narrow(R0_tos);
2852   }
2853   __ remove_activation(state, LR);
2854 
2855   __ interp_verify_oop(R0_tos, state, __FILE__, __LINE__);
2856 
2857 #ifndef AARCH64
2858   // According to interpreter calling conventions, result is returned in R0/R1,
2859   // so ftos (S0) and dtos (D0) are moved to R0/R1.
2860   // This conversion should be done after remove_activation, as it uses
2861   // push(state) & pop(state) to preserve return value.
2862   __ convert_tos_to_retval(state);
2863 #endif // !AARCH64
2864 
2865   __ ret();
2866 


< prev index next >