Lines Matching +full:big +full:- +full:endian +full:- +full:regs

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2013-2022, Arm Limited.
6 * https://github.com/ARM-software/optimized-routines/blob/189dfefe37d54c5b/string/aarch64/strncmp.S
14 * ARMv8-a, AArch64.
48 /* Define endian dependent shift operations.
49 On big-endian early bytes are at MSB and on little-endian LSB.
70 /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
71 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
81 eor diff, data1, data2 /* Non-zero if differences found. */
83 bics has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */
102 /* But we need to zero-extend (char is unsigned) the value and then
103 perform a signed 32-bit subtraction. */
114 lsl limit, tmp1, #3 /* Bits -> bytes. */
124 /* For big-endian we cannot use the trick with the syndrome value
125 as carry-propagation can corrupt the upper bits if the trailing
136 /* Re-compute the NUL-byte detection, using a byte-reversed value. */
144 /* The most-significant-non-zero bit of the syndrome marks either the
151 /* But we need to zero-extend (char is unsigned) the value and then
152 perform a signed 32-bit subtraction. */
167 neg tmp3, count, lsl #3 /* 64 - bits(bytes beyond align). */
214 The bytes are shown in natural order. For little-endian, it is
235 mov mask, -1
249 orr data2, data2, tmp1 /* 8 bytes from SRC2 combined from two regs.*/
251 eor diff, data1, data2 /* Non-zero if differences found. */
254 bic has_nul, has_nul, tmp3 /* Non-zero if NUL byte found in SRC1. */
263 /* For big-endian we do a byte reverse to avoid carry-propagation
273 eor diff, data2, data1 /* Non-zero if differences found. */
274 bic has_nul, has_nul, tmp3 /* Non-zero if NUL terminator. */
288 eor diff, data2, data1 /* Non-zero if differences found. */