comparison src/cpu/x86/vm/assembler_x86.cpp @ 1302:2484f4d6a54e

6935535: String.indexOf() returns incorrect result on x86 with SSE4.2 Summary: Added missing counter decrement when substring search restarted. Reviewed-by: twisti
author kvn
date Wed, 17 Mar 2010 10:47:03 -0700
parents 85f13cdfbc1d
children 0a43776437b6
comparison
equal deleted inserted replaced
1301:fc2c71045ada 1302:2484f4d6a54e
8458 // matched but the rest of it was not so we need to search 8458 // matched but the rest of it was not so we need to search
8459 // again. Start from the next element after the previous match. 8459 // again. Start from the next element after the previous match.
8460 subptr(str1, result); // Restore counter 8460 subptr(str1, result); // Restore counter
8461 shrl(str1, 1); 8461 shrl(str1, 1);
8462 addl(cnt1, str1); 8462 addl(cnt1, str1);
8463 decrementl(cnt1);
8463 lea(str1, Address(result, 2)); // Reload string 8464 lea(str1, Address(result, 2)); // Reload string
8464 8465
8465 // Load substr 8466 // Load substr
8466 bind(PREP_FOR_SCAN); 8467 bind(PREP_FOR_SCAN);
8467 movdqu(vec, Address(str2, 0)); 8468 movdqu(vec, Address(str2, 0));