News for hackers. Stuff that matters.
Re:GodBolt: Enter C, get Assembly by dangerbird2 on Thursday December 15, 2016 @08:23AM (#13184370)
The second example makes sense: rdi stores the first subroutine argument in amd64 calling conventions and rax stores the return value. I imagine it's easy for the compiler to infer that the loop is just counting 1 bits, which popcnt does. I imagine if you called functions or initialized local variables in the loop, it would be much more messy

There are no comments on this comment yet.