1 ;; SPDX-License-Identifier: GPL-2.0-or-later
2 ;; Copyright 2010 Free Software Foundation, Inc.
3 ;; Contributed by Bernd Schmidt <bernds@codesourcery.com>.
6 #include <linux/linkage.h>
10 ENTRY(__c6xabi_strasgi)
11 ;; This is essentially memcpy, with alignment known to be at least
12 ;; 4, and the size a multiple of 4 greater than or equal to 28.
24 || cmpltu .l2 B2, B7, B0
28 || [B0] ldw .d2t1 *B4++, A0
32 [B0] sub .d2 B6, 24, B7
33 || [B0] b .s2 _strasgi_loop
34 || cmpltu .l2 B1, B6, B0
36 [B0] ldw .d2t1 *B4++, A1
37 || stw .d1t2 B5, *A4++
39 || cmpltu .l2 12, B6, B0
41 [B0] ldw .d2t1 *B4++, A5
42 || stw .d1t2 B5, *A4++
44 || cmpltu .l2 8, B6, B0
46 [B0] ldw .d2t1 *B4++, A7
47 || stw .d1t2 B5, *A4++
49 || cmpltu .l2 4, B6, B0
51 [B0] ldw .d2t1 *B4++, A8
52 || stw .d1t2 B5, *A4++
54 || cmpltu .l2 0, B6, B0
56 [B0] ldw .d2t1 *B4++, A9
57 || stw .d1t2 B5, *A4++
59 || cmpltu .l2 B2, B7, B0
61 ;; loop back branch happens here
66 [B0] stw .d1t1 A1, *A4++
67 || cmpltu .l2 12, B6, B0
68 [B0] stw .d1t1 A5, *A4++
69 || cmpltu .l2 8, B6, B0
70 [B0] stw .d1t1 A7, *A4++
71 || cmpltu .l2 4, B6, B0
72 [B0] stw .d1t1 A8, *A4++
73 || cmpltu .l2 0, B6, B0
74 [B0] stw .d1t1 A9, *A4++
76 ;; return happens here
77 ENDPROC(__c6xabi_strasgi)