67 |
67 |
68 // push java thread (becomes first argument of C function) |
68 // push java thread (becomes first argument of C function) |
69 get_thread(thread); |
69 get_thread(thread); |
70 move(A0, thread); |
70 move(A0, thread); |
71 |
71 |
72 int call_offset; |
|
73 if(!align_stack) { |
72 if(!align_stack) { |
74 set_last_Java_frame(thread, NOREG, FP, NULL); |
73 set_last_Java_frame(thread, NOREG, FP, NULL); |
75 } else { |
74 } else { |
76 address the_pc = pc(); |
75 address the_pc = pc(); |
77 call_offset = offset(); |
|
78 set_last_Java_frame(thread, NOREG, FP, the_pc); |
76 set_last_Java_frame(thread, NOREG, FP, the_pc); |
79 move(AT, -(StackAlignmentInBytes)); |
77 move(AT, -(StackAlignmentInBytes)); |
80 andr(SP, SP, AT); |
78 andr(SP, SP, AT); |
81 } |
79 } |
82 |
80 |
705 // patch throwing pc into return address (has bci & oop map) |
702 // patch throwing pc into return address (has bci & oop map) |
706 __ st_ptr(exception_pc, Address(FP, 1*BytesPerWord)); |
703 __ st_ptr(exception_pc, Address(FP, 1*BytesPerWord)); |
707 |
704 |
708 // compute the exception handler. |
705 // compute the exception handler. |
709 // the exception oop and the throwing pc are read from the fields in JavaThread |
706 // the exception oop and the throwing pc are read from the fields in JavaThread |
|
707 __ block_comment(";; will call_RT exception_handler_for_pc"); |
710 int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, exception_handler_for_pc)); |
708 int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, exception_handler_for_pc)); |
711 oop_maps->add_gc_map(call_offset, oop_map); |
709 oop_maps->add_gc_map(call_offset, oop_map); |
|
710 __ block_comment(";; end of call_RT exception_handler_for_pc"); |
712 // V0: handler address or NULL if no handler exists |
711 // V0: handler address or NULL if no handler exists |
713 // will be the deopt blob if nmethod was deoptimized while we looked up |
712 // will be the deopt blob if nmethod was deoptimized while we looked up |
714 // handler regardless of whether handler existed in the nmethod. |
713 // handler regardless of whether handler existed in the nmethod. |
715 |
714 |
716 // only V0 is valid at this time, all other registers have been destroyed by the |
715 // only V0 is valid at this time, all other registers have been destroyed by the |