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

2  * strncmp - compare two strings
4 * Copyright (c) 2013-2022, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
10 * ARMv8-a, AArch64.
45 On big-endian early bytes are at MSB and on little-endian LSB.
66 /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
67 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
77 eor diff, data1, data2 /* Non-zero if differences found. */
79 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */
98 /* But we need to zero-extend (char is unsigned) the value and then
99 perform a signed 32-bit subtraction. */
110 lsl limit, tmp1, #3 /* Bits -> bytes. */
120 /* For big-endian we cannot use the trick with the syndrome value
121 as carry-propagation can corrupt the upper bits if the trailing
132 /* Re-compute the NUL-byte detection, using a byte-reversed value. */
140 /* The most-significant-non-zero bit of the syndrome marks either the
141 first bit that is different, or the top bit of the first zero byte.
147 /* But we need to zero-extend (char is unsigned) the value and then
148 perform a signed 32-bit subtraction. */
163 neg tmp3, count, lsl #3 /* 64 - bits(bytes beyond align). */
210 The bytes are shown in natural order. For little-endian, it is
231 mov mask, -1
247 eor diff, data1, data2 /* Non-zero if differences found. */
250 bic has_nul, has_nul, tmp3 /* Non-zero if NUL byte found in SRC1. */
259 /* For big-endian we do a byte reverse to avoid carry-propagation
269 eor diff, data2, data1 /* Non-zero if differences found. */
270 bic has_nul, has_nul, tmp3 /* Non-zero if NUL terminator. */
284 eor diff, data2, data1 /* Non-zero if differences found. */