From afb62f73499c09f4a7bde6f522fcd3ef1278e526 Mon Sep 17 00:00:00 2001 From: Fredrik Bredberg Date: Wed, 23 Oct 2024 15:26:32 +0000 Subject: [PATCH] 8342683: Use non-short forward jump when passing stop() Reviewed-by: aboldtch, shade, kvn --- src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp index 0eab2de2c64..879f33ede2d 100644 --- a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp @@ -837,8 +837,9 @@ void C2_MacroAssembler::fast_unlock_lightweight(Register obj, Register reg_rax, #ifdef ASSERT // Check that unlocked label is reached with ZF set. Label zf_correct; + Label zf_bad_zero; jcc(Assembler::zero, zf_correct); - stop("Fast Unlock ZF != 1"); + jmp(zf_bad_zero); #endif bind(slow_path); @@ -847,8 +848,10 @@ void C2_MacroAssembler::fast_unlock_lightweight(Register obj, Register reg_rax, } #ifdef ASSERT // Check that stub->continuation() label is reached with ZF not set. - jccb(Assembler::notZero, zf_correct); + jcc(Assembler::notZero, zf_correct); stop("Fast Unlock ZF != 0"); + bind(zf_bad_zero); + stop("Fast Unlock ZF != 1"); bind(zf_correct); #endif // C2 uses the value of ZF to determine the continuation.