MMX vs SSE vs 3DNow!
I''ll try to optimize my vector and vertex manupulation class with these pretty usual extensions. I know that MMX is for integers only and SSE and 3DNow for floats, so i guess I''ll use the latest. My question is though: If i implement SSE from the INTEL documents; will these SSE "functions" work on the AMD Athlon''s (the ones with SSE support) or do i have to use one implementation for the AMD version and one of the Intel version? The same goes for MMX (AMD Has the Extended MMX though) but will the standard mmx functions work over Cross-CPU''s?
Some do, some don''t; depends on the CPU(s)
AFAIK, none of the Intel''s support 3DNow, but all recent AMDs do MMX. Some do SSE, not sure about SSE2.
There''s an opcode to query the CPU for it''s capibilities.
AFAIK, none of the Intel''s support 3DNow, but all recent AMDs do MMX. Some do SSE, not sure about SSE2.
There''s an opcode to query the CPU for it''s capibilities.
Every socket based Athlon (Thunderbird & XP) supports
mmx , sse , 3dnow professional . But no sse2 though .
I don''t know for the slot-athlon ''s .
And indeed Magmai is right , 3dNOW/PRO is exclusive
for AMD .
mmx , sse , 3dnow professional . But no sse2 though .
I don''t know for the slot-athlon ''s .
And indeed Magmai is right , 3dNOW/PRO is exclusive
for AMD .
Well, Yes but that''s not my question: is the MMX instructions equal to both the AMD and the Intel version? If I''m using MMX on my computer using an Athlon XP, will the same cod work flawlessly on an Intel CPU?
if you know how extensions work in opengl you know how that works..
some cpus can do mmx, some can do 3dnow, some can do sse, some can do sse2. you have to query what they can do, if it can do the specific ext, you can use it.
"take a look around" - limp bizkit
www.google.com
some cpus can do mmx, some can do 3dnow, some can do sse, some can do sse2. you have to query what they can do, if it can do the specific ext, you can use it.
"take a look around" - limp bizkit
www.google.com
It''s not too complicated.
You should get the type of the CPU first, and you should create subclasses with inheritance from your Vector class for every case. From the P166 every CPU supports MMX, some AMD processors supporst 3DNow beside it, but nowadays AMD and Intel processors supports MMX and SSE too. And in the P4 there''s SSE2 too.
So you must create different vector classes for every cases, and use virtual functions, with plymorphism to choose the right. In this case you use the ancestor, but with polymorphism the C++ use the correct. So the most important to identify the type of the processor first. Later you know which class should be used.
Jonny
You should get the type of the CPU first, and you should create subclasses with inheritance from your Vector class for every case. From the P166 every CPU supports MMX, some AMD processors supporst 3DNow beside it, but nowadays AMD and Intel processors supports MMX and SSE too. And in the P4 there''s SSE2 too.
So you must create different vector classes for every cases, and use virtual functions, with plymorphism to choose the right. In this case you use the ancestor, but with polymorphism the C++ use the correct. So the most important to identify the type of the processor first. Later you know which class should be used.
Jonny
I don''t think you get my dilemma... Is the registers (mm0 .. mm7) named equally in both AMD''s and INTEL''s CPU''s? Is the MOVQ MOVD equal in both cpu''s?
Metus: If an AMD CPU supports MMX, it will run the same kind of MMX code an Intel chip runs. Why would you think otherwise? It wouldn''t be MMX if it couldn''t run Intel MMX code...
The encoding of the instructions are the same.
Nope. There are non-MMX P166s, P180s, and P200s. When Intel introduced MMX, they had 166MHz and 200MHz versions (not sure about 150 and 180), and from then on everything supported MMX (except for Pentium Pros -- the Pentium IIs had MMX support, though.)
As always, use CPUID to find out if a given CPU supports MMX or not.
---
Bart
The encoding of the instructions are the same.
quote:
From the P166 every CPU supports MMX
Nope. There are non-MMX P166s, P180s, and P200s. When Intel introduced MMX, they had 166MHz and 200MHz versions (not sure about 150 and 180), and from then on everything supported MMX (except for Pentium Pros -- the Pentium IIs had MMX support, though.)
As always, use CPUID to find out if a given CPU supports MMX or not.
---
Bart
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement