76 jcc(Assembler::equal, L); |
76 jcc(Assembler::equal, L); |
77 // exception pending => remove activation and forward to exception handler |
77 // exception pending => remove activation and forward to exception handler |
78 movptr(rax, Address(thread, Thread::pending_exception_offset())); |
78 movptr(rax, Address(thread, Thread::pending_exception_offset())); |
79 // make sure that the vm_results are cleared |
79 // make sure that the vm_results are cleared |
80 if (oop_result1->is_valid()) { |
80 if (oop_result1->is_valid()) { |
81 movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); |
81 movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); |
82 } |
82 } |
83 if (oop_result2->is_valid()) { |
83 if (oop_result2->is_valid()) { |
84 movptr(Address(thread, JavaThread::vm_result_2_offset()), (int32_t)NULL_WORD); |
84 movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD); |
85 } |
85 } |
86 if (frame_size() == no_frame_size) { |
86 if (frame_size() == no_frame_size) { |
87 leave(); |
87 leave(); |
88 jump(RuntimeAddress(StubRoutines::forward_exception_entry())); |
88 jump(RuntimeAddress(StubRoutines::forward_exception_entry())); |
89 } else if (_stub_id == Runtime1::forward_exception_id) { |
89 } else if (_stub_id == Runtime1::forward_exception_id) { |
94 bind(L); |
94 bind(L); |
95 } |
95 } |
96 // get oop results if there are any and reset the values in the thread |
96 // get oop results if there are any and reset the values in the thread |
97 if (oop_result1->is_valid()) { |
97 if (oop_result1->is_valid()) { |
98 movptr(oop_result1, Address(thread, JavaThread::vm_result_offset())); |
98 movptr(oop_result1, Address(thread, JavaThread::vm_result_offset())); |
99 movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); |
99 movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); |
100 verify_oop(oop_result1); |
100 verify_oop(oop_result1); |
101 } |
101 } |
102 if (oop_result2->is_valid()) { |
102 if (oop_result2->is_valid()) { |
103 movptr(oop_result2, Address(thread, JavaThread::vm_result_2_offset())); |
103 movptr(oop_result2, Address(thread, JavaThread::vm_result_2_offset())); |
104 movptr(Address(thread, JavaThread::vm_result_2_offset()), (int32_t)NULL_WORD); |
104 movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD); |
105 verify_oop(oop_result2); |
105 verify_oop(oop_result2); |
106 } |
106 } |
107 return call_offset; |
107 return call_offset; |
108 } |
108 } |
109 |
109 |
726 // restore exception oop into rax, (convention for unwind code) |
726 // restore exception oop into rax, (convention for unwind code) |
727 __ movptr(exception_oop, Address(thread, JavaThread::exception_oop_offset())); |
727 __ movptr(exception_oop, Address(thread, JavaThread::exception_oop_offset())); |
728 |
728 |
729 // clear exception fields in JavaThread because they are no longer needed |
729 // clear exception fields in JavaThread because they are no longer needed |
730 // (fields must be cleared because they are processed by GC otherwise) |
730 // (fields must be cleared because they are processed by GC otherwise) |
731 __ movptr(Address(thread, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD); |
731 __ movptr(Address(thread, JavaThread::exception_oop_offset()), NULL_WORD); |
732 __ movptr(Address(thread, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); |
732 __ movptr(Address(thread, JavaThread::exception_pc_offset()), NULL_WORD); |
733 |
733 |
734 // pop the stub frame off |
734 // pop the stub frame off |
735 __ leave(); |
735 __ leave(); |
736 |
736 |
737 generate_unwind_exception(sasm); |
737 generate_unwind_exception(sasm); |
876 // the deopt blob expects exceptions in the special fields of |
876 // the deopt blob expects exceptions in the special fields of |
877 // JavaThread, so copy and clear pending exception. |
877 // JavaThread, so copy and clear pending exception. |
878 |
878 |
879 // load and clear pending exception |
879 // load and clear pending exception |
880 __ movptr(rax, Address(thread, Thread::pending_exception_offset())); |
880 __ movptr(rax, Address(thread, Thread::pending_exception_offset())); |
881 __ movptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
881 __ movptr(Address(thread, Thread::pending_exception_offset()), NULL_WORD); |
882 |
882 |
883 // check that there is really a valid exception |
883 // check that there is really a valid exception |
884 __ verify_not_null_oop(rax); |
884 __ verify_not_null_oop(rax); |
885 |
885 |
886 // load throwing pc: this is the return address of the stub |
886 // load throwing pc: this is the return address of the stub |
969 const Register exception_pc = rdx; |
969 const Register exception_pc = rdx; |
970 |
970 |
971 // load pending exception oop into rax, |
971 // load pending exception oop into rax, |
972 __ movptr(exception_oop, Address(thread, Thread::pending_exception_offset())); |
972 __ movptr(exception_oop, Address(thread, Thread::pending_exception_offset())); |
973 // clear pending exception |
973 // clear pending exception |
974 __ movptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
974 __ movptr(Address(thread, Thread::pending_exception_offset()), NULL_WORD); |
975 |
975 |
976 // load issuing PC (the return address for this stub) into rdx |
976 // load issuing PC (the return address for this stub) into rdx |
977 __ movptr(exception_pc, Address(rbp, 1*BytesPerWord)); |
977 __ movptr(exception_pc, Address(rbp, 1*BytesPerWord)); |
978 |
978 |
979 // make sure that the vm_results are cleared (may be unnecessary) |
979 // make sure that the vm_results are cleared (may be unnecessary) |
980 __ movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); |
980 __ movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); |
981 __ movptr(Address(thread, JavaThread::vm_result_2_offset()), (int32_t)NULL_WORD); |
981 __ movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD); |
982 |
982 |
983 // verify that that there is really a valid exception in rax, |
983 // verify that that there is really a valid exception in rax, |
984 __ verify_not_null_oop(exception_oop); |
984 __ verify_not_null_oop(exception_oop); |
985 |
985 |
986 |
986 |