[HN Gopher] Understand CPU Branch Instructions Better
___________________________________________________________________
Understand CPU Branch Instructions Better
Author : mfiguiere
Score : 14 points
Date : 2025-07-06 15:34 UTC (3 days ago)
(HTM) web link (chrisfeilbach.com)
(TXT) w3m dump (chrisfeilbach.com)
| noone_youknow wrote:
| Nice article! Always good to see easy-to-follow explainers on
| these kinds of concepts!
|
| One minor nit, for the "odd corner case that likely never exists
| in real code" of taken branches to the next instruction, I can
| think of at least one example where this is often used: far jumps
| to the next instruction with a different segment on x86[_64] that
| are used to reload CS (e.g. on a mode switch).
|
| Aware that's a very specific case, but it's one that very much
| does exist in real code.
| a_void_sky wrote:
| its such a fascinating thing that most people just ignore i too
| wrote (using AI) an article on Branch Prediction after i found
| out that most of my team members only read this in college but
| never understood
| djmips wrote:
| Weird cookie policy on that blog?
___________________________________________________________________
(page generated 2025-07-09 23:00 UTC)