Decompiled alHeapInit

This commit is contained in:
David Benepe
2021-07-10 15:02:21 -05:00
parent b131cabb31
commit bdcb741db3
3 changed files with 18 additions and 28 deletions
@@ -1,21 +0,0 @@
glabel alHeapInit
/* 0C8160 800C7560 24030010 */ li $v1, 16
/* 0C8164 800C7564 30AE000F */ andi $t6, $a1, 0xf
/* 0C8168 800C7568 006E1023 */ subu $v0, $v1, $t6
/* 0C816C 800C756C 10620003 */ beq $v1, $v0, .L800C757C
/* 0C8170 800C7570 00A27821 */ addu $t7, $a1, $v0
/* 0C8174 800C7574 10000002 */ b .L800C7580
/* 0C8178 800C7578 AC8F0000 */ sw $t7, ($a0)
.L800C757C:
/* 0C817C 800C757C AC850000 */ sw $a1, ($a0)
.L800C7580:
/* 0C8180 800C7580 8C980000 */ lw $t8, ($a0)
/* 0C8184 800C7584 AC860008 */ sw $a2, 8($a0)
/* 0C8188 800C7588 AC80000C */ sw $zero, 0xc($a0)
/* 0C818C 800C758C 03E00008 */ jr $ra
/* 0C8190 800C7590 AC980004 */ sw $t8, 4($a0)
/* 0C8194 800C7594 00000000 */ nop
/* 0C8198 800C7598 00000000 */ nop
/* 0C819C 800C759C 00000000 */ nop
+18
View File
@@ -0,0 +1,18 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800C7560 */
#include "audio_internal.h"
void alHeapInit(ALHeap *hp, u8 *base, s32 len)
{
s32 extraAlign = (AL_CACHE_ALIGN+1) - ((s32) base & AL_CACHE_ALIGN);
if (extraAlign != AL_CACHE_ALIGN+1)
hp->base = base + extraAlign;
else
hp->base = base;
hp->len = len;
hp->cur = hp->base;
hp->count = 0;
}
-7
View File
@@ -1,7 +0,0 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800C7560 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("asm/non_matchings/unknown_0C8160/alHeapInit.s")