< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page




2620   __ dispatch_only(vtos, true);
2621 
2622   // default case -> j = default offset
2623   __ bind(default_case);
2624   __ profile_switch_default(i);
2625   __ movl(j, Address(array, -2 * BytesPerInt));
2626   __ bswapl(j);
2627   LP64_ONLY(__ movslq(j, j));
2628 
2629   NOT_LP64(__ restore_bcp());
2630   NOT_LP64(__ restore_locals());
2631 
2632   __ load_unsigned_byte(rbx, Address(rbcp, j, Address::times_1));
2633   __ addptr(rbcp, j);
2634   __ dispatch_only(vtos, true);
2635 }
2636 
2637 void TemplateTable::_return(TosState state) {
2638   transition(state, state);
2639 











2640   assert(_desc->calls_vm(),
2641          "inconsistent calls_vm information"); // call in remove_activation
2642 
2643   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
2644     assert(state == vtos, "only valid state");
2645     Register robj = LP64_ONLY(c_rarg1) NOT_LP64(rax);
2646     __ movptr(robj, aaddress(0));
2647     __ load_klass(rdi, robj);
2648     __ movl(rdi, Address(rdi, Klass::access_flags_offset()));
2649     __ testl(rdi, JVM_ACC_HAS_FINALIZER);
2650     Label skip_register_finalizer;
2651     __ jcc(Assembler::zero, skip_register_finalizer);
2652 
2653     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), robj);
2654 
2655     __ bind(skip_register_finalizer);
2656   }
2657 
2658   if (SafepointMechanism::uses_thread_local_poll() && _desc->bytecode() != Bytecodes::_return_register_finalizer) {
2659     Label no_safepoint;




2620   __ dispatch_only(vtos, true);
2621 
2622   // default case -> j = default offset
2623   __ bind(default_case);
2624   __ profile_switch_default(i);
2625   __ movl(j, Address(array, -2 * BytesPerInt));
2626   __ bswapl(j);
2627   LP64_ONLY(__ movslq(j, j));
2628 
2629   NOT_LP64(__ restore_bcp());
2630   NOT_LP64(__ restore_locals());
2631 
2632   __ load_unsigned_byte(rbx, Address(rbcp, j, Address::times_1));
2633   __ addptr(rbcp, j);
2634   __ dispatch_only(vtos, true);
2635 }
2636 
2637 void TemplateTable::_return(TosState state) {
2638   transition(state, state);
2639 
2640   // {
2641   //   Label not_rb;
2642   //   Register aa = rcx, bb = rdi;
2643   //   __ movptr(aa, Address(rsp, 0));
2644   //   __ lea(bb, ExternalAddress(StubRoutines::cont_returnBarrier()));
2645   //   __ cmpq(aa, bb);
2646   //   // __ cmpq(ExternalAddress(StubRoutines::cont_returnBarrier()).addr(), aa);
2647   //   __ jcc(Assembler::notZero, not_rb);
2648   //   __ stop("WQWWQWQW");
2649   //   __ bind(not_rb);
2650   // }
2651   assert(_desc->calls_vm(),
2652          "inconsistent calls_vm information"); // call in remove_activation
2653 
2654   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
2655     assert(state == vtos, "only valid state");
2656     Register robj = LP64_ONLY(c_rarg1) NOT_LP64(rax);
2657     __ movptr(robj, aaddress(0));
2658     __ load_klass(rdi, robj);
2659     __ movl(rdi, Address(rdi, Klass::access_flags_offset()));
2660     __ testl(rdi, JVM_ACC_HAS_FINALIZER);
2661     Label skip_register_finalizer;
2662     __ jcc(Assembler::zero, skip_register_finalizer);
2663 
2664     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), robj);
2665 
2666     __ bind(skip_register_finalizer);
2667   }
2668 
2669   if (SafepointMechanism::uses_thread_local_poll() && _desc->bytecode() != Bytecodes::_return_register_finalizer) {
2670     Label no_safepoint;


< prev index next >