1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-28 15:56:51 +00:00
oot/asm/osWritebackDCacheAll.s

24 lines
425 B
ArmAsm
Raw Normal View History

#include "ultra64/asm.h"
#include "ultra64/r4300.h"
2020-03-17 04:31:30 +00:00
.set noat
.set noreorder
2020-03-17 04:31:30 +00:00
.section .text
.balign 16
2020-03-17 04:31:30 +00:00
LEAF(osWritebackDCacheAll)
li $t0, K0BASE
li $t2, DCACHE_SIZE
addu $t1, $t0, $t2
addiu $t1, $t1, -DCACHE_LINESIZE
1:
cache (CACH_PD | C_IWBINV), ($t0)
sltu $at, $t0, $t1
bnez $at, 1b
addiu $t0, DCACHE_LINESIZE
jr $ra
nop
END(osWritebackDCacheAll)