cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

seeker010
Journeyman III

gcc and 3dnow

I know AMD wants 3dnow to disappear, but both the geode gx and lx only support 3dnow. can AMD modify gcc to allow it to emit scalar 3dnow! instructions for floating point? something like


float a,b,c;

/*** c = a * b ***/

__asm__ __volatile__ (
"femms\n\t"
"movd %1, %%mm0\n\t"
"movd %2, %%mm1\n\t"
"pfmul %%mm0,%%mm1\n\t"
"movd %%mm1,%0\n\t"
"femms"
: "=g" (c)
: "g" (a), "g" (b)
);

/*** c = a + b ***/
__asm__ __volatile__ (
"femms\n\t"
"movd %1, %%mm0\n\t"
"movd %2, %%mm1\n\t"
"pfadd %%mm0,%%mm1\n\t"
"movd %%mm1,%0\n\t"
"femms"
: "=g" (c)
: "g" (a), "g" (b)
);


etc etc.

0 Likes
1 Reply
avk
Adept III

What about to use the X86 Built-in Functions instead of inline assembler?
0 Likes