diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
| commit | f3e040230772f978540a71aea43dfde200992922 (patch) | |
| tree | bd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/libc/memset.s | |
| download | psn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz | |
First commit
Diffstat (limited to 'libpsn00b/libc/memset.s')
| -rw-r--r-- | libpsn00b/libc/memset.s | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libpsn00b/libc/memset.s b/libpsn00b/libc/memset.s new file mode 100644 index 0000000..f7d86b1 --- /dev/null +++ b/libpsn00b/libc/memset.s @@ -0,0 +1,25 @@ +# High speed ASM memset implementation by Lameguy64 +# +# Part of PSn00bSDK + +.set noreorder + +.section .text + +# Arguments: +# a0 - address to buffer +# a1 - value to set +# a2 - bytes to set +.global memset +.type memset,@function +memset: + move $v0, $a0 + blez $a2, .exit + addi $a2, -1 + sb $a1, 0($a0) + b memset + addiu $a0, 1 +.exit: + jr $ra + nop +
\ No newline at end of file |
