Skip to content

Commit

Permalink
8342683: Use non-short forward jump when passing stop()
Browse files Browse the repository at this point in the history
Reviewed-by: aboldtch, shade, kvn
  • Loading branch information
Fredrik Bredberg committed Oct 23, 2024
1 parent 964d8d2 commit afb62f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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.
Expand Down

0 comments on commit afb62f7

Please sign in to comment.