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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-4.c] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile { target powerpc*-*-* } } */
2
/* { dg-require-effective-target powerpc_altivec_ok } */
3
/* { dg-options "-maltivec -O0 -Wall" } */
4
 
5
#define vector __attribute__((vector_size(16)))
6
 
7
static int vector x, y;
8
 
9
static vector signed int i,j;
10
static vector signed short s,t;
11
static vector signed char c,d;
12
static vector float f,g;
13
 
14
static vector unsigned char uc;
15
 
16
static vector signed int *pi;
17
 
18
static int int1, int2;
19
 
20
void
21
b()
22
{
23
  __builtin_altivec_vadduwm (x, y);
24
 
25
  /* Make sure the predicates accept correct argument types.  */
26
 
27
  int1 = __builtin_altivec_vcmpbfp_p (0, f, g);
28
  int1 = __builtin_altivec_vcmpeqfp_p (0, f, g);
29
  int1 = __builtin_altivec_vcmpequb_p (0, c, d);
30
  int1 = __builtin_altivec_vcmpequh_p (0, s, t);
31
  int1 = __builtin_altivec_vcmpequw_p (0, i, j);
32
  int1 = __builtin_altivec_vcmpgefp_p (0, f, g);
33
  int1 = __builtin_altivec_vcmpgtfp_p (0, f, g);
34
  int1 = __builtin_altivec_vcmpgtsb_p (0, c, d);
35
  int1 = __builtin_altivec_vcmpgtsh_p (0, s, t);
36
  int1 = __builtin_altivec_vcmpgtsw_p (0, i, j);
37
  int1 = __builtin_altivec_vcmpgtub_p (0, c, d);
38
  int1 = __builtin_altivec_vcmpgtuh_p (0, s, t);
39
  int1 = __builtin_altivec_vcmpgtuw_p (0, i, j);
40
 
41
  __builtin_altivec_mtvscr (i);
42
  __builtin_altivec_dssall ();
43
  s = __builtin_altivec_mfvscr ();
44
  __builtin_altivec_dss (3);
45
 
46
  __builtin_altivec_dst (pi, int1 + int2, 3);
47
  __builtin_altivec_dstst (pi, int1 + int2, 3);
48
  __builtin_altivec_dststt (pi, int1 + int2, 3);
49
  __builtin_altivec_dstt (pi, int1 + int2, 3);
50
 
51
  uc = (vector unsigned char) __builtin_altivec_lvsl (int1 + 69, pi);
52
  uc = (vector unsigned char) __builtin_altivec_lvsr (int1 + 69, pi);
53
 
54
  c = __builtin_altivec_lvebx (int1, pi);
55
  s = __builtin_altivec_lvehx (int1, pi);
56
  i = __builtin_altivec_lvewx (int1, pi);
57
  i = __builtin_altivec_lvxl (int1, pi);
58
  i = __builtin_altivec_lvx (int1, pi);
59
 
60
  __builtin_altivec_stvx (i, int2, pi);
61
  __builtin_altivec_stvebx (c, int2, pi);
62
  __builtin_altivec_stvehx (s, int2, pi);
63
  __builtin_altivec_stvewx (i, int2, pi);
64
  __builtin_altivec_stvxl (i, int2, pi);
65
}

powered by: WebSVN 2.1.0

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