diff options
author | Akira Akashi <rubenru09@aol.com> | 2021-05-23 22:30:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-23 22:30:03 +0100 |
commit | a978faa0d8c222c5fce4db4f0dad19ed235eecfc (patch) | |
tree | b49471083bf3db7a922a9392ca5168202c740b4a /arm9/asm/NNS_FND_allocator.s | |
parent | efd77268ed8b1845922ac72f3b104d01ffd971c4 (diff) | |
parent | a6f7fce337711f4b9f2619177b4b6a3380c3cb4f (diff) |
Merge pull request #385 from PikalaxALT/pikalax_work
[LEAK-INFORMED] Split nitro system libraries
Diffstat (limited to 'arm9/asm/NNS_FND_allocator.s')
-rw-r--r-- | arm9/asm/NNS_FND_allocator.s | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/arm9/asm/NNS_FND_allocator.s b/arm9/asm/NNS_FND_allocator.s new file mode 100644 index 00000000..537ce6a0 --- /dev/null +++ b/arm9/asm/NNS_FND_allocator.s @@ -0,0 +1,65 @@ + .include "asm/macros.inc" + .include "global.inc" + .rodata + ; static const in function + + .global sAllocatorFunc$7864 +sAllocatorFunc$7864: ; 0x020FF7CC + .word AllocatorAllocForExpHeap + .word AllocatorFreeForExpHeap + .text + + arm_func_start NNS_FndInitAllocatorForExpHeap +NNS_FndInitAllocatorForExpHeap: ; 0x020AE82C + ldr ip, _020AE848 ; =sAllocatorFunc$7864 + mov r3, #0x0 + str r12, [r0, #0x0] + str r1, [r0, #0x4] + str r2, [r0, #0x8] + str r3, [r0, #0xc] + bx lr + .balign 4 +_020AE848: .word sAllocatorFunc$7864 + arm_func_end NNS_FndInitAllocatorForExpHeap + + arm_func_start NNS_FndFreeToAllocator +NNS_FndFreeToAllocator: ; 0x020AE84C + stmdb sp!, {lr} + sub sp, sp, #0x4 + ldr r2, [r0, #0x0] + ldr r2, [r2, #0x4] + blx r2 + add sp, sp, #0x4 + ldmia sp!, {pc} + arm_func_end NNS_FndFreeToAllocator + + arm_func_start NNS_FndAllocFromAllocator +NNS_FndAllocFromAllocator: ; 0x020AE868 + stmdb sp!, {lr} + sub sp, sp, #0x4 + ldr r2, [r0, #0x0] + ldr r2, [r2, #0x0] + blx r2 + add sp, sp, #0x4 + ldmia sp!, {pc} + arm_func_end NNS_FndAllocFromAllocator + + arm_func_start AllocatorFreeForExpHeap +AllocatorFreeForExpHeap: ; 0x020AE884 + ldr ip, _020AE890 ; =NNS_FndFreeToExpHeap + ldr r0, [r0, #0x4] + bx r12 + .balign 4 +_020AE890: .word NNS_FndFreeToExpHeap + arm_func_end AllocatorFreeForExpHeap + + arm_func_start AllocatorAllocForExpHeap +AllocatorAllocForExpHeap: ; 0x020AE894 + ldr ip, _020AE8A8 ; =NNS_FndAllocFromExpHeapEx + mov r2, r0 + ldr r0, [r2, #0x4] + ldr r2, [r2, #0x8] + bx r12 + .balign 4 +_020AE8A8: .word NNS_FndAllocFromExpHeapEx + arm_func_end AllocatorAllocForExpHeap |