diff options
Diffstat (limited to 'tools/splat/test/basic_app')
20 files changed, 0 insertions, 414 deletions
diff --git a/tools/splat/test/basic_app/basic_app.ld b/tools/splat/test/basic_app/basic_app.ld deleted file mode 100644 index 7a94e16..0000000 --- a/tools/splat/test/basic_app/basic_app.ld +++ /dev/null @@ -1,78 +0,0 @@ -SECTIONS -{ - __romPos = 0; - _gp = 0x0; - header_ROM_START = __romPos; - header_VRAM = ADDR(.header); - .header : AT(header_ROM_START) SUBALIGN(16) - { - header_DATA_START = .; - build/header.o(.data); - header_DATA_END = .; - header_DATA_SIZE = ABSOLUTE(header_DATA_END - header_DATA_START); - } - __romPos += SIZEOF(.header); - header_ROM_END = __romPos; - header_VRAM_END = .; - - dummy_ipl3_ROM_START = __romPos; - dummy_ipl3_VRAM = ADDR(.dummy_ipl3); - .dummy_ipl3 0xA4000040 : AT(dummy_ipl3_ROM_START) SUBALIGN(16) - { - dummy_ipl3_DATA_START = .; - build/dummy_ipl3.o(.data); - dummy_ipl3_DATA_END = .; - dummy_ipl3_DATA_SIZE = ABSOLUTE(dummy_ipl3_DATA_END - dummy_ipl3_DATA_START); - } - __romPos += SIZEOF(.dummy_ipl3); - __romPos = ALIGN(__romPos, 16); - dummy_ipl3_ROM_END = __romPos; - dummy_ipl3_VRAM_END = .; - - boot_ROM_START = __romPos; - boot_VRAM = ADDR(.boot); - .boot 0x80000400 : AT(boot_ROM_START) SUBALIGN(16) - { - boot_TEXT_START = .; - build/main.o(.text); - build/handwritten.o(.text); - boot_TEXT_END = .; - boot_TEXT_SIZE = ABSOLUTE(boot_TEXT_END - boot_TEXT_START); - - boot_DATA_START = .; - build/main.o(.data); - build/handwritten.o(.data); - boot_DATA_END = .; - boot_DATA_SIZE = ABSOLUTE(boot_DATA_END - boot_DATA_START); - - boot_RODATA_START = .; - build/main.o(.rodata); - build/handwritten.o(.rodata); - boot_RODATA_END = .; - boot_RODATA_SIZE = ABSOLUTE(boot_RODATA_END - boot_RODATA_START); - } - - boot_bss_VRAM = ADDR(.boot_bss); - .boot_bss (NOLOAD) : SUBALIGN(16) - { - boot_BSS_START = .; - build/main.o(.bss); - build/main.o(.scommon); - build/main.o(COMMON); - build/handwritten.o(.bss); - build/handwritten.o(.scommon); - build/handwritten.o(COMMON); - boot_BSS_END = .; - boot_BSS_SIZE = ABSOLUTE(boot_BSS_END - boot_BSS_START); - } - - __romPos += SIZEOF(.boot); - __romPos = ALIGN(__romPos, 16); - boot_ROM_END = __romPos; - boot_VRAM_END = .; - - /DISCARD/ : - { - *(*); - } -} diff --git a/tools/splat/test/basic_app/build.sh b/tools/splat/test/basic_app/build.sh deleted file mode 100755 index 0e11e36..0000000 --- a/tools/splat/test/basic_app/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -mkdir -p build -echo "Building..." -export PATH=/gcc-2.7.2:$PATH -COMPILER_PATH=/gcc-2.7.2 /gcc-2.7.2/gcc -v -G0 -mgp32 -mfp32 -mips3 main.c -c -o build/main.o -COMPILER_PATH=/gcc-2.7.2 /gcc-2.7.2/gcc -G0 -mgp32 -mfp32 -mips3 header.s -c -o build/header.o -COMPILER_PATH=/gcc-2.7.2 /gcc-2.7.2/gcc -G0 -mgp32 -mfp32 -mips3 handwritten.s -c -o build/handwritten.o -COMPILER_PATH=/gcc-2.7.2 /gcc-2.7.2/gcc -G0 -mgp32 -mfp32 -mips3 dummy_ipl3.s -c -o build/dummy_ipl3.o -mips-linux-gnu-strip -N dummy_symbol_name build/*.o -echo "Linking..." -mips-linux-gnu-ld -Map build/basic_app.map -T basic_app.ld -o build/basic_app.elf -echo "Dumping bin..." -mips-linux-gnu-objcopy build/basic_app.elf -O binary build/basic_app.bin --pad-to=0x1140 --gap-fill=0xFF diff --git a/tools/splat/test/basic_app/clean.sh b/tools/splat/test/basic_app/clean.sh deleted file mode 100644 index 2fcd367..0000000 --- a/tools/splat/test/basic_app/clean.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -rf ./build -rm -rf ./split diff --git a/tools/splat/test/basic_app/dummy_ipl3.s b/tools/splat/test/basic_app/dummy_ipl3.s deleted file mode 100644 index fc223a1..0000000 --- a/tools/splat/test/basic_app/dummy_ipl3.s +++ /dev/null @@ -1,3 +0,0 @@ -.section .data -dummy_ipl3: -.zero 0x1000 - 0x40 diff --git a/tools/splat/test/basic_app/expected/.splache b/tools/splat/test/basic_app/expected/.splache Binary files differdeleted file mode 100644 index c855f15..0000000 --- a/tools/splat/test/basic_app/expected/.splache +++ /dev/null diff --git a/tools/splat/test/basic_app/expected/asm/data/main.bss.s b/tools/splat/test/basic_app/expected/asm/data/main.bss.s deleted file mode 100644 index 96a20c2..0000000 --- a/tools/splat/test/basic_app/expected/asm/data/main.bss.s +++ /dev/null @@ -1,6 +0,0 @@ -.include "macro.inc" - -.section .bss - -glabel D_80000540 -/* 1110 80000540 */ .space 0x78 diff --git a/tools/splat/test/basic_app/expected/asm/data/main.data.s b/tools/splat/test/basic_app/expected/asm/data/main.data.s deleted file mode 100644 index 1ed582a..0000000 --- a/tools/splat/test/basic_app/expected/asm/data/main.data.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - -.section .data - -glabel D_80000500 -/* 1100 80000500 */ .word 0x00000001 -.size D_80000500, . - D_80000500 - -glabel D_80000504 -/* 1104 80000504 */ .word 0x00000000 -/* 1108 80000508 */ .word 0x00000000 -/* 110C 8000050C */ .word 0x00000000 -.size D_80000504, . - D_80000504 diff --git a/tools/splat/test/basic_app/expected/asm/handwritten.s b/tools/splat/test/basic_app/expected/asm/handwritten.s deleted file mode 100644 index 539d92a..0000000 --- a/tools/splat/test/basic_app/expected/asm/handwritten.s +++ /dev/null @@ -1,16 +0,0 @@ -.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 .text, "ax" - -# Handwritten function -glabel func_800004F0 -/* 10F0 800004F0 00851020 */ add $v0, $a0, $a1 # handwritten instruction -/* 10F4 800004F4 03E00008 */ jr $ra -/* 10F8 800004F8 00000000 */ nop -/* 10FC 800004FC 00000000 */ nop -.size func_800004F0, . - func_800004F0 diff --git a/tools/splat/test/basic_app/expected/asm/header.s b/tools/splat/test/basic_app/expected/asm/header.s deleted file mode 100644 index be176b7..0000000 --- a/tools/splat/test/basic_app/expected/asm/header.s +++ /dev/null @@ -1,16 +0,0 @@ -.section .data - -.word 0x80371240 /* PI BSB Domain 1 register */ -.word 0x0000000F /* Clockrate setting */ -.word 0x800004A0 /* Entrypoint address */ -.word 0x00001444 /* Revision */ -.word 0x00000000 /* Checksum 1 */ -.word 0x00000000 /* Checksum 2 */ -.word 0x00000000 /* Unknown 1 */ -.word 0x00000000 /* Unknown 2 */ -.ascii "SPLAT TEST ROM " /* Internal name */ -.word 0x00000000 /* Unknown 3 */ -.word 0x0000004E /* Cartridge */ -.ascii "SP" /* Cartridge ID */ -.ascii "E" /* Country code */ -.byte 0x00 /* Version */ diff --git a/tools/splat/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s b/tools/splat/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s deleted file mode 100644 index 21d0010..0000000 --- a/tools/splat/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s +++ /dev/null @@ -1,55 +0,0 @@ -.set noat /* allow manual use of $at */ -.set noreorder /* don't insert nops after branches */ - -glabel func_80000400 -/* 1000 80000400 27BDFFF8 */ addiu $sp, $sp, -0x8 -/* 1004 80000404 AFBE0000 */ sw $fp, 0x0($sp) -/* 1008 80000408 03A0F021 */ addu $fp, $sp, $zero -/* 100C 8000040C 3C028000 */ lui $v0, %hi(D_80000504) -/* 1010 80000410 8C420504 */ lw $v0, %lo(D_80000504)($v0) -/* 1014 80000414 2C430008 */ sltiu $v1, $v0, 0x8 -/* 1018 80000418 1060001B */ beqz $v1, .L80000488 -/* 101C 8000041C 00000000 */ nop -/* 1020 80000420 3C028000 */ lui $v0, %hi(D_80000504) -/* 1024 80000424 8C420504 */ lw $v0, %lo(D_80000504)($v0) -/* 1028 80000428 00401821 */ addu $v1, $v0, $zero -/* 102C 8000042C 00031080 */ sll $v0, $v1, 2 -/* 1030 80000430 3C038000 */ lui $v1, %hi(jtbl_80000518) -/* 1034 80000434 24630518 */ addiu $v1, $v1, %lo(jtbl_80000518) -/* 1038 80000438 00431021 */ addu $v0, $v0, $v1 -/* 103C 8000043C 8C430000 */ lw $v1, 0x0($v0) -/* 1040 80000440 00600008 */ jr $v1 -/* 1044 80000444 00000000 */ nop -glabel .L80000448 -/* 1048 80000448 08000124 */ j .L80000490 -/* 104C 8000044C 24020007 */ addiu $v0, $zero, 0x7 -glabel .L80000450 -/* 1050 80000450 08000124 */ j .L80000490 -/* 1054 80000454 24020006 */ addiu $v0, $zero, 0x6 -glabel .L80000458 -/* 1058 80000458 08000124 */ j .L80000490 -/* 105C 8000045C 24020005 */ addiu $v0, $zero, 0x5 -glabel .L80000460 -/* 1060 80000460 08000124 */ j .L80000490 -/* 1064 80000464 24020004 */ addiu $v0, $zero, 0x4 -glabel .L80000468 -/* 1068 80000468 08000124 */ j .L80000490 -/* 106C 8000046C 24020003 */ addiu $v0, $zero, 0x3 -glabel .L80000470 -/* 1070 80000470 08000124 */ j .L80000490 -/* 1074 80000474 24020002 */ addiu $v0, $zero, 0x2 -glabel .L80000478 -/* 1078 80000478 08000124 */ j .L80000490 -/* 107C 8000047C 24020001 */ addiu $v0, $zero, 0x1 -glabel .L80000480 -/* 1080 80000480 08000124 */ j .L80000490 -/* 1084 80000484 00001021 */ addu $v0, $zero, $zero -.L80000488: -/* 1088 80000488 08000124 */ j .L80000490 -/* 108C 8000048C 00001021 */ addu $v0, $zero, $zero -.L80000490: -/* 1090 80000490 03C0E821 */ addu $sp, $fp, $zero -/* 1094 80000494 8FBE0000 */ lw $fp, 0x0($sp) -/* 1098 80000498 03E00008 */ jr $ra -/* 109C 8000049C 27BD0008 */ addiu $sp, $sp, 0x8 -.size func_80000400, . - func_80000400 diff --git a/tools/splat/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s b/tools/splat/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s deleted file mode 100644 index 112eb68..0000000 --- a/tools/splat/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat /* allow manual use of $at */ -.set noreorder /* don't insert nops after branches */ - -glabel func_800004A0 -/* 10A0 800004A0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10A4 800004A4 AFBF0014 */ sw $ra, 0x14($sp) -/* 10A8 800004A8 AFBE0010 */ sw $fp, 0x10($sp) -/* 10AC 800004AC 0C000100 */ jal func_80000400 -/* 10B0 800004B0 03A0F021 */ addu $fp, $sp, $zero -.L800004B4: -/* 10B4 800004B4 3C028000 */ lui $v0, %hi(D_80000500) -/* 10B8 800004B8 8C420500 */ lw $v0, %lo(D_80000500)($v0) -/* 10BC 800004BC 24430001 */ addiu $v1, $v0, 0x1 -/* 10C0 800004C0 3C018000 */ lui $at, %hi(D_80000500) -/* 10C4 800004C4 AC230500 */ sw $v1, %lo(D_80000500)($at) -/* 10C8 800004C8 3C028000 */ lui $v0, %hi(D_80000500) -/* 10CC 800004CC 8C420500 */ lw $v0, %lo(D_80000500)($v0) -/* 10D0 800004D0 0800012D */ j .L800004B4 -/* 10D4 800004D4 00000000 */ nop -/* 10D8 800004D8 03C0E821 */ addu $sp, $fp, $zero -/* 10DC 800004DC 8FBF0014 */ lw $ra, 0x14($sp) -/* 10E0 800004E0 8FBE0010 */ lw $fp, 0x10($sp) -/* 10E4 800004E4 03E00008 */ jr $ra -/* 10E8 800004E8 27BD0018 */ addiu $sp, $sp, 0x18 -/* 10EC 800004EC 00000000 */ nop -.size func_800004A0, . - func_800004A0 diff --git a/tools/splat/test/basic_app/expected/assets/dummy_ipl3.bin b/tools/splat/test/basic_app/expected/assets/dummy_ipl3.bin Binary files differdeleted file mode 100644 index 26460b7..0000000 --- a/tools/splat/test/basic_app/expected/assets/dummy_ipl3.bin +++ /dev/null diff --git a/tools/splat/test/basic_app/expected/basic_app.ld b/tools/splat/test/basic_app/expected/basic_app.ld deleted file mode 100644 index 0779b7e..0000000 --- a/tools/splat/test/basic_app/expected/basic_app.ld +++ /dev/null @@ -1,70 +0,0 @@ -SECTIONS -{ - __romPos = 0; - _gp = 0x0; - header_ROM_START = __romPos; - header_VRAM = ADDR(.header); - .header : AT(header_ROM_START) SUBALIGN(16) - { - header_DATA_START = .; - header_s = .; - build/split/asm/header.s.o(.data); - header_DATA_END = .; - header_DATA_SIZE = ABSOLUTE(header_DATA_END - header_DATA_START); - } - __romPos += SIZEOF(.header); - header_ROM_END = __romPos; - header_VRAM_END = .; - - dummy_ipl3_ROM_START = __romPos; - dummy_ipl3_VRAM = ADDR(.dummy_ipl3); - .dummy_ipl3 0xA4000040 : AT(dummy_ipl3_ROM_START) SUBALIGN(16) - { - dummy_ipl3_DATA_START = .; - dummy_ipl3_bin = .; - build/split/assets/dummy_ipl3.bin.o(.data); - dummy_ipl3_DATA_END = .; - dummy_ipl3_DATA_SIZE = ABSOLUTE(dummy_ipl3_DATA_END - dummy_ipl3_DATA_START); - } - __romPos += SIZEOF(.dummy_ipl3); - __romPos = ALIGN(__romPos, 16); - dummy_ipl3_ROM_END = __romPos; - dummy_ipl3_VRAM_END = .; - - boot_ROM_START = __romPos; - boot_VRAM = ADDR(.boot); - .boot 0x80000400 : AT(boot_ROM_START) SUBALIGN(16) - { - boot_TEXT_START = .; - build/split/src/main.c.o(.text); - build/split/asm/handwritten.s.o(.text); - boot_TEXT_END = .; - boot_TEXT_SIZE = ABSOLUTE(boot_TEXT_END - boot_TEXT_START); - boot_DATA_START = .; - main_data__s = .; - build/split/asm/data/main.data.s.o(.data); - boot_DATA_END = .; - boot_DATA_SIZE = ABSOLUTE(boot_DATA_END - boot_DATA_START); - boot_RODATA_START = .; - build/split/asm/data/main.rodata.s.o(.rodata); - boot_RODATA_END = .; - boot_RODATA_SIZE = ABSOLUTE(boot_RODATA_END - boot_RODATA_START); - } - boot_bss_VRAM = ADDR(.boot_bss); - .boot_bss (NOLOAD) : SUBALIGN(16) - { - boot_BSS_START = .; - build/split/asm/data/main.bss.s.o(.bss); - boot_BSS_END = .; - boot_BSS_SIZE = ABSOLUTE(boot_BSS_END - boot_BSS_START); - } - __romPos += SIZEOF(.boot); - __romPos = ALIGN(__romPos, 16); - boot_ROM_END = __romPos; - boot_VRAM_END = .; - - /DISCARD/ : - { - *(*); - } -} diff --git a/tools/splat/test/basic_app/expected/src/main.c b/tools/splat/test/basic_app/expected/src/main.c deleted file mode 100644 index 41b2e70..0000000 --- a/tools/splat/test/basic_app/expected/src/main.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(const s32, "main", func_80000400); - -INCLUDE_ASM(const s32, "main", func_800004A0); diff --git a/tools/splat/test/basic_app/expected/undefined_funcs_auto.txt b/tools/splat/test/basic_app/expected/undefined_funcs_auto.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/splat/test/basic_app/expected/undefined_funcs_auto.txt +++ /dev/null diff --git a/tools/splat/test/basic_app/expected/undefined_syms_auto.txt b/tools/splat/test/basic_app/expected/undefined_syms_auto.txt deleted file mode 100644 index 8b96b0c..0000000 --- a/tools/splat/test/basic_app/expected/undefined_syms_auto.txt +++ /dev/null @@ -1 +0,0 @@ -jtbl_80000518 = 0x80000518; diff --git a/tools/splat/test/basic_app/handwritten.s b/tools/splat/test/basic_app/handwritten.s deleted file mode 100644 index 1a5f482..0000000 --- a/tools/splat/test/basic_app/handwritten.s +++ /dev/null @@ -1,12 +0,0 @@ -.section .text -.balign 16 -.set noreorder - -.global asm_func -.type asm_func, @function -.ent asm_func -asm_func: - add $v0, $a0, $a1 # Instruction that a compiler will never emit - jr $ra - nop -.end asm_func diff --git a/tools/splat/test/basic_app/header.s b/tools/splat/test/basic_app/header.s deleted file mode 100644 index 1e19f59..0000000 --- a/tools/splat/test/basic_app/header.s +++ /dev/null @@ -1,16 +0,0 @@ -.section .data - -.word 0x80371240 /* PI BSB Domain 1 register */ -.word 0x0000000F /* Clockrate setting */ -.word bootproc /* Entrypoint address */ -.word 0x00001444 /* Revision */ -.word 0x00000000 /* Checksum 1 */ -.word 0x00000000 /* Checksum 2 */ -.word 0x00000000 /* Unknown 1 */ -.word 0x00000000 /* Unknown 2 */ -.ascii "SPLAT TEST ROM " /* Internal name */ -.word 0x00000000 /* Unknown 3 */ -.word 0x0000004E /* Cartridge */ -.ascii "SP" /* Cartridge ID */ -.ascii "E" /* Country code */ -.byte 0x00 /* Version */ diff --git a/tools/splat/test/basic_app/main.c b/tools/splat/test/basic_app/main.c deleted file mode 100644 index cf119f7..0000000 --- a/tools/splat/test/basic_app/main.c +++ /dev/null @@ -1,45 +0,0 @@ -// .data -volatile int test = 1; - -// bin (.rodata) -const char bin_data[] = {0,1,2,3,4,5,6,7}; - -// .bss -unsigned long long bss_data[0x10]; - -// .data -volatile int switch_arg = 0; - -int do_switch() -{ - switch(switch_arg) - { - case 0: - return 7; - case 1: - return 6; - case 2: - return 5; - case 3: - return 4; - case 4: - return 3; - case 5: - return 2; - case 6: - return 1; - case 7: - return 0; - } - return 0; -} - -// c -void bootproc() -{ - do_switch(); - for (;;) - { - test++; - } -} diff --git a/tools/splat/test/basic_app/splat.yaml b/tools/splat/test/basic_app/splat.yaml deleted file mode 100644 index c1d2cf9..0000000 --- a/tools/splat/test/basic_app/splat.yaml +++ /dev/null @@ -1,38 +0,0 @@ -options: - platform: n64 - basename: basic_app - base_path: . - build_path: build - target_path: build/basic_app.bin - asm_path: split/asm - src_path: split/src - ld_script_path: split/basic_app.ld - cache_path: split/.splache - symbol_addrs_path: split/generated.symbols.txt - undefined_funcs_auto_path: split/undefined_funcs_auto.txt - undefined_syms_auto_path: split/undefined_syms_auto.txt - asset_path: split/assets - asm_generated_by: False - compiler: GCC -segments: - - name: header - type: header - start: 0x00 - - name: dummy_ipl3 - type: code - start: 0x40 - vram: 0xA4000040 - subsegments: - - [0x0040, bin, dummy_ipl3] - - name: boot - type: code - start: 0x1000 - vram: 0x80000400 - bss_size: 0x80 - subsegments: - - [0x1000, c, main] - - [0x10F0, hasm, handwritten] - - [0x1100, data, main] - - [0x1110, rodata, main] - - { type: bss, vram: 0x80000540, name: main } - - [0x1138] |
