summaryrefslogtreecommitdiff
path: root/arm9/asm/MSL_Common_wmem.s
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/asm/MSL_Common_wmem.s')
-rw-r--r--arm9/asm/MSL_Common_wmem.s35
1 files changed, 35 insertions, 0 deletions
diff --git a/arm9/asm/MSL_Common_wmem.s b/arm9/asm/MSL_Common_wmem.s
new file mode 100644
index 00000000..7c02c344
--- /dev/null
+++ b/arm9/asm/MSL_Common_wmem.s
@@ -0,0 +1,35 @@
+ .include "asm/macros.inc"
+ .include "global.inc"
+
+ .text
+
+ arm_func_start wmemcpy
+wmemcpy: ; 0x020E5068
+ ldr ip, _020E5074 ; =memcpy
+ mov r2, r2, lsl #0x1
+ bx r12
+ .balign 4
+_020E5074: .word memcpy
+ arm_func_end wmemcpy
+
+ arm_func_start wmemchr
+wmemchr:
+ cmp r2, #0x0
+ beq _020E5098
+_020E5080:
+ ldrh r3, [r0, #0x0]
+ cmp r3, r1
+ bxeq lr
+ add r0, r0, #0x2
+ subs r2, r2, #0x1
+ bne _020E5080
+_020E5098:
+ mov r0, #0x0
+ bx lr
+ arm_func_end wmemchr
+
+ .section .exceptix,4
+
+ .word wmemcpy
+ .short 17
+ .word 0x00000000