How many instructions are there on x86 today?
Have a look here, this listing should give you an idea on how many instructions were added to each x86 architecture.
In any case there is no better reference than the official Intel® 64 and IA-32 Architectures Software Developer’s Manual.
Related videos on Youtube
user2214913
Updated on June 17, 2022Comments
-
user2214913 almost 2 years
I am trying to learn up to date x86 assembly all from old 386 base instructions through all the sse additions up until now.
I read some things like SSE5 counts 170 new instructions - and I became urged to know how many of them there are presently in total.
Some may say that it's hard to count (because some of them are close, but work on different type arguments), but I think they can be counted with some reasonable assumptions on how to count multiples as one. So could anybody provide an answer to that?
The best answer would be the table of how many instructions in each processor extension it was.
-
Michael about 11 yearsCheck the manual
-
user2214913 about 11 yearsit will be a lot hours of work :c and some mistakes involved :C maybe someone did this already ? I would like to recount it when learning assembly and then make sure i saw it all ;-)
-
Andreas Fester about 11 years
and then make sure i saw it all
- I do not think that this is a reasonable approach when learning assembly. Pick a book like Assembly Language Step-by-Step: Programming with Linux, get started and over time you will learn the necessary instructions -
harold about 11 yearsIs it even unambiguous? For example, are
vpaddd xmm0, xmm0, xmm0
andvpaddd ymm0, ymm0, ymm0
different instructions or not? They aren't even in the same instruction set (AVX vs AVX2), but they're the same mnemonic and the only difference in the encoding is the length bit. If you just want to work through all of them, that's easier than trying to count them.. -
nrz about 11 years
movsd
is also a case of one mnemonic, but two different instructions (other 386+ instruction, other SSE2 instruction). And many instructions have multiple mnemonics. And arerep
/repe
/repz
andrepne
/repnz
instructions? Intel® 64 and IA-32 Architectures Developer's Manual also presentsmov
as 3 different instructions: 1. Move, 2. Move to/from Control Registers, 3. Move to/from Debug Registers. And why you expect others to count the instructions for you? -
user2214913 about 11 yearsI do not expect them to count them for me_ Thay maybe counted it for some other purposes and will tell me ;-) As to way of counting use just some reasonable or two or thre of them - I would distinguish by the results and other specyfic also for example adding 64 bits to 64 bits differs form adding 8 bits to 8 bits, same with jumps for me jnz and jge arre different instructions
-
bshanks over 9 yearsAs of Sep 6 2014, my very sloppy attempt to count the number of mnemonics at en.wikipedia.org/wiki/X86_instruction_listings yields a count of 678 mnemonics.
-
Peter Cordes over 8 years@user2214913: Then you really want to count the number of opcodes, if you want to count every form of every instruction differently. (e.g.
add r32, r32
vs.add r32, imm32
vs.add r32, imm8(sign-extended)
. Andmovzx r32, r8
vs.movzx r16, r8
. Actually, then you have to count different prefixes, since operand-size and REX modify things. -
Peter Cordes over 8 yearsBut Andreas's comment is correct: when I'm looking for a way to save a uop in a loop, I'll sometimes flip through the instruction manual, or search. x86 has too much weird stuff and non-orthogonalities esp. in the vector instructions to try to memorize which version of what is available, and which isn't. And the best choice evolves with time, as microarchitectures change.
-
Wolf almost 6 yearsOh man... overzealous SO users closed the question for no got reason again -_-... here is a really good answer (between 981 and 3683 instructions, depending on how you count): stefanheule.com/blog/…
-
-
user2214913 about 11 yearsye I know, but counting myself is tiresome - wil do that eventually