• Home
  • Raw
  • Download

Lines Matching +full:non +full:- +full:zero

6  * and re-licensed under GPLv2 for the Linux kernel. The original code can
9 * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/
32 * x0 - const string 1 pointer
33 * x1 - const string 2 pointer
34 * x2 - the maximal length to be compared
36 * x0 - an integer less than, equal to, or greater than zero if s1 is found,
75 /* Calculate the number of full and partial words -1. */
84 * NUL detection works on the principle that (X - 1) & (~X) & 0x80
85 * (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
95 eor diff, data1, data2 /* Non-zero if differences found. */
97 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */
108 lsl limit, limit, #3 /* Bits -> bytes. */
133 neg tmp3, tmp1, lsl #3 /* 64 - bits(bytes beyond align). */
137 /* Big-endian. Early bytes are at MSB. */
139 /* Little-endian. Early bytes are at LSB. */
203 eor diff, data1, data2 /* Non-zero if differences found. */
206 ccmp endloop, #0, #0, eq /*has_null is ZERO: no null byte*/
226 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */
227 eor diff, data1, data2 /* Non-zero if differences found. */
237 eor diff, data1, data2 /* Non-zero if differences found. */
240 ccmp endloop, #0, #0, eq /*has_null is ZERO: no null byte*/
248 * reversed the byte-order as big-endian,then CLZ can find the most
249 * significant zero bits.
255 * For big-endian we cannot use the trick with the syndrome value
256 * as carry-propagation can corrupt the upper bits if the trailing
268 /* Re-compute the NUL-byte detection, using a byte-reversed value.*/
276 * The MS-non-zero bit of the syndrome marks either the first bit
277 * that is different, or the top bit of the first zero byte.
285 * But we need to zero-extend (char is unsigned) the value and then
286 * perform a signed 32-bit subtraction.