You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 14
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
|
||||
.ifdef VERSION_EU
|
||||
.set VERSION_EU_SH, 1
|
||||
.endif
|
||||
.ifdef VERSION_SH
|
||||
.set VERSION_EU_SH, 1
|
||||
.endif
|
||||
#include "macros.inc"
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
.ifdef AVOID_UB
|
||||
#ifdef AVOID_UB
|
||||
.set D_80334890, D_80334890_fix
|
||||
.endif
|
||||
#endif
|
||||
|
||||
glabel __osExceptionPreamble
|
||||
lui $k0, %hi(__osException)
|
||||
@@ -37,7 +30,7 @@ glabel __osException
|
||||
sd $t2, 0x68($k0)
|
||||
sw $zero, 0x18($k0)
|
||||
mfc0 $t0, $13
|
||||
.ifndef VERSION_EU_SH
|
||||
#if !defined(VERSION_EU) && !defined(VERSION_SH)
|
||||
andi $t1, $t0, 0x7c
|
||||
li $t2, 0
|
||||
bne $t1, $t2, .L80326750
|
||||
@@ -62,11 +55,11 @@ glabel __osException
|
||||
lui $at, %hi(D_80334934)
|
||||
sw $zero, %lo(D_80334934)($at)
|
||||
lui $at, %hi(D_80334938)
|
||||
.endif
|
||||
#endif
|
||||
move $t0, $k0
|
||||
.ifndef VERSION_EU_SH
|
||||
#if !defined(VERSION_EU) && !defined(VERSION_SH)
|
||||
sw $zero, %lo(D_80334938)($at)
|
||||
.endif
|
||||
#endif
|
||||
lui $k0, %hi(D_80334890 + 0x10)
|
||||
lw $k0, %lo(D_80334890 + 0x10)($k0)
|
||||
ld $t1, 0x20($t0)
|
||||
@@ -79,17 +72,17 @@ glabel __osException
|
||||
sd $t1, 0x60($k0)
|
||||
ld $t1, 0x68($t0)
|
||||
sd $t1, 0x68($k0)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
lw $k1, 0x118($k0)
|
||||
.else
|
||||
#else
|
||||
.L80326794:
|
||||
.endif
|
||||
#endif
|
||||
mflo $t0
|
||||
sd $t0, 0x108($k0)
|
||||
mfhi $t0
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
andi $t1, $k1, 0xff00
|
||||
.endif
|
||||
#endif
|
||||
sd $v0, 0x28($k0)
|
||||
sd $v1, 0x30($k0)
|
||||
sd $a0, 0x38($k0)
|
||||
@@ -115,31 +108,31 @@ glabel __osException
|
||||
sd $sp, 0xf0($k0)
|
||||
sd $fp, 0xf8($k0)
|
||||
sd $ra, 0x100($k0)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
beqz $t1, .L802F3A18
|
||||
sd $t0, 0x110($k0)
|
||||
lui $t0, %hi(__OSGlobalIntMask)
|
||||
addiu $t0, %lo(__OSGlobalIntMask)
|
||||
lw $t0, ($t0)
|
||||
li $at, -1
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
xor $t0, $t0, $at
|
||||
.else
|
||||
#else
|
||||
xor $t2, $t0, $at
|
||||
.endif
|
||||
#endif
|
||||
lui $at, (0xFFFF00FF >> 16)
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
andi $t0, $t0, 0xFF00
|
||||
.else
|
||||
#else
|
||||
andi $t2, $t2, 0xFF00
|
||||
.endif
|
||||
#endif
|
||||
ori $at, (0xFFFF00FF & 0xFFFF)
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
or $t1, $t1, $t0
|
||||
and $k1, $k1, $at
|
||||
or $k1, $k1, $t1
|
||||
sw $k1, 0x118($k0)
|
||||
.else
|
||||
#else
|
||||
or $t4, $t1, $t2
|
||||
and $t3, $k1, $at
|
||||
andi $t0, $t0, 0xFF00
|
||||
@@ -148,7 +141,7 @@ glabel __osException
|
||||
and $k1, $k1, $at
|
||||
sw $t3, 0x118($k0)
|
||||
or $k1, $k1, $t1
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.L802F3A18:
|
||||
lui $t1, %hi(MI_INTR_MASK_REG)
|
||||
@@ -167,9 +160,9 @@ glabel __osException
|
||||
or $t1, $t1, $t0
|
||||
.L802F3A50:
|
||||
sw $t1, 0x128($k0)
|
||||
.else
|
||||
#else
|
||||
sd $t0, 0x110($k0)
|
||||
.endif
|
||||
#endif
|
||||
mfc0 $t0, $14
|
||||
sw $t0, 0x11c($k0)
|
||||
lw $t0, 0x18($k0)
|
||||
@@ -197,14 +190,14 @@ glabel __osException
|
||||
.L80326868:
|
||||
mfc0 $t0, $13
|
||||
sw $t0, 0x120($k0)
|
||||
.ifndef VERSION_EU_SH
|
||||
#if !defined(VERSION_EU) && !defined(VERSION_SH)
|
||||
lui $t1, %hi(MI_INTR_MASK_REG)
|
||||
lw $t1, %lo(MI_INTR_MASK_REG)($t1)
|
||||
sw $t1, 0x128($k0)
|
||||
.endif
|
||||
#endif
|
||||
li $t1, 2
|
||||
sh $t1, 0x10($k0)
|
||||
.ifndef VERSION_EU_SH
|
||||
#if !defined(VERSION_EU) && !defined(VERSION_SH)
|
||||
lui $t1, %hi(D_80334934)
|
||||
lw $t1, %lo(D_80334934)($t1)
|
||||
beqz $t1, .L803268B4
|
||||
@@ -239,7 +232,7 @@ glabel __osException
|
||||
b .L80326E08
|
||||
sw $t1, %lo(D_80334A44)($at)
|
||||
.L80326900:
|
||||
.endif
|
||||
#endif
|
||||
andi $t1, $t0, 0x7c
|
||||
li $t2, 36
|
||||
beq $t1, $t2, .L80326B84
|
||||
@@ -267,7 +260,7 @@ glabel __osException
|
||||
lw $t2, %lo(jtbl_80338630)($at)
|
||||
jr $t2
|
||||
nop
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
glabel L802F3B28
|
||||
li $at, -8193
|
||||
b .L8032692C
|
||||
@@ -276,7 +269,7 @@ glabel L802F3B34
|
||||
li $at, -16385
|
||||
b .L8032692C
|
||||
and $s0, $s0, $at
|
||||
.endif
|
||||
#endif
|
||||
glabel L80326964
|
||||
mfc0 $t1, $11
|
||||
mtc0 $t1, $11
|
||||
@@ -287,62 +280,62 @@ glabel L80326964
|
||||
b .L8032692C
|
||||
and $s0, $s0, $at
|
||||
glabel L80326984
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
li $at, -2049
|
||||
and $s0, $s0, $at
|
||||
.endif
|
||||
#endif
|
||||
li $t2, 4
|
||||
lui $at, %hi(D_80334920)
|
||||
addu $at, $at, $t2
|
||||
lw $t2, %lo(D_80334920)($at)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
lui $sp, %hi(leoDiskStack)
|
||||
addiu $sp, %lo(leoDiskStack)
|
||||
li $a0, 16
|
||||
beqz $t2, .L803269A4
|
||||
addiu $sp, $sp, 0xff0
|
||||
.else
|
||||
#else
|
||||
beqz $t2, .L803269A4
|
||||
nop
|
||||
.endif
|
||||
#endif
|
||||
jalr $t2
|
||||
nop
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
beqz $v0, .L803269A4
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
li $a0, 0x10
|
||||
.else
|
||||
#else
|
||||
nop
|
||||
.endif
|
||||
#endif
|
||||
b .L80326B9C
|
||||
nop
|
||||
.endif
|
||||
#endif
|
||||
.L803269A4:
|
||||
jal send_mesg
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
nop
|
||||
b .L8032692C
|
||||
nop
|
||||
.else
|
||||
#else
|
||||
li $a0, 16
|
||||
li $at, -2049
|
||||
b .L8032692C
|
||||
and $s0, $s0, $at
|
||||
.endif
|
||||
#endif
|
||||
glabel L803269B8
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
lui $t0, %hi(__OSGlobalIntMask)
|
||||
addiu $t0, %lo(__OSGlobalIntMask)
|
||||
lw $t0, ($t0)
|
||||
.endif
|
||||
#endif
|
||||
lui $s1, %hi(MI_INTR_REG)
|
||||
lw $s1, %lo(MI_INTR_REG)($s1)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
srl $t0, $t0, 0x10
|
||||
and $s1, $s1, $t0
|
||||
.else
|
||||
#else
|
||||
andi $s1, $s1, 0x3f
|
||||
.endif
|
||||
#endif
|
||||
andi $t1, $s1, 1
|
||||
beqz $t1, .L80326A18
|
||||
nop
|
||||
@@ -609,7 +602,7 @@ glabel __osEnqueueAndYield
|
||||
sw $k1, 0x12c($a1)
|
||||
|
||||
.L80326D70:
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
lw $k1, 0x118($a1)
|
||||
andi $t1, $k1, 0xff00
|
||||
beqz $t1, .L802F3FBC
|
||||
@@ -627,10 +620,10 @@ glabel __osEnqueueAndYield
|
||||
or $k1, $k1, $t1
|
||||
sw $k1, 0x118($a1)
|
||||
.L802F3FBC:
|
||||
.endif
|
||||
#endif
|
||||
lui $k1, %hi(MI_INTR_MASK_REG)
|
||||
lw $k1, %lo(MI_INTR_MASK_REG)($k1)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
beqz $k1, .L802F3FF4
|
||||
nop
|
||||
lui $k0, %hi(__OSGlobalIntMask)
|
||||
@@ -644,7 +637,7 @@ glabel __osEnqueueAndYield
|
||||
and $k0, $k0, $t0
|
||||
or $k1, $k1, $k0
|
||||
.L802F3FF4:
|
||||
.endif
|
||||
#endif
|
||||
beqz $a0, .L80326D88
|
||||
sw $k1, 0x128($a1)
|
||||
jal __osEnqueueThread
|
||||
@@ -653,7 +646,7 @@ glabel __osEnqueueAndYield
|
||||
j __osDispatchThread
|
||||
nop
|
||||
|
||||
#enqueue and pop look like compiled functions? but there's no easy way to extract them
|
||||
// enqueue and pop look like compiled functions? but there's no easy way to extract them
|
||||
glabel __osEnqueueThread
|
||||
lw $t8, ($a0)
|
||||
lw $t7, 4($a1)
|
||||
@@ -691,7 +684,7 @@ glabel __osDispatchThread
|
||||
li $t0, 4
|
||||
sh $t0, 0x10($v0)
|
||||
move $k0, $v0
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
lui $t0, %hi(__OSGlobalIntMask)
|
||||
lw $k1, 0x118($k0)
|
||||
addiu $t0, %lo(__OSGlobalIntMask)
|
||||
@@ -704,7 +697,7 @@ glabel __osDispatchThread
|
||||
and $k1, $k1, $at
|
||||
or $k1, $k1, $t1
|
||||
mtc0 $k1, $12
|
||||
.endif
|
||||
#endif
|
||||
.L80326E08:
|
||||
ld $k1, 0x108($k0)
|
||||
ld $at, 0x20($k0)
|
||||
@@ -741,10 +734,10 @@ glabel __osDispatchThread
|
||||
ld $ra, 0x100($k0)
|
||||
lw $k1, 0x11c($k0)
|
||||
mtc0 $k1, $14
|
||||
.ifndef VERSION_EU_SH
|
||||
#if !defined(VERSION_EU) && !defined(VERSION_SH)
|
||||
lw $k1, 0x118($k0)
|
||||
mtc0 $k1, $12
|
||||
.endif
|
||||
#endif
|
||||
lw $k1, 0x18($k0)
|
||||
beqz $k1, .L80326EF0
|
||||
nop
|
||||
@@ -768,13 +761,13 @@ glabel __osDispatchThread
|
||||
ldc1 $f30, 0x1a8($k0)
|
||||
.L80326EF0:
|
||||
lw $k1, 0x128($k0)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
lui $k0, %hi(__OSGlobalIntMask)
|
||||
addiu $k0, %lo(__OSGlobalIntMask)
|
||||
lw $k0, ($k0)
|
||||
srl $k0, $k0, 0x10
|
||||
and $k1, $k1, $k0
|
||||
.endif
|
||||
#endif
|
||||
sll $k1, $k1, 1
|
||||
lui $k0, %hi(D_803386D0)
|
||||
addiu $k0, %lo(D_803386D0)
|
||||
@@ -820,13 +813,13 @@ glabel jtbl_80338630
|
||||
.word L803269B8
|
||||
.word L80326984
|
||||
.word L80326AE8
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
.word L802F3B28
|
||||
.word L802F3B34
|
||||
.else
|
||||
#else
|
||||
.word L80326BE8
|
||||
.word L80326BE8
|
||||
.endif
|
||||
#endif
|
||||
.word L80326964
|
||||
.word 0
|
||||
.word 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
@@ -44,8 +44,8 @@ glabel __osProbeTLB
|
||||
andi $t5, $v0, 2
|
||||
beqz $t5, .L8032A0D8
|
||||
nop
|
||||
lui $at, (0x3FFFFFC0 >> 16) # lui $at, 0x3fff
|
||||
ori $at, (0x3FFFFFC0 & 0xFFFF) # ori $at, $at, 0xffc0
|
||||
lui $at, (0x3FFFFFC0 >> 16) // lui $at, 0x3fff
|
||||
ori $at, (0x3FFFFFC0 & 0xFFFF) // ori $at, $at, 0xffc0
|
||||
and $v0, $v0, $at
|
||||
sll $v0, $v0, 6
|
||||
and $t5, $a0, $t3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
.set noat
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
# cache related
|
||||
// cache related
|
||||
glabel __os_eu_802ef550
|
||||
lui $t0,0x8000
|
||||
li $t2,0x2000
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
#this file is probably handwritten
|
||||
// this file is probably handwritten
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
// assembler directives
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
# This file is handwritten
|
||||
// This file is handwritten
|
||||
|
||||
#void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr, u32 oddpaddr, s32 asid);
|
||||
// void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr, u32 oddpaddr, s32 asid);
|
||||
glabel osMapTLB
|
||||
mfc0 $t0, $10
|
||||
mtc0 $a0, $0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
@@ -1,38 +1,31 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
.eqv MI_INTR_MASK_REG, 0xA430000C
|
||||
|
||||
.ifdef VERSION_EU
|
||||
.set VERSION_EU_SH, 1
|
||||
.endif
|
||||
.ifdef VERSION_SH
|
||||
.set VERSION_EU_SH, 1
|
||||
.endif
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
glabel osSetIntMask
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
mfc0 $t4, $12
|
||||
andi $v0, $t4, 0xff01
|
||||
lui $t0, %hi(__OSGlobalIntMask) # $t0, 0x8030
|
||||
addiu $t0, %lo(__OSGlobalIntMask) # addiu $t0, $t0, 0x208c
|
||||
lui $t0, %hi(__OSGlobalIntMask) // $t0, 0x8030
|
||||
addiu $t0, %lo(__OSGlobalIntMask) // addiu $t0, $t0, 0x208c
|
||||
lw $t3, ($t0)
|
||||
li $at, -1
|
||||
xor $t0, $t3, $at
|
||||
andi $t0, $t0, 0xff00
|
||||
or $v0, $v0, $t0
|
||||
.else
|
||||
#else
|
||||
mfc0 $t1, $12
|
||||
andi $v0, $t1, 0xff01
|
||||
.endif
|
||||
lui $t2, %hi(MI_INTR_MASK_REG) # $t2, 0xa430
|
||||
#endif
|
||||
lui $t2, %hi(MI_INTR_MASK_REG) // $t2, 0xa430
|
||||
lw $t2, %lo(MI_INTR_MASK_REG)($t2)
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
beqz $t2, .L80200074
|
||||
srl $t1, $t3, 0x10
|
||||
li $at, -1
|
||||
@@ -40,36 +33,36 @@ glabel osSetIntMask
|
||||
andi $t1, $t1, 0x3f
|
||||
or $t2, $t2, $t1
|
||||
.L80200074:
|
||||
.endif
|
||||
#endif
|
||||
sll $t2, $t2, 0x10
|
||||
or $v0, $v0, $t2
|
||||
lui $at, 0x3f
|
||||
and $t0, $a0, $at
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
and $t0, $t0, $t3
|
||||
.endif
|
||||
#endif
|
||||
srl $t0, $t0, 0xf
|
||||
lui $t2, %hi(D_803386D0)
|
||||
addu $t2, $t2, $t0
|
||||
lhu $t2, %lo(D_803386D0)($t2)
|
||||
lui $at, %hi(MI_INTR_MASK_REG) # $at, 0xa430
|
||||
lui $at, %hi(MI_INTR_MASK_REG) // $at, 0xa430
|
||||
sw $t2, %lo(MI_INTR_MASK_REG)($at)
|
||||
andi $t0, $a0, 0xff01
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
andi $t1, $t3, 0xff00
|
||||
and $t0, $t0, $t1
|
||||
.endif
|
||||
lui $at, (0xFFFF00FF >> 16) # lui $at, 0xffff
|
||||
ori $at, (0xFFFF00FF & 0xFFFF) # ori $at, $at, 0xff
|
||||
.ifdef VERSION_EU_SH
|
||||
#endif
|
||||
lui $at, (0xFFFF00FF >> 16) // lui $at, 0xffff
|
||||
ori $at, (0xFFFF00FF & 0xFFFF) // ori $at, $at, 0xff
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
and $t4, $t4, $at
|
||||
or $t4, $t4, $t0
|
||||
mtc0 $t4, $12
|
||||
.else
|
||||
#else
|
||||
and $t1, $t1, $at
|
||||
or $t1, $t1, $t0
|
||||
mtc0 $t1, $12
|
||||
.endif
|
||||
#endif
|
||||
nop
|
||||
nop
|
||||
jr $ra
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user