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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [vshuf-main.inc] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
/* Driver fragment for __builtin_shuffle of any vector shape.  */
2
 
3
extern void abort(void);
4
 
5
int main()
6
{
7
#ifndef UNSUPPORTED
8
  int i;
9
 
10
  for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
11
    {
12
      V r = __builtin_shuffle(tests[i].in, tests[i].mask);
13
      if (__builtin_memcmp(&r, &tests[i].out, sizeof(V)) != 0)
14
        abort();
15
    }
16
 
17
  for (i = 0; i < sizeof(tests2)/sizeof(tests2[0]); ++i)
18
    {
19
      V r = __builtin_shuffle(tests2[i].in1, tests2[i].in2, tests2[i].mask);
20
      if (__builtin_memcmp(&r, &tests2[i].out, sizeof(V)) != 0)
21
        abort();
22
    }
23
#endif
24
 
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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