Skip to content

Commit

Permalink
Fix empty padding
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher committed Oct 24, 2024
1 parent da3a90f commit 2f57942
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/jit/_stencils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def pad(self, alignment: int) -> None:
"""Pad the stencil to the given alignment."""
offset = len(self.body)
padding = -offset % alignment
self.disassembly.append(f"{offset:x}: {' '.join(['00'] * padding)}")
if padding:
self.disassembly.append(f"{offset:x}: {' '.join(['00'] * padding)}")
self.body.extend([0] * padding)

def remove_jump(self, *, alignment: int = 1) -> None:
Expand Down

0 comments on commit 2f57942

Please sign in to comment.