mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Fix issue with small, misaligned copies
This commit is contained in:
parent
a7d52bbed0
commit
c9f1401ef3
|
@ -29,6 +29,10 @@ __aeabi_memcpy:
|
||||||
bmi .Lcopy1
|
bmi .Lcopy1
|
||||||
bcs .Lcopy2
|
bcs .Lcopy2
|
||||||
|
|
||||||
|
// If the number of bytes to copy is less than 4, we should just copy one byte at a time
|
||||||
|
cmp r2, #4
|
||||||
|
bmi .Lcopy1
|
||||||
|
|
||||||
.Lcopy4:
|
.Lcopy4:
|
||||||
// Copy half and byte head
|
// Copy half and byte head
|
||||||
rsb r3, r0, #4
|
rsb r3, r0, #4
|
||||||
|
|
Loading…
Reference in a new issue