2 * arch/alpha/lib/strcat.S
3 * Contributed by Richard Henderson (rth@tamu.edu)
5 * Append a null-terminated string from SRC to DST.
7 #include <asm/export.h>
18 mov $16, $0 # set up return value
20 /* Find the end of the string. */
22 ldq_u $1, 0($16) # load first quadword (a0 may be misaligned)
27 cmpbge $31, $1, $2 # bits set iff byte == 0
35 $found: negq $2, $3 # clear all but least set bit
38 and $2, 0xf0, $3 # binary search for that set bit
48 /* Now do the append. */
54 EXPORT_SYMBOL(strcat);