seeker010

gcc and 3dnow

Discussion created by seeker010 on Jun 2, 2008
Latest reply on Jun 3, 2008 by avk
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.

Outcomes