Lines Matching +full:non +full:- +full:zero
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2013-2021, Arm Limited.
6 * https://github.com/ARM-software/optimized-routines/blob/e823e3abf5f89ecb/string/aarch64/strncmp.S
14 * ARMv8-a, AArch64
55 /* Calculate the number of full and partial words -1. */
59 /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
60 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
70 eor diff, data1, data2 /* Non-zero if differences found. */
72 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */
84 lsl limit, limit, #3 /* Bits -> bytes. */
103 /* The MS-non-zero bit of the syndrome marks either the first bit
104 that is different, or the top bit of the first zero byte.
111 /* But we need to zero-extend (char is unsigned) the value and then
112 perform a signed 32-bit subtraction. */
117 /* For big-endian we cannot use the trick with the syndrome value
118 as carry-propagation can corrupt the upper bits if the trailing
129 /* Re-compute the NUL-byte detection, using a byte-reversed value. */
137 /* The MS-non-zero bit of the syndrome marks either the first bit
138 that is different, or the top bit of the first zero byte.
143 /* But we need to zero-extend (char is unsigned) the value and then
144 perform a signed 32-bit subtraction. */
159 neg tmp3, count, lsl #3 /* 64 - bits(bytes beyond align). */
164 /* Big-endian. Early bytes are at MSB. */
167 /* Little-endian. Early bytes are at LSB. */
233 eor diff, data1, data2 /* Non-zero if differences found. */
234 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */
251 eor diff, data1, data2 /* Non-zero if differences found. */
252 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */