Live data from Hacker News

How many x86 instructions are there? (2016)

fgiesen.wordpress.com

1–10 of 92 posts

Re: How many x86 instructions are there? (2016)

#5
post #4

I feel sudden urge to write some assembly for fun. Have not done it for at least a couple of years I think.

Then when checking the results are half the speed of what the compiler spits out and the fun is gone. At least that's what happens to me...

Re: How many x86 instructions are there? (2016)

#6
post #4

I feel sudden urge to write some assembly for fun. Have not done it for at least a couple of years I think.

Then when checking the results are half the speed of what the compiler spits out and the fun is gone. At least that's what happens to me...

That's why it's more fun to try to optimize for size

Re: How many x86 instructions are there? (2016)

#7
How about undocumented instructions? Sandsifter[1] is an interesting project and the video from BlackHat[2] is a good watch. There's also a previous discussion of it on HN[3].

[1] https://github.com/Battelle/sandsifter

[2] https://www.youtube.com/watch?v=KrksBdWcZgQ

[3] https://news.ycombinator.com/item?id=18179212

Re: How many x86 instructions are there? (2016)

#8
> To not leave you hanging: Intel has an official x86 encoder/decoder library called XED. According to Intel’s XED, as of this writing, there are 1503 defined x86 instructions (“iclasses” in XED lingo), from AAA to XTEST (this includes AMD-specific extensions too, by the way). Straightforward, right?

Hopefully this will have either saved you a click or validated your time in reading the article.

Re: How many x86 instructions are there? (2016)

#9
More than 1,500! Holy cow!

While having instructions for everything that are slow in early models but can be significantly improved in silicon over time is one way to look at CISC, I genuinely wonder how much silicon is spent on instructions that are so rarely used they'd be better in software.

Or to ask another way: how many instructions are in billions of x86 cores that rarely if ever get used? Hmmm...

Re: How many x86 instructions are there? (2016)

#10
post #3

ARM has all these variations which make it seem as complicated as x86, but they are distict variations and future CPUs can for example drop 16 bit Thumb fairly clearly.

I think that one of the things that distinguishes Arm from Intel (for good or bad) is that Arm _has_ left behind a lot of the legacy. aarch64 has no Thumb, Jazelle etc
Post reply on HN