diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
commit | a6c1ed4716cf02626ea035beb6dd4a921642ba80 (patch) | |
tree | ef582c1b52819e27bdd16097ec03b69799d04ede /newlib/libc/machine/sh/memset.S | |
parent | f6c9a624fa8a6878a7fb2b02f55e4990a20feb59 (diff) |
Use libc from agbcc instead of standalone newlib\nYou must have AGBCC commit 80d029caec189587f8b9294b6c8a5a489b8f5f88 in order to compile pmd_red.gbalibc
Diffstat (limited to 'newlib/libc/machine/sh/memset.S')
-rw-r--r-- | newlib/libc/machine/sh/memset.S | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/newlib/libc/machine/sh/memset.S b/newlib/libc/machine/sh/memset.S deleted file mode 100644 index 7352b41..0000000 --- a/newlib/libc/machine/sh/memset.S +++ /dev/null @@ -1,64 +0,0 @@ -! -! Fast SH memset -! -! by Toshiyasu Morita (tm@netcom.com) -! -! Entry: r4: destination pointer -! r5: fill value -! r6: byte count -! -! Exit: r0-r3: trashed -! - -! This assumes that the first four bytes of the address space (0..3) are -! reserved - usually by the linker script. Otherwise, we would had to check -! for the case of objects of the size 12..15 at address 0..3 . - -#include "asm.h" - -ENTRY(memset) - mov #12,r0 ! Check for small number of bytes - cmp/gt r6,r0 - mov r4,r0 - SL(bt, L_store_byte_loop_check0, add r4,r6) - - tst #3,r0 ! Align destination - SL(bt, L_dup_bytes, extu.b r5,r5) - .balignw 4,0x0009 -L_align_loop: - mov.b r5,@r0 - add #1,r0 - tst #3,r0 - bf L_align_loop - -L_dup_bytes: - swap.b r5,r2 ! Duplicate bytes across longword - or r2,r5 - swap.w r5,r2 - or r2,r5 - - add #-16,r6 - - .balignw 4,0x0009 -L_store_long_loop: - mov.l r5,@r0 ! Store double longs to memory - cmp/hs r6,r0 - mov.l r5,@(4,r0) - SL(bf, L_store_long_loop, add #8,r0) - - add #16,r6 - -L_store_byte_loop_check0: - cmp/eq r6,r0 - bt L_exit - .balignw 4,0x0009 -L_store_byte_loop: - mov.b r5,@r0 ! Store bytes to memory - add #1,r0 - cmp/eq r6,r0 - bf L_store_byte_loop - -L_exit: - rts - mov r4,r0 - |