From 446545a64d2710916286e178432f82a2429dc970 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Wed, 25 Dec 2024 10:37:41 -0800 Subject: [PATCH] Move D_80097508 out of system_heap.c --- include/libc64/fixed_point.h | 4 ++++ src/boot/libu64/system_heap.c | 5 ----- tools/disasm/disasm.py | 2 +- tools/disasm/files.txt | 2 +- tools/disasm/variables.txt | 5 ++++- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/libc64/fixed_point.h b/include/libc64/fixed_point.h index 41362abbf2f..292beaeade6 100644 --- a/include/libc64/fixed_point.h +++ b/include/libc64/fixed_point.h @@ -3,6 +3,10 @@ #include "ultra64.h" +extern f32 gPositiveInfinity; +extern f32 gNegativeInfinity; +extern f32 gPositiveZero; +extern f32 gNegativeZero; extern f32 qNaN0x3FFFFF; extern f32 qNaN0x10000; extern f32 sNaN0x3FFFFF; diff --git a/src/boot/libu64/system_heap.c b/src/boot/libu64/system_heap.c index 7ad21b6ae36..e1649cfd96d 100644 --- a/src/boot/libu64/system_heap.c +++ b/src/boot/libu64/system_heap.c @@ -21,11 +21,6 @@ void* sInitFuncs = NULL; char sNew[] = ""; -UNK_TYPE1 D_80097508[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, - 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; - void* SystemHeap_Malloc(size_t size) { if (size == 0) { size = 1; diff --git a/tools/disasm/disasm.py b/tools/disasm/disasm.py index 1d69556525d..2a6e1ae6330 100755 --- a/tools/disasm/disasm.py +++ b/tools/disasm/disasm.py @@ -458,7 +458,7 @@ def format_f32(f_wd): return ".float 3.4028235e+38" f = as_float(struct.pack(">I", f_wd)) - if math.isnan(f): + if math.isnan(f) or math.isinf(f): return f".word 0x{f_wd:08X}" return f".float {reduce_float(repr(f))}" diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt index 185e12c110f..c3a2403f534 100644 --- a/tools/disasm/files.txt +++ b/tools/disasm/files.txt @@ -257,7 +257,7 @@ 0x80096C40 : "stackcheck", 0x80096C50 : "gfxprint", 0x80097500 : "system_heap", - 0x80097520 : "fp", + 0x80097510 : "fp", 0x80097530 : "qrand", 0x80097540 : "vimodentschpf1", 0x80097590 : "vimodepallan1", diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 3d0ea3c5e58..f752e671c48 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -36,7 +36,10 @@ 0x80096CF8:("sGfxPrintFontData","u8","[0x800]",0x800), 0x80097500:("sInitFuncs","void*","",0x4), 0x80097504:("sNew","char","[4]",0x4), - 0x80097508:("D_80097508","[24]","",0x18), + 0x80097510:("gPositiveInfinity","f32","",0x4), + 0x80097514:("gNegativeInfinity","f32","",0x4), + 0x80097518:("gPositiveZero","f32","",0x4), + 0x8009751C:("gNegativeZero","f32","",0x4), 0x80097520:("qNaN0x3FFFFF","f32","",0x4), 0x80097524:("qNaN0x10000","f32","",0x4), 0x80097528:("sNaN0x3FFFFF","f32","",0x4),