Split file in boot as functions differ in opt level

This commit is contained in:
rozlette 2018-10-28 23:12:21 -05:00
parent 5cda2411e7
commit 62a88f34a6
5 changed files with 33 additions and 2 deletions

View File

@ -17,6 +17,7 @@ OPTIMIZATION := -O2 -g3
build/src/libultra/os/%: OPTIMIZATION := -O1
build/src/libultra/io/%: OPTIMIZATION := -O2
build/src/libultra/libc/%: OPTIMIZATION := -O2
build/src/boot_O2_g3/%: OPTIMIZATION := -O2 -g3
test.txt: OPTIMIZATION := -O2 -g3
test.txt: MIPS_VERSION := -mips2
@ -24,7 +25,13 @@ BASEROM_FILES := $(wildcard baserom/*)
BASEROM_O_FILES := $(BASEROM_FILES:baserom/%=build/baserom/%.o)
S_FILES := $(wildcard asm/*)
S_O_FILES = $(S_FILES:asm/%.asm=build/asm/%.o)
C_FILES := $(wildcard src/*) $(wildcard src/libultra/*) $(wildcard src/libultra/os/*) $(wildcard src/libultra/io/*) $(wildcard src/libultra/libc/*) $(wildcard src/code/*)
C_FILES := $(wildcard src/*) \
$(wildcard src/libultra/*) \
$(wildcard src/libultra/os/*) \
$(wildcard src/libultra/io/*) \
$(wildcard src/libultra/libc/*) \
$(wildcard src/code/*) \
$(wildcard src/boot_O2_g3/*)
C_O_FILES = $(C_FILES:src/%.c=build/src/%.o)
O_FILES := $(BASEROM_O_FILES) $(S_O_FILES)
@ -41,6 +48,7 @@ $(shell mkdir -p build/src/libultra/os)
$(shell mkdir -p build/src/libultra/io)
$(shell mkdir -p build/src/libultra/libc)
$(shell mkdir -p build/src/code)
$(shell mkdir -p build/src/boot_O2_g3)
check: $(ROM) code.bin boot.bin
@md5sum -c checksum.md5

View File

@ -2,7 +2,8 @@ SECTIONS
{
boot 0x80080060:
{
build/asm/boot_0x80080060.o(.text)
build/src/boot_O2_g3/boot_0x80080060.o(.text)
build/asm/boot_0x80080180.o(.text)
build/asm/boot_0x800805E0.o(.text)
build/asm/boot_0x80080790.o(.text)
build/asm/boot_0x80080E30.o(.text)

View File

@ -1,4 +1,5 @@
known_objects = {
0x80080180:"",
0x80087b00:"setcause",
0x80087b10:"sendmesg",
0x80087e10:"stopthread",

View File

@ -0,0 +1,20 @@
#include <ultra64.h>
#include <global.h>
UNK_RET func_80080060(void) {
func_80085320(&D_80099500, &D_80099AF0, &D_80099EF0, 0, -1, &D_80098190);
D_80000318 = func_8008D350();
func_800818F4();
func_8008A6FC();
osUnmapTLBAll();
D_80096B40 = func_80092920();
func_80085320(&D_80099AD0, &D_800996D0, &D_80099AD0_, 0, 256, &D_80098198);
osCreateThread(&D_80099520, 1, (void(*)(void*))func_80080514, 0, &D_80099AD0, 12);
osStartThread(&D_80099520);
}
void func_80080150(UNK_PTR a0, UNK_PTR a1) {
if (a0 < a1) {
_blkclr(a0, (u32)a1 - (u32)a0);
}
}

View File

@ -14290,3 +14290,4 @@ func_840010CC = 0x840010CC;
func_84001060 = 0x84001060;
func_80920340 = 0x80920340;
func_80922430 = 0x80922430;
D_80099AD0_ = 0x80099AD0;