src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp
changeset 55343 03d417fd7d9a
parent 55105 9ad765641e8f
child 58051 505e28fe1769
--- a/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp	Wed Jun 12 14:21:36 2019 +0200
+++ b/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp	Wed Jun 12 14:22:04 2019 +0200
@@ -82,7 +82,18 @@
 }
 
 void LIR_Assembler::clinit_barrier(ciMethod* method) {
-  ShouldNotReachHere(); // not implemented
+  assert(!method->holder()->is_not_initialized(), "initialization should have been started");
+
+  Label L_skip_barrier;
+  Register klass = Z_R1_scratch;
+
+  metadata2reg(method->holder()->constant_encoding(), klass);
+  __ 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);
 }
 
 void LIR_Assembler::osr_entry() {