2021-07-12 23:17:54 -04:00
|
|
|
.set noreorder // don't insert nops after branches
|
2019-08-25 00:46:40 -04:00
|
|
|
|
2021-07-12 23:17:54 -04:00
|
|
|
#include "macros.inc"
|
2019-08-25 00:46:40 -04:00
|
|
|
|
|
|
|
|
|
|
|
.section .text, "ax"
|
|
|
|
|
|
|
|
glabel osUnmapTLBAll
|
|
|
|
mfc0 $t0, $10
|
2023-08-17 08:56:02 -04:00
|
|
|
#ifdef VERSION_CN
|
|
|
|
li $t1, 30
|
|
|
|
#else
|
2019-08-25 00:46:40 -04:00
|
|
|
li $t1, 31
|
2023-08-17 08:56:02 -04:00
|
|
|
#endif
|
2019-08-25 00:46:40 -04:00
|
|
|
lui $t2, 0x8000
|
|
|
|
mtc0 $t2, $10
|
|
|
|
mtc0 $zero, $2
|
|
|
|
mtc0 $zero, $3
|
|
|
|
.L80321588:
|
|
|
|
mtc0 $t1, $0
|
|
|
|
nop
|
|
|
|
tlbwi
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
addi $t1, $t1, -1
|
2023-08-17 08:56:02 -04:00
|
|
|
#ifdef VERSION_CN
|
|
|
|
bgez $t1, .L80321588
|
|
|
|
#else
|
2019-08-25 00:46:40 -04:00
|
|
|
bnezl $t1, .L80321588 #bnezl, bnez but with likely hint
|
2023-08-17 08:56:02 -04:00
|
|
|
#endif
|
2019-08-25 00:46:40 -04:00
|
|
|
nop
|
|
|
|
mtc0 $t0, $10
|
|
|
|
jr $ra
|
|
|
|
nop
|