Match and link most of Runtime

This commit is contained in:
2022-10-13 01:02:37 -07:00
parent e5b3cfa36a
commit 8b0c414ae0
17 changed files with 641 additions and 129 deletions

View File

@@ -12,15 +12,117 @@ stdout_buff:
stdin_buff:
.skip 0x100
.section .data, "wa"
.balign 8
.global __files
__files:
# ROM: 0x3EF778
.4byte 0
.4byte 0x0A800000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte stdin_buff
.4byte 0x00000100
.4byte stdin_buff
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte __read_console
.4byte __write_console
.4byte __close_console
.4byte 0
.4byte lbl_803F27C8
.global lbl_803F27C8
lbl_803F27C8:
# ROM: 0x3EF7C8
.4byte 0x00000001
.4byte 0x12800000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte stdout_buff
.4byte 0x00000100
.4byte stdout_buff
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte __read_console
.4byte __write_console
.4byte __close_console
.4byte 0
.4byte lbl_803F2818
.global lbl_803F2818
lbl_803F2818:
# ROM: 0x3EF818
.4byte 0x00000002
.4byte 0x10800000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte stderr_buff
.4byte 0x00000100
.4byte stderr_buff
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte __read_console
.4byte __write_console
.4byte __close_console
.4byte 0
.4byte lbl_803F2868
.global lbl_803F2868
lbl_803F2868:
# ROM: 0x3EF868
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.section .text, "ax"
.global __flush_all
__flush_all:
/* 8038B0A8 00388008 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8038B0AC 0038800C 7C 08 02 A6 */ mflr r0
/* 8038B0B0 00388010 3C 60 80 3F */ lis r3, lbl_803F2778@ha
/* 8038B0B0 00388010 3C 60 80 3F */ lis r3, __files@ha
/* 8038B0B4 00388014 90 01 00 14 */ stw r0, 0x14(r1)
/* 8038B0B8 00388018 38 03 27 78 */ addi r0, r3, lbl_803F2778@l
/* 8038B0B8 00388018 38 03 27 78 */ addi r0, r3, __files@l
/* 8038B0BC 0038801C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8038B0C0 00388020 3B E0 00 00 */ li r31, 0
/* 8038B0C4 00388024 93 C1 00 08 */ stw r30, 8(r1)
@@ -52,9 +154,9 @@ lbl_8038B0F4:
__close_all:
/* 8038B118 00388078 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8038B11C 0038807C 7C 08 02 A6 */ mflr r0
/* 8038B120 00388080 3C 60 80 3F */ lis r3, lbl_803F2778@ha
/* 8038B120 00388080 3C 60 80 3F */ lis r3, __files@ha
/* 8038B124 00388084 90 01 00 14 */ stw r0, 0x14(r1)
/* 8038B128 00388088 38 03 27 78 */ addi r0, r3, lbl_803F2778@l
/* 8038B128 00388088 38 03 27 78 */ addi r0, r3, __files@l
/* 8038B12C 0038808C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8038B130 00388090 7C 1F 03 78 */ mr r31, r0
/* 8038B134 00388094 48 00 00 60 */ b lbl_8038B194

View File

@@ -3,105 +3,6 @@
.section .data, "wa"
.balign 8
.global lbl_803F2778
lbl_803F2778:
# ROM: 0x3EF778
.4byte 0
.4byte 0x0A800000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte stdin_buff
.4byte 0x00000100
.4byte stdin_buff
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte __read_console
.4byte __write_console
.4byte __close_console
.4byte 0
.4byte lbl_803F27C8
.global lbl_803F27C8
lbl_803F27C8:
# ROM: 0x3EF7C8
.4byte 0x00000001
.4byte 0x12800000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte stdout_buff
.4byte 0x00000100
.4byte stdout_buff
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte __read_console
.4byte __write_console
.4byte __close_console
.4byte 0
.4byte lbl_803F2818
.global lbl_803F2818
lbl_803F2818:
# ROM: 0x3EF818
.4byte 0x00000002
.4byte 0x10800000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte stderr_buff
.4byte 0x00000100
.4byte stderr_buff
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte __read_console
.4byte __write_console
.4byte __close_console
.4byte 0
.4byte lbl_803F2868
.global lbl_803F2868
lbl_803F2868:
# ROM: 0x3EF868
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.global lbl_803F28B8
lbl_803F28B8:
# ROM: 0x3EF8B8
@@ -2389,4 +2290,3 @@ lbl_805AEC80:
lbl_805AEC88:
# ROM: 0x3FB528
.double 4.503601774854144E15

View File

@@ -289,12 +289,12 @@ lbl_8038DE20:
vprintf:
/* 8038DE34 0038AD94 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8038DE38 0038AD98 7C 08 02 A6 */ mflr r0
/* 8038DE3C 0038AD9C 3C A0 80 3F */ lis r5, lbl_803F2778@ha
/* 8038DE3C 0038AD9C 3C A0 80 3F */ lis r5, __files@ha
/* 8038DE40 0038ADA0 90 01 00 24 */ stw r0, 0x24(r1)
/* 8038DE44 0038ADA4 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8038DE48 0038ADA8 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8038DE4C 0038ADAC 7C 9E 23 78 */ mr r30, r4
/* 8038DE50 0038ADB0 38 85 27 78 */ addi r4, r5, lbl_803F2778@l
/* 8038DE50 0038ADB0 38 85 27 78 */ addi r4, r5, __files@l
/* 8038DE54 0038ADB4 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8038DE58 0038ADB8 3B E4 00 50 */ addi r31, r4, 0x50
/* 8038DE5C 0038ADBC 7C 7D 1B 78 */ mr r29, r3
@@ -339,9 +339,9 @@ printf:
/* 8038DEE4 0038AE44 D8 E1 00 58 */ stfd f7, 0x58(r1)
/* 8038DEE8 0038AE48 D9 01 00 60 */ stfd f8, 0x60(r1)
lbl_8038DEEC:
/* 8038DEEC 0038AE4C 3D 60 80 3F */ lis r11, lbl_803F2778@ha
/* 8038DEEC 0038AE4C 3D 60 80 3F */ lis r11, __files@ha
/* 8038DEF0 0038AE50 90 81 00 0C */ stw r4, 0xc(r1)
/* 8038DEF4 0038AE54 39 6B 27 78 */ addi r11, r11, lbl_803F2778@l
/* 8038DEF4 0038AE54 39 6B 27 78 */ addi r11, r11, __files@l
/* 8038DEF8 0038AE58 38 80 FF FF */ li r4, -1
/* 8038DEFC 0038AE5C 90 61 00 08 */ stw r3, 8(r1)
/* 8038DF00 0038AE60 3B EB 00 50 */ addi r31, r11, 0x50
@@ -2572,4 +2572,3 @@ lbl_805AEC98:
# ROM: 0x3FB538
.4byte 0
.4byte 0