--- a/src/hotspot/cpu/sparc/templateTable_sparc.cpp Sat Nov 11 01:21:09 2017 +0100
+++ b/src/hotspot/cpu/sparc/templateTable_sparc.cpp Thu Aug 31 10:00:28 2017 +0200
@@ -1499,7 +1499,7 @@
// Push returnAddress for "ret" on stack
__ push_ptr(Otos_i);
// And away we go!
- __ dispatch_next(vtos);
+ __ dispatch_next(vtos, 0, true);
return;
}
@@ -1607,7 +1607,7 @@
// continue with bytecode @ target
// %%%%% Like Intel, could speed things up by moving bytecode fetch to code above,
// %%%%% and changing dispatch_next to dispatch_only
- __ dispatch_next(vtos);
+ __ dispatch_next(vtos, 0, true);
}
@@ -1676,7 +1676,7 @@
__ ld_ptr(Lmethod, Method::const_offset(), G3_scratch);
__ add(G3_scratch, Otos_i, G3_scratch);
__ add(G3_scratch, in_bytes(ConstMethod::codes_offset()), Lbcp);
- __ dispatch_next(vtos);
+ __ dispatch_next(vtos, 0, true);
}
@@ -1691,7 +1691,7 @@
__ ld_ptr(Lmethod, Method::const_offset(), G3_scratch);
__ add(G3_scratch, Otos_i, G3_scratch);
__ add(G3_scratch, in_bytes(ConstMethod::codes_offset()), Lbcp);
- __ dispatch_next(vtos);
+ __ dispatch_next(vtos, 0, true);
}
@@ -1727,7 +1727,7 @@
// continue execution
__ bind(continue_execution);
__ add(Lbcp, O2, Lbcp);
- __ dispatch_next(vtos);
+ __ dispatch_next(vtos, 0, true);
}
@@ -1779,7 +1779,7 @@
__ bind(continue_execution);
}
__ add(Lbcp, O4, Lbcp);
- __ dispatch_next(vtos);
+ __ dispatch_next(vtos, 0, true);
}
@@ -1888,7 +1888,7 @@
__ bind(continue_execution);
__ add( Lbcp, Rj, Lbcp );
- __ dispatch_next( vtos );
+ __ dispatch_next(vtos, 0, true);
}
@@ -1914,6 +1914,18 @@
__ bind(skip_register_finalizer);
}
+ if (SafepointMechanism::uses_thread_local_poll() && _desc->bytecode() != Bytecodes::_return_register_finalizer) {
+ Label no_safepoint;
+ __ ldx(Address(G2_thread, Thread::polling_page_offset()), G3_scratch, 0);
+ __ btst(SafepointMechanism::poll_bit(), G3_scratch);
+ __ br(Assembler::zero, false, Assembler::pt, no_safepoint);
+ __ delayed()->nop();
+ __ push(state);
+ __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint));
+ __ pop(state);
+ __ bind(no_safepoint);
+ }
+
// Narrow result if state is itos but result type is smaller.
// Need to narrow in the return bytecode rather than in generate_return_entry
// since compiled code callers expect the result to already be narrowed.