A good list of x86_64 instructions

Programming, for all ages and all languages.
Post Reply
Synon
Member
Member
Posts: 169
Joined: Sun Sep 06, 2009 3:54 am
Location: Brighton, United Kingdom

A good list of x86_64 instructions

Post by Synon »

Hi :)
I was thinking of attempting emulation (actually, I tried it before). I plan to have support for SSE at first; and then extend to x64, SSE4a, MMX and 3DNow! instructions. Does anyone know where I can find an ordered list of opcodes for at least SSE? I have searched and searched; but the only ones I found were in alphabetic order, which is useless because I want to make a jump table of instructions.

Edit: it would be great if this list had privilege levels, too; but it's OK if it doesn't.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: A good list of x86_64 instructions

Post by Combuster »

Did you read Intel 2B, opcode tables?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Synon
Member
Member
Posts: 169
Joined: Sun Sep 06, 2009 3:54 am
Location: Brighton, United Kingdom

Re: A good list of x86_64 instructions

Post by Synon »

Combuster wrote:Did you read Intel 2B, opcode tables?
Uhhh.. no... :P

I didn't think to look in the manuals; I feel dumb now...
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: A good list of x86_64 instructions

Post by Selenic »

It may also be worth looking at the AMD manuals: not only are they better organized, but there's a nice table in volume 3 (appendix A) which explains what instructions belong to what extension set.

To show you what I mean by 'better organized' above, the instruction reference is split across four volumes: volume 3 contains standard instructions, volume 4 contains SSE*, 5 contains FPU and MMX instructions and 6 contains SSE-based extensions which haven't been implemented yet (such as 256-bit SIMD)
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: A good list of x86_64 instructions

Post by Owen »

You need to do MMX before SSE; most SSE integer apps will use both extensively
Synon
Member
Member
Posts: 169
Joined: Sun Sep 06, 2009 3:54 am
Location: Brighton, United Kingdom

Re: A good list of x86_64 instructions

Post by Synon »

@Selenic,
Yeah, I agree. I used the AMD manual when I was doing cpuid; and I found it extremely useful. I can't link you to it, but here's a link to a google search. It's the first result (I think it's cached): http://www.google.co.uk/search?q=amd+cpuid+spec

@Owen,
Thanks; I'll bare that in mind when I go to implement the instructions. For now, I'm playing with Linux kernel modules, but I'll take a look at that when I go back to my emulator.
Post Reply