[clug] gcc3.3 + 3dNOW bug?

Francis James Whittle fudje at phreaker.net
Mon Sep 13 09:38:36 GMT 2004


OK, So attachments are hosed here....

For the curious, ze C[99] source:

/* - Begin Code - */

#include <stdio.h>

typedef int V2SF __attribute__ ((mode(V2SF)));

typedef union  {
     V2SF vec;
     struct {
	  float x;
	  float y;
     } ovec;
} vec2f;

vec2f mul( const vec2f *a, const vec2f *b )
{
     return (vec2f) __builtin_ia32_pfmul(a->vec, b->vec);
}

int main()
{
     vec2f a = { .ovec = { 1.0, 2.0 } },
	  b = { .ovec = { 3.0, 4.0 } };
     
     printf( "a = %g %g\n", a.ovec.x, a.ovec.y );
     printf( "b = %g %g\n", b.ovec.x, b.ovec.y );
     printf( "mul\n" );
     vec2f c = mul ( &a, &b );
     printf( "a = %g %g\n", a.ovec.x, a.ovec.y );
     printf( "b = %g %g\n", b.ovec.x, b.ovec.y );
     printf( "c = %g %g\n", c.ovec.x, c.ovec.y );
     return 0;
};

/* - End Code - */

On Sun, 2004-09-12 at 15:15 +1000, Francis James Whittle wrote:
> Hmm.  Should be attached this time, in actuality.
> 
> On Sat, 2004-09-11 at 22:23 +1000, Francis James Whittle wrote:
> > Using the C source code attached (because getting rid of C++ is always
> > fun.  Also, interestingly enough, it damages a in a different way.):
> 



More information about the linux mailing list