< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page
rev 47594 : imported patch Interpreter-Poll-7
rev 47595 : imported patch Interpreter-Poll-Wide_Ret-8
rev 47597 : imported patch Interpreter-Poll-Switch-10
rev 47598 : imported patch Interpreter-Poll-Ret-11


2528   __ dispatch_only(vtos, true);
2529 
2530   // default case -> j = default offset
2531   __ bind(default_case);
2532   __ profile_switch_default(i);
2533   __ movl(j, Address(array, -2 * BytesPerInt));
2534   __ bswapl(j);
2535   LP64_ONLY(__ movslq(j, j));
2536 
2537   NOT_LP64(__ restore_bcp());
2538   NOT_LP64(__ restore_locals());
2539 
2540   __ load_unsigned_byte(rbx, Address(rbcp, j, Address::times_1));
2541   __ addptr(rbcp, j);
2542   __ dispatch_only(vtos, true);
2543 }
2544 
2545 void TemplateTable::_return(TosState state) {
2546   transition(state, state);
2547 














2548   assert(_desc->calls_vm(),
2549          "inconsistent calls_vm information"); // call in remove_activation
2550 
2551   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
2552     assert(state == vtos, "only valid state");
2553     Register robj = LP64_ONLY(c_rarg1) NOT_LP64(rax);
2554     __ movptr(robj, aaddress(0));
2555     __ load_klass(rdi, robj);
2556     __ movl(rdi, Address(rdi, Klass::access_flags_offset()));
2557     __ testl(rdi, JVM_ACC_HAS_FINALIZER);
2558     Label skip_register_finalizer;
2559     __ jcc(Assembler::zero, skip_register_finalizer);
2560 
2561     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), robj);
2562 
2563     __ bind(skip_register_finalizer);
2564   }
2565 
2566   // Explicitly reset last_sp, for handling special case in TemplateInterpreter::deopt_reexecute_entry
2567 #ifdef ASSERT




2528   __ dispatch_only(vtos, true);
2529 
2530   // default case -> j = default offset
2531   __ bind(default_case);
2532   __ profile_switch_default(i);
2533   __ movl(j, Address(array, -2 * BytesPerInt));
2534   __ bswapl(j);
2535   LP64_ONLY(__ movslq(j, j));
2536 
2537   NOT_LP64(__ restore_bcp());
2538   NOT_LP64(__ restore_locals());
2539 
2540   __ load_unsigned_byte(rbx, Address(rbcp, j, Address::times_1));
2541   __ addptr(rbcp, j);
2542   __ dispatch_only(vtos, true);
2543 }
2544 
2545 void TemplateTable::_return(TosState state) {
2546   transition(state, state);
2547 
2548 #ifdef _LP64
2549   if (SafepointMechanism::uses_thread_local_poll()) {
2550     Label no_safepoint;
2551     NOT_PRODUCT(__ block_comment("Thread-local Safepoint poll"));
2552     __ testb(Address(r15_thread, Thread::polling_page_offset()), SafepointMechanism::poll_bit());
2553     __ jcc(Assembler::zero, no_safepoint);
2554     __ push(state);
2555     __ call_VM(noreg, CAST_FROM_FN_PTR(address,
2556                                     InterpreterRuntime::at_safepoint));
2557     __ pop(state);
2558     __ bind(no_safepoint);
2559   }
2560 #endif
2561 
2562   assert(_desc->calls_vm(),
2563          "inconsistent calls_vm information"); // call in remove_activation
2564 
2565   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
2566     assert(state == vtos, "only valid state");
2567     Register robj = LP64_ONLY(c_rarg1) NOT_LP64(rax);
2568     __ movptr(robj, aaddress(0));
2569     __ load_klass(rdi, robj);
2570     __ movl(rdi, Address(rdi, Klass::access_flags_offset()));
2571     __ testl(rdi, JVM_ACC_HAS_FINALIZER);
2572     Label skip_register_finalizer;
2573     __ jcc(Assembler::zero, skip_register_finalizer);
2574 
2575     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), robj);
2576 
2577     __ bind(skip_register_finalizer);
2578   }
2579 
2580   // Explicitly reset last_sp, for handling special case in TemplateInterpreter::deopt_reexecute_entry
2581 #ifdef ASSERT


< prev index next >