src/cpu/mips/vm/c1_Runtime1_mips.cpp

changeset 9161
97a8ece254bc
parent 9153
7ebfb115ed31
child 9171
c67c94f5b85d
equal deleted inserted replaced
9160:b6ac0b9d8b02 9161:97a8ece254bc
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
100 #else 98 #else
101 li48(T9, (intptr_t)entry); 99 li48(T9, (intptr_t)entry);
102 #endif 100 #endif
103 jalr(T9); 101 jalr(T9);
104 delayed()->nop(); 102 delayed()->nop();
105 if (!align_stack) { 103
106 call_offset = offset(); 104 int call_offset = offset();
107 }
108 105
109 // verify callee-saved register 106 // verify callee-saved register
110 #ifdef ASSERT 107 #ifdef ASSERT
111 guarantee(thread != V0, "change this code"); 108 guarantee(thread != V0, "change this code");
112 push(V0); 109 push(V0);
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

mercurial