Handling Long Branches

(maskray.me)

22 points | by ingve a day ago ago

2 comments

  • netule 5 minutes ago

    It looks like the author has renamed their blog post, and thus the link has changed: https://maskray.me/blog/2026-01-25-long-branches-in-compiler...

  • stevekemp 27 minutes ago

    It was only a couple of years ago since I wrote an assembly language program of my own and got hit by branching-limits on the Z80 processor.

    I did exactly the same things that were suggested in this article, either inverted conditionals, or had a thunk - essentially "jmp nextJump", where that jumped to the actual location.

    I sometimes spent a few hours shuffling code around to remove the longer jumps and re-order code in groups closer together to save individual bytes.