Runtime/math matches; better libc headers

Former-commit-id: bef7db1748
This commit is contained in:
Luke Street 2022-08-25 23:46:24 -04:00
parent 75f08901d8
commit 00c77e6195
116 changed files with 5434 additions and 973 deletions

View File

@ -50,9 +50,9 @@ include obj_files.mk
O_FILES := $(INIT_O_FILES) $(METROTRK_FILES) \
$(METROIDPRIME) $(WORLDFORMAT) $(WEAPONS) $(METARENDER) $(GUISYS) $(COLLISION) \
$(KYOTO) $(AI_FILES) \
$(KYOTO_1) $(ZLIB_FILES) $(KYOTO_2) $(AI_FILES) \
$(AR_FILES) $(BASE_FILES) $(DB_FILES) $(DSP_FILES) $(DVD_FILES) $(GX_FILES) $(MTX_FILES) \
$(OS_FILES) $(PAD_FILES) $(VI_FILES) $(MSL_PPCEABI_BARE_H) $(MUSYX_FILES) \
$(OS_FILES) $(PAD_FILES) $(VI_FILES) $(MSL_PPCEABI_BARE_H) $(MSL_COMMON_MATH) $(MUSYX_FILES) \
$(DTK_FILES) $(CARD_FILES) $(SI_FILES) $(EXI_FILES) $(THP_FILES) \
$(GBA_FILES)
DEPENDS := $(O_FILES:.o=.d)
@ -95,9 +95,13 @@ TRANSFORM_DEP := tools/transform-dep.py
FRANK := tools/franklite.py
# Options
INCLUDES := -i include/
INCLUDES := -i include/ -i libc/
ASM_INCLUDES := -I include/
# DotKuribo/llvm-project
CLANG_CC ?= clang-kuribo
CLANG_CFLAGS := --target=ppc32-kuribo -mcpu=750 -nostdlib -fno-exceptions -fno-rtti -O3 -Wall -Wno-trigraphs -Wno-inline-new-delete -Wno-unused-private-field -fpermissive -std=gnu++11 $(ASM_INCLUDES)
ASFLAGS := -mgekko $(ASM_INCLUDES) --defsym version=$(VERSION_NUM)
ifeq ($(VERBOSE),1)
# this set of LDFLAGS outputs warnings.
@ -107,50 +111,32 @@ ifeq ($(VERBOSE),0)
# this set of LDFLAGS generates no warnings.
LDFLAGS := $(MAPGEN) -fp fmadd -nodefaults -w off
endif
CFLAGS_1.2 = -proc gekko -nodefaults -Cpp_exceptions off -RTTI off -fp fmadd -fp_contract on -O4,p -maxerrors 1 -enum int -inline auto -MMD $(INCLUDES)
CFLAGS_MUSYX = -proc gekko -nodefaults -Cpp_exceptions off -RTTI off -fp fmadd -str reuse,pool,readonly -O4,p -maxerrors 1 -enum int -inline auto -MMD $(INCLUDES)
CFLAGS = $(CFLAGS_1.2) -use_lmw_stmw on -str reuse,pool,readonly -gccinc -nosyspath -inline deferred,noauto -common on
CFLAGS_ZLIB = $(CFLAGS_1.2) -use_lmw_stmw on -str reuse,pool,readonly -gccinc -nosyspath -inline deferred,auto
CFLAGS_1.2 += -str reuse
CFLAGS_BASE = -proc gekko -nodefaults -Cpp_exceptions off -RTTI off -fp hard -fp_contract on -O4,p -maxerrors 1 -enum int -inline auto -str reuse -nosyspath -MMD $(INCLUDES)
CFLAGS = $(CFLAGS_BASE) -use_lmw_stmw on -str reuse,pool,readonly -gccinc -inline deferred,noauto -common on
CFLAGS_RUNTIME = $(CFLAGS_BASE) -use_lmw_stmw on -str reuse,pool,readonly -gccinc -inline deferred,auto
CFLAGS_MUSYX = $(CFLAGS_BASE) -str reuse,pool,readonly
ifeq ($(VERBOSE),0)
# this set of ASFLAGS generates no warnings.
ASFLAGS += -W
endif
$(BUILD_DIR)/src/os/__start.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/os/__start.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/MetroTRK/mslsupp.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/MetroTRK/mslsupp.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/PPCArch.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/PPCArch.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/ai.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/ai.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/os/OSReset.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/os/OSReset.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/dsp/dsp.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/dsp/dsp.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/dsp/dsp_debug.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/musyx/seq_api.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/synth_dbtab.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/snd_service.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/snd_init.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/dsp_import.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/hw_memory.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/reverb_fx.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/delay_fx.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/creverb_fx.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/musyx/synth_ac.o: CFLAGS := $(CFLAGS_MUSYX)
$(BUILD_DIR)/src/Kyoto/zlib/adler32.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/infblock.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/infcodes.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/inffast.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/inflate.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/inftrees.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/infutil.o: CFLAGS := $(CFLAGS_ZLIB)
$(BUILD_DIR)/src/Kyoto/zlib/zutil.o: CFLAGS := $(CFLAGS_ZLIB)
$(INIT_O_FILES): MWCC_VERSION := 1.2.5
$(INIT_O_FILES): CFLAGS := $(CFLAGS_BASE)
$(METROTRK_FILES): MWCC_VERSION := 1.2.5
$(METROTRK_FILES): CFLAGS := $(CFLAGS_BASE)
$(BASE_FILES): MWCC_VERSION := 1.2.5
$(BASE_FILES): CFLAGS := $(CFLAGS_BASE)
$(AI_FILES): MWCC_VERSION := 1.2.5
$(AI_FILES): CFLAGS := $(CFLAGS_BASE)
$(OS_FILES): MWCC_VERSION := 1.2.5
$(OS_FILES): CFLAGS := $(CFLAGS_BASE)
$(DSP_FILES): MWCC_VERSION := 1.2.5
$(DSP_FILES): CFLAGS := $(CFLAGS_BASE)
$(MUSYX_FILES): CFLAGS := $(CFLAGS_MUSYX)
$(ZLIB_FILES): CFLAGS := $(CFLAGS_RUNTIME)
$(MSL_PPCEABI_BARE_H): CFLAGS := $(CFLAGS_RUNTIME)
$(MSL_COMMON_MATH): CFLAGS := $(CFLAGS_RUNTIME)
#-------------------------------------------------------------------------------
@ -199,9 +185,13 @@ $(ELF): $(O_FILES) $(LDSCRIPT)
-include $(DEPENDS)
$(BUILD_DIR)/%.o: %.s
@echo Assembling $<
@echo "Assembling" $<
$(QUIET) $(AS) $(ASFLAGS) -o $@ $<
$(BUILD_DIR)/%.clang.o: %.cpp
@echo "Clang " $<
$(QUIET) $(CLANG_CC) $(CLANG_CFLAGS) -c -o $@ $<
$(BUILD_DIR)/%.ep.o: $(BUILD_DIR)/%.o
@echo Frank is fixing $<
$(QUIET) $(PYTHON) $(FRANK) $< $@

View File

@ -46,9 +46,9 @@ FourCCToTypeIdx__11CFactoryMgrFUi:
/* 803385E4 00335544 38 00 FF FF */ li r0, -1
/* 803385E8 00335548 48 00 00 14 */ b lbl_803385FC
lbl_803385EC:
/* 803385EC 0033554C 3C 60 80 3F */ lis r3, lbl_803F2C20@ha
/* 803385EC 0033554C 3C 60 80 3F */ lis r3, __upper_map@ha
/* 803385F0 00335550 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 803385F4 00335554 38 63 2C 20 */ addi r3, r3, lbl_803F2C20@l
/* 803385F4 00335554 38 63 2C 20 */ addi r3, r3, __upper_map@l
/* 803385F8 00335558 7C 03 00 AE */ lbzx r0, r3, r0
lbl_803385FC:
/* 803385FC 0033555C 88 81 00 09 */ lbz r4, 9(r1)
@ -59,9 +59,9 @@ lbl_803385FC:
/* 80338610 00335570 38 00 FF FF */ li r0, -1
/* 80338614 00335574 48 00 00 14 */ b lbl_80338628
lbl_80338618:
/* 80338618 00335578 3C 60 80 3F */ lis r3, lbl_803F2C20@ha
/* 80338618 00335578 3C 60 80 3F */ lis r3, __upper_map@ha
/* 8033861C 0033557C 54 80 06 3E */ clrlwi r0, r4, 0x18
/* 80338620 00335580 38 63 2C 20 */ addi r3, r3, lbl_803F2C20@l
/* 80338620 00335580 38 63 2C 20 */ addi r3, r3, __upper_map@l
/* 80338624 00335584 7C 03 00 AE */ lbzx r0, r3, r0
lbl_80338628:
/* 80338628 00335588 88 81 00 0A */ lbz r4, 0xa(r1)
@ -72,9 +72,9 @@ lbl_80338628:
/* 8033863C 0033559C 38 00 FF FF */ li r0, -1
/* 80338640 003355A0 48 00 00 14 */ b lbl_80338654
lbl_80338644:
/* 80338644 003355A4 3C 60 80 3F */ lis r3, lbl_803F2C20@ha
/* 80338644 003355A4 3C 60 80 3F */ lis r3, __upper_map@ha
/* 80338648 003355A8 54 80 06 3E */ clrlwi r0, r4, 0x18
/* 8033864C 003355AC 38 63 2C 20 */ addi r3, r3, lbl_803F2C20@l
/* 8033864C 003355AC 38 63 2C 20 */ addi r3, r3, __upper_map@l
/* 80338650 003355B0 7C 03 00 AE */ lbzx r0, r3, r0
lbl_80338654:
/* 80338654 003355B4 88 81 00 0B */ lbz r4, 0xb(r1)
@ -85,9 +85,9 @@ lbl_80338654:
/* 80338668 003355C8 38 00 FF FF */ li r0, -1
/* 8033866C 003355CC 48 00 00 14 */ b lbl_80338680
lbl_80338670:
/* 80338670 003355D0 3C 60 80 3F */ lis r3, lbl_803F2C20@ha
/* 80338670 003355D0 3C 60 80 3F */ lis r3, __upper_map@ha
/* 80338674 003355D4 54 80 06 3E */ clrlwi r0, r4, 0x18
/* 80338678 003355D8 38 63 2C 20 */ addi r3, r3, lbl_803F2C20@l
/* 80338678 003355D8 38 63 2C 20 */ addi r3, r3, __upper_map@l
/* 8033867C 003355DC 7C 03 00 AE */ lbzx r0, r3, r0
lbl_80338680:
/* 80338680 003355E0 98 01 00 0B */ stb r0, 0xb(r1)

View File

@ -24,8 +24,8 @@ Type2Text__10SObjectTagFUi:
/* 80341010 0033DF70 38 00 FF FF */ li r0, -1
/* 80341014 0033DF74 48 00 00 10 */ b lbl_80341024
lbl_80341018:
/* 80341018 0033DF78 3C 80 80 3F */ lis r4, lbl_803F2C20@ha
/* 8034101C 0033DF7C 38 84 2C 20 */ addi r4, r4, lbl_803F2C20@l
/* 80341018 0033DF78 3C 80 80 3F */ lis r4, __upper_map@ha
/* 8034101C 0033DF7C 38 84 2C 20 */ addi r4, r4, __upper_map@l
/* 80341020 0033DF80 7C 04 00 AE */ lbzx r0, r4, r0
lbl_80341024:
/* 80341024 0033DF84 54 65 86 3E */ rlwinm r5, r3, 0x10, 0x18, 0x1f
@ -35,8 +35,8 @@ lbl_80341024:
/* 80341034 0033DF94 38 00 FF FF */ li r0, -1
/* 80341038 0033DF98 48 00 00 10 */ b lbl_80341048
lbl_8034103C:
/* 8034103C 0033DF9C 3C 80 80 3F */ lis r4, lbl_803F2C20@ha
/* 80341040 0033DFA0 38 84 2C 20 */ addi r4, r4, lbl_803F2C20@l
/* 8034103C 0033DF9C 3C 80 80 3F */ lis r4, __upper_map@ha
/* 80341040 0033DFA0 38 84 2C 20 */ addi r4, r4, __upper_map@l
/* 80341044 0033DFA4 7C 04 28 AE */ lbzx r0, r4, r5
lbl_80341048:
/* 80341048 0033DFA8 54 65 C6 3E */ rlwinm r5, r3, 0x18, 0x18, 0x1f
@ -47,8 +47,8 @@ lbl_80341048:
/* 8034105C 0033DFBC 38 00 FF FF */ li r0, -1
/* 80341060 0033DFC0 48 00 00 10 */ b lbl_80341070
lbl_80341064:
/* 80341064 0033DFC4 3C 80 80 3F */ lis r4, lbl_803F2C20@ha
/* 80341068 0033DFC8 38 84 2C 20 */ addi r4, r4, lbl_803F2C20@l
/* 80341064 0033DFC4 3C 80 80 3F */ lis r4, __upper_map@ha
/* 80341068 0033DFC8 38 84 2C 20 */ addi r4, r4, __upper_map@l
/* 8034106C 0033DFCC 7C 04 28 AE */ lbzx r0, r4, r5
lbl_80341070:
/* 80341070 0033DFD0 54 64 06 3E */ clrlwi r4, r3, 0x18
@ -59,15 +59,15 @@ lbl_80341070:
/* 80341084 0033DFE4 38 60 FF FF */ li r3, -1
/* 80341088 0033DFE8 48 00 00 10 */ b lbl_80341098
lbl_8034108C:
/* 8034108C 0033DFEC 3C 60 80 3F */ lis r3, lbl_803F2C20@ha
/* 80341090 0033DFF0 38 63 2C 20 */ addi r3, r3, lbl_803F2C20@l
/* 8034108C 0033DFEC 3C 60 80 3F */ lis r3, __upper_map@ha
/* 80341090 0033DFF0 38 63 2C 20 */ addi r3, r3, __upper_map@l
/* 80341094 0033DFF4 7C 63 20 AE */ lbzx r3, r3, r4
lbl_80341098:
/* 80341098 0033DFF8 38 AD A9 58 */ addi r5, r13, lbl_805A9518@sda21
/* 8034109C 0033DFFC 38 00 00 00 */ li r0, 0
/* 803410A0 0033E000 98 65 00 03 */ stb r3, 3(r5)
/* 803410A4 0033E004 3C 60 80 3F */ lis r3, lbl_803F2A20@ha
/* 803410A8 0033E008 38 83 2A 20 */ addi r4, r3, lbl_803F2A20@l
/* 803410A4 0033E004 3C 60 80 3F */ lis r3, __ctype_map@ha
/* 803410A8 0033E008 38 83 2A 20 */ addi r4, r3, __ctype_map@l
/* 803410AC 0033E00C 98 05 00 04 */ stb r0, 4(r5)
/* 803410B0 0033E010 38 00 00 2D */ li r0, 0x2d
/* 803410B4 0033E014 88 6D A9 58 */ lbz r3, lbl_805A9518@sda21(r13)

View File

@ -580,12 +580,12 @@ lbl_80315438:
lbl_80315444:
/* 80315444 003123A4 FC 01 10 00 */ fcmpu cr0, f1, f2
/* 80315448 003123A8 41 82 00 10 */ beq lbl_80315458
/* 8031544C 003123AC 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 80315450 003123B0 C0 43 8B A0 */ lfs f2, lbl_805A8BA0@l(r3)
/* 8031544C 003123AC 3C 60 80 5B */ lis r3, __float_nan@ha
/* 80315450 003123B0 C0 43 8B A0 */ lfs f2, __float_nan@l(r3)
/* 80315454 003123B4 48 00 00 0C */ b lbl_80315460
lbl_80315458:
/* 80315458 003123B8 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8031545C 003123BC C0 43 8B A4 */ lfs f2, lbl_805A8BA4@l(r3)
/* 80315458 003123B8 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8031545C 003123BC C0 43 8B A4 */ lfs f2, __float_huge@l(r3)
lbl_80315460:
/* 80315460 003123C0 C8 02 C9 C8 */ lfd f0, lbl_805AE6E8@sda21(r2)
/* 80315464 003123C4 FC 20 10 24 */ fdiv f1, f0, f2
@ -625,12 +625,12 @@ lbl_803154D0:
lbl_803154DC:
/* 803154DC 0031243C FC 01 00 00 */ fcmpu cr0, f1, f0
/* 803154E0 00312440 41 82 00 10 */ beq lbl_803154F0
/* 803154E4 00312444 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 803154E8 00312448 C0 03 8B A0 */ lfs f0, lbl_805A8BA0@l(r3)
/* 803154E4 00312444 3C 60 80 5B */ lis r3, __float_nan@ha
/* 803154E8 00312448 C0 03 8B A0 */ lfs f0, __float_nan@l(r3)
/* 803154EC 0031244C 48 00 00 0C */ b lbl_803154F8
lbl_803154F0:
/* 803154F0 00312450 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 803154F4 00312454 C0 03 8B A4 */ lfs f0, lbl_805A8BA4@l(r3)
/* 803154F0 00312450 3C 60 80 5B */ lis r3, __float_huge@ha
/* 803154F4 00312454 C0 03 8B A4 */ lfs f0, __float_huge@l(r3)
lbl_803154F8:
/* 803154F8 00312458 FC 20 00 90 */ fmr f1, f0
/* 803154FC 0031245C 4E 80 00 20 */ blr
@ -668,12 +668,12 @@ lbl_80315560:
lbl_8031556C:
/* 8031556C 003124CC FC 01 00 00 */ fcmpu cr0, f1, f0
/* 80315570 003124D0 41 82 00 10 */ beq lbl_80315580
/* 80315574 003124D4 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 80315578 003124D8 C0 03 8B A0 */ lfs f0, lbl_805A8BA0@l(r3)
/* 80315574 003124D4 3C 60 80 5B */ lis r3, __float_nan@ha
/* 80315578 003124D8 C0 03 8B A0 */ lfs f0, __float_nan@l(r3)
/* 8031557C 003124DC 48 00 00 0C */ b lbl_80315588
lbl_80315580:
/* 80315580 003124E0 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 80315584 003124E4 C0 03 8B A4 */ lfs f0, lbl_805A8BA4@l(r3)
/* 80315580 003124E0 3C 60 80 5B */ lis r3, __float_huge@ha
/* 80315584 003124E4 C0 03 8B A4 */ lfs f0, __float_huge@l(r3)
lbl_80315588:
/* 80315588 003124E8 FC 20 00 18 */ frsp f1, f0
/* 8031558C 003124EC 4E 80 00 20 */ blr

View File

@ -1923,6 +1923,8 @@ lbl_803D8368:
# ROM: 0x3D5368
.asciz "??(??)"
.balign 4
# what's going on here?
.if version < 2
.4byte 0
.4byte 0

View File

@ -2031,12 +2031,12 @@ lbl_8005452C:
lbl_80054538:
/* 80054538 00051498 FC 04 08 00 */ fcmpu cr0, f4, f1
/* 8005453C 0005149C 41 82 00 10 */ beq lbl_8005454C
/* 80054540 000514A0 3C 80 80 5B */ lis r4, lbl_805A8BA0@ha
/* 80054544 000514A4 C0 24 8B A0 */ lfs f1, lbl_805A8BA0@l(r4)
/* 80054540 000514A0 3C 80 80 5B */ lis r4, __float_nan@ha
/* 80054544 000514A4 C0 24 8B A0 */ lfs f1, __float_nan@l(r4)
/* 80054548 000514A8 48 00 00 0C */ b lbl_80054554
lbl_8005454C:
/* 8005454C 000514AC 3C 80 80 5B */ lis r4, lbl_805A8BA4@ha
/* 80054550 000514B0 C0 24 8B A4 */ lfs f1, lbl_805A8BA4@l(r4)
/* 8005454C 000514AC 3C 80 80 5B */ lis r4, __float_huge@ha
/* 80054550 000514B0 C0 24 8B A4 */ lfs f1, __float_huge@l(r4)
lbl_80054554:
/* 80054554 000514B4 FC 20 08 18 */ frsp f1, f1
/* 80054558 000514B8 C0 02 86 60 */ lfs f0, lbl_805AA380@sda21(r2)

View File

@ -144,12 +144,12 @@ lbl_8001B704:
lbl_8001B710:
/* 8001B710 00018670 FC 04 48 00 */ fcmpu cr0, f4, f9
/* 8001B714 00018674 41 82 00 10 */ beq lbl_8001B724
/* 8001B718 00018678 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 8001B71C 0001867C C1 23 8B A0 */ lfs f9, lbl_805A8BA0@l(r3)
/* 8001B718 00018678 3C 60 80 5B */ lis r3, __float_nan@ha
/* 8001B71C 0001867C C1 23 8B A0 */ lfs f9, __float_nan@l(r3)
/* 8001B720 00018680 48 00 00 0C */ b lbl_8001B72C
lbl_8001B724:
/* 8001B724 00018684 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8001B728 00018688 C1 23 8B A4 */ lfs f9, lbl_805A8BA4@l(r3)
/* 8001B724 00018684 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8001B728 00018688 C1 23 8B A4 */ lfs f9, __float_huge@l(r3)
lbl_8001B72C:
/* 8001B72C 0001868C FF 80 48 18 */ frsp f28, f9
/* 8001B730 00018690 C0 A2 82 5C */ lfs f5, lbl_805A9F7C@sda21(r2)
@ -257,12 +257,12 @@ lbl_8001B8A4:
lbl_8001B8B0:
/* 8001B8B0 00018810 FC 04 08 00 */ fcmpu cr0, f4, f1
/* 8001B8B4 00018814 41 82 00 10 */ beq lbl_8001B8C4
/* 8001B8B8 00018818 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 8001B8BC 0001881C C0 23 8B A0 */ lfs f1, lbl_805A8BA0@l(r3)
/* 8001B8B8 00018818 3C 60 80 5B */ lis r3, __float_nan@ha
/* 8001B8BC 0001881C C0 23 8B A0 */ lfs f1, __float_nan@l(r3)
/* 8001B8C0 00018820 48 00 00 0C */ b lbl_8001B8CC
lbl_8001B8C4:
/* 8001B8C4 00018824 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8001B8C8 00018828 C0 23 8B A4 */ lfs f1, lbl_805A8BA4@l(r3)
/* 8001B8C4 00018824 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8001B8C8 00018828 C0 23 8B A4 */ lfs f1, __float_huge@l(r3)
lbl_8001B8CC:
/* 8001B8CC 0001882C FF E0 08 18 */ frsp f31, f1
/* 8001B8D0 00018830 C0 22 82 5C */ lfs f1, lbl_805A9F7C@sda21(r2)

View File

@ -38,7 +38,7 @@ lbl_805A9110:
.section .text, "ax"
.if version == 2
.if version >= 2
.global PollResponse__11CGBASupportFv
PollResponse__11CGBASupportFv:

View File

@ -8130,12 +8130,12 @@ lbl_800F4080:
lbl_800F408C:
/* 800F408C 000F0FEC FC 04 08 00 */ fcmpu cr0, f4, f1
/* 800F4090 000F0FF0 41 82 00 10 */ beq lbl_800F40A0
/* 800F4094 000F0FF4 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 800F4098 000F0FF8 C0 23 8B A0 */ lfs f1, lbl_805A8BA0@l(r3)
/* 800F4094 000F0FF4 3C 60 80 5B */ lis r3, __float_nan@ha
/* 800F4098 000F0FF8 C0 23 8B A0 */ lfs f1, __float_nan@l(r3)
/* 800F409C 000F0FFC 48 00 00 0C */ b lbl_800F40A8
lbl_800F40A0:
/* 800F40A0 000F1000 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 800F40A4 000F1004 C0 23 8B A4 */ lfs f1, lbl_805A8BA4@l(r3)
/* 800F40A0 000F1000 3C 60 80 5B */ lis r3, __float_huge@ha
/* 800F40A4 000F1004 C0 23 8B A4 */ lfs f1, __float_huge@l(r3)
lbl_800F40A8:
/* 800F40A8 000F1008 FF 80 08 18 */ frsp f28, f1
/* 800F40AC 000F100C FC 20 E8 90 */ fmr f1, f29
@ -8192,12 +8192,12 @@ lbl_800F4168:
lbl_800F4174:
/* 800F4174 000F10D4 FC 06 10 00 */ fcmpu cr0, f6, f2
/* 800F4178 000F10D8 41 82 00 10 */ beq lbl_800F4188
/* 800F417C 000F10DC 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 800F4180 000F10E0 C0 43 8B A0 */ lfs f2, lbl_805A8BA0@l(r3)
/* 800F417C 000F10DC 3C 60 80 5B */ lis r3, __float_nan@ha
/* 800F4180 000F10E0 C0 43 8B A0 */ lfs f2, __float_nan@l(r3)
/* 800F4184 000F10E4 48 00 00 0C */ b lbl_800F4190
lbl_800F4188:
/* 800F4188 000F10E8 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 800F418C 000F10EC C0 43 8B A4 */ lfs f2, lbl_805A8BA4@l(r3)
/* 800F4188 000F10E8 3C 60 80 5B */ lis r3, __float_huge@ha
/* 800F418C 000F10EC C0 43 8B A4 */ lfs f2, __float_huge@l(r3)
lbl_800F4190:
/* 800F4190 000F10F0 FC 60 10 18 */ frsp f3, f2
/* 800F4194 000F10F4 C0 42 91 50 */ lfs f2, lbl_805AAE70@sda21(r2)
@ -8250,12 +8250,12 @@ lbl_800F4240:
lbl_800F424C:
/* 800F424C 000F11AC FC 04 10 00 */ fcmpu cr0, f4, f2
/* 800F4250 000F11B0 41 82 00 10 */ beq lbl_800F4260
/* 800F4254 000F11B4 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 800F4258 000F11B8 C0 43 8B A0 */ lfs f2, lbl_805A8BA0@l(r3)
/* 800F4254 000F11B4 3C 60 80 5B */ lis r3, __float_nan@ha
/* 800F4258 000F11B8 C0 43 8B A0 */ lfs f2, __float_nan@l(r3)
/* 800F425C 000F11BC 48 00 00 0C */ b lbl_800F4268
lbl_800F4260:
/* 800F4260 000F11C0 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 800F4264 000F11C4 C0 43 8B A4 */ lfs f2, lbl_805A8BA4@l(r3)
/* 800F4260 000F11C0 3C 60 80 5B */ lis r3, __float_huge@ha
/* 800F4264 000F11C4 C0 43 8B A4 */ lfs f2, __float_huge@l(r3)
lbl_800F4268:
/* 800F4268 000F11C8 FC 20 E8 90 */ fmr f1, f29
/* 800F426C 000F11CC FC 40 10 18 */ frsp f2, f2

View File

@ -3997,12 +3997,12 @@ lbl_80285524:
lbl_80285530:
/* 80285530 00282490 FC 04 18 00 */ fcmpu cr0, f4, f3
/* 80285534 00282494 41 82 00 10 */ beq lbl_80285544
/* 80285538 00282498 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 8028553C 0028249C C0 63 8B A0 */ lfs f3, lbl_805A8BA0@l(r3)
/* 80285538 00282498 3C 60 80 5B */ lis r3, __float_nan@ha
/* 8028553C 0028249C C0 63 8B A0 */ lfs f3, __float_nan@l(r3)
/* 80285540 002824A0 48 00 00 0C */ b lbl_8028554C
lbl_80285544:
/* 80285544 002824A4 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 80285548 002824A8 C0 63 8B A4 */ lfs f3, lbl_805A8BA4@l(r3)
/* 80285544 002824A4 3C 60 80 5B */ lis r3, __float_huge@ha
/* 80285548 002824A8 C0 63 8B A4 */ lfs f3, __float_huge@l(r3)
lbl_8028554C:
/* 8028554C 002824AC FF E0 18 18 */ frsp f31, f3
/* 80285550 002824B0 80 7E 08 8C */ lwz r3, 0x88c(r30)

View File

@ -2958,12 +2958,12 @@ lbl_802180D0:
lbl_802180DC:
/* 802180DC 0021503C FC 04 00 00 */ fcmpu cr0, f4, f0
/* 802180E0 00215040 41 82 00 10 */ beq lbl_802180F0
/* 802180E4 00215044 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 802180E8 00215048 C0 03 8B A0 */ lfs f0, lbl_805A8BA0@l(r3)
/* 802180E4 00215044 3C 60 80 5B */ lis r3, __float_nan@ha
/* 802180E8 00215048 C0 03 8B A0 */ lfs f0, __float_nan@l(r3)
/* 802180EC 0021504C 48 00 00 0C */ b lbl_802180F8
lbl_802180F0:
/* 802180F0 00215050 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 802180F4 00215054 C0 03 8B A4 */ lfs f0, lbl_805A8BA4@l(r3)
/* 802180F0 00215050 3C 60 80 5B */ lis r3, __float_huge@ha
/* 802180F4 00215054 C0 03 8B A4 */ lfs f0, __float_huge@l(r3)
lbl_802180F8:
/* 802180F8 00215058 FC 20 00 18 */ frsp f1, f0
/* 802180FC 0021505C C0 02 B3 B0 */ lfs f0, lbl_805AD0D0@sda21(r2)
@ -3248,12 +3248,12 @@ lbl_80218518:
lbl_80218524:
/* 80218524 00215484 FC 04 00 00 */ fcmpu cr0, f4, f0
/* 80218528 00215488 41 82 00 10 */ beq lbl_80218538
/* 8021852C 0021548C 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 80218530 00215490 C0 03 8B A0 */ lfs f0, lbl_805A8BA0@l(r3)
/* 8021852C 0021548C 3C 60 80 5B */ lis r3, __float_nan@ha
/* 80218530 00215490 C0 03 8B A0 */ lfs f0, __float_nan@l(r3)
/* 80218534 00215494 48 00 00 0C */ b lbl_80218540
lbl_80218538:
/* 80218538 00215498 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8021853C 0021549C C0 03 8B A4 */ lfs f0, lbl_805A8BA4@l(r3)
/* 80218538 00215498 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8021853C 0021549C C0 03 8B A4 */ lfs f0, __float_huge@l(r3)
lbl_80218540:
/* 80218540 002154A0 FC 20 00 18 */ frsp f1, f0
/* 80218544 002154A4 C0 02 B3 B0 */ lfs f0, lbl_805AD0D0@sda21(r2)

View File

@ -2,8 +2,8 @@
.section .sbss
.balign 8
.global lbl_805A99D0
lbl_805A99D0:
.global errno
errno:
.skip 0x8
.section .text, "ax"
@ -39,7 +39,7 @@ _fseek:
lbl_8038D4C8:
/* 8038D4C8 0038A428 38 00 00 28 */ li r0, 0x28
/* 8038D4CC 0038A42C 38 60 FF FF */ li r3, -1
/* 8038D4D0 0038A430 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13)
/* 8038D4D0 0038A430 90 0D AE 10 */ stw r0, errno@sda21(r13)
/* 8038D4D4 0038A434 48 00 01 DC */ b lbl_8038D6B0
lbl_8038D4D8:
/* 8038D4D8 0038A438 88 1E 00 08 */ lbz r0, 8(r30)
@ -56,7 +56,7 @@ lbl_8038D4D8:
/* 8038D504 0038A464 38 00 00 28 */ li r0, 0x28
/* 8038D508 0038A468 38 60 FF FF */ li r3, -1
/* 8038D50C 0038A46C 90 9E 00 28 */ stw r4, 0x28(r30)
/* 8038D510 0038A470 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13)
/* 8038D510 0038A470 90 0D AE 10 */ stw r0, errno@sda21(r13)
/* 8038D514 0038A474 48 00 01 9C */ b lbl_8038D6B0
lbl_8038D518:
/* 8038D518 0038A478 2C 1F 00 01 */ cmpwi r31, 1
@ -75,7 +75,7 @@ lbl_8038D53C:
lbl_8038D548:
/* 8038D548 0038A4A8 38 00 00 28 */ li r0, 0x28
/* 8038D54C 0038A4AC 38 60 FF FF */ li r3, -1
/* 8038D550 0038A4B0 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13)
/* 8038D550 0038A4B0 90 0D AE 10 */ stw r0, errno@sda21(r13)
/* 8038D554 0038A4B4 48 00 00 3C */ b lbl_8038D590
lbl_8038D558:
/* 8038D558 0038A4B8 88 1E 00 08 */ lbz r0, 8(r30)
@ -164,7 +164,7 @@ lbl_8038D640:
/* 8038D684 0038A5E4 38 00 00 28 */ li r0, 0x28
/* 8038D688 0038A5E8 38 60 FF FF */ li r3, -1
/* 8038D68C 0038A5EC 90 9E 00 28 */ stw r4, 0x28(r30)
/* 8038D690 0038A5F0 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13)
/* 8038D690 0038A5F0 90 0D AE 10 */ stw r0, errno@sda21(r13)
/* 8038D694 0038A5F4 48 00 00 1C */ b lbl_8038D6B0
lbl_8038D698:
/* 8038D698 0038A5F8 38 60 00 00 */ li r3, 0
@ -197,7 +197,7 @@ lbl_8038D6E0:
lbl_8038D6EC:
/* 8038D6EC 0038A64C 38 00 00 28 */ li r0, 0x28
/* 8038D6F0 0038A650 38 60 FF FF */ li r3, -1
/* 8038D6F4 0038A654 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13)
/* 8038D6F4 0038A654 90 0D AE 10 */ stw r0, errno@sda21(r13)
/* 8038D6F8 0038A658 4E 80 00 20 */ blr
lbl_8038D6FC:
/* 8038D6FC 0038A65C 88 03 00 08 */ lbz r0, 8(r3)

View File

@ -193,11 +193,11 @@ lbl_extabindex:
.4byte 0x000000B8
.4byte __partial_array_destructor_extab
.global lbl_80003604
lbl_80003604:
.global _eti_init_info_
_eti_init_info_:
# ROM: 0x3C8184
.4byte lbl_extabindex
.4byte lbl_80003604
.4byte _eti_init_info_
.4byte __destroy_arr
.4byte 0x00000228
.4byte 0

View File

@ -33,9 +33,9 @@ __init_cpp_exceptions:
/* 8038A130 00387090 2C 00 FF FE */ cmpwi r0, -2
/* 8038A134 00387094 40 82 00 1C */ bne lbl_8038A150
/* 8038A138 00387098 4B FF FF AD */ bl GetR2__Fv
/* 8038A13C 0038709C 3C A0 80 00 */ lis r5, lbl_80003604@ha
/* 8038A13C 0038709C 3C A0 80 00 */ lis r5, _eti_init_info_@ha
/* 8038A140 003870A0 7C 64 1B 78 */ mr r4, r3
/* 8038A144 003870A4 38 65 36 04 */ addi r3, r5, lbl_80003604@l
/* 8038A144 003870A4 38 65 36 04 */ addi r3, r5, _eti_init_info_@l
/* 8038A148 003870A8 48 00 00 4D */ bl __register_fragment
/* 8038A14C 003870AC 90 6D 9F C8 */ stw r3, fragmentID@sda21(r13)
lbl_8038A150:
@ -62,4 +62,3 @@ __fini_cpp_exceptions_reference:
.balign 8
fragmentID:
.4byte 0xFFFFFFFE
.4byte 0

View File

@ -2,21 +2,19 @@
.section .bss
.balign 8
.lcomm lbl_80542198, 0x100, 4
.lcomm __atexit_funcs, 0x100, 4
.section .sbss
.balign 8
.global lbl_805A99B8
lbl_805A99B8:
.global __aborting
__aborting:
.skip 0x4
.global lbl_805A99BC
lbl_805A99BC:
__atexit_curr_func:
.skip 0x4
.global lbl_805A99C0
lbl_805A99C0:
.global __stdio_exit
__stdio_exit:
.skip 0x4
.global lbl_805A99C4
lbl_805A99C4:
__console_exit:
.skip 0x4
.section .text, "ax"
@ -27,7 +25,7 @@ exit:
/* 8038A1CC 0038712C 7C 08 02 A6 */ mflr r0
/* 8038A1D0 00387130 90 01 00 14 */ stw r0, 0x14(r1)
/* 8038A1D4 00387134 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8038A1D8 00387138 80 0D AD F8 */ lwz r0, lbl_805A99B8@sda21(r13)
/* 8038A1D8 00387138 80 0D AD F8 */ lwz r0, __aborting@sda21(r13)
/* 8038A1DC 0038713C 2C 00 00 00 */ cmpwi r0, 0
/* 8038A1E0 00387140 40 82 00 4C */ bne lbl_8038A22C
/* 8038A1E4 00387144 4B FF F4 61 */ bl __destroy_global_chain
@ -43,36 +41,36 @@ lbl_8038A204:
/* 8038A204 00387164 81 9F 00 00 */ lwz r12, 0(r31)
/* 8038A208 00387168 28 0C 00 00 */ cmplwi r12, 0
/* 8038A20C 0038716C 40 82 FF EC */ bne lbl_8038A1F8
/* 8038A210 00387170 81 8D AE 00 */ lwz r12, lbl_805A99C0@sda21(r13)
/* 8038A210 00387170 81 8D AE 00 */ lwz r12, __stdio_exit@sda21(r13)
/* 8038A214 00387174 28 0C 00 00 */ cmplwi r12, 0
/* 8038A218 00387178 41 82 00 14 */ beq lbl_8038A22C
/* 8038A21C 0038717C 7D 89 03 A6 */ mtctr r12
/* 8038A220 00387180 4E 80 04 21 */ bctrl
/* 8038A224 00387184 38 00 00 00 */ li r0, 0
/* 8038A228 00387188 90 0D AE 00 */ stw r0, lbl_805A99C0@sda21(r13)
/* 8038A228 00387188 90 0D AE 00 */ stw r0, __stdio_exit@sda21(r13)
lbl_8038A22C:
/* 8038A22C 0038718C 3C 60 80 54 */ lis r3, lbl_80542198@ha
/* 8038A230 00387190 3B E3 21 98 */ addi r31, r3, lbl_80542198@l
/* 8038A22C 0038718C 3C 60 80 54 */ lis r3, __atexit_funcs@ha
/* 8038A230 00387190 3B E3 21 98 */ addi r31, r3, __atexit_funcs@l
/* 8038A234 00387194 48 00 00 20 */ b lbl_8038A254
lbl_8038A238:
/* 8038A238 00387198 80 6D AD FC */ lwz r3, lbl_805A99BC@sda21(r13)
/* 8038A238 00387198 80 6D AD FC */ lwz r3, __atexit_curr_func@sda21(r13)
/* 8038A23C 0038719C 38 63 FF FF */ addi r3, r3, -1
/* 8038A240 003871A0 54 60 10 3A */ slwi r0, r3, 2
/* 8038A244 003871A4 90 6D AD FC */ stw r3, lbl_805A99BC@sda21(r13)
/* 8038A244 003871A4 90 6D AD FC */ stw r3, __atexit_curr_func@sda21(r13)
/* 8038A248 003871A8 7D 9F 00 2E */ lwzx r12, r31, r0
/* 8038A24C 003871AC 7D 89 03 A6 */ mtctr r12
/* 8038A250 003871B0 4E 80 04 21 */ bctrl
lbl_8038A254:
/* 8038A254 003871B4 80 0D AD FC */ lwz r0, lbl_805A99BC@sda21(r13)
/* 8038A254 003871B4 80 0D AD FC */ lwz r0, __atexit_curr_func@sda21(r13)
/* 8038A258 003871B8 2C 00 00 00 */ cmpwi r0, 0
/* 8038A25C 003871BC 41 81 FF DC */ bgt lbl_8038A238
/* 8038A260 003871C0 81 8D AE 04 */ lwz r12, lbl_805A99C4@sda21(r13)
/* 8038A260 003871C0 81 8D AE 04 */ lwz r12, __console_exit@sda21(r13)
/* 8038A264 003871C4 28 0C 00 00 */ cmplwi r12, 0
/* 8038A268 003871C8 41 82 00 14 */ beq lbl_8038A27C
/* 8038A26C 003871CC 7D 89 03 A6 */ mtctr r12
/* 8038A270 003871D0 4E 80 04 21 */ bctrl
/* 8038A274 003871D4 38 00 00 00 */ li r0, 0
/* 8038A278 003871D8 90 0D AE 04 */ stw r0, lbl_805A99C4@sda21(r13)
/* 8038A278 003871D8 90 0D AE 04 */ stw r0, __console_exit@sda21(r13)
lbl_8038A27C:
/* 8038A27C 003871DC 4B FF B6 1D */ bl _ExitProcess
/* 8038A280 003871E0 80 01 00 14 */ lwz r0, 0x14(r1)

View File

@ -1,5 +1,205 @@
.include "macros.inc"
.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
.4byte 0x40240000
.4byte 0
.4byte 0x40590000
.4byte 0
.4byte 0x408F4000
.4byte 0
.4byte 0x40C38800
.4byte 0
.4byte 0x40F86A00
.4byte 0
.4byte 0x412E8480
.4byte 0
.4byte 0x416312D0
.4byte 0
.4byte 0x4197D784
.4byte 0
.global lbl_803F28F8
lbl_803F28F8:
# ROM: 0x3EF8F8
.4byte lbl_8038C62C
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C644
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C65C
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C674
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C824
.4byte lbl_8038C68C
.4byte lbl_8038C6A4
.4byte lbl_8038C6BC
.4byte lbl_8038C6D4
.4byte lbl_8038C6EC
.4byte lbl_8038C704
.4byte lbl_8038C71C
.4byte lbl_8038C734
.4byte lbl_8038C74C
.4byte lbl_8038C764
.4byte lbl_8038C77C
.4byte lbl_8038C794
.4byte lbl_8038C7AC
.4byte lbl_8038C7C4
.4byte lbl_8038C7DC
.4byte lbl_8038C7F4
.4byte lbl_8038C80C
.4byte 0
.section .rodata
.balign 8
.global lbl_803D85D8
@ -32,19 +232,6 @@ lbl_803D85D8:
.4byte 0x00323536
.4byte 0
.global lbl_803D86B8
lbl_803D86B8:
# ROM: 0x3D56B8
.2byte 0x2E00
.global lbl_803D86BA
lbl_803D86BA:
# ROM: 0x3D56BA
.byte 0x00, 0x43
.4byte 0
.section .text, "ax"
.global __dec2num
@ -96,8 +283,8 @@ lbl_8038B240:
/* 8038B244 003881A4 48 00 08 A0 */ b lbl_8038BAE4
lbl_8038B248:
/* 8038B248 003881A8 88 03 00 00 */ lbz r0, 0(r3)
/* 8038B24C 003881AC 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8038B250 003881B0 C0 23 8B A4 */ lfs f1, lbl_805A8BA4@l(r3)
/* 8038B24C 003881AC 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8038B250 003881B0 C0 23 8B A4 */ lfs f1, __float_huge@l(r3)
/* 8038B254 003881B4 7C 00 07 75 */ extsb. r0, r0
/* 8038B258 003881B8 40 82 00 0C */ bne lbl_8038B264
/* 8038B25C 003881BC C8 42 CF 48 */ lfd f2, lbl_805AEC68@sda21(r2)
@ -137,9 +324,9 @@ lbl_8038B2BC:
/* 8038B2D0 00388230 40 81 00 08 */ ble lbl_8038B2D8
/* 8038B2D4 00388234 38 C0 00 0E */ li r6, 0xe
lbl_8038B2D8:
/* 8038B2D8 00388238 3C 80 80 3F */ lis r4, lbl_803F2A20@ha
/* 8038B2D8 00388238 3C 80 80 3F */ lis r4, __ctype_map@ha
/* 8038B2DC 0038823C 38 06 FF FF */ addi r0, r6, -1
/* 8038B2E0 00388240 38 A4 2A 20 */ addi r5, r4, lbl_803F2A20@l
/* 8038B2E0 00388240 38 A4 2A 20 */ addi r5, r4, __ctype_map@l
/* 8038B2E4 00388244 39 40 00 01 */ li r10, 1
/* 8038B2E8 00388248 7C 09 03 A6 */ mtctr r0
/* 8038B2EC 0038824C 2C 06 00 01 */ cmpwi r6, 1
@ -158,8 +345,8 @@ lbl_8038B310:
/* 8038B318 00388278 38 80 FF FF */ li r4, -1
/* 8038B31C 0038827C 48 00 00 10 */ b lbl_8038B32C
lbl_8038B320:
/* 8038B320 00388280 3C 80 80 3F */ lis r4, lbl_803F2B20@ha
/* 8038B324 00388284 38 84 2B 20 */ addi r4, r4, lbl_803F2B20@l
/* 8038B320 00388280 3C 80 80 3F */ lis r4, __lower_map@ha
/* 8038B324 00388284 38 84 2B 20 */ addi r4, r4, __lower_map@l
/* 8038B328 00388288 7C 84 30 AE */ lbzx r4, r4, r6
lbl_8038B32C:
/* 8038B32C 0038828C 38 04 FF A9 */ addi r0, r4, -87
@ -442,8 +629,8 @@ lbl_8038B6E4:
/* 8038B708 00388668 48 00 0C D9 */ bl __less_dec
/* 8038B70C 0038866C 2C 03 00 00 */ cmpwi r3, 0
/* 8038B710 00388670 40 82 03 B8 */ bne lbl_8038BAC8
/* 8038B714 00388674 3C 60 80 5B */ lis r3, lbl_805A8BB0@ha
/* 8038B718 00388678 C8 03 8B B0 */ lfd f0, lbl_805A8BB0@l(r3)
/* 8038B714 00388674 3C 60 80 5B */ lis r3, __double_max@ha
/* 8038B718 00388678 C8 03 8B B0 */ lfd f0, __double_max@l(r3)
/* 8038B71C 0038867C D8 01 00 20 */ stfd f0, 0x20(r1)
lbl_8038B720:
/* 8038B720 00388680 C8 21 00 20 */ lfd f1, 0x20(r1)
@ -459,9 +646,9 @@ lbl_8038B720:
/* 8038B748 003886A8 48 00 0C 99 */ bl __less_dec
/* 8038B74C 003886AC 2C 03 00 00 */ cmpwi r3, 0
/* 8038B750 003886B0 41 82 02 44 */ beq lbl_8038B994
/* 8038B754 003886B4 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8038B754 003886B4 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8038B758 003886B8 C8 21 00 20 */ lfd f1, 0x20(r1)
/* 8038B75C 003886BC C0 43 8B A4 */ lfs f2, lbl_805A8BA4@l(r3)
/* 8038B75C 003886BC C0 43 8B A4 */ lfs f2, __float_huge@l(r3)
/* 8038B760 003886C0 48 00 91 F9 */ bl nextafter
/* 8038B764 003886C4 FF E0 08 90 */ fmr f31, f1
/* 8038B768 003886C8 3C 00 7F F0 */ lis r0, 0x7ff0
@ -509,9 +696,9 @@ lbl_8038B7EC:
/* 8038B7EC 0038874C FC 20 F8 90 */ fmr f1, f31
/* 8038B7F0 00388750 38 61 01 0C */ addi r3, r1, 0x10c
/* 8038B7F4 00388754 48 00 04 B5 */ bl __num2dec_internal
/* 8038B7F8 00388758 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8038B7F8 00388758 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8038B7FC 0038875C 3F E0 7F F0 */ lis r31, 0x7ff0
/* 8038B800 00388760 3B C3 8B A4 */ addi r30, r3, lbl_805A8BA4@l
/* 8038B800 00388760 3B C3 8B A4 */ addi r30, r3, __float_huge@l
/* 8038B804 00388764 48 00 00 FC */ b lbl_8038B900
lbl_8038B808:
/* 8038B808 00388768 81 81 01 0C */ lwz r12, 0x10c(r1)
@ -625,16 +812,16 @@ lbl_8038B978:
/* 8038B98C 003888EC DB E1 00 20 */ stfd f31, 0x20(r1)
/* 8038B990 003888F0 48 00 01 38 */ b lbl_8038BAC8
lbl_8038B994:
/* 8038B994 003888F4 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8038B994 003888F4 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8038B998 003888F8 C8 21 00 20 */ lfd f1, 0x20(r1)
/* 8038B99C 003888FC C0 03 8B A4 */ lfs f0, lbl_805A8BA4@l(r3)
/* 8038B99C 003888FC C0 03 8B A4 */ lfs f0, __float_huge@l(r3)
/* 8038B9A0 00388900 FC 40 00 50 */ fneg f2, f0
/* 8038B9A4 00388904 48 00 8F B5 */ bl nextafter
/* 8038B9A8 00388908 FF E0 08 90 */ fmr f31, f1
/* 8038B9AC 0038890C 38 61 00 88 */ addi r3, r1, 0x88
/* 8038B9B0 00388910 48 00 02 F9 */ bl __num2dec_internal
/* 8038B9B4 00388914 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 8038B9B8 00388918 3B E3 8B A4 */ addi r31, r3, lbl_805A8BA4@l
/* 8038B9B4 00388914 3C 60 80 5B */ lis r3, __float_huge@ha
/* 8038B9B8 00388918 3B E3 8B A4 */ addi r31, r3, __float_huge@l
/* 8038B9BC 0038891C 48 00 00 7C */ b lbl_8038BA38
lbl_8038B9C0:
/* 8038B9C0 00388920 C0 1F 00 00 */ lfs f0, 0(r31)

View File

@ -1,5 +1,212 @@
.include "macros.inc"
.section .data, "wa"
.balign 8
.global __ctype_map
__ctype_map:
# ROM: 0x3EFA20
.4byte 0x01010101
.4byte 0x01010101
.4byte 0x01020202
.4byte 0x02020101
.4byte 0x01010101
.4byte 0x01010101
.4byte 0x01010101
.4byte 0x01010101
.4byte 0x04080808
.4byte 0x08080808
.4byte 0x08080808
.4byte 0x08080808
.4byte 0x30303030
.4byte 0x30303030
.4byte 0x30300808
.4byte 0x08080808
.4byte 0x08A0A0A0
.4byte 0xA0A0A080
.4byte 0x80808080
.4byte 0x80808080
.4byte 0x80808080
.4byte 0x80808080
.4byte 0x80808008
.4byte 0x08080808
.4byte 0x08606060
.4byte 0x60606040
.4byte 0x40404040
.4byte 0x40404040
.4byte 0x40404040
.4byte 0x40404040
.4byte 0x40404008
.4byte 0x08080801
.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
.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 __lower_map
__lower_map:
# ROM: 0x3EFB20
.4byte 0x00010203
.4byte 0x04050607
.4byte 0x08090A0B
.4byte 0x0C0D0E0F
.4byte 0x10111213
.4byte 0x14151617
.4byte 0x18191A1B
.4byte 0x1C1D1E1F
.4byte 0x20212223
.4byte 0x24252627
.4byte 0x28292A2B
.4byte 0x2C2D2E2F
.4byte 0x30313233
.4byte 0x34353637
.4byte 0x38393A3B
.4byte 0x3C3D3E3F
.4byte 0x40616263
.4byte 0x64656667
.4byte 0x68696A6B
.4byte 0x6C6D6E6F
.4byte 0x70717273
.4byte 0x74757677
.4byte 0x78797A5B
.4byte 0x5C5D5E5F
.4byte 0x60616263
.4byte 0x64656667
.4byte 0x68696A6B
.4byte 0x6C6D6E6F
.4byte 0x70717273
.4byte 0x74757677
.4byte 0x78797A7B
.4byte 0x7C7D7E7F
.4byte 0x80818283
.4byte 0x84858687
.4byte 0x88898A8B
.4byte 0x8C8D8E8F
.4byte 0x90919293
.4byte 0x94959697
.4byte 0x98999A9B
.4byte 0x9C9D9E9F
.4byte 0xA0A1A2A3
.4byte 0xA4A5A6A7
.4byte 0xA8A9AAAB
.4byte 0xACADAEAF
.4byte 0xB0B1B2B3
.4byte 0xB4B5B6B7
.4byte 0xB8B9BABB
.4byte 0xBCBDBEBF
.4byte 0xC0C1C2C3
.4byte 0xC4C5C6C7
.4byte 0xC8C9CACB
.4byte 0xCCCDCECF
.4byte 0xD0D1D2D3
.4byte 0xD4D5D6D7
.4byte 0xD8D9DADB
.4byte 0xDCDDDEDF
.4byte 0xE0E1E2E3
.4byte 0xE4E5E6E7
.4byte 0xE8E9EAEB
.4byte 0xECEDEEEF
.4byte 0xF0F1F2F3
.4byte 0xF4F5F6F7
.4byte 0xF8F9FAFB
.4byte 0xFCFDFEFF
.global __upper_map
__upper_map:
# ROM: 0x3EFC20
.4byte 0x00010203
.4byte 0x04050607
.4byte 0x08090A0B
.4byte 0x0C0D0E0F
.4byte 0x10111213
.4byte 0x14151617
.4byte 0x18191A1B
.4byte 0x1C1D1E1F
.4byte 0x20212223
.4byte 0x24252627
.4byte 0x28292A2B
.4byte 0x2C2D2E2F
.4byte 0x30313233
.4byte 0x34353637
.4byte 0x38393A3B
.4byte 0x3C3D3E3F
.4byte 0x40414243
.4byte 0x44454647
.4byte 0x48494A4B
.4byte 0x4C4D4E4F
.4byte 0x50515253
.4byte 0x54555657
.4byte 0x58595A5B
.4byte 0x5C5D5E5F
.4byte 0x60414243
.4byte 0x44454647
.4byte 0x48494A4B
.4byte 0x4C4D4E4F
.4byte 0x50515253
.4byte 0x54555657
.4byte 0x58595A7B
.4byte 0x7C7D7E7F
.4byte 0x80818283
.4byte 0x84858687
.4byte 0x88898A8B
.4byte 0x8C8D8E8F
.4byte 0x90919293
.4byte 0x94959697
.4byte 0x98999A9B
.4byte 0x9C9D9E9F
.4byte 0xA0A1A2A3
.4byte 0xA4A5A6A7
.4byte 0xA8A9AAAB
.4byte 0xACADAEAF
.4byte 0xB0B1B2B3
.4byte 0xB4B5B6B7
.4byte 0xB8B9BABB
.4byte 0xBCBDBEBF
.4byte 0xC0C1C2C3
.4byte 0xC4C5C6C7
.4byte 0xC8C9CACB
.4byte 0xCCCDCECF
.4byte 0xD0D1D2D3
.4byte 0xD4D5D6D7
.4byte 0xD8D9DADB
.4byte 0xDCDDDEDF
.4byte 0xE0E1E2E3
.4byte 0xE4E5E6E7
.4byte 0xE8E9EAEB
.4byte 0xECEDEEEF
.4byte 0xF0F1F2F3
.4byte 0xF4F5F6F7
.4byte 0xF8F9FAFB
.4byte 0xFCFDFEFF
.section .text, "ax"
.global tolower
@ -9,8 +216,8 @@ tolower:
/* 8038CF2C 00389E8C 38 60 FF FF */ li r3, -1
/* 8038CF30 00389E90 4E 80 00 20 */ blr
lbl_8038CF34:
/* 8038CF34 00389E94 3C 80 80 3F */ lis r4, lbl_803F2B20@ha
/* 8038CF34 00389E94 3C 80 80 3F */ lis r4, __lower_map@ha
/* 8038CF38 00389E98 54 60 06 3E */ clrlwi r0, r3, 0x18
/* 8038CF3C 00389E9C 38 64 2B 20 */ addi r3, r4, lbl_803F2B20@l
/* 8038CF3C 00389E9C 38 64 2B 20 */ addi r3, r4, __lower_map@l
/* 8038CF40 00389EA0 7C 63 00 AE */ lbzx r3, r3, r0
/* 8038CF44 00389EA4 4E 80 00 20 */ blr

View File

@ -23,8 +23,8 @@ lbl_80391404:
/* 80391404 0038E364 C8 22 CF A0 */ lfd f1, lbl_805AECC0@sda21(r2)
/* 80391408 0038E368 48 00 02 C8 */ b lbl_803916D0
lbl_8039140C:
/* 8039140C 0038E36C 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 80391410 0038E370 C0 23 8B A0 */ lfs f1, lbl_805A8BA0@l(r3)
/* 8039140C 0038E36C 3C 60 80 5B */ lis r3, __float_nan@ha
/* 80391410 0038E370 C0 23 8B A0 */ lfs f1, __float_nan@l(r3)
/* 80391414 0038E374 48 00 02 BC */ b lbl_803916D0
lbl_80391418:
/* 80391418 0038E378 3C 00 3F E0 */ lis r0, 0x3fe0
@ -122,12 +122,12 @@ lbl_80391570:
lbl_8039157C:
/* 8039157C 0038E4DC FC 01 58 00 */ fcmpu cr0, f1, f11
/* 80391580 0038E4E0 41 82 00 10 */ beq lbl_80391590
/* 80391584 0038E4E4 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 80391588 0038E4E8 C1 63 8B A0 */ lfs f11, lbl_805A8BA0@l(r3)
/* 80391584 0038E4E4 3C 60 80 5B */ lis r3, __float_nan@ha
/* 80391588 0038E4E8 C1 63 8B A0 */ lfs f11, __float_nan@l(r3)
/* 8039158C 0038E4EC 48 00 00 0C */ b lbl_80391598
lbl_80391590:
/* 80391590 0038E4F0 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 80391594 0038E4F4 C1 63 8B A4 */ lfs f11, lbl_805A8BA4@l(r3)
/* 80391590 0038E4F0 3C 60 80 5B */ lis r3, __float_huge@ha
/* 80391594 0038E4F4 C1 63 8B A4 */ lfs f11, __float_huge@l(r3)
lbl_80391598:
/* 80391598 0038E4F8 FC 45 30 24 */ fdiv f2, f5, f6
/* 8039159C 0038E4FC C8 22 CF B0 */ lfd f1, lbl_805AECD0@sda21(r2)
@ -172,12 +172,12 @@ lbl_80391624:
lbl_80391630:
/* 80391630 0038E590 FC 00 48 00 */ fcmpu cr0, f0, f9
/* 80391634 0038E594 41 82 00 10 */ beq lbl_80391644
/* 80391638 0038E598 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 8039163C 0038E59C C1 23 8B A0 */ lfs f9, lbl_805A8BA0@l(r3)
/* 80391638 0038E598 3C 60 80 5B */ lis r3, __float_nan@ha
/* 8039163C 0038E59C C1 23 8B A0 */ lfs f9, __float_nan@l(r3)
/* 80391640 0038E5A0 48 00 00 0C */ b lbl_8039164C
lbl_80391644:
/* 80391644 0038E5A4 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha
/* 80391648 0038E5A8 C1 23 8B A4 */ lfs f9, lbl_805A8BA4@l(r3)
/* 80391644 0038E5A4 3C 60 80 5B */ lis r3, __float_huge@ha
/* 80391648 0038E5A8 C1 23 8B A4 */ lfs f9, __float_huge@l(r3)
lbl_8039164C:
/* 8039164C 0038E5AC C8 42 CF E0 */ lfd f2, lbl_805AED00@sda21(r2)
/* 80391650 0038E5B0 38 00 00 00 */ li r0, 0

View File

@ -21,8 +21,8 @@ __ieee754_asin:
/* 80391710 0038E670 FC 22 00 7A */ fmadd f1, f2, f1, f0
/* 80391714 0038E674 48 00 02 20 */ b lbl_80391934
lbl_80391718:
/* 80391718 0038E678 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 8039171C 0038E67C C0 23 8B A0 */ lfs f1, lbl_805A8BA0@l(r3)
/* 80391718 0038E678 3C 60 80 5B */ lis r3, __float_nan@ha
/* 8039171C 0038E67C C0 23 8B A0 */ lfs f1, __float_nan@l(r3)
/* 80391720 0038E680 48 00 02 14 */ b lbl_80391934
lbl_80391724:
/* 80391724 0038E684 3C 00 3F E0 */ lis r0, 0x3fe0
@ -123,12 +123,12 @@ lbl_80391884:
lbl_80391890:
/* 80391890 0038E7F0 FC 02 08 00 */ fcmpu cr0, f2, f1
/* 80391894 0038E7F4 41 82 00 10 */ beq lbl_803918A4
/* 80391898 0038E7F8 3C 60 80 5B */ lis r3, lbl_805A8BA0@ha
/* 8039189C 0038E7FC C0 23 8B A0 */ lfs f1, lbl_805A8BA0@l(r3)
/* 80391898 0038E7F8 3C 60 80 5B */ lis r3, __float_nan@ha
/* 8039189C 0038E7FC C0 23 8B A0 */ lfs f1, __float_nan@l(r3)
/* 803918A0 0038E800 48 00 00 0C */ b lbl_803918AC
lbl_803918A4: