RFR(S): 8215792: AArch64: String.indexOf generates incorrect result
Pengfei Li (Arm Technology China)
Pengfei.Li at arm.com
Fri Jan 4 11:04:40 UTC 2019
Hi Dmitrij,
Thanks a lot for your reply.
> since cnt2 is used as counter, wouldn't it be easier and shorter just to substract cnt1 from cnt2 at the beginning of this code. Total (cnt2 - cnt1 +1) combinations must be checked. That is why first sustraction is by (wordSize/str2_chr_size - 1).
> Then whole fix will be probably just 1 line at the beginning: sub(cnt2, cnt2, cnt1);
I don't think the whole fix could be as easy as "sub(cnt2, cnt2, cnt1)" because cnt2 is the counter which counts number of bytes not processed. It could be different from the number of bytes after current first-character-match index.
But this is just my thought. Perhaps I didn't understand your idea and code thoroughly. So could you post your shorter fix and let's test if it's right?
--
Thanks,
Pengfei
More information about the hotspot-compiler-dev
mailing list