splat64 0.36.4__tar.gz → 0.37.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {splat64-0.36.4 → splat64-0.37.0}/CHANGELOG.md +14 -1
- {splat64-0.36.4 → splat64-0.37.0}/PKG-INFO +4 -4
- {splat64-0.36.4 → splat64-0.37.0}/README.md +1 -1
- {splat64-0.36.4 → splat64-0.37.0}/docs/Configuration.md +24 -0
- {splat64-0.36.4 → splat64-0.37.0}/pyproject.toml +2 -2
- {splat64-0.36.4 → splat64-0.37.0}/requirements.txt +1 -1
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/__init__.py +1 -1
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/disassembler/spimdisasm_disassembler.py +3 -1
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/scripts/split.py +1 -1
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/compiler.py +2 -1
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/file_presets.py +22 -7
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/options.py +13 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/include/include_asm.h +6 -1
- {splat64-0.36.4 → splat64-0.37.0}/.gitattributes +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.github/workflows/format.yml +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.github/workflows/lint.yml +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.github/workflows/publish_docs_to_wiki.yml +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.github/workflows/pypi.yml +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.github/workflows/test_lib.yml +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.github/workflows/unit_tests.yml +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/.gitignore +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/LICENSE +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/create_config.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Adding-Symbols.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Advanced-Reloc.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Advanced.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Examples.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/General-Workflow.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Home.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Quickstart-Elf.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Quickstart.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/Segments.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/docs/VramClasses.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/mypy.ini +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/split.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/__main__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/disassembler/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/disassembler/disassembler.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/disassembler/disassembler_instance.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/disassembler/disassembler_section.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/disassembler/null_disassembler.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/platforms/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/platforms/n64.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/platforms/ps2.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/platforms/psp.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/platforms/psx.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/py.typed +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/scripts/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/scripts/capy.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/scripts/create_config.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/asm.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/asmtu.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/bin.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/bss.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/c.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/code.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/codesubsegment.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/cpp.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/data.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/databin.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/eh_frame.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/gcc_except_table.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/group.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/hasm.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/header.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/lib.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/linker_offset.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/pad.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/rdata.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/rodata.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/rodatabin.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/sbss.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/sdata.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/segment.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/common/textbin.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/linker_entry.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ci.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ci4.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ci8.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/decompressor.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/gfx.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/header.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/i1.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/i4.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/i8.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ia16.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ia4.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ia8.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/img.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/ipl3.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/mio0.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/palette.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/rgba16.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/rgba32.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/rsp.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/vtx.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/n64/yay0.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/ps2/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/ps2/ctor.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/ps2/lit4.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/ps2/lit8.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/ps2/vtables.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/psp/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/psx/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/psx/header.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/segtypes/segment.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/cache_handler.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/color.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/conf.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/log.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/n64/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/n64/find_code_length.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/n64/rominfo.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/palettes.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/progress_bar.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/ps2/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/ps2/ps2elfinfo.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/psx/__init__.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/psx/psxexeinfo.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/relocs.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/statistics.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/symbols.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/utils.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/src/splat/util/vram_classes.py +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/Dockerfile +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/README.md +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/.gitignore +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/Makefile +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/build/basic_app.bin +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/dummy_ipl3.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/.splache +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/data/main.bss.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/data/main.data.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/data/main.rodata.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/handwritten.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/header.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/main.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/nonmatchings/main/D_80000510.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/assets/dummy_ipl3.bin +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/basic_app.d +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/build/test/basic_app/split/src/main.asmproc.d +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/include/labels.inc +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/include/macro.inc +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/src/main.c +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/undefined_funcs_auto.txt +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/undefined_syms_auto.txt +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/handwritten.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/header.s +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/basic_app/main.c +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test/test_gen_expected.sh +0 -0
- {splat64-0.36.4 → splat64-0.37.0}/test.py +0 -0
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
# splat Release Notes
|
|
2
2
|
|
|
3
|
+
### 0.37.0
|
|
4
|
+
|
|
5
|
+
* Add define check to allow using `macro.inc` instead of `labels.inc` in `include_asm.h`.
|
|
6
|
+
* The macro must be `INCLUDE_ASM_USE_MACRO_INC` and have a non zero value.
|
|
7
|
+
* New option: `generated_asm_macros_directory`
|
|
8
|
+
* Allow changing the directory for the generated assembly macros files.
|
|
9
|
+
* Add workaround for the short loop bug that happens in SN PS2 compilers.
|
|
10
|
+
* This workaround is only used when the selected compiler is `EEGCC`.
|
|
11
|
+
* This can be manually overriden with the option `align_on_branch_labels`.
|
|
12
|
+
* Emit an `.align` directive in branch labels to avoid triggering the bug.
|
|
13
|
+
* The bug in question adds a non-zero number of nops as a workaround for a hardware defect, producing non-matching builds.
|
|
14
|
+
|
|
3
15
|
### 0.36.4
|
|
4
16
|
|
|
5
17
|
* Fix missing dollar signs (`$`) on specific ps2 registers on the extra assembly files generated by `make_full_disasm_for_code`.
|
|
6
18
|
* Pin versions of dependencies to avoid breaking because they broke.
|
|
7
19
|
* Add more checks for texture and palette segments to have a correct size in their yaml entries, ensuring their `width`/`height` or `size` attributes match the sizes relative to other segments.
|
|
8
20
|
* Fix `gfx` segments sometimes not picking up properly the corresponding typed reference.
|
|
9
|
-
*
|
|
21
|
+
* Fix sometimes picking a name symbol from a different segment instead of the owned segment when both symbols have the same address but are from completely different segments.
|
|
22
|
+
* Add PS2 compatibility to `create_config`.
|
|
10
23
|
|
|
11
24
|
### 0.36.3
|
|
12
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splat64
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.37.0
|
|
4
4
|
Summary: A binary splitting tool to assist with decompilation and modding projects
|
|
5
5
|
Project-URL: Repository, https://github.com/ethteck/splat
|
|
6
6
|
Project-URL: Issues, https://github.com/ethteck/splat/issues
|
|
@@ -42,7 +42,7 @@ Requires-Dist: n64img>=0.3.3; extra == 'dev'
|
|
|
42
42
|
Requires-Dist: pygfxd>=1.0.5; extra == 'dev'
|
|
43
43
|
Requires-Dist: rabbitizer<2.0.0,>=1.12.0; extra == 'dev'
|
|
44
44
|
Requires-Dist: ruff; extra == 'dev'
|
|
45
|
-
Requires-Dist: spimdisasm<2.0.0,>=1.
|
|
45
|
+
Requires-Dist: spimdisasm<2.0.0,>=1.39.0; extra == 'dev'
|
|
46
46
|
Requires-Dist: types-colorama; extra == 'dev'
|
|
47
47
|
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
48
48
|
Provides-Extra: mips
|
|
@@ -50,7 +50,7 @@ Requires-Dist: crunch64<1.0.0,>=0.5.1; extra == 'mips'
|
|
|
50
50
|
Requires-Dist: n64img>=0.3.3; extra == 'mips'
|
|
51
51
|
Requires-Dist: pygfxd>=1.0.5; extra == 'mips'
|
|
52
52
|
Requires-Dist: rabbitizer<2.0.0,>=1.12.0; extra == 'mips'
|
|
53
|
-
Requires-Dist: spimdisasm<2.0.0,>=1.
|
|
53
|
+
Requires-Dist: spimdisasm<2.0.0,>=1.39.0; extra == 'mips'
|
|
54
54
|
Description-Content-Type: text/markdown
|
|
55
55
|
|
|
56
56
|
# splat
|
|
@@ -76,7 +76,7 @@ The brackets corresponds to the optional dependencies to install while installin
|
|
|
76
76
|
If you use a `requirements.txt` file in your repository, then you can add this library with the following line:
|
|
77
77
|
|
|
78
78
|
```txt
|
|
79
|
-
splat64[mips]>=0.
|
|
79
|
+
splat64[mips]>=0.37.0,<1.0.0
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
### Optional dependencies
|
|
@@ -21,7 +21,7 @@ The brackets corresponds to the optional dependencies to install while installin
|
|
|
21
21
|
If you use a `requirements.txt` file in your repository, then you can add this library with the following line:
|
|
22
22
|
|
|
23
23
|
```txt
|
|
24
|
-
splat64[mips]>=0.
|
|
24
|
+
splat64[mips]>=0.37.0,<1.0.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
### Optional dependencies
|
|
@@ -147,6 +147,12 @@ Allows configuring the style used by the generated `INCLUDE_ASM` macro. It curre
|
|
|
147
147
|
|
|
148
148
|
Defaults to `default`.
|
|
149
149
|
|
|
150
|
+
### generated_asm_macros_directory
|
|
151
|
+
|
|
152
|
+
Change the directory where the assembly macros files are written to.
|
|
153
|
+
|
|
154
|
+
Defaults to `include`.
|
|
155
|
+
|
|
150
156
|
### o_as_suffix
|
|
151
157
|
|
|
152
158
|
Used to determine the file extension of the built files that will be listed on the linker script.
|
|
@@ -932,3 +938,21 @@ use_legacy_include_asm: True
|
|
|
932
938
|
|
|
933
939
|
#### Default
|
|
934
940
|
`False`
|
|
941
|
+
|
|
942
|
+
## align_on_branch_labels
|
|
943
|
+
|
|
944
|
+
If enabled emit no-op alignment directives on all branch labels.
|
|
945
|
+
|
|
946
|
+
This is useful as a workaround for the "short loop bug" present in SN PS2 compilers, in which the compiler may decide to insert extra `nop` instructions due to a hardware defect, producing non-matching builds.
|
|
947
|
+
|
|
948
|
+
This option is enabled automatically if the selected compiler is known to have this issue, but this option allows to override the default selection in case this setting ends up producing problems.
|
|
949
|
+
|
|
950
|
+
#### Usage
|
|
951
|
+
|
|
952
|
+
```yaml
|
|
953
|
+
align_on_branch_labels: False
|
|
954
|
+
```
|
|
955
|
+
|
|
956
|
+
#### Default
|
|
957
|
+
|
|
958
|
+
`True` if [`compiler`](#compiler) is set to `EEGCC`, `False` otherwise
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "splat64"
|
|
3
3
|
# Should be synced with src/splat/__init__.py
|
|
4
|
-
version = "0.
|
|
4
|
+
version = "0.37.0"
|
|
5
5
|
description = "A binary splitting tool to assist with decompilation and modding projects"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = {file = "LICENSE"}
|
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
22
|
mips = [
|
|
23
|
-
"spimdisasm>=1.
|
|
23
|
+
"spimdisasm>=1.39.0,<2.0.0", # This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py
|
|
24
24
|
"rabbitizer>=1.12.0,<2.0.0",
|
|
25
25
|
"pygfxd>=1.0.5",
|
|
26
26
|
"n64img>=0.3.3",
|
|
@@ -4,7 +4,7 @@ tqdm==4.67.1
|
|
|
4
4
|
intervaltree==3.1.0
|
|
5
5
|
colorama==0.4.6
|
|
6
6
|
# This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py and pyproject.toml
|
|
7
|
-
spimdisasm>=1.
|
|
7
|
+
spimdisasm>=1.39.0
|
|
8
8
|
rabbitizer>=1.10.0
|
|
9
9
|
pygfxd>=1.0.5
|
|
10
10
|
n64img>=0.1.4
|
|
@@ -7,7 +7,7 @@ from typing import Set
|
|
|
7
7
|
|
|
8
8
|
class SpimdisasmDisassembler(disassembler.Disassembler):
|
|
9
9
|
# This value should be kept in sync with the version listed on requirements.txt and pyproject.toml
|
|
10
|
-
SPIMDISASM_MIN = (1,
|
|
10
|
+
SPIMDISASM_MIN = (1, 39, 0)
|
|
11
11
|
|
|
12
12
|
def configure(self):
|
|
13
13
|
# Configure spimdisasm
|
|
@@ -74,6 +74,8 @@ class SpimdisasmDisassembler(disassembler.Disassembler):
|
|
|
74
74
|
spimdisasm.common.GlobalConfig.SYMBOL_FINDER_FILTERED_ADDRESSES_AS_HILO = (
|
|
75
75
|
False
|
|
76
76
|
)
|
|
77
|
+
if options.opts.align_on_branch_labels:
|
|
78
|
+
spimdisasm.common.GlobalConfig.ASM_EMIT_ALIGN_BRANCH_LABELS = True
|
|
77
79
|
rabbitizer.config.toolchainTweaks_treatJAsUnconditionalBranch = (
|
|
78
80
|
selected_compiler.j_as_branch
|
|
79
81
|
)
|
|
@@ -581,7 +581,7 @@ def add_arguments_to_parser(parser: argparse.ArgumentParser):
|
|
|
581
581
|
nargs="+",
|
|
582
582
|
type=Path,
|
|
583
583
|
)
|
|
584
|
-
parser.add_argument("--modes", nargs="+", default="all")
|
|
584
|
+
parser.add_argument("--modes", nargs="+", default=["all"])
|
|
585
585
|
parser.add_argument("--verbose", action="store_true", help="Enable debug logging")
|
|
586
586
|
parser.add_argument(
|
|
587
587
|
"--use-cache", action="store_true", help="Only split changed segments in config"
|
|
@@ -18,6 +18,7 @@ class Compiler:
|
|
|
18
18
|
asm_emit_size_directive: Optional[bool] = None
|
|
19
19
|
j_as_branch: bool = False
|
|
20
20
|
uses_include_asm: bool = True
|
|
21
|
+
align_on_branch_labels: bool = False
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
GCC = Compiler(
|
|
@@ -61,7 +62,7 @@ PSYQ = Compiler(
|
|
|
61
62
|
|
|
62
63
|
# PS2
|
|
63
64
|
MWCCPS2 = Compiler("MWCCPS2", uses_include_asm=False)
|
|
64
|
-
EEGCC = Compiler("EEGCC")
|
|
65
|
+
EEGCC = Compiler("EEGCC", align_on_branch_labels=True)
|
|
65
66
|
|
|
66
67
|
compiler_for_name: Dict[str, Compiler] = {
|
|
67
68
|
x.name: x
|
|
@@ -5,10 +5,12 @@ This includes writing files like:
|
|
|
5
5
|
- include/macro.inc
|
|
6
6
|
- include/labels.inc
|
|
7
7
|
- include/gte_macros.inc
|
|
8
|
+
|
|
9
|
+
The directory where these files are written to can be controlled with
|
|
10
|
+
`options.opts.generated_asm_macros_directory`.
|
|
8
11
|
"""
|
|
9
12
|
|
|
10
13
|
from pathlib import Path
|
|
11
|
-
import os
|
|
12
14
|
|
|
13
15
|
from . import options, log
|
|
14
16
|
|
|
@@ -22,7 +24,7 @@ def write_all_files():
|
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
def _write(filepath: str, contents: str):
|
|
25
|
-
p = Path(
|
|
27
|
+
p = Path(filepath)
|
|
26
28
|
p.parent.mkdir(parents=True, exist_ok=True)
|
|
27
29
|
|
|
28
30
|
if p.exists():
|
|
@@ -39,6 +41,11 @@ def write_include_asm_h():
|
|
|
39
41
|
# These compilers do not use the `INCLUDE_ASM` macro.
|
|
40
42
|
return
|
|
41
43
|
|
|
44
|
+
directory = options.opts.generated_asm_macros_directory.as_posix()
|
|
45
|
+
print()
|
|
46
|
+
print(directory)
|
|
47
|
+
print()
|
|
48
|
+
|
|
42
49
|
if options.opts.include_asm_macro_style == "maspsx_hack":
|
|
43
50
|
include_asm_macro = """\
|
|
44
51
|
#define INCLUDE_ASM(FOLDER, NAME) \\
|
|
@@ -88,7 +95,12 @@ def write_include_asm_h():
|
|
|
88
95
|
#ifndef INCLUDE_RODATA
|
|
89
96
|
{include_rodata_macro}\
|
|
90
97
|
#endif
|
|
91
|
-
|
|
98
|
+
|
|
99
|
+
#if INCLUDE_ASM_USE_MACRO_INC
|
|
100
|
+
__asm__(".include \\"{directory}/macro.inc\\"\\n");
|
|
101
|
+
#else
|
|
102
|
+
__asm__(".include \\"{directory}/labels.inc\\"\\n");
|
|
103
|
+
#endif
|
|
92
104
|
|
|
93
105
|
#else
|
|
94
106
|
|
|
@@ -103,10 +115,12 @@ __asm__(".include \\"include/labels.inc\\"\\n");
|
|
|
103
115
|
|
|
104
116
|
#endif /* INCLUDE_ASM_H */
|
|
105
117
|
"""
|
|
106
|
-
_write("
|
|
118
|
+
_write(f"{directory}/include_asm.h", file_data)
|
|
107
119
|
|
|
108
120
|
|
|
109
121
|
def write_assembly_inc_files():
|
|
122
|
+
directory = options.opts.generated_asm_macros_directory.as_posix()
|
|
123
|
+
|
|
110
124
|
func_macros = f"""\
|
|
111
125
|
# A function symbol.
|
|
112
126
|
.macro {options.opts.asm_function_macro} label, visibility=global
|
|
@@ -230,7 +244,7 @@ def write_assembly_inc_files():
|
|
|
230
244
|
{data_macros}
|
|
231
245
|
{nm_macros}\
|
|
232
246
|
"""
|
|
233
|
-
_write("
|
|
247
|
+
_write(f"{directory}/labels.inc", labels_inc)
|
|
234
248
|
|
|
235
249
|
if options.opts.platform in {"n64", "psx"}:
|
|
236
250
|
gas = macros_inc
|
|
@@ -338,7 +352,7 @@ def write_assembly_inc_files():
|
|
|
338
352
|
{gas}
|
|
339
353
|
.endif
|
|
340
354
|
"""
|
|
341
|
-
_write("
|
|
355
|
+
_write(f"{directory}/macro.inc", f"{preamble}\n{gas}")
|
|
342
356
|
|
|
343
357
|
|
|
344
358
|
def write_gte_macros():
|
|
@@ -762,4 +776,5 @@ def write_gte_macros():
|
|
|
762
776
|
.endif
|
|
763
777
|
"""
|
|
764
778
|
|
|
765
|
-
|
|
779
|
+
directory = options.opts.generated_asm_macros_directory.as_posix()
|
|
780
|
+
_write(f"{directory}/gte_macros.inc", gte_macros)
|
|
@@ -43,6 +43,8 @@ class SplatOpts:
|
|
|
43
43
|
# default: The default one.
|
|
44
44
|
# maspsx_hack: Use the maspsx hack workaround definition https://github.com/mkst/maspsx?tab=readme-ov-file#include_asm-reordering-workaround-hack
|
|
45
45
|
include_asm_macro_style: Literal["default", "maspsx_hack"]
|
|
46
|
+
# Directory to place the generated asm macros files.
|
|
47
|
+
generated_asm_macros_directory: Path
|
|
46
48
|
# Determines whether to use .o as the suffix for all binary files?... TODO document
|
|
47
49
|
use_o_as_suffix: bool
|
|
48
50
|
# the value of the $gp register to correctly calculate offset to %gp_rel relocs
|
|
@@ -278,6 +280,8 @@ class SplatOpts:
|
|
|
278
280
|
# Determines whether to use a legacy INCLUDE_ASM macro format in c files
|
|
279
281
|
# only applies to GCC/SN64
|
|
280
282
|
use_legacy_include_asm: bool
|
|
283
|
+
# Emit alignment directives in branch labels, as a way to workaround the short loop bug present in SN PS2 compilers
|
|
284
|
+
align_on_branch_labels: bool
|
|
281
285
|
|
|
282
286
|
# Returns whether the given mode is currently enabled
|
|
283
287
|
def is_mode_active(self, mode: str) -> bool:
|
|
@@ -392,6 +396,11 @@ def _parse_yaml(
|
|
|
392
396
|
if asm_emit_size_directive is None:
|
|
393
397
|
asm_emit_size_directive = comp.asm_emit_size_directive
|
|
394
398
|
|
|
399
|
+
align_on_branch_labels = p.parse_optional_opt("align_on_branch_labels", bool)
|
|
400
|
+
# If option not provided then use the compiler default
|
|
401
|
+
if align_on_branch_labels is None:
|
|
402
|
+
align_on_branch_labels = comp.align_on_branch_labels
|
|
403
|
+
|
|
395
404
|
def parse_endianness() -> Literal["big", "little"]:
|
|
396
405
|
endianness = p.parse_opt_within(
|
|
397
406
|
"endianness",
|
|
@@ -454,6 +463,9 @@ def _parse_yaml(
|
|
|
454
463
|
),
|
|
455
464
|
generate_asm_macros_files=p.parse_opt("generate_asm_macros_files", bool, True),
|
|
456
465
|
include_asm_macro_style=parse_include_asm_macro_style(),
|
|
466
|
+
generated_asm_macros_directory=p.parse_path(
|
|
467
|
+
base_path, "generated_asm_macros_directory", "include"
|
|
468
|
+
),
|
|
457
469
|
use_o_as_suffix=p.parse_opt("o_as_suffix", bool, False),
|
|
458
470
|
gp=p.parse_optional_opt("gp_value", int),
|
|
459
471
|
check_consecutive_segment_types=p.parse_opt(
|
|
@@ -608,6 +620,7 @@ def _parse_yaml(
|
|
|
608
620
|
hardware_regs=p.parse_opt("hardware_regs", bool, False),
|
|
609
621
|
image_type_in_extension=p.parse_opt("image_type_in_extension", bool, False),
|
|
610
622
|
use_legacy_include_asm=p.parse_opt("use_legacy_include_asm", bool, False),
|
|
623
|
+
align_on_branch_labels=align_on_branch_labels,
|
|
611
624
|
disasm_unknown=p.parse_opt("disasm_unknown", bool, False),
|
|
612
625
|
detect_redundant_function_end=p.parse_opt(
|
|
613
626
|
"detect_redundant_function_end", bool, True
|
|
@@ -22,7 +22,12 @@
|
|
|
22
22
|
".section .text" \
|
|
23
23
|
)
|
|
24
24
|
#endif
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
#if INCLUDE_ASM_USE_MACRO_INC
|
|
27
|
+
__asm__(".include \"test/basic_app/split/include/macro.inc\"\n");
|
|
28
|
+
#else
|
|
29
|
+
__asm__(".include \"test/basic_app/split/include/labels.inc\"\n");
|
|
30
|
+
#endif
|
|
26
31
|
|
|
27
32
|
#else
|
|
28
33
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/nonmatchings/main/D_80000510.s
RENAMED
|
File without changes
|
{splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s
RENAMED
|
File without changes
|
{splat64-0.36.4 → splat64-0.37.0}/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|