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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [altivec-13.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 jeremybenn
/* Check that vec_step can be used with const vector types.   This
2
   test is derived from parts of gcc.dg/vmx/8-02.c from Motorola's
3
   AltiVec testsuite.  */
4
 
5
/* { dg-do compile { target powerpc*-*-* } } */
6
/* { dg-require-effective-target powerpc_altivec_ok } */
7
/* { dg-options "-maltivec" } */
8
 
9
#include 
10
 
11
extern vector unsigned char vuc;
12
extern vector signed char vsc;
13
extern vector bool char vbc;
14
extern vector unsigned short vus;
15
extern vector signed short vss;
16
extern vector bool short vbs;
17
extern vector unsigned int vui;
18
extern vector signed int vsi;
19
extern vector bool int vbi;
20
extern vector pixel vp;
21
extern vector float vf;
22
extern const vector unsigned char cvuc;
23
extern const vector signed char cvsc;
24
extern const vector bool char cvbc;
25
extern const vector unsigned short cvus;
26
extern const vector signed short cvss;
27
extern const vector bool short cvbs;
28
extern const vector unsigned int cvui;
29
extern const vector signed int cvsi;
30
extern const vector bool int cvbi;
31
extern const vector pixel cvp;
32
extern const vector float cvf;
33
 
34
void
35
foo (void)
36
{
37
  int i_vuc = vec_step (vuc);
38
  int i_vsc = vec_step (vsc);
39
  int i_vbc = vec_step (vbc);
40
  int i_vus = vec_step (vus);
41
  int i_vss = vec_step (vss);
42
  int i_vbs = vec_step (vbs);
43
  int i_vui = vec_step (vui);
44
  int i_vsi = vec_step (vsi);
45
  int i_vbi = vec_step (vbi);
46
  int i_vp = vec_step (vp);
47
  int i_vf = vec_step (vf);
48
  int i_cvuc = vec_step (cvuc);
49
  int i_cvsc = vec_step (cvsc);
50
  int i_cvbc = vec_step (cvbc);
51
  int i_cvus = vec_step (cvus);
52
  int i_cvss = vec_step (cvss);
53
  int i_cvbs = vec_step (cvbs);
54
  int i_cvui = vec_step (cvui);
55
  int i_cvsi = vec_step (cvsi);
56
  int i_cvbi = vec_step (cvbi);
57
  int i_cvp = vec_step (cvp);
58
  int i_cvf = vec_step (cvf);
59
}

powered by: WebSVN 2.1.0

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