/*1* arch/alpha/lib/strcat.S2* Contributed by Richard Henderson ([email protected])3*4* Append a null-terminated string from SRC to DST.5*/67.text89.align 310.globl strcat11.ent strcat12strcat:13.frame $30, 0, $2614.prologue 01516mov $16, $0 # set up return value1718/* Find the end of the string. */1920ldq_u $1, 0($16) # load first quadword (a0 may be misaligned)21lda $2, -122insqh $2, $16, $223andnot $16, 7, $1624or $2, $1, $125cmpbge $31, $1, $2 # bits set iff byte == 026bne $2, $found2728$loop: ldq $1, 8($16)29addq $16, 8, $1630cmpbge $31, $1, $231beq $2, $loop3233$found: negq $2, $3 # clear all but least set bit34and $2, $3, $23536and $2, 0xf0, $3 # binary search for that set bit37and $2, 0xcc, $438and $2, 0xaa, $539cmovne $3, 4, $340cmovne $4, 2, $441cmovne $5, 1, $542addq $3, $4, $343addq $16, $5, $1644addq $16, $3, $164546/* Now do the append. */4748mov $26, $2349br __stxcpy5051.end strcat525354