60: // We're here because the fast path found a hit - now we have to track down exactly which word it was\r
// r0 points to the start of the double word after the one that was tested\r
// r5 has the 00/ff pattern for the first word, r6 has the chained value\r
+ subs r0, r0, #3\r
cmp r5, #0\r
- itte eq\r
- moveq r5, r6 // the end is in the 2nd word\r
- subeq r0, r0, #3 // Points to 2nd byte of 2nd word\r
- subne r0, r0, #7 // or 2nd byte of 1st word\r
+ it eq\r
+ moveq.n r5, r6 // the end is in the 2nd word\r
+ it ne\r
+ subne.n r0, r0, #4 // or 2nd byte of 1st word\r
\r
// r0 currently points to the 3rd byte of the word containing the hit\r
tst r5, #CHARTSTMASK(0) // 1st character\r
bne 61f\r
adds r0, r0, #1\r
tst r5, #CHARTSTMASK(1) // 2nd character\r
- ittt eq\r
- addeq r0, r0 ,#1\r
- tsteq r5, #(3 << 15) // 2nd & 3rd character\r
+ bne 61f\r
+ adds r0, r0 ,#1\r
+ tst r5, #(3 << 15) // 2nd & 3rd character\r
// If not the 3rd must be the last one\r
- addeq r0, r0, #1\r
+ it eq\r
+ addeq.n r0, r0, #1\r
\r
61:\r
pop {r4-r7}\r