From 5a8af2b8b93672de9b3a3e73e6984506980da932 Mon Sep 17 00:00:00 2001 From: Arseny Bochkarev Date: Wed, 3 Jul 2024 14:09:59 +0000 Subject: [PATCH] 8335615: Clean up left-overs from 8317721 Reviewed-by: fyang --- src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp index a04c02bbc45..b3ae5fbcdd0 100644 --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp @@ -1494,10 +1494,9 @@ void MacroAssembler::update_word_crc32(Register crc, Register v, Register tmp1, xorr(crc, crc, tmp2); lwu(tmp2, Address(tmp3)); - if (upper) { - tmp1 = v; + // It is more optimal to use 'srli' instead of 'srliw' for case when it is not necessary to clean upper bits + if (upper) srli(tmp1, v, 24); - } else srliw(tmp1, v, 24);