summaryrefslogtreecommitdiff
path: root/tools/asm-processor
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-07-14 14:44:11 -0400
committerGitHub <noreply@github.com>2023-07-14 14:44:11 -0400
commitce93cd026259b5724a8de4a2d3bb2e87297ce5e4 (patch)
tree33797b411d2451d9aeddd3b43d7fe2d7b244fa56 /tools/asm-processor
parent39a2e453bb882b2498c7c4aa9073a9f85d048f0c (diff)
Update subrepos (#19)
* git subrepo pull --force tools/asm-processor subrepo: subdir: "tools/asm-processor" merged: "6dd4d3a" upstream: origin: "git@github.com:simonlindholm/asm-processor.git" branch: "main" commit: "6dd4d3a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull lib/ultralib --force subrepo: subdir: "lib/ultralib" merged: "0417857" upstream: origin: "git@github.com:decompals/ultralib.git" branch: "main" commit: "0417857" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull tools/asm-differ --force subrepo: subdir: "tools/asm-differ" merged: "6d3e4c4" upstream: origin: "git@github.com:simonlindholm/asm-differ.git" branch: "main" commit: "6d3e4c4" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull tools/splat --force subrepo: subdir: "tools/splat" merged: "406b646" upstream: origin: "git@github.com:ethteck/splat.git" branch: "master" commit: "406b646" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Revert "git subrepo pull lib/ultralib --force" This reverts commit da9fca47be7d8f957b786c02d7bf4b4a48830f4a. * git subrepo pull tools/splat subrepo: subdir: "tools/splat" merged: "7869ef2" upstream: origin: "git@github.com:ethteck/splat.git" branch: "master" commit: "7869ef2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Disable asm size directive
Diffstat (limited to 'tools/asm-processor')
-rw-r--r--tools/asm-processor/.gitrepo4
-rw-r--r--tools/asm-processor/asm_processor.py13
-rw-r--r--tools/asm-processor/prelude.inc10
3 files changed, 21 insertions, 6 deletions
diff --git a/tools/asm-processor/.gitrepo b/tools/asm-processor/.gitrepo
index ef2baa1..fd4c97a 100644
--- a/tools/asm-processor/.gitrepo
+++ b/tools/asm-processor/.gitrepo
@@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:simonlindholm/asm-processor.git
branch = main
- commit = bbd86ea1faf84e6a7a0e101ab8068a00a3dfb2fc
- parent = 75437386de04179489f4fd5fb345d122ff8a2dc0
+ commit = 6dd4d3adcbfb3ee607b9a1e2bba3502d27217d44
+ parent = 39a2e453bb882b2498c7c4aa9073a9f85d048f0c
method = merge
cmdver = 0.4.3
diff --git a/tools/asm-processor/asm_processor.py b/tools/asm-processor/asm_processor.py
index 0d62bc3..23f6102 100644
--- a/tools/asm-processor/asm_processor.py
+++ b/tools/asm-processor/asm_processor.py
@@ -605,11 +605,11 @@ class GlobalAsmBlock:
line = re.sub(r'^[a-zA-Z0-9_]+:\s*', '', line)
changed_section = False
emitting_double = False
- if line.startswith('glabel ') and self.cur_section == '.text':
+ if (line.startswith('glabel ') or line.startswith('jlabel ')) and self.cur_section == '.text':
self.text_glabels.append(line.split()[1])
if not line:
pass # empty line
- elif line.startswith('glabel ') or line.startswith('dlabel ') or line.startswith('endlabel ') or (' ' not in line and line.endswith(':')):
+ elif line.startswith('glabel ') or line.startswith('dlabel ') or line.startswith('jlabel ') or line.startswith('endlabel ') or (' ' not in line and line.endswith(':')):
pass # label
elif line.startswith('.section') or line in ['.text', '.data', '.rdata', '.rodata', '.bss', '.late_rodata']:
# section change
@@ -651,17 +651,22 @@ class GlobalAsmBlock:
emitting_double = True
elif line.startswith('.space'):
self.add_sized(int(line.split()[1], 0), real_line)
- elif line.startswith('.balign') or line.startswith('.align'):
+ elif line.startswith('.balign'):
align = int(line.split()[1])
if align != 4:
self.fail("only .balign 4 is supported", real_line)
self.align4()
+ elif line.startswith('.align'):
+ align = int(line.split()[1])
+ if align != 2:
+ self.fail("only .align 2 is supported", real_line)
+ self.align4()
elif line.startswith('.asci'):
z = (line.startswith('.asciz') or line.startswith('.asciiz'))
self.add_sized(self.count_quoted_size(line, z, real_line, output_enc), real_line)
elif line.startswith('.byte'):
self.add_sized(len(line.split(',')), real_line)
- elif line.startswith('.half'):
+ elif line.startswith('.half') or line.startswith('.hword'):
self.align2()
self.add_sized(2*len(line.split(',')), real_line)
elif line.startswith('.'):
diff --git a/tools/asm-processor/prelude.inc b/tools/asm-processor/prelude.inc
index 3e58ff1..9bc8939 100644
--- a/tools/asm-processor/prelude.inc
+++ b/tools/asm-processor/prelude.inc
@@ -1,11 +1,21 @@
.set noat
.set noreorder
.set gp=64
+
.macro glabel label
.global \label
\label:
.endm
+.macro dlabel label
+ .global \label
+ \label:
+.endm
+
+.macro jlabel label
+ \label:
+.endm
+
# Float register aliases (o32 ABI, odd ones are rarely used)