--- old/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2017-11-10 17:13:50.470786479 +0300 +++ new/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2017-11-10 17:13:50.302788495 +0300 @@ -5068,6 +5068,16 @@ // Check for short strings, i.e. smaller than wordSize. subs(cnt1, cnt1, elem_per_word); br(Assembler::LT, SHORT); + // large loop algo should be used for >= 64(large loop) + 16(post loop) bytes + cmp(cnt1, 80/elem_size); + br(Assembler::LT, NEXT_WORD); + RuntimeAddress stub = elem_size == 1 + ? RuntimeAddress(StubRoutines::aarch64::large_array_equals_byte()) + : RuntimeAddress(StubRoutines::aarch64::large_array_equals_char()); + assert(stub.target() != NULL, "array_equals_long_* stub has not been generated"); + trampoline_call(stub); + cbz(result, DONE); + mov(result, false); // reset result // Main 8 byte comparison loop. bind(NEXT_WORD); { ldr(tmp1, Address(post(a1, wordSize)));