From cd46c87dc916b2b74067accf80c62df1792f74cf Mon Sep 17 00:00:00 2001 From: Gui Cao Date: Fri, 28 Jun 2024 01:44:14 +0000 Subject: [PATCH] 8334843: RISC-V: Fix wraparound checking for r_array_index in lookup_secondary_supers_table_slow_path Reviewed-by: fyang --- src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);