Does altivec work on biarch compiler for gcc 3.3.3-hammer?

davis davis at
Mon Apr 26 23:44:20 EST 2004

Hello Segher,

On Mon, Apr 26, 2004 at 09:39:17AM +0200, Segher Boessenkool wrote:
> >Does altivec work with gcc 3.3.3 hammer?
> Yes.
> >I'm building  with -maltivec and -mabi=altivec but it does not seem to
> >work
> >for simple programs.  For instance,
> >
> >	printf("%vc",(vector unsigned char) {'h','e','l','l','o'});
> Not valid code.  A vector initializer has either one, or exactly
> the correct number of elements (i.e., for char, 16 elts).

Thanks that is good to know.  However, I was a little sloppy with my
rewrite.  I actually did use all the slots in the vector as they do
in the velocity engine tutorial.  ie. hello world 1234.  My main
point was below.

> >Will print:
> >
> > 	%vc
> glibc doesn't support vector printf extensions.  Political issue.

That's good to know.  I won't try to get that stuff working anymore.

> >Here is how I am building:
> >
> >	gcc -maltivec -mabi=altivec -mcpu=970 -mtune=970 testy.c
> -mtune is redundant; looks fine otherwise.

That is also good to know.  Many thanks.

> Segher

Happy Trails

John F. Davis                                            Durham, North Carolina
Airhead BMW Club #6334 1992 R100GSPD           

** Sent via the linuxppc64-dev mail list. See

More information about the Linuxppc64-dev mailing list