Skip to content

Commit e368815

Browse files
authored
Merge pull request #122 from Decompollaborate/develop
1.14.1
2 parents f01ad96 + 0e3ab37 commit e368815

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[project]
55
name = "spimdisasm"
66
# Version should be synced with spimdisasm/__init__.py
7-
version = "1.14.0"
7+
version = "1.14.1"
88
description = "MIPS disassembler"
99
# license = "MIT"
1010
readme = "README.md"

spimdisasm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from __future__ import annotations
77

8-
__version_info__ = (1, 14, 0)
8+
__version_info__ = (1, 14, 1)
99
__version__ = ".".join(map(str, __version_info__))
1010
__author__ = "Decompollaborate"
1111

spimdisasm/mips/MipsFileBase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def getAsmPrelude(self) -> str:
5050
output += common.GlobalConfig.LINE_ENDS
5151
output += f".section {self.sectionType.toSectionName()}" + common.GlobalConfig.LINE_ENDS
5252
output += common.GlobalConfig.LINE_ENDS
53-
output += ".balign 16" + common.GlobalConfig.LINE_ENDS
53+
output += ".align 4" + common.GlobalConfig.LINE_ENDS
5454

5555
return output
5656

spimdisasm/mips/symbols/MipsSymbolBase.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -438,28 +438,19 @@ def getPrevAlignDirective(self, i: int=0) -> str:
438438
return f".align 3{common.GlobalConfig.LINE_ENDS}"
439439
elif self.isJumpTable():
440440
if i == 0 and common.GlobalConfig.COMPILER not in {common.Compiler.IDO, common.Compiler.PSYQ}:
441-
442441
if self.vram % 0x8 == 0:
443442
return f".align 3{common.GlobalConfig.LINE_ENDS}"
443+
elif self.isString():
444+
if self.vram % 0x4 == 0:
445+
return f".align 2{common.GlobalConfig.LINE_ENDS}"
444446

445447
return ""
446448

447449
def getPostAlignDirective(self, i: int=0) -> str:
448-
commentPaddingNum = 22
449-
if not common.GlobalConfig.ASM_COMMENT:
450-
commentPaddingNum = 1
451-
452-
alignDirective = ""
453-
454450
if self.isString():
455-
alignDirective += commentPaddingNum * " "
456-
if common.GlobalConfig.COMPILER in {common.Compiler.SN64, common.Compiler.PSYQ}:
457-
alignDirective += ".align 2"
458-
else:
459-
alignDirective += ".balign 4"
460-
alignDirective += common.GlobalConfig.LINE_ENDS
451+
return f".align 2{common.GlobalConfig.LINE_ENDS}"
461452

462-
return alignDirective
453+
return ""
463454

464455
def disassembleAsData(self, useGlobalLabel: bool=True) -> str:
465456
output = self.contextSym.getReferenceeSymbols()

spimdisasm/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)