1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 #include <linux/linkage.h>
9 /* Test if len less than 4 bytes. */
16 /* Test if dest is not 4 bytes aligned. */
17 bnez r13, .L_dest_not_aligned
19 /* Hardware can handle unaligned access directly. */
21 /* If dest is aligned, then copy. */
24 /* Test if len less than 16 bytes. */
25 bez r18, .L_len_less_16bytes
29 .L_len_larger_16bytes:
30 #if defined(__CK860__)
54 BNEZAD (r18, .L_len_larger_16bytes)
58 bez r18, .L_copy_by_byte
59 .L_len_less_16bytes_loop:
65 BNEZAD (r18, .L_len_less_16bytes_loop)
67 /* Test if len less than 4 bytes. */
77 BNEZAD (r18, .L_copy_by_byte_loop)
84 * If dest is not aligned, just copying some bytes makes the
91 /* Makes the dest align. */
92 .L_dest_not_aligned_loop:
98 BNEZAD (r13, .L_dest_not_aligned_loop)
102 /* Check whether the src is aligned. */