Page 1 of 1

A good list of x86_64 instructions

Posted: Mon Feb 22, 2010 5:59 am
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.

Re: A good list of x86_64 instructions

Posted: Mon Feb 22, 2010 6:12 am
by Combuster
Did you read Intel 2B, opcode tables?

Re: A good list of x86_64 instructions

Posted: Mon Feb 22, 2010 6:58 am
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...

Re: A good list of x86_64 instructions

Posted: Mon Feb 22, 2010 11:26 am
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)

Re: A good list of x86_64 instructions

Posted: Mon Feb 22, 2010 1:29 pm
by Owen
You need to do MMX before SSE; most SSE integer apps will use both extensively

Re: A good list of x86_64 instructions

Posted: Tue Feb 23, 2010 12:36 pm
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.