2 * arch/alpha/lib/memmove.S
4 * Barely optimized memmove routine for Alpha EV5.
6 * This is hand-massaged output from the original memcpy.c. We defer to
7 * memcpy whenever possible; the backwards copy loops are not unrolled.
25 cmpule $4,$17,$1 /* dest + n <= src */
26 cmpule $5,$16,$2 /* dest >= src + n */
33 and $2,7,$2 /* Test for src/dest co-alignment. */
36 bne $3,$memmove_up /* dest < src */
41 beq $1,$skip_aligned_byte_loop_head_dn
43 $aligned_byte_loop_head_dn:
60 bne $6,$aligned_byte_loop_head_dn
62 $skip_aligned_byte_loop_head_dn:
64 blt $18,$skip_aligned_word_loop_dn
66 $aligned_word_loop_dn:
75 bge $18,$aligned_word_loop_dn
77 $skip_aligned_word_loop_dn:
79 bgt $18,$byte_loop_tail_dn
103 bgt $18,$byte_loop_tail_dn
109 bne $2,$misaligned_up
110 beq $1,$skip_aligned_byte_loop_head_up
112 $aligned_byte_loop_head_up:
129 bne $6,$aligned_byte_loop_head_up
131 $skip_aligned_byte_loop_head_up:
133 blt $18,$skip_aligned_word_loop_up
135 $aligned_word_loop_up:
144 bge $18,$aligned_word_loop_up
146 $skip_aligned_word_loop_up:
148 bgt $18,$byte_loop_tail_up
173 bgt $18,$byte_loop_tail_up