224 addl $1,%eax
225 subl $1,%ecx
226 jnz 6b
227 7: popl %edi
228 popl %esi
229 ret
230 acb_CopyLeft:
231 std
232 leal -4(%edi,%ecx),%edi # to + count - 4
233 movl %eax,%esi # from + count - 1
234 movl %ecx,%eax
235 subl $3,%esi # from + count - 4
236 cmpl $3,%ecx
237 jbe 5f
238 1: shrl $2,%ecx
239 jz 4f
240 cmpl $32,%ecx
241 jbe 2f # <= 32 dwords
242 rep; smovl
243 jmp 4f
244 .=.+8
245 2: subl %esi,%edi
246 .p2align 4,,15
247 3: movl (%esi),%edx
248 movl %edx,(%edi,%esi,1)
249 subl $4,%esi
250 subl $1,%ecx
251 jnz 3b
252 addl %esi,%edi
253 4: movl %eax,%ecx
254 5: andl $3,%ecx
255 jz 7f
256 subl %esi,%edi
257 addl $3,%esi
258 6: movb (%esi),%dl
259 movb %dl,(%edi,%esi,1)
260 subl $1,%esi
261 subl $1,%ecx
262 jnz 6b
263 7: cld
264 popl %edi
361 pushl %esi
362 movl 4+12(%esp),%ecx # count
363 pushl %edi
364 movl 8+ 4(%esp),%esi # from
365 movl 8+ 8(%esp),%edi # to
366 cmpl %esi,%edi
367 leal -2(%esi,%ecx,2),%eax # from + count*2 - 2
368 jbe acs_CopyRight
369 cmpl %eax,%edi
370 jbe acs_CopyLeft
371 acs_CopyRight:
372 movl %ecx,%eax # word count
373 sarl %ecx # dword count
374 jz 4f # no dwords to move
375 cmpl $32,%ecx
376 jbe 2f # <= 32 dwords
377 # copy aligned dwords
378 rep; smovl
379 jmp 4f
380 # copy aligned dwords
381 .=.+5
382 2: subl %esi,%edi
383 .p2align 4,,15
384 3: movl (%esi),%edx
385 movl %edx,(%edi,%esi,1)
386 addl $4,%esi
387 subl $1,%ecx
388 jnz 3b
389 addl %esi,%edi
390 4: andl $1,%eax # suffix count
391 jz 5f # no suffix
392 # copy suffix
393 movw (%esi),%dx
394 movw %dx,(%edi)
395 5: popl %edi
396 popl %esi
397 ret
398 acs_CopyLeft:
399 std
400 leal -4(%edi,%ecx,2),%edi # to + count*2 - 4
401 movl %eax,%esi # from + count*2 - 2
437 .type _Copy_arrayof_conjoint_jints,@function
438 _Copy_conjoint_jints_atomic:
439 _Copy_arrayof_conjoint_jints:
440 pushl %esi
441 movl 4+12(%esp),%ecx # count
442 pushl %edi
443 movl 8+ 4(%esp),%esi # from
444 movl 8+ 8(%esp),%edi # to
445 cmpl %esi,%edi
446 leal -4(%esi,%ecx,4),%eax # from + count*4 - 4
447 jbe ci_CopyRight
448 cmpl %eax,%edi
449 jbe ci_CopyLeft
450 ci_CopyRight:
451 cmpl $32,%ecx
452 jbe 2f # <= 32 dwords
453 rep; smovl
454 popl %edi
455 popl %esi
456 ret
457 .=.+10
458 2: subl %esi,%edi
459 jmp 4f
460 .p2align 4,,15
461 3: movl (%esi),%edx
462 movl %edx,(%edi,%esi,1)
463 addl $4,%esi
464 4: subl $1,%ecx
465 jge 3b
466 popl %edi
467 popl %esi
468 ret
469 ci_CopyLeft:
470 std
471 leal -4(%edi,%ecx,4),%edi # to + count*4 - 4
472 cmpl $32,%ecx
473 ja 4f # > 32 dwords
474 subl %eax,%edi # eax == from + count*4 - 4
475 jmp 3f
476 .p2align 4,,15
477 2: movl (%eax),%edx
|
224 addl $1,%eax
225 subl $1,%ecx
226 jnz 6b
227 7: popl %edi
228 popl %esi
229 ret
230 acb_CopyLeft:
231 std
232 leal -4(%edi,%ecx),%edi # to + count - 4
233 movl %eax,%esi # from + count - 1
234 movl %ecx,%eax
235 subl $3,%esi # from + count - 4
236 cmpl $3,%ecx
237 jbe 5f
238 1: shrl $2,%ecx
239 jz 4f
240 cmpl $32,%ecx
241 jbe 2f # <= 32 dwords
242 rep; smovl
243 jmp 4f
244 .space 8
245 2: subl %esi,%edi
246 .p2align 4,,15
247 3: movl (%esi),%edx
248 movl %edx,(%edi,%esi,1)
249 subl $4,%esi
250 subl $1,%ecx
251 jnz 3b
252 addl %esi,%edi
253 4: movl %eax,%ecx
254 5: andl $3,%ecx
255 jz 7f
256 subl %esi,%edi
257 addl $3,%esi
258 6: movb (%esi),%dl
259 movb %dl,(%edi,%esi,1)
260 subl $1,%esi
261 subl $1,%ecx
262 jnz 6b
263 7: cld
264 popl %edi
361 pushl %esi
362 movl 4+12(%esp),%ecx # count
363 pushl %edi
364 movl 8+ 4(%esp),%esi # from
365 movl 8+ 8(%esp),%edi # to
366 cmpl %esi,%edi
367 leal -2(%esi,%ecx,2),%eax # from + count*2 - 2
368 jbe acs_CopyRight
369 cmpl %eax,%edi
370 jbe acs_CopyLeft
371 acs_CopyRight:
372 movl %ecx,%eax # word count
373 sarl %ecx # dword count
374 jz 4f # no dwords to move
375 cmpl $32,%ecx
376 jbe 2f # <= 32 dwords
377 # copy aligned dwords
378 rep; smovl
379 jmp 4f
380 # copy aligned dwords
381 .space 5
382 2: subl %esi,%edi
383 .p2align 4,,15
384 3: movl (%esi),%edx
385 movl %edx,(%edi,%esi,1)
386 addl $4,%esi
387 subl $1,%ecx
388 jnz 3b
389 addl %esi,%edi
390 4: andl $1,%eax # suffix count
391 jz 5f # no suffix
392 # copy suffix
393 movw (%esi),%dx
394 movw %dx,(%edi)
395 5: popl %edi
396 popl %esi
397 ret
398 acs_CopyLeft:
399 std
400 leal -4(%edi,%ecx,2),%edi # to + count*2 - 4
401 movl %eax,%esi # from + count*2 - 2
437 .type _Copy_arrayof_conjoint_jints,@function
438 _Copy_conjoint_jints_atomic:
439 _Copy_arrayof_conjoint_jints:
440 pushl %esi
441 movl 4+12(%esp),%ecx # count
442 pushl %edi
443 movl 8+ 4(%esp),%esi # from
444 movl 8+ 8(%esp),%edi # to
445 cmpl %esi,%edi
446 leal -4(%esi,%ecx,4),%eax # from + count*4 - 4
447 jbe ci_CopyRight
448 cmpl %eax,%edi
449 jbe ci_CopyLeft
450 ci_CopyRight:
451 cmpl $32,%ecx
452 jbe 2f # <= 32 dwords
453 rep; smovl
454 popl %edi
455 popl %esi
456 ret
457 .space 10
458 2: subl %esi,%edi
459 jmp 4f
460 .p2align 4,,15
461 3: movl (%esi),%edx
462 movl %edx,(%edi,%esi,1)
463 addl $4,%esi
464 4: subl $1,%ecx
465 jge 3b
466 popl %edi
467 popl %esi
468 ret
469 ci_CopyLeft:
470 std
471 leal -4(%edi,%ecx,4),%edi # to + count*4 - 4
472 cmpl $32,%ecx
473 ja 4f # > 32 dwords
474 subl %eax,%edi # eax == from + count*4 - 4
475 jmp 3f
476 .p2align 4,,15
477 2: movl (%eax),%edx
|