Skip to content

Commit

Permalink
Remove include_macro_inc option (#395)
Browse files Browse the repository at this point in the history
* Remove include_macro_inc

* fix test
  • Loading branch information
ethteck authored Aug 16, 2024
1 parent 84d428f commit 5c3511f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Fixed the `subalign` segment property logic to be more straightforward
* Updated required versions of rabbitizier, n64img, and crunch64
* Removed `include_macro_inc` option, as it was never required and often detrimental

### 0.25.3

Expand Down
4 changes: 0 additions & 4 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,6 @@ Defaults to `ehlabel`

Toggles the .size directive emitted by the disassembler

### include_macro_inc

Determines including the macro.inc file on non-migrated rodata variables

### mnemonic_ljust

Determines the number of characters to left align before the instruction
Expand Down
2 changes: 0 additions & 2 deletions src/splat/segtypes/common/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ def create_unmigrated_rodata_file(
outpath.parent.mkdir(parents=True, exist_ok=True)

with outpath.open("w", newline="\n") as f:
if options.opts.include_macro_inc:
f.write('.include "macro.inc"\n\n')
preamble = options.opts.generated_s_preamble
if preamble:
f.write(preamble + "\n")
Expand Down
4 changes: 1 addition & 3 deletions src/splat/util/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Compiler:
asm_ehtable_label_macro: str = "ehlabel"
c_newline: str = "\n"
asm_inc_header: str = ""
include_macro_inc: bool = True
asm_emit_size_directive: Optional[bool] = None


Expand All @@ -29,11 +28,10 @@ class Compiler:
asm_data_macro=".globl",
asm_end_label=".end",
c_newline="\r\n",
include_macro_inc=False,
asm_emit_size_directive=False,
)

IDO = Compiler("IDO", include_macro_inc=False, asm_emit_size_directive=False)
IDO = Compiler("IDO", asm_emit_size_directive=False)

EEGCC = Compiler("EEGCC")

Expand Down
5 changes: 0 additions & 5 deletions src/splat/util/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ class SplatOpts:
asm_ehtable_label_macro: str
# Toggles the .size directive emitted by the disassembler
asm_emit_size_directive: Optional[bool]
# Determines including the macro.inc file on non-migrated rodata variables
include_macro_inc: bool
# Determines the number of characters to left align before the TODO finish documenting
mnemonic_ljust: int
# Determines whether to pad the rom address
Expand Down Expand Up @@ -507,9 +505,6 @@ def parse_endianness() -> Literal["big", "little"]:
"asm_ehtable_label_macro", str, comp.asm_ehtable_label_macro
),
asm_emit_size_directive=asm_emit_size_directive,
include_macro_inc=p.parse_opt(
"include_macro_inc", bool, comp.include_macro_inc
),
mnemonic_ljust=p.parse_opt("mnemonic_ljust", int, 11),
rom_address_padding=p.parse_opt("rom_address_padding", bool, False),
mips_abi_gpr=p.parse_opt_within(
Expand Down
2 changes: 0 additions & 2 deletions test/basic_app/expected/asm/nonmatchings/main/D_80000510.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.include "macro.inc"

.section .rodata

glabel D_80000510
Expand Down

0 comments on commit 5c3511f

Please sign in to comment.