News for hackers. Stuff that matters.
Re:How Many X86-64 Instructions Are There Anyway? by pslam on Monday May 01, 2017 @12:18AM (#14235546)
This is the wrong way to go about it. x86 mnemonics bear little resemblance to the encoded binary machine code. For example, what x86 lumps into a single "mov" mnemonic, is actually half a dozen different underlying instructions, e.g load, store, reg-reg, and a few special cases.

It's the wrong question too. Perhaps what you're looking for is: "What is the number of combinations in which an instruction can be decoded?" This would need to lump together all the multi-bit fields (such as immediates) as one (or a few if there's special values). This would be a measure of the expressivity of instruction set, and somewhat a measure of the encoding efficiency — how much it can cover the execution unit inputs?

It's a much easier thing to answer for most of the "RISC" oriented architectures, e.g ARM 32 and 64 bit. It's basically the set of valid binary encodings of instructions, compressing together all the immediate values.

Re:How Many X86-64 Instructions Are There Anyway? by Erwin on Monday May 01, 2017 @07:30PM (#14242721)
Curiosly the capability of the x86 MOV is such that you can compile C code to only MOV instructions: https://github.com/xoreaxeaxeax/movfuscator

Inspired by this paper about Turing-completeness of MOV: http://www.cl.cam.ac.uk/~sd601/papers/mov.pdf

Re:How Many X86-64 Instructions Are There Anyway? by Questron on Monday May 01, 2017 @05:31AM (#14236430)
All the different instructions are listed in intel's instruction reference manuals. What is not very wise about this article is that he's using AT&T syntax. It adds one pointless level between the actual assembly and the programmer, and it has these syntax differences compared to reference manuals, which makes it frustrating to use (both read and write).