URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 322 |
Rev 338 |
/* { dg-do compile { target powerpc*-*-* } } */
|
/* { dg-do compile { target powerpc*-*-* } } */
|
/* { dg-require-effective-target powerpc_altivec_ok } */
|
/* { dg-require-effective-target powerpc_altivec_ok } */
|
/* { dg-options "-maltivec" } */
|
/* { dg-options "-maltivec" } */
|
|
|
/* Program to test the vector_size attribute. This needs to run on a
|
/* Program to test the vector_size attribute. This needs to run on a
|
target that has vectors, so use AltiVec. */
|
target that has vectors, so use AltiVec. */
|
|
|
#define vector __attribute__((vector_size(16)))
|
#define vector __attribute__((vector_size(16)))
|
|
|
vector int foobar;
|
vector int foobar;
|
|
|
/* Only floats and integrals allowed. We don't care if they map to SIs. */
|
/* Only floats and integrals allowed. We don't care if they map to SIs. */
|
struct X { int frances; };
|
struct X { int frances; };
|
vector struct X hotdog; /* { dg-error "invalid vector type" } */
|
vector struct X hotdog; /* { dg-error "invalid vector type" } */
|
|
|
/* Arrays of vectors. */
|
/* Arrays of vectors. */
|
vector char b[10], ouch;
|
vector char b[10], ouch;
|
|
|
/* Pointers of vectors. */
|
/* Pointers of vectors. */
|
vector short *shoe, polish;
|
vector short *shoe, polish;
|
|
|
int xxx[sizeof(foobar) == 16 ? 69 : -1];
|
int xxx[sizeof(foobar) == 16 ? 69 : -1];
|
|
|
int nc17[sizeof(shoe) == sizeof (char *) ? 69 : -1];
|
int nc17[sizeof(shoe) == sizeof (char *) ? 69 : -1];
|
|
|
code ()
|
code ()
|
{
|
{
|
*shoe = polish;
|
*shoe = polish;
|
b[1] = ouch;
|
b[1] = ouch;
|
}
|
}
|
|
|
vector short
|
vector short
|
hoop ()
|
hoop ()
|
{
|
{
|
return polish;
|
return polish;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.