< prev index next >

src/hotspot/cpu/sparc/templateTable_sparc.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


1879   __ ld( Rarray, Ri, Rj );
1880   // (Rj is already in the native byte-ordering.)
1881 
1882   if (ProfileInterpreter) {
1883     __ ba_short(continue_execution);
1884   }
1885 
1886   __ bind(default_case); // fall through (if not profiling)
1887   __ profile_switch_default(Ri);
1888 
1889   __ bind(continue_execution);
1890   __ add( Lbcp, Rj, Lbcp );
1891   __ dispatch_next(vtos, 0, true);
1892 }
1893 
1894 
1895 void TemplateTable::_return(TosState state) {
1896   transition(state, state);
1897   assert(_desc->calls_vm(), "inconsistent calls_vm information");
1898 












1899   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
1900     assert(state == vtos, "only valid state");
1901     __ mov(G0, G3_scratch);
1902     __ access_local_ptr(G3_scratch, Otos_i);
1903     __ load_klass(Otos_i, O2);
1904     __ set(JVM_ACC_HAS_FINALIZER, G3);
1905     __ ld(O2, in_bytes(Klass::access_flags_offset()), O2);
1906     __ andcc(G3, O2, G0);
1907     Label skip_register_finalizer;
1908     __ br(Assembler::zero, false, Assembler::pn, skip_register_finalizer);
1909     __ delayed()->nop();
1910 
1911     // Call out to do finalizer registration
1912     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), Otos_i);
1913 
1914     __ bind(skip_register_finalizer);
1915   }
1916 
1917   // Narrow result if state is itos but result type is smaller.
1918   // Need to narrow in the return bytecode rather than in generate_return_entry




1879   __ ld( Rarray, Ri, Rj );
1880   // (Rj is already in the native byte-ordering.)
1881 
1882   if (ProfileInterpreter) {
1883     __ ba_short(continue_execution);
1884   }
1885 
1886   __ bind(default_case); // fall through (if not profiling)
1887   __ profile_switch_default(Ri);
1888 
1889   __ bind(continue_execution);
1890   __ add( Lbcp, Rj, Lbcp );
1891   __ dispatch_next(vtos, 0, true);
1892 }
1893 
1894 
1895 void TemplateTable::_return(TosState state) {
1896   transition(state, state);
1897   assert(_desc->calls_vm(), "inconsistent calls_vm information");
1898 
1899   if (SafepointMechanism::uses_thread_local_poll()) {
1900     Label no_safepoint;
1901     __ ldx(Address(G2_thread, Thread::polling_page_offset()), G3_scratch, 0);
1902     __ btst(SafepointMechanism::poll_bit(), G3_scratch);
1903     __ br(Assembler::zero, false, Assembler::pt, no_safepoint);
1904     __ delayed()->nop();
1905     __ push(state); //?
1906     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint));
1907     __ pop(state); //?
1908     __ bind(no_safepoint);
1909   }
1910 
1911   if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
1912     assert(state == vtos, "only valid state");
1913     __ mov(G0, G3_scratch);
1914     __ access_local_ptr(G3_scratch, Otos_i);
1915     __ load_klass(Otos_i, O2);
1916     __ set(JVM_ACC_HAS_FINALIZER, G3);
1917     __ ld(O2, in_bytes(Klass::access_flags_offset()), O2);
1918     __ andcc(G3, O2, G0);
1919     Label skip_register_finalizer;
1920     __ br(Assembler::zero, false, Assembler::pn, skip_register_finalizer);
1921     __ delayed()->nop();
1922 
1923     // Call out to do finalizer registration
1924     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), Otos_i);
1925 
1926     __ bind(skip_register_finalizer);
1927   }
1928 
1929   // Narrow result if state is itos but result type is smaller.
1930   // Need to narrow in the return bytecode rather than in generate_return_entry


< prev index next >