aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-10-24 22:32:12 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-24 22:32:12 -0400
commit7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e (patch)
treee8c03b1bf27e6822f2f5486b6211573fd17a0b94
parent95707704800988093a9b9a27e0f2f67f5b4bf2fa (diff)
sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting.
Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/lib/NGcopy_from_user.S4
-rw-r--r--arch/sparc/lib/NGcopy_to_user.S4
-rw-r--r--arch/sparc/lib/NGmemcpy.S233
3 files changed, 162 insertions, 79 deletions
diff --git a/arch/sparc/lib/NGcopy_from_user.S b/arch/sparc/lib/NGcopy_from_user.S
index e61694c444af..9cd42fcbc781 100644
--- a/arch/sparc/lib/NGcopy_from_user.S
+++ b/arch/sparc/lib/NGcopy_from_user.S
@@ -3,11 +3,11 @@
3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#define EX_LD(x) \ 6#define EX_LD(x,y) \
798: x; \ 798: x; \
8 .section __ex_table,"a";\ 8 .section __ex_table,"a";\
9 .align 4; \ 9 .align 4; \
10 .word 98b, __ret_mone_asi;\ 10 .word 98b, y; \
11 .text; \ 11 .text; \
12 .align 4; 12 .align 4;
13 13
diff --git a/arch/sparc/lib/NGcopy_to_user.S b/arch/sparc/lib/NGcopy_to_user.S
index 2d6b33d3998f..5c358afd464e 100644
--- a/arch/sparc/lib/NGcopy_to_user.S
+++ b/arch/sparc/lib/NGcopy_to_user.S
@@ -3,11 +3,11 @@
3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#define EX_ST(x) \ 6#define EX_ST(x,y) \
798: x; \ 798: x; \
8 .section __ex_table,"a";\ 8 .section __ex_table,"a";\
9 .align 4; \ 9 .align 4; \
10 .word 98b, __ret_mone_asi;\ 10 .word 98b, y; \
11 .text; \ 11 .text; \
12 .align 4; 12 .align 4;
13 13
diff --git a/arch/sparc/lib/NGmemcpy.S b/arch/sparc/lib/NGmemcpy.S
index 96a14caf6966..d88c4ed50a00 100644
--- a/arch/sparc/lib/NGmemcpy.S
+++ b/arch/sparc/lib/NGmemcpy.S
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7#include <linux/linkage.h>
7#include <asm/asi.h> 8#include <asm/asi.h>
8#include <asm/thread_info.h> 9#include <asm/thread_info.h>
9#define GLOBAL_SPARE %g7 10#define GLOBAL_SPARE %g7
@@ -27,15 +28,11 @@
27#endif 28#endif
28 29
29#ifndef EX_LD 30#ifndef EX_LD
30#define EX_LD(x) x 31#define EX_LD(x,y) x
31#endif 32#endif
32 33
33#ifndef EX_ST 34#ifndef EX_ST
34#define EX_ST(x) x 35#define EX_ST(x,y) x
35#endif
36
37#ifndef EX_RETVAL
38#define EX_RETVAL(x) x
39#endif 36#endif
40 37
41#ifndef LOAD 38#ifndef LOAD
@@ -79,6 +76,92 @@
79 .register %g3,#scratch 76 .register %g3,#scratch
80 77
81 .text 78 .text
79#ifndef EX_RETVAL
80#define EX_RETVAL(x) x
81__restore_asi:
82 ret
83 wr %g0, ASI_AIUS, %asi
84 restore
85ENTRY(NG_ret_i2_plus_i4_plus_1)
86 ba,pt %xcc, __restore_asi
87 add %i2, %i5, %i0
88ENDPROC(NG_ret_i2_plus_i4_plus_1)
89ENTRY(NG_ret_i2_plus_g1)
90 ba,pt %xcc, __restore_asi
91 add %i2, %g1, %i0
92ENDPROC(NG_ret_i2_plus_g1)
93ENTRY(NG_ret_i2_plus_g1_minus_8)
94 sub %g1, 8, %g1
95 ba,pt %xcc, __restore_asi
96 add %i2, %g1, %i0
97ENDPROC(NG_ret_i2_plus_g1_minus_8)
98ENTRY(NG_ret_i2_plus_g1_minus_16)
99 sub %g1, 16, %g1
100 ba,pt %xcc, __restore_asi
101 add %i2, %g1, %i0
102ENDPROC(NG_ret_i2_plus_g1_minus_16)
103ENTRY(NG_ret_i2_plus_g1_minus_24)
104 sub %g1, 24, %g1
105 ba,pt %xcc, __restore_asi
106 add %i2, %g1, %i0
107ENDPROC(NG_ret_i2_plus_g1_minus_24)
108ENTRY(NG_ret_i2_plus_g1_minus_32)
109 sub %g1, 32, %g1
110 ba,pt %xcc, __restore_asi
111 add %i2, %g1, %i0
112ENDPROC(NG_ret_i2_plus_g1_minus_32)
113ENTRY(NG_ret_i2_plus_g1_minus_40)
114 sub %g1, 40, %g1
115 ba,pt %xcc, __restore_asi
116 add %i2, %g1, %i0
117ENDPROC(NG_ret_i2_plus_g1_minus_40)
118ENTRY(NG_ret_i2_plus_g1_minus_48)
119 sub %g1, 48, %g1
120 ba,pt %xcc, __restore_asi
121 add %i2, %g1, %i0
122ENDPROC(NG_ret_i2_plus_g1_minus_48)
123ENTRY(NG_ret_i2_plus_g1_minus_56)
124 sub %g1, 56, %g1
125 ba,pt %xcc, __restore_asi
126 add %i2, %g1, %i0
127ENDPROC(NG_ret_i2_plus_g1_minus_56)
128ENTRY(NG_ret_i2_plus_i4)
129 ba,pt %xcc, __restore_asi
130 add %i2, %i4, %i0
131ENDPROC(NG_ret_i2_plus_i4)
132ENTRY(NG_ret_i2_plus_i4_minus_8)
133 sub %i4, 8, %i4
134 ba,pt %xcc, __restore_asi
135 add %i2, %i4, %i0
136ENDPROC(NG_ret_i2_plus_i4_minus_8)
137ENTRY(NG_ret_i2_plus_8)
138 ba,pt %xcc, __restore_asi
139 add %i2, 8, %i0
140ENDPROC(NG_ret_i2_plus_8)
141ENTRY(NG_ret_i2_plus_4)
142 ba,pt %xcc, __restore_asi
143 add %i2, 4, %i0
144ENDPROC(NG_ret_i2_plus_4)
145ENTRY(NG_ret_i2_plus_1)
146 ba,pt %xcc, __restore_asi
147 add %i2, 1, %i0
148ENDPROC(NG_ret_i2_plus_1)
149ENTRY(NG_ret_i2_plus_g1_plus_1)
150 add %g1, 1, %g1
151 ba,pt %xcc, __restore_asi
152 add %i2, %g1, %i0
153ENDPROC(NG_ret_i2_plus_g1_plus_1)
154ENTRY(NG_ret_i2)
155 ba,pt %xcc, __restore_asi
156 mov %i2, %i0
157ENDPROC(NG_ret_i2)
158ENTRY(NG_ret_i2_and_7_plus_i4)
159 and %i2, 7, %i2
160 ba,pt %xcc, __restore_asi
161 add %i2, %i4, %i0
162ENDPROC(NG_ret_i2_and_7_plus_i4)
163#endif
164
82 .align 64 165 .align 64
83 166
84 .globl FUNC_NAME 167 .globl FUNC_NAME
@@ -126,8 +209,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
126 sub %g0, %i4, %i4 ! bytes to align dst 209 sub %g0, %i4, %i4 ! bytes to align dst
127 sub %i2, %i4, %i2 210 sub %i2, %i4, %i2
1281: subcc %i4, 1, %i4 2111: subcc %i4, 1, %i4
129 EX_LD(LOAD(ldub, %i1, %g1)) 212 EX_LD(LOAD(ldub, %i1, %g1), NG_ret_i2_plus_i4_plus_1)
130 EX_ST(STORE(stb, %g1, %o0)) 213 EX_ST(STORE(stb, %g1, %o0), NG_ret_i2_plus_i4_plus_1)
131 add %i1, 1, %i1 214 add %i1, 1, %i1
132 bne,pt %XCC, 1b 215 bne,pt %XCC, 1b
133 add %o0, 1, %o0 216 add %o0, 1, %o0
@@ -160,7 +243,7 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
160 and %i4, 0x7, GLOBAL_SPARE 243 and %i4, 0x7, GLOBAL_SPARE
161 sll GLOBAL_SPARE, 3, GLOBAL_SPARE 244 sll GLOBAL_SPARE, 3, GLOBAL_SPARE
162 mov 64, %i5 245 mov 64, %i5
163 EX_LD(LOAD_TWIN(%i1, %g2, %g3)) 246 EX_LD(LOAD_TWIN(%i1, %g2, %g3), NG_ret_i2_plus_g1)
164 sub %i5, GLOBAL_SPARE, %i5 247 sub %i5, GLOBAL_SPARE, %i5
165 mov 16, %o4 248 mov 16, %o4
166 mov 32, %o5 249 mov 32, %o5
@@ -178,31 +261,31 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
178 srlx WORD3, PRE_SHIFT, TMP; \ 261 srlx WORD3, PRE_SHIFT, TMP; \
179 or WORD2, TMP, WORD2; 262 or WORD2, TMP, WORD2;
180 263
1818: EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3)) 2648: EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3), NG_ret_i2_plus_g1)
182 MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1) 265 MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1)
183 LOAD(prefetch, %i1 + %i3, #one_read) 266 LOAD(prefetch, %i1 + %i3, #one_read)
184 267
185 EX_ST(STORE_INIT(%g2, %o0 + 0x00)) 268 EX_ST(STORE_INIT(%g2, %o0 + 0x00), NG_ret_i2_plus_g1)
186 EX_ST(STORE_INIT(%g3, %o0 + 0x08)) 269 EX_ST(STORE_INIT(%g3, %o0 + 0x08), NG_ret_i2_plus_g1_minus_8)
187 270
188 EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3)) 271 EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3), NG_ret_i2_plus_g1_minus_16)
189 MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1) 272 MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1)
190 273
191 EX_ST(STORE_INIT(%o2, %o0 + 0x10)) 274 EX_ST(STORE_INIT(%o2, %o0 + 0x10), NG_ret_i2_plus_g1_minus_16)
192 EX_ST(STORE_INIT(%o3, %o0 + 0x18)) 275 EX_ST(STORE_INIT(%o3, %o0 + 0x18), NG_ret_i2_plus_g1_minus_24)
193 276
194 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3)) 277 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3), NG_ret_i2_plus_g1_minus_32)
195 MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1) 278 MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1)
196 279
197 EX_ST(STORE_INIT(%g2, %o0 + 0x20)) 280 EX_ST(STORE_INIT(%g2, %o0 + 0x20), NG_ret_i2_plus_g1_minus_32)
198 EX_ST(STORE_INIT(%g3, %o0 + 0x28)) 281 EX_ST(STORE_INIT(%g3, %o0 + 0x28), NG_ret_i2_plus_g1_minus_40)
199 282
200 EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3)) 283 EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3), NG_ret_i2_plus_g1_minus_48)
201 add %i1, 64, %i1 284 add %i1, 64, %i1
202 MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1) 285 MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1)
203 286
204 EX_ST(STORE_INIT(%o2, %o0 + 0x30)) 287 EX_ST(STORE_INIT(%o2, %o0 + 0x30), NG_ret_i2_plus_g1_minus_48)
205 EX_ST(STORE_INIT(%o3, %o0 + 0x38)) 288 EX_ST(STORE_INIT(%o3, %o0 + 0x38), NG_ret_i2_plus_g1_minus_56)
206 289
207 subcc %g1, 64, %g1 290 subcc %g1, 64, %g1
208 bne,pt %XCC, 8b 291 bne,pt %XCC, 8b
@@ -211,31 +294,31 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
211 ba,pt %XCC, 60f 294 ba,pt %XCC, 60f
212 add %i1, %i4, %i1 295 add %i1, %i4, %i1
213 296
2149: EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3)) 2979: EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3), NG_ret_i2_plus_g1)
215 MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1) 298 MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1)
216 LOAD(prefetch, %i1 + %i3, #one_read) 299 LOAD(prefetch, %i1 + %i3, #one_read)
217 300
218 EX_ST(STORE_INIT(%g3, %o0 + 0x00)) 301 EX_ST(STORE_INIT(%g3, %o0 + 0x00), NG_ret_i2_plus_g1)
219 EX_ST(STORE_INIT(%o2, %o0 + 0x08)) 302 EX_ST(STORE_INIT(%o2, %o0 + 0x08), NG_ret_i2_plus_g1_minus_8)
220 303
221 EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3)) 304 EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3), NG_ret_i2_plus_g1_minus_16)
222 MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1) 305 MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1)
223 306
224 EX_ST(STORE_INIT(%o3, %o0 + 0x10)) 307 EX_ST(STORE_INIT(%o3, %o0 + 0x10), NG_ret_i2_plus_g1_minus_16)
225 EX_ST(STORE_INIT(%g2, %o0 + 0x18)) 308 EX_ST(STORE_INIT(%g2, %o0 + 0x18), NG_ret_i2_plus_g1_minus_24)
226 309
227 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3)) 310 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3), NG_ret_i2_plus_g1_minus_32)
228 MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1) 311 MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1)
229 312
230 EX_ST(STORE_INIT(%g3, %o0 + 0x20)) 313 EX_ST(STORE_INIT(%g3, %o0 + 0x20), NG_ret_i2_plus_g1_minus_32)
231 EX_ST(STORE_INIT(%o2, %o0 + 0x28)) 314 EX_ST(STORE_INIT(%o2, %o0 + 0x28), NG_ret_i2_plus_g1_minus_40)
232 315
233 EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3)) 316 EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3), NG_ret_i2_plus_g1_minus_48)
234 add %i1, 64, %i1 317 add %i1, 64, %i1
235 MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1) 318 MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1)
236 319
237 EX_ST(STORE_INIT(%o3, %o0 + 0x30)) 320 EX_ST(STORE_INIT(%o3, %o0 + 0x30), NG_ret_i2_plus_g1_minus_48)
238 EX_ST(STORE_INIT(%g2, %o0 + 0x38)) 321 EX_ST(STORE_INIT(%g2, %o0 + 0x38), NG_ret_i2_plus_g1_minus_56)
239 322
240 subcc %g1, 64, %g1 323 subcc %g1, 64, %g1
241 bne,pt %XCC, 9b 324 bne,pt %XCC, 9b
@@ -249,25 +332,25 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
249 * one twin load ahead, then add 8 back into source when 332 * one twin load ahead, then add 8 back into source when
250 * we finish the loop. 333 * we finish the loop.
251 */ 334 */
252 EX_LD(LOAD_TWIN(%i1, %o4, %o5)) 335 EX_LD(LOAD_TWIN(%i1, %o4, %o5), NG_ret_i2_plus_g1)
253 mov 16, %o7 336 mov 16, %o7
254 mov 32, %g2 337 mov 32, %g2
255 mov 48, %g3 338 mov 48, %g3
256 mov 64, %o1 339 mov 64, %o1
2571: EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3)) 3401: EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3), NG_ret_i2_plus_g1)
258 LOAD(prefetch, %i1 + %o1, #one_read) 341 LOAD(prefetch, %i1 + %o1, #one_read)
259 EX_ST(STORE_INIT(%o5, %o0 + 0x00)) ! initializes cache line 342 EX_ST(STORE_INIT(%o5, %o0 + 0x00), NG_ret_i2_plus_g1) ! initializes cache line
260 EX_ST(STORE_INIT(%o2, %o0 + 0x08)) 343 EX_ST(STORE_INIT(%o2, %o0 + 0x08), NG_ret_i2_plus_g1_minus_8)
261 EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5)) 344 EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5), NG_ret_i2_plus_g1_minus_16)
262 EX_ST(STORE_INIT(%o3, %o0 + 0x10)) 345 EX_ST(STORE_INIT(%o3, %o0 + 0x10), NG_ret_i2_plus_g1_minus_16)
263 EX_ST(STORE_INIT(%o4, %o0 + 0x18)) 346 EX_ST(STORE_INIT(%o4, %o0 + 0x18), NG_ret_i2_plus_g1_minus_24)
264 EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3)) 347 EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3), NG_ret_i2_plus_g1_minus_32)
265 EX_ST(STORE_INIT(%o5, %o0 + 0x20)) 348 EX_ST(STORE_INIT(%o5, %o0 + 0x20), NG_ret_i2_plus_g1_minus_32)
266 EX_ST(STORE_INIT(%o2, %o0 + 0x28)) 349 EX_ST(STORE_INIT(%o2, %o0 + 0x28), NG_ret_i2_plus_g1_minus_40)
267 EX_LD(LOAD_TWIN(%i1 + %o1, %o4, %o5)) 350 EX_LD(LOAD_TWIN(%i1 + %o1, %o4, %o5), NG_ret_i2_plus_g1_minus_48)
268 add %i1, 64, %i1 351 add %i1, 64, %i1
269 EX_ST(STORE_INIT(%o3, %o0 + 0x30)) 352 EX_ST(STORE_INIT(%o3, %o0 + 0x30), NG_ret_i2_plus_g1_minus_48)
270 EX_ST(STORE_INIT(%o4, %o0 + 0x38)) 353 EX_ST(STORE_INIT(%o4, %o0 + 0x38), NG_ret_i2_plus_g1_minus_56)
271 subcc %g1, 64, %g1 354 subcc %g1, 64, %g1
272 bne,pt %XCC, 1b 355 bne,pt %XCC, 1b
273 add %o0, 64, %o0 356 add %o0, 64, %o0
@@ -282,20 +365,20 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
282 mov 32, %g2 365 mov 32, %g2
283 mov 48, %g3 366 mov 48, %g3
284 mov 64, %o1 367 mov 64, %o1
2851: EX_LD(LOAD_TWIN(%i1 + %g0, %o4, %o5)) 3681: EX_LD(LOAD_TWIN(%i1 + %g0, %o4, %o5), NG_ret_i2_plus_g1)
286 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3)) 369 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3), NG_ret_i2_plus_g1)
287 LOAD(prefetch, %i1 + %o1, #one_read) 370 LOAD(prefetch, %i1 + %o1, #one_read)
288 EX_ST(STORE_INIT(%o4, %o0 + 0x00)) ! initializes cache line 371 EX_ST(STORE_INIT(%o4, %o0 + 0x00), NG_ret_i2_plus_g1) ! initializes cache line
289 EX_ST(STORE_INIT(%o5, %o0 + 0x08)) 372 EX_ST(STORE_INIT(%o5, %o0 + 0x08), NG_ret_i2_plus_g1_minus_8)
290 EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5)) 373 EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5), NG_ret_i2_plus_g1_minus_16)
291 EX_ST(STORE_INIT(%o2, %o0 + 0x10)) 374 EX_ST(STORE_INIT(%o2, %o0 + 0x10), NG_ret_i2_plus_g1_minus_16)
292 EX_ST(STORE_INIT(%o3, %o0 + 0x18)) 375 EX_ST(STORE_INIT(%o3, %o0 + 0x18), NG_ret_i2_plus_g1_minus_24)
293 EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3)) 376 EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3), NG_ret_i2_plus_g1_minus_32)
294 add %i1, 64, %i1 377 add %i1, 64, %i1
295 EX_ST(STORE_INIT(%o4, %o0 + 0x20)) 378 EX_ST(STORE_INIT(%o4, %o0 + 0x20), NG_ret_i2_plus_g1_minus_32)
296 EX_ST(STORE_INIT(%o5, %o0 + 0x28)) 379 EX_ST(STORE_INIT(%o5, %o0 + 0x28), NG_ret_i2_plus_g1_minus_40)
297 EX_ST(STORE_INIT(%o2, %o0 + 0x30)) 380 EX_ST(STORE_INIT(%o2, %o0 + 0x30), NG_ret_i2_plus_g1_minus_48)
298 EX_ST(STORE_INIT(%o3, %o0 + 0x38)) 381 EX_ST(STORE_INIT(%o3, %o0 + 0x38), NG_ret_i2_plus_g1_minus_56)
299 subcc %g1, 64, %g1 382 subcc %g1, 64, %g1
300 bne,pt %XCC, 1b 383 bne,pt %XCC, 1b
301 add %o0, 64, %o0 384 add %o0, 64, %o0
@@ -321,28 +404,28 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
321 andn %i2, 0xf, %i4 404 andn %i2, 0xf, %i4
322 and %i2, 0xf, %i2 405 and %i2, 0xf, %i2
3231: subcc %i4, 0x10, %i4 4061: subcc %i4, 0x10, %i4
324 EX_LD(LOAD(ldx, %i1, %o4)) 407 EX_LD(LOAD(ldx, %i1, %o4), NG_ret_i2_plus_i4)
325 add %i1, 0x08, %i1 408 add %i1, 0x08, %i1
326 EX_LD(LOAD(ldx, %i1, %g1)) 409 EX_LD(LOAD(ldx, %i1, %g1), NG_ret_i2_plus_i4)
327 sub %i1, 0x08, %i1 410 sub %i1, 0x08, %i1
328 EX_ST(STORE(stx, %o4, %i1 + %i3)) 411 EX_ST(STORE(stx, %o4, %i1 + %i3), NG_ret_i2_plus_i4)
329 add %i1, 0x8, %i1 412 add %i1, 0x8, %i1
330 EX_ST(STORE(stx, %g1, %i1 + %i3)) 413 EX_ST(STORE(stx, %g1, %i1 + %i3), NG_ret_i2_plus_i4_minus_8)
331 bgu,pt %XCC, 1b 414 bgu,pt %XCC, 1b
332 add %i1, 0x8, %i1 415 add %i1, 0x8, %i1
33373: andcc %i2, 0x8, %g0 41673: andcc %i2, 0x8, %g0
334 be,pt %XCC, 1f 417 be,pt %XCC, 1f
335 nop 418 nop
336 sub %i2, 0x8, %i2 419 sub %i2, 0x8, %i2
337 EX_LD(LOAD(ldx, %i1, %o4)) 420 EX_LD(LOAD(ldx, %i1, %o4), NG_ret_i2_plus_8)
338 EX_ST(STORE(stx, %o4, %i1 + %i3)) 421 EX_ST(STORE(stx, %o4, %i1 + %i3), NG_ret_i2_plus_8)
339 add %i1, 0x8, %i1 422 add %i1, 0x8, %i1
3401: andcc %i2, 0x4, %g0 4231: andcc %i2, 0x4, %g0
341 be,pt %XCC, 1f 424 be,pt %XCC, 1f
342 nop 425 nop
343 sub %i2, 0x4, %i2 426 sub %i2, 0x4, %i2
344 EX_LD(LOAD(lduw, %i1, %i5)) 427 EX_LD(LOAD(lduw, %i1, %i5), NG_ret_i2_plus_4)
345 EX_ST(STORE(stw, %i5, %i1 + %i3)) 428 EX_ST(STORE(stw, %i5, %i1 + %i3), NG_ret_i2_plus_4)
346 add %i1, 0x4, %i1 429 add %i1, 0x4, %i1
3471: cmp %i2, 0 4301: cmp %i2, 0
348 be,pt %XCC, 85f 431 be,pt %XCC, 85f
@@ -358,8 +441,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
358 sub %i2, %g1, %i2 441 sub %i2, %g1, %i2
359 442
3601: subcc %g1, 1, %g1 4431: subcc %g1, 1, %g1
361 EX_LD(LOAD(ldub, %i1, %i5)) 444 EX_LD(LOAD(ldub, %i1, %i5), NG_ret_i2_plus_g1_plus_1)
362 EX_ST(STORE(stb, %i5, %i1 + %i3)) 445 EX_ST(STORE(stb, %i5, %i1 + %i3), NG_ret_i2_plus_g1_plus_1)
363 bgu,pt %icc, 1b 446 bgu,pt %icc, 1b
364 add %i1, 1, %i1 447 add %i1, 1, %i1
365 448
@@ -375,16 +458,16 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
375 458
3768: mov 64, %i3 4598: mov 64, %i3
377 andn %i1, 0x7, %i1 460 andn %i1, 0x7, %i1
378 EX_LD(LOAD(ldx, %i1, %g2)) 461 EX_LD(LOAD(ldx, %i1, %g2), NG_ret_i2)
379 sub %i3, %g1, %i3 462 sub %i3, %g1, %i3
380 andn %i2, 0x7, %i4 463 andn %i2, 0x7, %i4
381 sllx %g2, %g1, %g2 464 sllx %g2, %g1, %g2
3821: add %i1, 0x8, %i1 4651: add %i1, 0x8, %i1
383 EX_LD(LOAD(ldx, %i1, %g3)) 466 EX_LD(LOAD(ldx, %i1, %g3), NG_ret_i2_and_7_plus_i4)
384 subcc %i4, 0x8, %i4 467 subcc %i4, 0x8, %i4
385 srlx %g3, %i3, %i5 468 srlx %g3, %i3, %i5
386 or %i5, %g2, %i5 469 or %i5, %g2, %i5
387 EX_ST(STORE(stx, %i5, %o0)) 470 EX_ST(STORE(stx, %i5, %o0), NG_ret_i2_and_7_plus_i4)
388 add %o0, 0x8, %o0 471 add %o0, 0x8, %o0
389 bgu,pt %icc, 1b 472 bgu,pt %icc, 1b
390 sllx %g3, %g1, %g2 473 sllx %g3, %g1, %g2
@@ -404,8 +487,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
404 487
4051: 4881:
406 subcc %i2, 4, %i2 489 subcc %i2, 4, %i2
407 EX_LD(LOAD(lduw, %i1, %g1)) 490 EX_LD(LOAD(lduw, %i1, %g1), NG_ret_i2_plus_4)
408 EX_ST(STORE(stw, %g1, %i1 + %i3)) 491 EX_ST(STORE(stw, %g1, %i1 + %i3), NG_ret_i2_plus_4)
409 bgu,pt %XCC, 1b 492 bgu,pt %XCC, 1b
410 add %i1, 4, %i1 493 add %i1, 4, %i1
411 494
@@ -415,8 +498,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
415 .align 32 498 .align 32
41690: 49990:
417 subcc %i2, 1, %i2 500 subcc %i2, 1, %i2
418 EX_LD(LOAD(ldub, %i1, %g1)) 501 EX_LD(LOAD(ldub, %i1, %g1), NG_ret_i2_plus_1)
419 EX_ST(STORE(stb, %g1, %i1 + %i3)) 502 EX_ST(STORE(stb, %g1, %i1 + %i3), NG_ret_i2_plus_1)
420 bgu,pt %XCC, 90b 503 bgu,pt %XCC, 90b
421 add %i1, 1, %i1 504 add %i1, 1, %i1
422 ret 505 ret