1331 __ push(thread); |
1331 __ push(thread); |
1332 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::block_for_jni_critical))); |
1332 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::block_for_jni_critical))); |
1333 __ increment(rsp, wordSize); |
1333 __ increment(rsp, wordSize); |
1334 |
1334 |
1335 __ get_thread(thread); |
1335 __ get_thread(thread); |
1336 __ reset_last_Java_frame(thread, false, true); |
1336 __ reset_last_Java_frame(thread, false); |
1337 |
1337 |
1338 save_or_restore_arguments(masm, stack_slots, total_in_args, |
1338 save_or_restore_arguments(masm, stack_slots, total_in_args, |
1339 arg_save_area, NULL, in_regs, in_sig_bt); |
1339 arg_save_area, NULL, in_regs, in_sig_bt); |
1340 |
1340 |
1341 __ bind(cont); |
1341 __ bind(cont); |
2249 restore_native_result(masm, ret_type, stack_slots); |
2249 restore_native_result(masm, ret_type, stack_slots); |
2250 } |
2250 } |
2251 |
2251 |
2252 // We can finally stop using that last_Java_frame we setup ages ago |
2252 // We can finally stop using that last_Java_frame we setup ages ago |
2253 |
2253 |
2254 __ reset_last_Java_frame(thread, false, true); |
2254 __ reset_last_Java_frame(thread, false); |
2255 |
2255 |
2256 // Unpack oop result |
2256 // Unpack oop result |
2257 if (ret_type == T_OBJECT || ret_type == T_ARRAY) { |
2257 if (ret_type == T_OBJECT || ret_type == T_ARRAY) { |
2258 Label L; |
2258 Label L; |
2259 __ cmpptr(rax, (int32_t)NULL_WORD); |
2259 __ cmpptr(rax, (int32_t)NULL_WORD); |
3115 |
3115 |
3116 // rax, contains the return result type |
3116 // rax, contains the return result type |
3117 __ push(rax); |
3117 __ push(rax); |
3118 |
3118 |
3119 __ get_thread(rcx); |
3119 __ get_thread(rcx); |
3120 __ reset_last_Java_frame(rcx, false, false); |
3120 __ reset_last_Java_frame(rcx, false); |
3121 |
3121 |
3122 // Collect return values |
3122 // Collect return values |
3123 __ movptr(rax,Address(rsp, (RegisterSaver::raxOffset() + additional_words + 1)*wordSize)); |
3123 __ movptr(rax,Address(rsp, (RegisterSaver::raxOffset() + additional_words + 1)*wordSize)); |
3124 __ movptr(rdx,Address(rsp, (RegisterSaver::rdxOffset() + additional_words + 1)*wordSize)); |
3124 __ movptr(rdx,Address(rsp, (RegisterSaver::rdxOffset() + additional_words + 1)*wordSize)); |
3125 |
3125 |
3217 |
3217 |
3218 oop_maps->add_gc_map( __ pc()-start, map); |
3218 oop_maps->add_gc_map( __ pc()-start, map); |
3219 |
3219 |
3220 __ get_thread(rcx); |
3220 __ get_thread(rcx); |
3221 |
3221 |
3222 __ reset_last_Java_frame(rcx, false, false); |
3222 __ reset_last_Java_frame(rcx, false); |
3223 |
3223 |
3224 // Load UnrollBlock into EDI |
3224 // Load UnrollBlock into EDI |
3225 __ movptr(rdi, rax); |
3225 __ movptr(rdi, rax); |
3226 |
3226 |
3227 // Pop all the frames we must move/replace. |
3227 // Pop all the frames we must move/replace. |
3329 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames))); |
3329 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames))); |
3330 // Set an oopmap for the call site |
3330 // Set an oopmap for the call site |
3331 oop_maps->add_gc_map( __ pc()-start, new OopMap( framesize, 0 ) ); |
3331 oop_maps->add_gc_map( __ pc()-start, new OopMap( framesize, 0 ) ); |
3332 |
3332 |
3333 __ get_thread(rdi); |
3333 __ get_thread(rdi); |
3334 __ reset_last_Java_frame(rdi, true, false); |
3334 __ reset_last_Java_frame(rdi, true); |
3335 |
3335 |
3336 // Pop self-frame. |
3336 // Pop self-frame. |
3337 __ leave(); // Epilog! |
3337 __ leave(); // Epilog! |
3338 |
3338 |
3339 // Jump to interpreter |
3339 // Jump to interpreter |
3424 |
3424 |
3425 Label noException; |
3425 Label noException; |
3426 |
3426 |
3427 // Clear last_Java_sp again |
3427 // Clear last_Java_sp again |
3428 __ get_thread(java_thread); |
3428 __ get_thread(java_thread); |
3429 __ reset_last_Java_frame(java_thread, false, false); |
3429 __ reset_last_Java_frame(java_thread, false); |
3430 |
3430 |
3431 __ cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
3431 __ cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
3432 __ jcc(Assembler::equal, noException); |
3432 __ jcc(Assembler::equal, noException); |
3433 |
3433 |
3434 // Exception pending |
3434 // Exception pending |
3499 // rax, contains the address we are going to jump to assuming no exception got installed |
3499 // rax, contains the address we are going to jump to assuming no exception got installed |
3500 |
3500 |
3501 __ addptr(rsp, wordSize); |
3501 __ addptr(rsp, wordSize); |
3502 |
3502 |
3503 // clear last_Java_sp |
3503 // clear last_Java_sp |
3504 __ reset_last_Java_frame(thread, true, false); |
3504 __ reset_last_Java_frame(thread, true); |
3505 // check for pending exceptions |
3505 // check for pending exceptions |
3506 Label pending; |
3506 Label pending; |
3507 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
3507 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); |
3508 __ jcc(Assembler::notEqual, pending); |
3508 __ jcc(Assembler::notEqual, pending); |
3509 |
3509 |