Files
goldeneye_src/ge007_libultra/lib/asm/osWritebackDCache.s
T
kholdfuzion 3ebe19d728 update to current progress
Former-commit-id: bed7f1bddb7af09c0f288c1150c6b1c5c106e3be [formerly 02402a0b62d22bfba17d6dfef2f443c1500b450a] [formerly 93bff37d83bad8297647c88c0b42afe81ed277e7 [formerly 08274c78a878dba3fa13551e009ca7aba6528beb]]
Former-commit-id: f66285070e26f0193e87c728c4a0d3913e9a6868 [formerly 85e3eb7005d566d372945751835e29205ff816b4]
Former-commit-id: deff595044d44ac83b2a5c920a64abb2d97054f5
2019-08-03 17:56:46 +00:00

41 lines
711 B
ArmAsm

.set noreorder # don't insert nops after branches
.set gp=64
.include "macros.inc"
.section .text, "ax"
glabel osWritebackDCache
blez $a1, .osWritebackDCacheReturn
nop
li $t3, 8192
bgeu $a1, $t3, .L80324E40
nop
move $t0, $a0
addu $t1, $a0, $a1
bgeu $t0, $t1, .osWritebackDCacheReturn
nop
andi $t2, $t0, 0xf
addiu $t1, $t1, -0x10
subu $t0, $t0, $t2
.L80324E28:
cache 0x19, ($t0)
bltu $t0, $t1, .L80324E28
addiu $t0, $t0, 0x10
.osWritebackDCacheReturn:
jr $ra
nop
.L80324E40:
lui $t0, 0x8000
addu $t1, $t0, $t3
addiu $t1, $t1, -0x10
.L80324E4C:
cache 1, ($t0)
bltu $t0, $t1, .L80324E4C
addiu $t0, 0x10 # addiu $t0, $t0, 0x10
jr $ra
nop