OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-2.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile { target powerpc*-*-* } } */
2
/* { dg-require-effective-target powerpc_altivec_ok } */
3
/* { dg-options "-maltivec" } */
4
 
5
/* Program to test the vector_size attribute.  This needs to run on a
6
   target that has vectors, so use AltiVec.  */
7
 
8
#define vector __attribute__((vector_size(16)))
9
 
10
vector int foobar;
11
 
12
/* Only floats and integrals allowed.  We don't care if they map to SIs.  */
13
struct X { int frances; };
14
vector struct X hotdog; /* { dg-error "invalid vector type" } */
15
 
16
/* Arrays of vectors.  */
17
vector char b[10], ouch;
18
 
19
/* Pointers of vectors.  */
20
vector short *shoe, polish;
21
 
22
int xxx[sizeof(foobar) == 16 ? 69 : -1];
23
 
24
int nc17[sizeof(shoe) == sizeof (char *) ? 69 : -1];
25
 
26
code ()
27
{
28
  *shoe = polish;
29
  b[1] = ouch;
30
}
31
 
32
vector short
33
hoop ()
34
{
35
  return polish;
36
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.