summaryrefslogtreecommitdiff
path: root/tools/asm_processor/asm_processor.py
diff options
context:
space:
mode:
authorRémi Calixte <remicalixte.rmc@gmail.com>2021-03-16 11:27:03 +0100
committerRémi Calixte <remicalixte.rmc@gmail.com>2021-03-16 11:27:03 +0100
commitfe49a1d229fef47e7a4c78d2fea6b92a22892ddb (patch)
tree8719d75247ba15eea47a5f5d4a9f4e3d477a4396 /tools/asm_processor/asm_processor.py
parent841866478a047e1879804eeee93a2f6113fa5295 (diff)
parent6138b2ea49421579ec2857d7a8a491de6b1701b6 (diff)
Merge branch 'master' into decomp-unk_02024E64
Diffstat (limited to 'tools/asm_processor/asm_processor.py')
-rw-r--r--tools/asm_processor/asm_processor.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/asm_processor/asm_processor.py b/tools/asm_processor/asm_processor.py
index e3226cb2..e1540c0c 100644
--- a/tools/asm_processor/asm_processor.py
+++ b/tools/asm_processor/asm_processor.py
@@ -575,7 +575,7 @@ class GlobalAsmBlock:
self.add_sized(int(line.split()[1], 0), real_line)
elif line.startswith('.balign') or line.startswith('.align'):
align = int(line.split()[1])
- if align != 2:
+ if align != 4:
self.fail("only .balign 4 is supported", real_line)
self.align4()
elif line.startswith('.asci'):
@@ -586,9 +586,6 @@ class GlobalAsmBlock:
# Branches are 4 bytes long
elif line.startswith('bl'):
self.add_sized(4, real_line)
- elif line.startswith('.'):
- # .macro, ...
- self.fail("asm directive not supported", real_line)
else:
# Unfortunately, macros are hard to support for .rodata --
# we don't know how how space they will expand to before
@@ -1027,8 +1024,11 @@ def fixup_objfile(objfile_name, functions, asm_prelude, assembler, output_enc):
loc1 = asm_objfile.symtab.find_symbol_in_section(temp_name + '_asm_start', source)
loc2 = asm_objfile.symtab.find_symbol_in_section(temp_name + '_asm_end', source)
assert loc1 == pos, "assembly and C files don't line up for section " + sectype + ", " + fn_desc
- if loc2 - loc1 != count:
- raise Failure("incorrectly computed size for section " + sectype + ", " + fn_desc + ". If using .double, make sure to provide explicit alignment padding.")
+ # Since we are nonmatching whole functions, we don't need to insert the correct
+ # amount of padding into the src file. We don't actually need to insert padding
+ # at all. We can just plop the asm's text section into the objfile.
+ # if loc2 - loc1 != count:
+ # raise Failure("incorrectly computed size for section " + sectype + ", " + fn_desc + ". If using .double, make sure to provide explicit alignment padding.")
if sectype == '.bss' or sectype == '.sbss2':
continue
target = objfile.find_section(sectype, n_text if sectype == '.text' else 0)