Fix mtl_rmemcpy32 incorrectly calculating the number of bytes and words
This commit is contained in:
parent
c9091951f8
commit
236b5661ad
@ -117,7 +117,7 @@ add r1, r2
|
|||||||
sub r0, #1
|
sub r0, #1
|
||||||
sub r1, #1
|
sub r1, #1
|
||||||
// r12 = num residual bytes
|
// r12 = num residual bytes
|
||||||
and r12, r2, #3
|
and r12, r2, #2
|
||||||
.Lrbyte_copy:
|
.Lrbyte_copy:
|
||||||
subs r12, #1
|
subs r12, #1
|
||||||
ldrcsb r3, [r1], #-1
|
ldrcsb r3, [r1], #-1
|
||||||
@ -125,6 +125,7 @@ and r12, r2, #3
|
|||||||
bhi .Lrbyte_copy
|
bhi .Lrbyte_copy
|
||||||
// r12 = num residual words
|
// r12 = num residual words
|
||||||
lsr r12, r2, #2
|
lsr r12, r2, #2
|
||||||
|
and r12, #3
|
||||||
// Move to the beginning of the current word
|
// Move to the beginning of the current word
|
||||||
sub r0, #3
|
sub r0, #3
|
||||||
sub r1, #3
|
sub r1, #3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user