1 /* SPDX-License-Identifier: GPL-2.0 */
3 * arch/alpha/lib/strcat.S
4 * Contributed by Richard Henderson (rth@tamu.edu)
6 * Append a null-terminated string from SRC to DST.
8 #include <linux/export.h>
19 mov $16, $0 # set up return value
21 /* Find the end of the string. */
23 ldq_u $1, 0($16) # load first quadword (a0 may be misaligned)
28 cmpbge $31, $1, $2 # bits set iff byte == 0
36 $found: negq $2, $3 # clear all but least set bit
39 and $2, 0xf0, $3 # binary search for that set bit
49 /* Now do the append. */
55 EXPORT_SYMBOL(strcat);