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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-6.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 -O0 -Wall" } */
4
 
5
#include <altivec.h>
6
 
7
/* These denote "generic" GCC vectors.  */
8
static int __attribute__((vector_size(16))) x, y, z;
9
 
10
static vector signed int i,j;
11
static vector signed short s,t;
12
static vector signed char c,d;
13
static vector float f,g;
14
 
15
static vector unsigned char uc;
16
 
17
static vector signed int *pi;
18
 
19
static int int1, int2;
20
 
21
void
22
b()
23
{
24
  z = vec_add (x, y);
25
 
26
  /* Make sure the predicates accept correct argument types.  */
27
 
28
  int1 = vec_all_in (f, g);
29
  int1 = vec_all_ge (f, g);
30
  int1 = vec_all_eq (c, d);
31
  int1 = vec_all_ne (s, t);
32
  int1 = vec_any_eq (i, j);
33
  int1 = vec_any_ge (f, g);
34
  int1 = vec_all_ngt (f, g);
35
  int1 = vec_any_ge (c, d);
36
  int1 = vec_any_ge (s, t);
37
  int1 = vec_any_ge (i, j);
38
  int1 = vec_any_ge (c, d);
39
  int1 = vec_any_ge (s, t);
40
  int1 = vec_any_ge (i, j);
41
 
42
  vec_mtvscr (i);
43
  vec_dssall ();
44
  s = (vector signed short) vec_mfvscr ();
45
  vec_dss (3);
46
 
47
  vec_dst (pi, int1 + int2, 3);
48
  vec_dstst (pi, int1 + int2, 3);
49
  vec_dststt (pi, int1 + int2, 3);
50
  vec_dstt (pi, int1 + int2, 3);
51
 
52
  uc = (vector unsigned char) vec_lvsl (int1 + 69, (signed int *) pi);
53
  uc = (vector unsigned char) vec_lvsr (int1 + 69, (signed int *) pi);
54
 
55
  c = vec_lde (int1, (signed char *) pi);
56
  s = vec_lde (int1, (signed short *) pi);
57
  i = vec_lde (int1, (signed int *) pi);
58
  i = vec_ldl (int1, pi);
59
  i = vec_ld (int1, pi);
60
 
61
  vec_st (i, int2, pi);
62
  vec_ste (c, int2, (signed char *) pi);
63
  vec_ste (s, int2, (signed short *) pi);
64
  vec_ste (i, int2, (signed int *) pi);
65
  vec_stl (i, int2, pi);
66
}

powered by: WebSVN 2.1.0

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