Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/lib/asm/osInvalICache.s
7858 views
1
.set noat // allow manual use of $at
2
.set noreorder // don't insert nops after branches
3
.set gp=64
4
5
#include "macros.inc"
6
7
8
.section .text, "ax"
9
10
glabel osInvalICache
11
blez $a1, .L80323728
12
nop
13
li $t3, 16384
14
sltu $at, $a1, $t3
15
beqz $at, .L80323730
16
nop
17
move $t0, $a0
18
addu $t1, $a0, $a1
19
sltu $at, $t0, $t1
20
beqz $at, .L80323728
21
nop
22
andi $t2, $t0, 0x1f
23
addiu $t1, $t1, -0x20
24
subu $t0, $t0, $t2
25
.L80323718:
26
cache 0x10, ($t0)
27
sltu $at, $t0, $t1
28
bnez $at, .L80323718
29
addiu $t0, $t0, 0x20
30
.L80323728:
31
jr $ra
32
nop
33
34
.L80323730:
35
li $t0, K0BASE
36
addu $t1, $t0, $t3
37
addiu $t1, $t1, -0x20
38
.L8032373C:
39
cache 0, ($t0)
40
sltu $at, $t0, $t1
41
bnez $at, .L8032373C
42
addiu $t0, $t0, 0x20
43
jr $ra
44
nop
45
46