string: fix a bug in SuperH memset

This commit is contained in:
Lephenixnoir 2022-03-26 15:19:15 +00:00
parent 4d464bde01
commit 3c29639988
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 3 deletions

View File

@ -12,12 +12,12 @@ _memset:
/* When setting less than 64 bytes, use the naive method */
mov #64, r0
cmp/ge r6, r0
bt _naive_memset
bt.s _naive_memset
mov r5, r0
mov #3, r2
/* Make a 4-byte filler */
mov r5, r0
shll8 r5
or r5, r0
mov r0, r5
@ -59,7 +59,7 @@ _naive_memset:
/* Tight loop copy one byte */
dt r6
bf/s _naive_memset
mov.b r5, @-r4
mov.b r0, @-r4
.end:
rts