Files
SpaghettiKart/asm/os/osWritebackDCache.s
coco875 848b31c01e Update decomp (#63)
* update libultra asm (#648)

* update libultra asm

* fix gcc __osThreadTail

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* Document Vehicles (#641)

* start doc collision

* fix merge

* finish rename fonction related to vehicle

* document around waypoint of vehicle

* make some modification

* make some change and rename one

* copy_ to oldPos

* doc smoke ferry and train

* some rename

* fix some renaming

* precise index

* rename a funciton

* simplify waypoint_vehicles

* change some name

* change some name

* rename move_to_point_direction

* fix some conflict

* Update code_80005FD0.c

* Update code_80005FD0.h

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* Label a save info loop (#645)

* save info

* more gcc progress

* fix a value and do a rename (#669)

* fix error of compilation

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2024-08-24 18:39:52 -06:00

40 lines
842 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, DCACHE_SIZE
bgeu $a1, $t3, .L80324E40
nop
move $t0, $a0
addu $t1, $a0, $a1
bgeu $t0, $t1, .osWritebackDCacheReturn
nop
andi $t2, $t0, DCACHE_LINEMASK
addiu $t1, $t1, -DCACHE_LINESIZE
subu $t0, $t0, $t2
.L80324E28:
cache C_HWB|CACH_PD, ($t0)
bltu $t0, $t1, .L80324E28
addiu $t0, $t0, 0x10
.osWritebackDCacheReturn:
jr $ra
nop
.L80324E40:
li $t0, KUSIZE
addu $t1, $t0, $t3
addiu $t1, $t1, -DCACHE_LINESIZE
.L80324E4C:
cache C_IWBINV|CACH_PD, ($t0)
bltu $t0, $t1, .L80324E4C
addiu $t0, DCACHE_LINESIZE # addiu $t0, $t0, 0x10
jr $ra
nop