asm_processor: count bls, .word and .extern correctly

This commit is contained in:
Rémi Calixte
2021-03-27 18:38:59 +01:00
parent 4ed9bcf63a
commit 352625ff40

View File

@@ -584,8 +584,12 @@ class GlobalAsmBlock:
elif line.startswith('.byte'):
self.add_sized(len(line.split(',')), real_line)
# Branches are 4 bytes long
elif line.startswith('bl'):
elif line.startswith('bl') and not line.startswith('bls'):
self.add_sized(4, real_line)
elif line.startswith('.word'):
self.add_sized(4, real_line)
elif line.startswith('.extern'):
pass
else:
# Unfortunately, macros are hard to support for .rodata --
# we don't know how how space they will expand to before