mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-04-03 17:17:10 +02:00
libc: faster memset
This commit is contained in:
parent
492f61f7b2
commit
a4d23ef7ad
1 changed files with 18 additions and 2 deletions
|
@ -31,12 +31,28 @@ _memset_align:
|
|||
bf/s _memset_align
|
||||
dt r6
|
||||
|
||||
mov #40, r2
|
||||
|
||||
.aligned4_32:
|
||||
add #-32, r4
|
||||
add #-32, r6
|
||||
mov.l r0, @(28,r4)
|
||||
mov.l r0, @(24,r4)
|
||||
mov.l r0, @(20,r4)
|
||||
mov.l r0, @(16,r4)
|
||||
mov.l r0, @(12,r4)
|
||||
mov.l r0, @(8,r4)
|
||||
mov.l r0, @(4,r4)
|
||||
cmp/ge r6, r2
|
||||
bf/s .aligned4_32
|
||||
mov.l r0, @r4
|
||||
|
||||
mov #8, r2
|
||||
|
||||
.aligned4:
|
||||
.aligned4_4:
|
||||
mov.l r0, @-r4
|
||||
cmp/ge r6, r2
|
||||
bf/s .aligned4
|
||||
bf/s .aligned4_4
|
||||
add #-4, r6
|
||||
|
||||
_naive_memset:
|
||||
|
|
Loading…
Add table
Reference in a new issue