Disassemble __osProbeTLB

This commit is contained in:
Ryan Dwyer 2021-10-05 21:23:27 +10:00
parent b6885e9420
commit 27ac294c9b
2 changed files with 57 additions and 56 deletions

View File

@ -1,56 +0,0 @@
#include <libultra_internal.h>
#include "data.h"
GLOBAL_ASM(
glabel __osProbeTLB
/* 51c90: 40085000 */ mfc0 $t0,$10
/* 51c94: 310900ff */ andi $t1,$t0,0xff
/* 51c98: 2401e000 */ addiu $at,$zero,-8192
/* 51c9c: 00815024 */ and $t2,$a0,$at
/* 51ca0: 012a4825 */ or $t1,$t1,$t2
/* 51ca4: 40895000 */ mtc0 $t1,$10
/* 51ca8: 00000000 */ nop
/* 51cac: 00000000 */ nop
/* 51cb0: 00000000 */ nop
/* 51cb4: 42000008 */ tlbp
/* 51cb8: 00000000 */ nop
/* 51cbc: 00000000 */ nop
/* 51cc0: 400b0000 */ mfc0 $t3,$0
/* 51cc4: 3c018000 */ lui $at,0x8000
/* 51cc8: 01615824 */ and $t3,$t3,$at
/* 51ccc: 1560001a */ bnez $t3,.L00051d38
/* 51cd0: 00000000 */ nop
/* 51cd4: 42000001 */ tlbr
/* 51cd8: 00000000 */ nop
/* 51cdc: 00000000 */ nop
/* 51ce0: 00000000 */ nop
/* 51ce4: 400b2800 */ mfc0 $t3,$5
/* 51ce8: 216b2000 */ addi $t3,$t3,0x2000
/* 51cec: 000b5842 */ srl $t3,$t3,0x1
/* 51cf0: 01646024 */ and $t4,$t3,$a0
/* 51cf4: 15800004 */ bnez $t4,.L00051d08
/* 51cf8: 216bffff */ addi $t3,$t3,-1
/* 51cfc: 40021000 */ mfc0 $v0,$2
/* 51d00: 10000002 */ b .L00051d0c
/* 51d04: 00000000 */ nop
.L00051d08:
/* 51d08: 40021800 */ mfc0 $v0,$3
.L00051d0c:
/* 51d0c: 304d0002 */ andi $t5,$v0,0x2
/* 51d10: 11a00009 */ beqz $t5,.L00051d38
/* 51d14: 00000000 */ nop
/* 51d18: 3c013fff */ lui $at,0x3fff
/* 51d1c: 3421ffc0 */ ori $at,$at,0xffc0
/* 51d20: 00411024 */ and $v0,$v0,$at
/* 51d24: 00021180 */ sll $v0,$v0,0x6
/* 51d28: 008b6824 */ and $t5,$a0,$t3
/* 51d2c: 004d1020 */ add $v0,$v0,$t5
/* 51d30: 10000002 */ b .L00051d3c
/* 51d34: 00000000 */ nop
.L00051d38:
/* 51d38: 2402ffff */ addiu $v0,$zero,-1
.L00051d3c:
/* 51d3c: 40885000 */ mtc0 $t0,$10
/* 51d40: 03e00008 */ jr $ra
/* 51d44: 00000000 */ nop
);

View File

@ -0,0 +1,57 @@
#include "macros.inc"
.set noat
.set noreorder
.section .text
glabel __osProbeTLB
mfc0 $t0, $10
andi $t1, $t0, 0xff
addiu $at, $zero, -8192
and $t2, $a0, $at
or $t1, $t1, $t2
mtc0 $t1, $10
nop
nop
nop
tlbp
nop
nop
mfc0 $t3, $0
lui $at, 0x8000
and $t3, $t3, $at
bnez $t3, .L00051d38
nop
tlbr
nop
nop
nop
mfc0 $t3, $5
addi $t3, $t3, 0x2000
srl $t3, $t3, 0x1
and $t4, $t3, $a0
bnez $t4, .L00051d08
addi $t3, $t3, -1
mfc0 $v0, $2
b .L00051d0c
nop
.L00051d08:
mfc0 $v0, $3
.L00051d0c:
andi $t5, $v0, 0x2
beqz $t5, .L00051d38
nop
lui $at, 0x3fff
ori $at, $at, 0xffc0
and $v0, $v0, $at
sll $v0, $v0, 0x6
and $t5, $a0, $t3
add $v0, $v0, $t5
b .L00051d3c
nop
.L00051d38:
addiu $v0, $zero, -1
.L00051d3c:
mtc0 $t0, $10
jr $ra
nop