Skip to content

Commit 9b2bae6

Browse files
Use uint for the option and assert it >= 256
1 parent db926eb commit 9b2bae6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/hotspot/cpu/aarch64/globals_aarch64.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ define_pd_global(intx, InlineSmallCode, 1000);
8989
"Use CRC32 instructions for CRC32 computation") \
9090
product(bool, UseCryptoPmullForCRC32, false, \
9191
"Use Crypto PMULL instructions for CRC32 computation") \
92-
product(intx, CryptoPmullForCRC32LowLimit, 256, DIAGNOSTIC, \
92+
product(uint, CryptoPmullForCRC32LowLimit, 256, DIAGNOSTIC, \
9393
"Minimum size in bytes when Crypto PMULL will be used." \
9494
"Value must be a multiple of 128.") \
95-
range(256, max_jint) \
95+
range(256, max_juint) \
9696
product(bool, UseSIMDForMemoryOps, false, \
9797
"Use SIMD instructions in generated memory move code") \
9898
product(bool, UseSIMDForArrayEquals, true, \

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4331,6 +4331,7 @@ void MacroAssembler::kernel_crc32_using_crypto_pmull(Register crc, Register buf,
43314331
Register len, Register tmp0, Register tmp1, Register tmp2, Register tmp3) {
43324332
Label CRC_by4_loop, CRC_by1_loop, CRC_less128, CRC_by128_pre, CRC_by32_loop, CRC_less32, L_exit;
43334333
assert_different_registers(crc, buf, len, tmp0, tmp1, tmp2);
4334+
assert(CryptoPmullForCRC32LowLimit >= 256);
43344335

43354336
subs(tmp0, len, CryptoPmullForCRC32LowLimit);
43364337
mvnw(crc, crc);
@@ -4696,6 +4697,7 @@ void MacroAssembler::kernel_crc32c_using_crypto_pmull(Register crc, Register buf
46964697
Register len, Register tmp0, Register tmp1, Register tmp2, Register tmp3) {
46974698
Label CRC_by4_loop, CRC_by1_loop, CRC_less128, CRC_by128_pre, CRC_by32_loop, CRC_less32, L_exit;
46984699
assert_different_registers(crc, buf, len, tmp0, tmp1, tmp2);
4700+
assert(CryptoPmullForCRC32LowLimit >= 256);
46994701

47004702
subs(tmp0, len, CryptoPmullForCRC32LowLimit);
47014703
br(Assembler::GE, CRC_by128_pre);

0 commit comments

Comments
 (0)