Commit f2477bfd authored by David S. Miller's avatar David S. Miller

[SPARC64]: Minor memmove refinements.

- If dst/src are equal, memcpy can be used.
- Eliminate register writes which were unused
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33199381
......@@ -8,18 +8,16 @@
.align 32
.globl memmove
.type memmove,#function
memmove:
memmove: /* o0=dst o1=src o2=len */
mov %o0, %g1
cmp %o0, %o1
blu,pt %xcc, memcpy
sub %o0, %o1, %g5
add %o1, %o2, %g3
cmp %g3, %o0
bleu,pt %xcc, memcpy
add %o1, %o2, %g5
add %o0, %o2, %o5
cmp %g5, %o0
bleu,pt %xcc, memcpy
add %o0, %o2, %o5
sub %g5, 1, %o1
sub %o5, 1, %o0
1: ldub [%o1], %g5
subcc %o2, 1, %o2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment