/* SPDX-License-Identifier: GPL-2.0 */1/*2* arch/alpha/lib/strcat.S3* Contributed by Richard Henderson ([email protected])4*5* Append a null-terminated string from SRC to DST.6*/7#include <linux/export.h>89.text1011.align 312.globl strcat13.ent strcat14strcat:15.frame $30, 0, $2616.prologue 01718mov $16, $0 # set up return value1920/* Find the end of the string. */2122ldq_u $1, 0($16) # load first quadword (a0 may be misaligned)23lda $2, -124insqh $2, $16, $225andnot $16, 7, $1626or $2, $1, $127cmpbge $31, $1, $2 # bits set iff byte == 028bne $2, $found2930$loop: ldq $1, 8($16)31addq $16, 8, $1632cmpbge $31, $1, $233beq $2, $loop3435$found: negq $2, $3 # clear all but least set bit36and $2, $3, $23738and $2, 0xf0, $3 # binary search for that set bit39and $2, 0xcc, $440and $2, 0xaa, $541cmovne $3, 4, $342cmovne $4, 2, $443cmovne $5, 1, $544addq $3, $4, $345addq $16, $5, $1646addq $16, $3, $164748/* Now do the append. */4950mov $26, $2351br __stxcpy5253.end strcat54EXPORT_SYMBOL(strcat);555657