< prev index next >

src/cpu/aarch64/vm/macroAssembler_aarch64.cpp

Print this page
rev 9428 : 8143219: AArch64 broken by 8141132: JEP 254: Compact Strings
Reviewed-by: kvn

*** 4031,4047 **** Register cnt2tmp = tmp2; Register cnt1_neg = cnt1; Register cnt2_neg = cnt2; Register result_tmp = tmp4; - // Note, inline_string_indexOf() generates checks: - // if (substr.count > string.count) return -1; - // if (substr.count == 0) return 0; - // We have two strings, a source string in str2, cnt2 and a pattern string // in str1, cnt1. Find the 1st occurence of pattern in source or return -1. // For larger pattern and source we use a simplified Boyer Moore algorithm. // With a small pattern and source we use linear scan. if (icnt1 == -1) { cmp(cnt1, 256); // Use Linear Scan if cnt1 < 8 || cnt1 >= 256 --- 4031,4050 ---- Register cnt2tmp = tmp2; Register cnt1_neg = cnt1; Register cnt2_neg = cnt2; Register result_tmp = tmp4; // We have two strings, a source string in str2, cnt2 and a pattern string // in str1, cnt1. Find the 1st occurence of pattern in source or return -1. + // if (substr.count > string.count) return -1; + cmp(cnt1, cnt2); + br(Assembler::GT, NOMATCH); + + // Note, inline_string_indexOf() generates checks: + // if (substr.count == 0) return 0; + // For larger pattern and source we use a simplified Boyer Moore algorithm. // With a small pattern and source we use linear scan. if (icnt1 == -1) { cmp(cnt1, 256); // Use Linear Scan if cnt1 < 8 || cnt1 >= 256
< prev index next >