HardwareBanter

HardwareBanter (http://www.hardwarebanter.com/index.php)
-   General (http://www.hardwarebanter.com/forumdisplay.php?f=8)
-   -   How many x86 instructions? (http://www.hardwarebanter.com/showthread.php?t=194234)

Yousuf Khan[_2_] February 21st 14 12:26 AM

How many x86 instructions?
 
I was asked this question recently, and I just realized that I really
don't know the answer to this. I may have known at one time, but I don't
anymore, as things have moved on since I last used to do assembly
programming. How many instructions are there in modern x86 processors?

These days it seems more practical to just list the number of x86
instruction set extensions than to count up just the individual
instructions themselves. But even the number of x86 instruction set
extensions are becoming unmanageable: x86-16, x86-32, x64, x87, MMX,
SSE, 3DNow, VT-X, AMD-V, AVX, AES, etc., etc.

I searched around just looking for a simple count of instructions, and I
couldn't find them.

Yousuf Khan

Gene E. Bloch[_4_] February 21st 14 02:19 AM

How many x86 instructions?
 
On 2/20/2014, Yousuf Khan posted:
I was asked this question recently, and I just realized that I really
don't know the answer to this. I may have known at one time, but I
don't anymore, as things have moved on since I last used to do
assembly programming. How many instructions are there in modern x86
processors?


These days it seems more practical to just list the number of x86
instruction set extensions than to count up just the individual
instructions themselves. But even the number of x86 instruction set
extensions are becoming unmanageable: x86-16, x86-32, x64, x87, MMX,
SSE, 3DNow, VT-X, AMD-V, AVX, AES, etc., etc.


I searched around just looking for a simple count of instructions,
and I couldn't find them.


Yousuf Khan


Looking briefly at http://ref.x86asm.net/ and http://www.sandpile.org/
gives me the impression that the *isn't* a simple count of
instructions.

The first was pretty confusing, but it offered a manual for $20
involving a table in XML that might be a useful way to track it down.
Or maybe nit...

The second lists instructions in several subsets and I didn't see a way
to find a combined list.

I'd suggest making a spreadsheet, and using sandpile to fill some cells
with numbers that you can then easily sum :-)

Suddenly I'm glad that I don't code in Intel asm any more ;-)

To be honest, I vaguely recall that it was never easy, even well before
the proliferation of instruction sets[1], to get such a count.

[1] My Intel asm experience was a pretty long time ago!

--
Gene E. Bloch (Stumbling Bloch)

Gene E. Bloch[_4_] February 21st 14 02:26 AM

How many x86 instructions?
 
On 2/20/2014, Gene E. Bloch posted:
Looking briefly at http://ref.x86asm.net/ and
http://www.sandpile.org/ gives me the impression that the *isn't* a

^^^
there

simple count of instructions.


The first was pretty confusing, but it offered a manual for $20
involving a table in XML that might be a useful way to track it down.
Or maybe nit...


Or maybe not.

I am aware that my spell checker is sometimes quite generous in
allowing semantic errors, so I have no excuse for letting those errors
get away from me.

But if they amused you, so much the better :-)

--
Gene E. Bloch (Stumbling Bloch)

Gene E. Bloch[_4_] February 21st 14 02:29 AM

How many x86 instructions?
 
On 2/20/2014, Gene E. Bloch posted:
On 2/20/2014, Gene E. Bloch posted:
Looking briefly at http://ref.x86asm.net/ and
http://www.sandpile.org/ gives me the impression that the *isn't* a

^^^
there


simple count of instructions.


The first was pretty confusing, but it offered a manual for $20
involving a table in XML that might be a useful way to track it
down. Or maybe nit...


Or maybe not.


I am aware that my spell checker is sometimes quite generous in
allowing semantic errors, so I have no excuse for letting those
errors get away from me.


But if they amused you, so much the better :-)


It's still pretty funny.

So much for my skill at ASCII art, or ASCII errata corrections.

"impression that *there* isn't a simple count ..."

--
Gene E. Bloch (Stumbling Bloch)

Gene E. Bloch[_4_] February 21st 14 02:35 AM

How many x86 instructions?
 
On 2/20/2014, Gene E. Bloch posted:
On 2/20/2014, Yousuf Khan posted:
I was asked this question recently, and I just realized that I
really don't know the answer to this. I may have known at one time,
but I don't anymore, as things have moved on since I last used to
do assembly programming. How many instructions are there in modern
x86 processors?


These days it seems more practical to just list the number of x86
instruction set extensions than to count up just the individual
instructions themselves. But even the number of x86 instruction set
extensions are becoming unmanageable: x86-16, x86-32, x64, x87,
MMX, SSE, 3DNow, VT-X, AMD-V, AVX, AES, etc., etc.


I searched around just looking for a simple count of instructions,
and I couldn't find them.


Yousuf Khan


Looking briefly at http://ref.x86asm.net/ and
http://www.sandpile.org/ gives me the impression that the *isn't* a
simple count of instructions.


The first was pretty confusing, but it offered a manual for $20
involving a table in XML that might be a useful way to track it down.
Or maybe nit...


The second lists instructions in several subsets and I didn't see a
way to find a combined list.


I'd suggest making a spreadsheet, and using sandpile to fill some
cells with numbers that you can then easily sum :-)


Suddenly I'm glad that I don't code in Intel asm any more ;-)


To be honest, I vaguely recall that it was never easy, even well
before the proliferation of instruction sets[1], to get such a count.


[1] My Intel asm experience was a pretty long time ago!


There are a lot of manuals here[1]:

http://www.intel.com/content/www/us/...r-manuals.html

AKA http://tinyurl.com/3lh7em3

They are downloadable PDFs in several configurations...but I bet they
won't have a unified table either :-(

[1] And you've probably already been there...

--
Gene E. Bloch (Stumbling Bloch)

Yousuf Khan[_2_] February 21st 14 03:33 AM

How many x86 instructions?
 
On 20/02/2014 8:19 PM, Gene E. Bloch wrote:
Looking briefly at http://ref.x86asm.net/ and http://www.sandpile.org/
gives me the impression that the *isn't* a simple count of instructions.


Yeah, I looked at some of those sites already, and that was my
impression too, that the instructions aren't easy to count. It doesn't
help that Intel and AMD have their own extensions, either.

But it goes to show why the age of compilers is well and truly upon us,
there's no human way to keep track of these machine language
instructions. Compilers just use a subset, and just repeat those
instructions over and over again.

Yousuf Khan

Gene E. Bloch[_4_] February 21st 14 04:46 AM

How many x86 instructions?
 
On 2/20/2014, Yousuf Khan posted:
On 20/02/2014 8:19 PM, Gene E. Bloch wrote:
Looking briefly at http://ref.x86asm.net/ and
http://www.sandpile.org/
gives me the impression that the *isn't* a simple count of
instructions.


Yeah, I looked at some of those sites already, and that was my
impression too, that the instructions aren't easy to count. It
doesn't help that Intel and AMD have their own extensions, either.


But it goes to show why the age of compilers is well and truly upon
us, there's no human way to keep track of these machine language
instructions. Compilers just use a subset, and just repeat those
instructions over and over again.


Yousuf Khan


Maybe there are too many instructions (seriously).

But on the other hand, if I were writing video drivers (for moving
video), I'd want a specialized compiler that uses one subset of
instructions, and if I were writing heavy math software, I'd need
another subset in another specialized compiler...and so on.

None of the above is where I am these days :-)

--
Gene E. Bloch (Stumbling Bloch)

Gene E. Bloch[_4_] February 21st 14 05:02 AM

How many x86 instructions?
 
On 2/20/2014, Yousuf Khan posted:
On 20/02/2014 8:19 PM, Gene E. Bloch wrote:
Looking briefly at http://ref.x86asm.net/ and
http://www.sandpile.org/
gives me the impression that the *isn't* a simple count of
instructions.


Yeah, I looked at some of those sites already, and that was my
impression too, that the instructions aren't easy to count. It
doesn't help that Intel and AMD have their own extensions, either.


But it goes to show why the age of compilers is well and truly upon
us, there's no human way to keep track of these machine language
instructions. Compilers just use a subset, and just repeat those
instructions over and over again.


Yousuf Khan


Maybe there are too many instructions (seriously).

But on the other hand, if I were writing video drivers (for moving
video), I'd want a specialized compiler that uses one subset of
instructions, and if I were writing heavy math software, I'd need
another subset in another specialized compiler...and so on.

None of the above is where I am these days :-)

COMMENT
I am reposting this. I sent it about 15 min ago, and it is now shown as
removed from the server. Perhaps I have offended the Usenet gods.
/COMMENT

--
Gene E. Bloch (Stumbling Bloch)

Paul February 21st 14 05:21 AM

How many x86 instructions?
 
Yousuf Khan wrote:
On 20/02/2014 8:19 PM, Gene E. Bloch wrote:
Looking briefly at http://ref.x86asm.net/ and http://www.sandpile.org/
gives me the impression that the *isn't* a simple count of instructions.


Yeah, I looked at some of those sites already, and that was my
impression too, that the instructions aren't easy to count. It doesn't
help that Intel and AMD have their own extensions, either.

But it goes to show why the age of compilers is well and truly upon us,
there's no human way to keep track of these machine language
instructions. Compilers just use a subset, and just repeat those
instructions over and over again.

Yousuf Khan


Actually, even the compiler writers are getting
tired of the expanding instruction set. (I read
a rant on the topic.) Intel can make new instructions
faster than those guys can find a use for them.

At one time, a compiler would issue instructions
from about 30% of the instruction set. It would mean
a compiled program would never emit the other 70% of
them. But a person writing assembler code, would
have access to all of them, at least, as long as
the mnemonic existed in the assembler.

I worked on a couple of 8 bit micros, and at the
time, you could get a fold-out card (about a foot long,
double sided), with all the instructions on it. And
that's what we'd use as a quick reference when picking
instructions. You can't do that now, because the
fold-out card would be a hundred feet long. It
was a sign you were a "real programmer", when the
local rep gave you your fold-out card :-) LOL.

Paul

Gene E. Bloch[_4_] February 21st 14 06:23 AM

How many x86 instructions?
 
On 2/20/2014, Paul posted:
Yousuf Khan wrote:
On 20/02/2014 8:19 PM, Gene E. Bloch wrote:
Looking briefly at http://ref.x86asm.net/ and
http://www.sandpile.org/
gives me the impression that the *isn't* a simple count of
instructions.


Yeah, I looked at some of those sites already, and that was my
impression too, that the instructions aren't easy to count. It
doesn't help that Intel and AMD have their own extensions, either.

But it goes to show why the age of compilers is well and truly upon
us, there's no human way to keep track of these machine language
instructions. Compilers just use a subset, and just repeat those
instructions over and over again.

Yousuf Khan


Actually, even the compiler writers are getting
tired of the expanding instruction set. (I read
a rant on the topic.) Intel can make new instructions
faster than those guys can find a use for them.


At one time, a compiler would issue instructions
from about 30% of the instruction set. It would mean
a compiled program would never emit the other 70% of
them. But a person writing assembler code, would
have access to all of them, at least, as long as
the mnemonic existed in the assembler.


And was somehow accessible to the mind of the programmer :-)

I worked on a couple of 8 bit micros, and at the
time, you could get a fold-out card (about a foot long,
double sided), with all the instructions on it. And
that's what we'd use as a quick reference when picking
instructions. You can't do that now, because the
fold-out card would be a hundred feet long. It
was a sign you were a "real programmer", when the
local rep gave you your fold-out card :-) LOL.


Paul


In my assembly language days, the fold-out card was pretty damn small
:-)

I remember writing some code to move a block of memory in 286 (I think)
days, and later I realized how badly I had set it up. I didn't take
proper advantage of the way the 20-bit addressing worked[1], so I made
the call unusual and the code klutzy. I required the caller to address
memory to the byte level, i.e., all 20 bits, instead of to the
high-order 16 bits. Flexible but silly.

[1] Because I didn't fully understand the usage conventions yet.

--
Gene E. Bloch (Stumbling Bloch)


All times are GMT +1. The time now is 08:13 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HardwareBanter.com