aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/apple-altivec-5.C
blob: 4473881dda74892ce6aba1f8412cab0f14bc99e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* APPLE LOCAL file AltiVec */
/* Test for handling of reference vector parameters.  */
/* { dg-do compile { target powerpc*-*-darwin* } } */
/* { dg-options "-faltivec" } */

struct Vect
{
  typedef vector unsigned int vector_1;

  static vector_1 ConvertPixel1(const vector_1 &source, const vector unsigned char &vp);
  static vector_1 ConvertPixel2(const vector_1 source, const vector unsigned char vp);
  static vector_1 ConvertPixel3(vector_1 &source, vector unsigned char &vp);
  static vector_1 ConvertPixel4(vector_1 source, vector unsigned char vp);
};

Vect::vector_1 Vect::ConvertPixel1(const vector_1 &source, const vector unsigned char &vp)
{
  return (vector_1) vec_perm(source, source, vp);
}
Vect::vector_1 Vect::ConvertPixel2(const vector_1 source, const vector unsigned char vp)
{
  return (vector_1) vec_perm(source, source, vp);
}
Vect::vector_1 Vect::ConvertPixel3(vector_1 &source, vector unsigned char &vp)
{
  return (vector_1) vec_perm(source, source, vp);
}
Vect::vector_1 Vect::ConvertPixel4(vector_1 source, vector unsigned char vp)
{
  return (vector_1) vec_perm(source, source, vp);
}