Skip to content

Commit

Permalink
match s_m_f
Browse files Browse the repository at this point in the history
  • Loading branch information
sozud committed Feb 25, 2024
1 parent 9b9b22a commit 29fd13f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/spu/s_m_f.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "libspu_i.h"

void SpuFree(unsigned long arg0) {
s32 temp_v1;
s32 cur_block_num;
SPU_MALLOC* cur_mem;
s32 temp;
s32 mask4;
s32 block_num;
u8 pad[2];
cur_block_num = 0;
if (temp_v1 = _spu_AllocBlockNum > 0) {
mask4 = 0x40000000;
temp = arg0 | 0x80000000;
block_num = _spu_AllocBlockNum;
cur_mem = _spu_memList;
while (true) {
temp_v1 = cur_mem->addr;
if (temp_v1 & mask4) {
break;
}
if (temp_v1 == arg0) {
cur_mem->addr = temp;
break;
}
cur_mem++;
cur_block_num++;
if (cur_block_num >= block_num) {
break;
}
}
}
_spu_gcSPU();
}

0 comments on commit 29fd13f

Please sign in to comment.