From fcc9c8d570396506068e0a1d4123e32b195e6653 Mon Sep 17 00:00:00 2001 From: Fredrik Bredberg Date: Wed, 9 Oct 2024 16:45:56 +0000 Subject: [PATCH] 8341854: Incorrect clearing of ZF in fast_unlock_lightweight on x86 Reviewed-by: stefank, aboldtch, pchilanomate, dcubed --- src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp index 839745f76ec..aba5344b7e4 100644 --- a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp @@ -822,7 +822,7 @@ void C2_MacroAssembler::fast_unlock_lightweight(Register obj, Register reg_rax, } movptr(Address(thread, JavaThread::unlocked_inflated_monitor_offset()), monitor); - testl(monitor, monitor); // Fast Unlock ZF = 0 + orl(t, 1); // Fast Unlock ZF = 0 jmpb(slow_path); // Recursive unlock.