diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp index e889c26e5f4..0e6a9099265 100644 --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp @@ -3799,7 +3799,7 @@ void MacroAssembler::lookup_secondary_supers_table_slow_path(Register r_super_kl // Check for wraparound. Label skip; - bge(r_array_length, r_array_index, skip); + blt(r_array_index, r_array_length, skip); mv(r_array_index, zr); bind(skip);