@@ -2436,8 +2436,7 @@ class StubGenerator: public StubCodeGenerator {
24362436 Register strL, Register strU, Label& DIFF) {
24372437 const Register tmp = x30, tmpLval = x12;
24382438
2439- int base_offset = arrayOopDesc::base_offset_in_bytes (T_CHAR);
2440-
2439+ int base_offset = arrayOopDesc::base_offset_in_bytes (T_BYTE);
24412440 assert ((base_offset % (UseCompactObjectHeaders ? 4 :
24422441 (UseCompressedClassPointers ? 8 : 4 ))) == 0 , " Must be" );
24432442
@@ -2495,25 +2494,21 @@ class StubGenerator: public StubCodeGenerator {
24952494 const Register result = x10, str1 = x11, str2 = x13, cnt2 = x14,
24962495 tmp1 = x28, tmp2 = x29, tmp3 = x30, tmp4 = x12;
24972496
2498- int base_offset1 = arrayOopDesc::base_offset_in_bytes (T_BYTE);
2499- int base_offset2 = arrayOopDesc::base_offset_in_bytes (T_CHAR);
2500-
2501- assert ((base_offset1 % (UseCompactObjectHeaders ? 4 :
2502- (UseCompressedClassPointers ? 8 : 4 ))) == 0 , " Must be" );
2503- assert ((base_offset2 % (UseCompactObjectHeaders ? 4 :
2504- (UseCompressedClassPointers ? 8 : 4 ))) == 0 , " Must be" );
2497+ int base_offset = arrayOopDesc::base_offset_in_bytes (T_BYTE);
2498+ assert ((base_offset % (UseCompactObjectHeaders ? 4 :
2499+ (UseCompressedClassPointers ? 8 : 4 ))) == 0 , " Must be" );
25052500
25062501 Register strU = isLU ? str2 : str1,
25072502 strL = isLU ? str1 : str2,
25082503 tmpU = isLU ? tmp2 : tmp1, // where to keep U for comparison
25092504 tmpL = isLU ? tmp1 : tmp2; // where to keep L for comparison
25102505
2511- if (AvoidUnalignedAccesses && (base_offset1 % 8 ) != 0 ) {
2506+ if (AvoidUnalignedAccesses && (base_offset % 8 ) != 0 ) {
25122507 // Load 4 bytes from strL to make sure main loop is 8-byte aligned
25132508 // cnt2 is >= 68 here, no need to check it for >= 0
25142509 __ lwu (tmpL, Address (strL));
25152510 __ addi (strL, strL, wordSize / 2 );
2516- __ load_long_misaligned (tmpU, Address (strU), tmp4, (base_offset2 % 8 ) != 0 ? 4 : 8 );
2511+ __ load_long_misaligned (tmpU, Address (strU), tmp4, (base_offset % 8 ) != 0 ? 4 : 8 );
25172512 __ addi (strU, strU, wordSize);
25182513 __ inflate_lo32 (tmp3, tmpL);
25192514 __ mv (tmpL, tmp3);
0 commit comments