Skip to content

Commit

Permalink
memcpy: removed redundant instructions using cbz
Browse files Browse the repository at this point in the history
  • Loading branch information
NaohiroTamura committed Apr 20, 2021
1 parent d57bed7 commit 94363b4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sysdeps/aarch64/multiarch/memcpy_a64fx.S
Expand Up @@ -325,8 +325,7 @@ L(L2):
sub tmp1, vector_length, 1
and tmp2, dest_ptr, tmp1
// if vl_remainder == 0
cmp tmp2, 0
b.eq 1f
cbz tmp2, 1f
sub vl_remainder, vector_length, tmp2
// process remainder until the first vector_length boundary
whilelt p2.b, xzr, vl_remainder
Expand All @@ -339,8 +338,7 @@ L(L2):
1: mov tmp1, CACHE_LINE_SIZE
and tmp2, dest_ptr, CACHE_LINE_SIZE - 1
// if cl_remainder == 0
cmp tmp2, 0
b.eq L(L2_dc_zva)
cbz tmp2, L(L2_dc_zva)
sub cl_remainder, tmp1, tmp2
// process remainder until the first CACHE_LINE_SIZE boundary
mov tmp1, xzr // index
Expand Down Expand Up @@ -459,8 +457,7 @@ L(unroll1):

.p2align 3
L(last):
cmp rest, 0
b.eq 1f
cbz rest, 1f
whilelt p2.b, xzr, rest
ld1b z0.b, p2/z, [src_ptr]
st1b z0.b, p2, [dest_ptr]
Expand Down

0 comments on commit 94363b4

Please sign in to comment.