diff -r 6502d6a92fe2 -r 3c905e67e380 src/hotspot/cpu/x86/macroAssembler_x86.cpp --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp Thu Jun 06 13:45:59 2019 +0300 +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp Thu Jun 06 13:46:01 2019 +0300 @@ -4602,13 +4602,14 @@ bind(L_fallthrough); } - void MacroAssembler::clinit_barrier(Register klass, Register thread, Label* L_fast_path, Label* L_slow_path) { assert(L_fast_path != NULL || L_slow_path != NULL, "at least one is required"); Label L_fallthrough; if (L_fast_path == NULL) { L_fast_path = &L_fallthrough; + } else if (L_slow_path == NULL) { + L_slow_path = &L_fallthrough; } // Fast path check: class is fully initialized @@ -4617,13 +4618,15 @@ // Fast path check: current thread is initializer thread cmpptr(thread, Address(klass, InstanceKlass::init_thread_offset())); - if (L_slow_path != NULL) { - jcc(Assembler::notEqual, *L_slow_path); - } else { + if (L_slow_path == &L_fallthrough) { jcc(Assembler::equal, *L_fast_path); - } - - bind(L_fallthrough); + bind(*L_slow_path); + } else if (L_fast_path == &L_fallthrough) { + jcc(Assembler::notEqual, *L_slow_path); + bind(*L_fast_path); + } else { + Unimplemented(); + } } void MacroAssembler::cmov32(Condition cc, Register dst, Address src) {