summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/arm64/memmove.s
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-05-09 12:40:03 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-05-09 12:40:03 +0200
commita375c9ac38e72dc5b0a6710c8da89245d154b435 (patch)
tree0622887467d6e85cad4ae1b4a4d0c290d91bfe5f /sys/src/ape/lib/ap/arm64/memmove.s
parent57e07865953412c7cf8ae579d7a748c1540d629e (diff)
libc: fix return value for arm64 memset() and memove()
Diffstat (limited to 'sys/src/ape/lib/ap/arm64/memmove.s')
-rw-r--r--sys/src/ape/lib/ap/arm64/memmove.s9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/src/ape/lib/ap/arm64/memmove.s b/sys/src/ape/lib/ap/arm64/memmove.s
index 0def257e9..b19b736da 100644
--- a/sys/src/ape/lib/ap/arm64/memmove.s
+++ b/sys/src/ape/lib/ap/arm64/memmove.s
@@ -8,6 +8,7 @@ TEXT memmove(SB), $-4
BLT _backward
_forward:
+ MOV R0, R7
ADD R0, R2, R3
BIC $15, R2, R4
CBZ R4, _floop1
@@ -15,15 +16,15 @@ _forward:
_floop16:
MOVP (R1)16!, R5, R6
- MOVP R5, R6, (R0)16!
- CMP R4, R0
+ MOVP R5, R6, (R7)16!
+ CMP R4, R7
BNE _floop16
_floop1:
- CMP R3, R0
+ CMP R3, R7
BEQ _done
MOVBU (R1)1!, R5
- MOVBU R5, (R0)1!
+ MOVBU R5, (R7)1!
B _floop1
_done: