diff --git a/slothy/targets/aarch64/aarch64_neon.py b/slothy/targets/aarch64/aarch64_neon.py index 69bca5ed..b074d73d 100644 --- a/slothy/targets/aarch64/aarch64_neon.py +++ b/slothy/targets/aarch64/aarch64_neon.py @@ -305,7 +305,8 @@ def start(self, loop_cnt, indentation=0, fixup=0, unroll=1, jump_if_empty=None, if fixup != 0: # In case the immediate is >1, we need to scale the fixup. This # allows for loops that do not use an increment of 1 - fixup *= self.additional_data['imm'] + assert isinstance(fixup, int) + fixup = simplify(f"{fixup} * ({self.additional_data['imm']})") yield f"{indent}sub {loop_cnt}, {loop_cnt}, #{fixup}" if jump_if_empty is not None: yield f"cbz {loop_cnt}, {jump_if_empty}"