Re: What header is needed "__vector" when using altivec support?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2006-02-26 at 05:41 -0600, Blake Huff wrote:
> Ernest:
> 
> I think you can answer your own question by looking carefully at your  
> e-mail and comparing these two statements:
> 
> > The following functions are made available by including <altivec.h>  
> > and
> >
> 
> > #include <altivecLib.h>
> 
> 
> Perhaps including <altivec.h> instead of <altivecLib.h>  would fix  
> your problem? Hope this helps.
Yes, that got it for me.  I just did not realize where altivec.h was
hiding.  For vxWorks it lives here:
=======================================================================================================

<Install_Dir>/gnu/3.3.2-vxworks-6.2/x86-linux2/lib/gcc-lib/powerpc-wrs-vxworks/3.3.2/include/altivec.h
========================================================================================================

I am in business now. :)

Thanks,
Ernesto




> 
> Blake
> 
> 
> 
> 
> On Feb 25, 2006, at 6:40 PM, Ernest L. Williams Jr. wrote:
> 
> > Hi,
> >
> > I am trying to build altivec code using GCC and I can't get past first
> > base:
> >
> > ====================================================================== 
> > ==
> > The following functions are made available by including <altivec.h>  
> > and
> > using -maltivec and -mabi=altivec. The functions implement the
> > functionality described in Motorola's AltiVec Programming Interface
> > Manual.
> > ====================================================================== 
> > ==
> >
> > My code snippet looks like:
> > ========================================================
> >
> > #include <altivecLib.h>
> >
> >
> > void testFormattedIO()
> > {
> > __vector unsigned char s;
> > __vector signed int I;
> > __vector signed short SI;
> > __vector __pixel P;
> > __vector float F;
> >
> > /* 8-bits per element */
> > s = (__vector unsigned char)
> > {’0’,’1’,’2’,’3’,’4’,’5’,’6’,’7’,’8’,’9’,’A’,’B’,’C’,’D’,’E’,’F’};
> > ====================================================================
> >
> > The header does not define "__vector".  What is the deal?
> > Can anyone point me in the right direction?
> >
> >
> >
> >
> > I keep getting:
> > /ade/vxWorks/6.2/gnu/3.3.2-vxworks-6.2/x86-linux2/bin/ccppc -c
> > -D_POSIX_SOURCE       -DCPU=PPC604    -DvxWorks
> > -include /ade/vxWorks/6.2/vxworks-6.2/target/h/vxWorks.h  -ansi  -O3
> > -Wall     -mcpu=604 -mstrict-align -mlongcall -maltivec  -mabi=altivec
> > -fno-builtin  -I. -I.. -I../../../include/os/vxWorks -I../../../ 
> > include
> > -I/ade/epics/supTop/base/R3.14.8.2/include/os/vxWorks
> > -I/ade/epics/supTop/base/R3.14.8.2/include
> > -I/ade/epics/supTop/extensions/R3.14.8.2/include/os/vxWorks
> > -I/ade/epics/supTop/extensions/R3.14.8.2/include
> > -I/ade/vxWorks/6.2/vxworks-6.2/target/h
> > -I/ade/vxWorks/6.2/vxworks-6.2/target/h/wrn/coreip  ../altivecTest.c
> > ../altivecTest.c: In function `testFormattedIO':
> > ../altivecTest.c:7: error: `__vector' undeclared (first use in this
> > function)
> >
> >
> >
> >
> > Thanks,
> > Ernesto
> >
> 
> Blake Huff
> stangmechanic@xxxxxxxxx
> 
> 
> 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux