1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
/*
* Copyright (C) 2020 Kalray Inc.
*
* Licensed under the LGPL v2.1 or later, see the file COPYING.LIB
* in this tarball.
*/
#include <sysdep.h>
.align 16
ENTRY(memcpy)
cb.deqz $r2? .Lreturn
compd.geu $r3 = $r2, 256
copyd $r6 = $r0
;;
cb.deqz $r3? .Lremaining_256
;;
lq.u $r32r33 = 0[$r1]
addd $r2 = $r2, -256
;;
lq.u $r34r35 = 16[$r1]
;;
lq.u $r36r37 = 32[$r1]
srld $r7 = $r2, 8
;;
lq.u $r38r39 = 48[$r1]
;;
lq.u $r40r41 = 64[$r1]
;;
lq.u $r42r43 = 80[$r1]
;;
lq.u $r44r45 = 96[$r1]
;;
lq.u $r46r47 = 112[$r1]
;;
lq.u $r48r49 = 128[$r1]
;;
lq.u $r50r51 = 144[$r1]
;;
lq.u $r52r53 = 160[$r1]
;;
lq.u $r54r55 = 176[$r1]
;;
lq.u $r56r57 = 192[$r1]
;;
lq.u $r58r59 = 208[$r1]
compd.geu $r3 = $r2, 256
;;
lq.u $r60r61 = 224[$r1]
;;
lq.u $r62r63 = 240[$r1]
addd $r1 = $r1, 256
;;
cb.deqz $r7? .Lstreaming_loop_end
;;
loopdo $r7? .Lstreaming_loop_end
;;
sq 0[$r0] = $r32r33
addd $r2 = $r2, -256
;;
lq.u $r32r33 = 0[$r1]
;;
sq 16[$r0] = $r34r35
;;
lq.u $r34r35 = 16[$r1]
;;
sq 32[$r0] = $r36r37
;;
lq.u $r36r37 = 32[$r1]
;;
sq 48[$r0] = $r38r39
;;
lq.u $r38r39 = 48[$r1]
;;
sq 64[$r0] = $r40r41
;;
lq.u $r40r41 = 64[$r1]
;;
sq 80[$r0] = $r42r43
;;
lq.u $r42r43 = 80[$r1]
;;
sq 96[$r0] = $r44r45
;;
lq.u $r44r45 = 96[$r1]
;;
sq 112[$r0] = $r46r47
;;
lq.u $r46r47 = 112[$r1]
;;
sq 128[$r0] = $r48r49
;;
lq.u $r48r49 = 128[$r1]
;;
sq 144[$r0] = $r50r51
;;
lq.u $r50r51 = 144[$r1]
;;
sq 160[$r0] = $r52r53
;;
lq.u $r52r53 = 160[$r1]
;;
sq 176[$r0] = $r54r55
;;
lq.u $r54r55 = 176[$r1]
;;
sq 192[$r0] = $r56r57
;;
lq.u $r56r57 = 192[$r1]
;;
sq 208[$r0] = $r58r59
;;
lq.u $r58r59 = 208[$r1]
;;
sq 224[$r0] = $r60r61
;;
lq.u $r60r61 = 224[$r1]
;;
sq 240[$r0] = $r62r63
addd $r0 = $r0, 256
;;
lq.u $r62r63 = 240[$r1]
addd $r1 = $r1, 256
;;
.Lstreaming_loop_end:
sq 0[$r0] = $r32r33
;;
sq 16[$r0] = $r34r35
;;
sq 32[$r0] = $r36r37
;;
sq 48[$r0] = $r38r39
;;
sq 64[$r0] = $r40r41
;;
sq 80[$r0] = $r42r43
;;
sq 96[$r0] = $r44r45
;;
sq 112[$r0] = $r46r47
;;
sq 128[$r0] = $r48r49
;;
sq 144[$r0] = $r50r51
;;
sq 160[$r0] = $r52r53
;;
sq 176[$r0] = $r54r55
;;
sq 192[$r0] = $r56r57
;;
sq 208[$r0] = $r58r59
;;
sq 224[$r0] = $r60r61
;;
sq 240[$r0] = $r62r63
addd $r0 = $r0, 256
;;
.Lremaining_256:
andd $r11 = $r2, 16
srld $r7 = $r2, 5
;;
cb.deqz $r7? .Lloop_32_end
;;
loopdo $r7? .Lloop_32_end
;;
lo $r32r33r34r35 = 0[$r1]
addd $r1 = $r1, 32
addd $r2 = $r2, -32
;;
so 0[$r0] = $r32r33r34r35
addd $r0 = $r0, 32
;;
.Lloop_32_end:
andd $r10 = $r2, 8
andd $r9 = $r2, 4
cb.deqz $r11? .Lloop_remaining_16
lq.u.dnez $r11? $r32r33 = 0[$r1]
;;
sq 0[$r0] = $r32r33
addd $r1 = $r1, 16
addd $r0 = $r0, 16
;;
.Lloop_remaining_16:
andd $r8 = $r2, 2
andd $r7 = $r2, 1
cb.deqz $r10? .Lloop_remaining_8
ld.dnez $r10? $r32 = 0[$r1]
;;
sd 0[$r0] = $r32
addd $r1 = $r1, 8
addd $r0 = $r0, 8
;;
.Lloop_remaining_8:
cb.deqz $r9? .Lloop_remaining_4
lwz.dnez $r9? $r32 = 0[$r1]
;;
sw 0[$r0] = $r32
addd $r1 = $r1, 4
addd $r0 = $r0, 4
;;
.Lloop_remaining_4:
cb.deqz $r8? .Lloop_remaining_2
lhz.dnez $r8? $r32 = 0[$r1]
;;
sh 0[$r0] = $r32
addd $r1 = $r1, 2
addd $r0 = $r0, 2
;;
.Lloop_remaining_2:
lbz.dnez $r7? $r32 = 0[$r1]
;;
sb.dnez $r7? 0[$r0] = $r32
;;
.Lreturn:
copyd $r0 = $r6
ret
;;
END(memcpy)
libc_hidden_def(memcpy)
|