--- old/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp 2019-01-24 17:46:43.711101115 +0000 +++ new/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp 2019-01-24 17:46:43.027070716 +0000 @@ -83,6 +83,12 @@ ldr(hdr, Address(obj, hdr_offset)); // and mark it as unlocked orr(hdr, hdr, markOopDesc::unlocked_value); + + if (EnableValhalla && !UseBiasedLocking) { + // Mask always_locked bit such that we go to the slow path if object is a value type + andr(hdr, hdr, ~markOopDesc::biased_lock_bit_in_place); + } + // save unlocked object header into the displaced header location on the stack str(hdr, Address(disp_hdr, 0)); // test if object header is still the same (i.e. unlocked), and if so, store the