public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* What header is needed "__vector" when using altivec support?
@ 2006-02-26  0:40 Ernest L. Williams Jr.
  2006-02-26 11:41 ` Blake Huff
  0 siblings, 1 reply; 3+ messages in thread
From: Ernest L. Williams Jr. @ 2006-02-26  0:40 UTC (permalink / raw)
  To: GCC-Help; +Cc: ernesto

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What header is needed "__vector" when using altivec support?
  2006-02-26  0:40 What header is needed "__vector" when using altivec support? Ernest L. Williams Jr.
@ 2006-02-26 11:41 ` Blake Huff
  2006-02-26 15:31   ` Ernest L. Williams Jr.
  0 siblings, 1 reply; 3+ messages in thread
From: Blake Huff @ 2006-02-26 11:41 UTC (permalink / raw)
  To: Ernest L. Williams Jr., GCC-Help

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.

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@gmail.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What header is needed "__vector" when using altivec support?
  2006-02-26 11:41 ` Blake Huff
@ 2006-02-26 15:31   ` Ernest L. Williams Jr.
  0 siblings, 0 replies; 3+ messages in thread
From: Ernest L. Williams Jr. @ 2006-02-26 15:31 UTC (permalink / raw)
  To: Blake Huff; +Cc: GCC-Help

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@gmail.com
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-26 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-26  0:40 What header is needed "__vector" when using altivec support? Ernest L. Williams Jr.
2006-02-26 11:41 ` Blake Huff
2006-02-26 15:31   ` Ernest L. Williams Jr.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).