Hacker News new | past | comments | ask | show | jobs | submit login
The Surprising Subtleties of Zeroing a Register (2012) (randomascii.wordpress.com)
62 points by qznc on Feb 10, 2016 | hide | past | favorite | 3 comments



Hey! A word for my friends who are interested in machine architecture, but like me, aren't already experts in the topic.

I'd command-clicked this article to read it later, got busy with other stuff, then ran across the tab again. Found it so compelling that I wrote dang - well past midnight! - to see if it could get boosted back to the home page. Turns out this had been done once already, but he gave it another shot thanks to my suggestion.

So don't make me a liar, go read this article if the topic is at all interesting to you. It takes a simple little case - zeroing a register - maybe the most fundamental "spike solution" there is [1] - and traces a few ways to do it and how different processors interpret them.

I learned quite a lot in the ten minutes it took to read this.

If my advice is wrong, you know where to find the downvote button. ;-)

[1] https://www.google.com/search?q=spike+solution


Somewhat related: "Why do Windows functions all begin with a pointless MOV EDI, EDI instruction?" https://blogs.msdn.microsoft.com/oldnewthing/20110921-00/?p=...


The comments on the post linked seem to be good, in addition to the post linked.

I didn't really understand all of it, which is why I said seem to be, instead of are.

What I did understand was interesting though.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: