--- a/src/hotspot/cpu/s390/s390.ad Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/cpu/s390/s390.ad Thu Oct 17 20:53:35 2019 +0100
@@ -867,6 +867,23 @@
assert(framesize % wordSize == 0, "must preserve wordSize alignment");
+ if (C->clinit_barrier_on_entry()) {
+ assert(!C->method()->holder()->is_not_initialized(), "initialization should have been started");
+
+ Label L_skip_barrier;
+ Register klass = Z_R1_scratch;
+
+ // Notify OOP recorder (don't need the relocation)
+ AddressLiteral md = __ constant_metadata_address(C->method()->holder()->constant_encoding());
+ __ load_const_optimized(klass, md.value());
+ __ clinit_barrier(klass, Z_thread, &L_skip_barrier /*L_fast_path*/);
+
+ __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub());
+ __ z_br(klass);
+
+ __ bind(L_skip_barrier);
+ }
+
// Calls to C2R adapters often do not accept exceptional returns.
// We require that their callers must bang for them. But be
// careful, because some VM calls (such as call site linkage) can
@@ -5392,6 +5409,14 @@
ins_pipe(pipe_class_dummy);
%}
+instruct castLL(iRegL dst) %{
+ match(Set dst (CastLL dst));
+ size(0);
+ format %{ "# castLL of $dst" %}
+ ins_encode(/*empty*/);
+ ins_pipe(pipe_class_dummy);
+%}
+
//----------Conditional_store--------------------------------------------------
// Conditional-store of the updated heap-top.