papermario/ver/ique/asm/os/setintmask.s
AltoXorg b171712e0e
Match libultra iQue ver (#1111)
* match libultra ique pt 1

* add sgidefs.h to include/gcc

* recvmesg match + _getcount

* add elfpatch.py for those compiled with -mips3

* pt 2

* os/setthreadpri(.data) -> os/thread

* os thread matches

* os timer matches

* pt 4 (erm... 3?)

* vitbl

* os pi matches

* pt. uhmmmm, i've lost track...

* os pfs matches

* replace elfpatch.py

* pt. just forget it...

* outsource from ultralib ique branch

* .

* . 2

* final blow

* add egcs compiler to Jenkinsfile

* fix errors from CI

* minor changes as requested
2023-08-17 02:29:21 +09:00

128 lines
5.1 KiB
ArmAsm

.include "macro.inc"
/* assembler directives */
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
.set gp=64 /* allow use of 64-bit general purpose registers */
.section .rodata
glabel __osRcpImTable
/* 73D00 80098900 */ .short 0x0555
/* 73D02 80098902 */ .short 0x0556
/* 73D04 80098904 */ .short 0x0559
/* 73D06 80098906 */ .short 0x055A
/* 73D08 80098908 */ .short 0x0565
/* 73D0A 8009890A */ .short 0x0566
/* 73D0C 8009890C */ .short 0x0569
/* 73D0E 8009890E */ .short 0x056A
/* 73D10 80098910 */ .short 0x0595
/* 73D12 80098912 */ .short 0x0596
/* 73D14 80098914 */ .short 0x0599
/* 73D16 80098916 */ .short 0x059A
/* 73D18 80098918 */ .short 0x05A5
/* 73D1A 8009891A */ .short 0x05A6
/* 73D1C 8009891C */ .short 0x05A9
/* 73D1E 8009891E */ .short 0x05AA
/* 73D20 80098920 */ .short 0x0655
/* 73D22 80098922 */ .short 0x0656
/* 73D24 80098924 */ .short 0x0659
/* 73D26 80098926 */ .short 0x065A
/* 73D28 80098928 */ .short 0x0665
/* 73D2A 8009892A */ .short 0x0666
/* 73D2C 8009892C */ .short 0x0669
/* 73D2E 8009892E */ .short 0x066A
/* 73D30 80098930 */ .short 0x0695
/* 73D32 80098932 */ .short 0x0696
/* 73D34 80098934 */ .short 0x0699
/* 73D36 80098936 */ .short 0x069A
/* 73D38 80098938 */ .short 0x06A5
/* 73D3A 8009893A */ .short 0x06A6
/* 73D3C 8009893C */ .short 0x06A9
/* 73D3E 8009893E */ .short 0x06AA
/* 73D40 80098940 */ .short 0x0955
/* 73D42 80098942 */ .short 0x0956
/* 73D44 80098944 */ .short 0x0959
/* 73D46 80098946 */ .short 0x095A
/* 73D48 80098948 */ .short 0x0965
/* 73D4A 8009894A */ .short 0x0966
/* 73D4C 8009894C */ .short 0x0969
/* 73D4E 8009894E */ .short 0x096A
/* 73D50 80098950 */ .short 0x0995
/* 73D52 80098952 */ .short 0x0996
/* 73D54 80098954 */ .short 0x0999
/* 73D56 80098956 */ .short 0x099A
/* 73D58 80098958 */ .short 0x09A5
/* 73D5A 8009895A */ .short 0x09A6
/* 73D5C 8009895C */ .short 0x09A9
/* 73D5E 8009895E */ .short 0x09AA
/* 73D60 80098960 */ .short 0x0A55
/* 73D62 80098962 */ .short 0x0A56
/* 73D64 80098964 */ .short 0x0A59
/* 73D66 80098966 */ .short 0x0A5A
/* 73D68 80098968 */ .short 0x0A65
/* 73D6A 8009896A */ .short 0x0A66
/* 73D6C 8009896C */ .short 0x0A69
/* 73D6E 8009896E */ .short 0x0A6A
/* 73D70 80098970 */ .short 0x0A95
/* 73D72 80098972 */ .short 0x0A96
/* 73D74 80098974 */ .short 0x0A99
/* 73D76 80098976 */ .short 0x0A9A
/* 73D78 80098978 */ .short 0x0AA5
/* 73D7A 8009897A */ .short 0x0AA6
/* 73D7C 8009897C */ .short 0x0AA9
/* 73D7E 8009897E */ .short 0x0AAA
.size __osRcpImTable, . - __osRcpImTable
.section .text, "ax"
/* Generated by spimdisasm 1.11.1 */
# Handwritten function
glabel osSetIntMask
/* 42190 80066D90 400C6000 */ mfc0 $t4, $12 # handwritten instruction
/* 42194 80066D94 3182FF01 */ andi $v0, $t4, 0xFF01
/* 42198 80066D98 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
/* 4219C 80066D9C 250845B4 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
/* 421A0 80066DA0 8D0B0000 */ lw $t3, 0x0($t0)
/* 421A4 80066DA4 3C01FFFF */ lui $at, (0xFFFFFFFF >> 16)
/* 421A8 80066DA8 3421FFFF */ ori $at, $at, (0xFFFFFFFF & 0xFFFF)
/* 421AC 80066DAC 01614026 */ xor $t0, $t3, $at
/* 421B0 80066DB0 3108FF00 */ andi $t0, $t0, 0xFF00
/* 421B4 80066DB4 00481025 */ or $v0, $v0, $t0
/* 421B8 80066DB8 3C0AA430 */ lui $t2, %hi(D_A430000C)
/* 421BC 80066DBC 8D4A000C */ lw $t2, %lo(D_A430000C)($t2)
/* 421C0 80066DC0 11400006 */ beqz $t2, .LIQUE_80066DDC
/* 421C4 80066DC4 000B4C02 */ srl $t1, $t3, 16
/* 421C8 80066DC8 3C01FFFF */ lui $at, (0xFFFFFFFF >> 16)
/* 421CC 80066DCC 3421FFFF */ ori $at, $at, (0xFFFFFFFF & 0xFFFF)
/* 421D0 80066DD0 01214826 */ xor $t1, $t1, $at
/* 421D4 80066DD4 3129003F */ andi $t1, $t1, 0x3F
/* 421D8 80066DD8 01495025 */ or $t2, $t2, $t1
.LIQUE_80066DDC:
/* 421DC 80066DDC 000A5400 */ sll $t2, $t2, 16
/* 421E0 80066DE0 004A1025 */ or $v0, $v0, $t2
/* 421E4 80066DE4 3C01003F */ lui $at, (0x3F0000 >> 16)
/* 421E8 80066DE8 00814024 */ and $t0, $a0, $at
/* 421EC 80066DEC 010B4024 */ and $t0, $t0, $t3
/* 421F0 80066DF0 000843C2 */ srl $t0, $t0, 15
/* 421F4 80066DF4 3C0A800A */ lui $t2, %hi(__osRcpImTable)
/* 421F8 80066DF8 01485021 */ addu $t2, $t2, $t0
/* 421FC 80066DFC 954A8900 */ lhu $t2, %lo(__osRcpImTable)($t2)
/* 42200 80066E00 3C01A430 */ lui $at, %hi(D_A430000C)
/* 42204 80066E04 AC2A000C */ sw $t2, %lo(D_A430000C)($at)
/* 42208 80066E08 3088FF01 */ andi $t0, $a0, 0xFF01
/* 4220C 80066E0C 3169FF00 */ andi $t1, $t3, 0xFF00
/* 42210 80066E10 01094024 */ and $t0, $t0, $t1
/* 42214 80066E14 3C01FFFF */ lui $at, (0xFFFF00FF >> 16)
/* 42218 80066E18 342100FF */ ori $at, $at, (0xFFFF00FF & 0xFFFF)
/* 4221C 80066E1C 01816024 */ and $t4, $t4, $at
/* 42220 80066E20 01886025 */ or $t4, $t4, $t0
/* 42224 80066E24 408C6000 */ mtc0 $t4, $12 # handwritten instruction
/* 42228 80066E28 00000000 */ nop
/* 4222C 80066E2C 00000000 */ nop
/* 42230 80066E30 03E00008 */ jr $ra
/* 42234 80066E34 00000000 */ nop
/* 42238 80066E38 00000000 */ nop
/* 4223C 80066E3C 00000000 */ nop