I just played around with MMX to get used to it.

I wrote a simple programm that test if the CPU is capable of doing MMX instructions. For this purpose I "test edx, 00080000h" after executing CPUID. The Problem: I've an AMD Processor. I've read somewhere that AMD CPUs fully support MMX. Isn't this right and do I have to rewrite the program?

I've noticed that AMDs 3DNow! uses the MMX-Registers. Are the Instructions compatible with MMX (I mean do they use the same Opcodes?)

Thanks for your help.
Posted on 2003-02-24 02:31:54 by Compuholic
They are different.
3DNow is a set of instructions similar in purpose to those of SSE, while MMX are SIMD integer instructions, 3DNow, SSE(1, 2, and soon to be 3) are SIMD floating point instructions.

They use the same bank of registers. This means that mixing MMX, 3DNow, SSE, and floating point instructions will probably go wrong. They all use the same physical registers (although physical registers are relative, taking a high level software view of the processor they can be considered such), so the MMX instruction followed by 3DNow instruction, will mean the processor interprets the MMX result as 3DNow format floating point data, which is clearly wrong (if not actually wrong, then morally).

In theory you could mix the instructions, but you'd need a deep understanding of the two instruction sets data formats, and a brain the size of a small planet.
Not only that, further generations may separate the register space into their own domains. This would obviously break everything.

Mirno
Posted on 2003-02-24 04:29:41 by Mirno