941
942 __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch);
943 __ cmp(G3_scratch, Lscratch);
944 __ brx(Assembler::notEqual, false, Assembler::pt, no_oop);
945 __ delayed()->nop();
946 __ addcc(G0, O0, O0);
947 __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL:
948 __ delayed()->ld_ptr(O0, 0, O0); // unbox it
949 __ mov(G0, O0);
950
951 __ bind(store_result);
952 // Store it where gc will look for it and result handler expects it.
953 __ st_ptr(O0, STATE(_oop_temp));
954
955 __ bind(no_oop);
956
957 }
958
959 // reset handle block
960 __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), G3_scratch);
961 __ st_ptr(G0, G3_scratch, JNIHandleBlock::top_offset_in_bytes());
962
963
964 // handle exceptions (exception handling will handle unlocking!)
965 { Label L;
966 Address exception_addr (G2_thread, in_bytes(Thread::pending_exception_offset()));
967
968 __ ld_ptr(exception_addr, Gtemp);
969 __ tst(Gtemp);
970 __ brx(Assembler::equal, false, Assembler::pt, L);
971 __ delayed()->nop();
972 __ bind(pending_exception_present);
973 // With c++ interpreter we just leave it pending caller will do the correct thing. However...
974 // Like x86 we ignore the result of the native call and leave the method locked. This
975 // seems wrong to leave things locked.
976
977 __ br(Assembler::always, false, Assembler::pt, StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type);
978 __ delayed()->restore(I5_savedSP, G0, SP); // remove interpreter frame
979
980 __ bind(L);
981 }
|
941
942 __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch);
943 __ cmp(G3_scratch, Lscratch);
944 __ brx(Assembler::notEqual, false, Assembler::pt, no_oop);
945 __ delayed()->nop();
946 __ addcc(G0, O0, O0);
947 __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL:
948 __ delayed()->ld_ptr(O0, 0, O0); // unbox it
949 __ mov(G0, O0);
950
951 __ bind(store_result);
952 // Store it where gc will look for it and result handler expects it.
953 __ st_ptr(O0, STATE(_oop_temp));
954
955 __ bind(no_oop);
956
957 }
958
959 // reset handle block
960 __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), G3_scratch);
961 __ st(G0, G3_scratch, JNIHandleBlock::top_offset_in_bytes());
962
963
964 // handle exceptions (exception handling will handle unlocking!)
965 { Label L;
966 Address exception_addr (G2_thread, in_bytes(Thread::pending_exception_offset()));
967
968 __ ld_ptr(exception_addr, Gtemp);
969 __ tst(Gtemp);
970 __ brx(Assembler::equal, false, Assembler::pt, L);
971 __ delayed()->nop();
972 __ bind(pending_exception_present);
973 // With c++ interpreter we just leave it pending caller will do the correct thing. However...
974 // Like x86 we ignore the result of the native call and leave the method locked. This
975 // seems wrong to leave things locked.
976
977 __ br(Assembler::always, false, Assembler::pt, StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type);
978 __ delayed()->restore(I5_savedSP, G0, SP); // remove interpreter frame
979
980 __ bind(L);
981 }
|