Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been meaning to solidify my memory of common x86 instructions for a while, but I never got around to it because I get distracted by the bazillion other more advanced instructions. This guide is nice because it covers a few common instructions in a complete-enough manner but not excruciating details like the Intel manual.


Unless you're looking at handwritten and/or deliberately obfuscated code, the "more advanced" instructions are unlikely to be encountered; the bulk of compiler-generated general-purpose code will be moves, ALU ops, pushes, and pops along with the usual control flow calls, returns, and jumps.


I deal with a lot of manual SIMD code in C with <nmmintrin.h> etc, but being a C programmer, I've forgotten how some of the "normal" instructions work. Also the advanced instructions are useful to at least be familiar with when you're working with disassembly, or studying how compilers optimize code.


Most of the time you don't need all the special-purpose instructions. I mean, mov is Turing complete. runs away


You don't even need mov. X86 MMU fault handling mechanism is Turing complete. https://github.com/jbangert/trapcc



Exactly! This is a very nice and relatively brief guide. Bookmarked. :)




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

Search: