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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [vsx-vector-6.c] - Blame information for rev 378

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

Line No. Rev Author Line
1 322 jeremybenn
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3
/* { dg-require-effective-target powerpc_vsx_ok } */
4
/* { dg-options "-mvsx -O2" } */
5
 
6
#include <altivec.h>
7
 
8
void foo (vector double *out, vector double *in, vector long *p_l, vector bool long *p_b, vector unsigned char *p_uc, int *i)
9
{
10
  vector double in0 = in[0];
11
  vector double in1 = in[1];
12
  vector double in2 = in[2];
13
  vector long inl = *p_l;
14
  vector bool long inb = *p_b;
15
  vector unsigned char uc = *p_uc;
16
 
17
  *out++ = vec_abs (in0);
18
  *out++ = vec_add (in0, in1);
19
  *out++ = vec_and (in0, in1);
20
  *out++ = vec_and (in0, inb);
21
  *out++ = vec_and (inb, in0);
22
  *out++ = vec_andc (in0, in1);
23
  *out++ = vec_andc (in0, inb);
24
  *out++ = vec_andc (inb, in0);
25
  *out++ = vec_ceil (in0);
26
  *p_b++ = vec_cmpeq (in0, in1);
27
  *p_b++ = vec_cmpgt (in0, in1);
28
  *p_b++ = vec_cmpge (in0, in1);
29
  *p_b++ = vec_cmplt (in0, in1);
30
  *p_b++ = vec_cmple (in0, in1);
31
  *out++ = vec_div (in0, in1);
32
  *out++ = vec_floor (in0);
33
  *out++ = vec_madd (in0, in1, in2);
34
  *out++ = vec_msub (in0, in1, in2);
35
  *out++ = vec_max (in0, in1);
36
  *out++ = vec_min (in0, in1);
37
  *out++ = vec_msub (in0, in1, in2);
38
  *out++ = vec_mul (in0, in1);
39
  *out++ = vec_nearbyint (in0);
40
  *out++ = vec_nmadd (in0, in1, in2);
41
  *out++ = vec_nmsub (in0, in1, in2);
42
  *out++ = vec_nor (in0, in1);
43
  *out++ = vec_or (in0, in1);
44
  *out++ = vec_or (in0, inb);
45
  *out++ = vec_or (inb, in0);
46
  *out++ = vec_perm (in0, in1, uc);
47
  *out++ = vec_rint (in0);
48
  *out++ = vec_sel (in0, in1, inl);
49
  *out++ = vec_sel (in0, in1, inb);
50
  *out++ = vec_sub (in0, in1);
51
  *out++ = vec_sqrt (in0);
52
  *out++ = vec_trunc (in0);
53
  *out++ = vec_xor (in0, in1);
54
  *out++ = vec_xor (in0, inb);
55
  *out++ = vec_xor (inb, in0);
56
 
57
  *i++ = vec_all_eq (in0, in1);
58
  *i++ = vec_all_ge (in0, in1);
59
  *i++ = vec_all_gt (in0, in1);
60
  *i++ = vec_all_le (in0, in1);
61
  *i++ = vec_all_lt (in0, in1);
62
  *i++ = vec_all_nan (in0);
63
  *i++ = vec_all_ne (in0, in1);
64
  *i++ = vec_all_nge (in0, in1);
65
  *i++ = vec_all_ngt (in0, in1);
66
  *i++ = vec_all_nle (in0, in1);
67
  *i++ = vec_all_nlt (in0, in1);
68
  *i++ = vec_all_numeric (in0);
69
  *i++ = vec_any_eq (in0, in1);
70
  *i++ = vec_any_ge (in0, in1);
71
  *i++ = vec_any_gt (in0, in1);
72
  *i++ = vec_any_le (in0, in1);
73
  *i++ = vec_any_lt (in0, in1);
74
  *i++ = vec_any_nan (in0);
75
  *i++ = vec_any_ne (in0, in1);
76
  *i++ = vec_any_nge (in0, in1);
77
  *i++ = vec_any_ngt (in0, in1);
78
  *i++ = vec_any_nle (in0, in1);
79
  *i++ = vec_any_nlt (in0, in1);
80
  *i++ = vec_any_numeric (in0);
81
}

powered by: WebSVN 2.1.0

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