Lines Matching +full:no +full:- +full:1 +full:- +full:8 +full:- +full:v

1 /* SPDX-License-Identifier: GPL-2.0 */
14 * Copyright (C) 1999, 2001 Hewlett-Packard Co
30 // The goal is to look at the string in chunks of 8 bytes.
32 // string may not be 8-byte aligned. In this case we load the 8byte
55 // - the cmp r0,r0 is used as a fast way to initialize a predicate
56 // register to 1. This is required to make sure that we get the parallel
59 // - we don't use the epilogue counter to exit the loop but we need to set
62 // - after the loop we must test for Nat values because neither the
68 // - Clearly performance tuning is required.
86 alloc saved_pfs=ar.pfs,11,0,0,8 // rotating must be multiple of 8
88 .rotr v[2], w[2] // declares our 4 aliases
92 dep src=0,in0,0,3 // src=8byte-aligned in0 address
99 ld8 v[1]=[src],8 // must not speculate: can fail here
100 shl tmp=tmp,3 // multiply by 8bits/byte
101 mov mask=-1 // our mask
103 ld8.s w[1]=[src],8 // speculatively load next
107 shr.u mask=mask,tmp // zero enough bits to hold v[1] valuable part
110 add base=-16,src // keep track of aligned base
111 or v[1]=v[1],mask // now we have a safe initial byte pattern
113 1:
114 ld8.s v[0]=[src],8 // speculatively load next
115 czx1.r val1=v[1] // search 0 byte from right
116 czx1.r val2=w[1] // search 0 byte from right following 8bytes
118 ld8.s w[0]=[src],8 // speculatively load next to next
119 cmp.eq.and p6,p0=8,val1 // p6 = p6 and val1==8
120 cmp.eq.and p6,p0=8,val2 // p6 = p6 and mask==8
121 (p6) br.wtop.dptk 1b // loop until p6 == 0
125 // val1_is_nat || (val1==8 && val2_is_nat)
128 // - there must be a better way of doing the test
130 cmp.eq p8,p9=8,val1 // p6 = val1 had zero (disambiguate)
137 cmp.eq.and p7,p0=8,val1// val1==8?
142 (p8) adds src=-16,src // correct position when 3 ahead
143 (p9) adds src=-24,src // correct position when 4 ahead
146 sub tmp=8,val1 // which byte in word
150 mov ar.pfs=saved_pfs // because of ar.ec, restore no matter what
167 // - today we restart from the beginning of the string instead
171 ld8 val=[base],8 // will fail if unrecoverable fault
180 (p6) ld8 val=[base],8 // will fail if unrecoverable fault
184 cmp.eq p6,p0=8,val1 // val1==8 ?
188 sub tmp=8,val1
191 sub ret0=ret0,tmp // length=now - back -1
192 mov ar.pfs=saved_pfs // because of ar.ec, restore no matter what