Files
goldeneye-pc-port/ge007_libultra/lib/asm/osMapTLB.s
T
kholdfuzion 3516197a71 oops forgot that
Former-commit-id: 51b7d68a6dc95736271f84b0fc77ebf6d47e52cd [formerly 2c85d1c72fdc9bb1fbf167e646bdeb09ef3ab61e] [formerly a13e518d540596eb3f572666e7dc1f0e9fc23735 [formerly 5a1125980db68c93b676d756a1735174827465c8]]
Former-commit-id: 32929e424314258696aadd1fa822cc97697c1f87 [formerly 40f3f2bb14e103445d97e3a8956926eda59e5f73]
Former-commit-id: 6124ae5e2340b83c14e40668868ecacb9f4d1fa3
2019-08-03 18:01:45 +00:00

64 lines
1.2 KiB
ArmAsm

.set noreorder # don't insert nops after branches
.set gp=64
.include "macros.inc"
.section .text, "ax"
# This file is handwritten
#void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr,
# u32 oddpaddr, s32 asid);
glabel osMapTLB
mfc0 $t0, $10
mtc0 $a0, $0
mtc0 $a1, $5
lw $t1, 0x14($sp) #asid
beq $t1, -1, .L803214D8
li $t4, 1
li $t2, 30
b .L803214DC
or $a2, $a2, $t1 #vaddr
.L803214D8:
li $t2, 31
.L803214DC:
mtc0 $a2, $10 #vaddr
beq $a3, -1, .L80321500 #even paddr
nop
srl $t3, $a3, 6 #evenpaddr
or $t3, $t3, $t2
mtc0 $t3, $2
b .L80321504
nop
.L80321500:
mtc0 $t4, $2
.L80321504:
lw $t3, 0x10($sp) #oddpaddr
beq $t3, -1, .L80321528
nop
srl $t3, $t3, 6
or $t3, $t3, $t2
mtc0 $t3, $3
b .L80321540
nop
.L80321528:
mtc0 $t4, $3
bne $a3, -1, .L80321540 #evenpaddr
nop
lui $t3, 0x8000
mtc0 $t3, $10
.L80321540:
nop
tlbwi
nop
nop
nop
nop
mtc0 $t0, $10
jr $ra
nop #file gets padded but
nop
nop
nop