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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [m256-2.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target avx } */
3
/* { dg-options "-mavx" } */
4
 
5
#include <assert.h>
6
#include "avx-check.h"
7
 
8
struct m128
9
{
10
  __m128 v;
11
};
12
 
13
struct m256d
14
{
15
  __m256d v;
16
};
17
 
18
struct m128 n1 = { { -283.3, -23.3, 213.4, 1119.03 } };
19
struct m256d n2 = { { -93.83, 893.318, 3884.34, -3134.3 } };
20
__m256i n3 = { 893, -3180, 3334, -3984 };
21
int n4 = -30;
22
double n5 = 40.3;
23
__m128i n6 = { 8931, -13984 };
24
__m128d n7 = { 1893.318, -31134.3 };
25
__m256 n8 =
26
{
27
  -913.87, 8193.518, 312884.34, -9134.9,
28
  -19093.83, 89312.318, 7884.84, -4134.3
29
};
30
__m128 n9 = { -1283.3, -213.3, 3213.4, 81119.03 };
31
__m128i n10 = { 28131, -313684 };
32
int n11 = 103;
33
double n12 = -3004.3;
34
struct m256d n13 =  { { 913.73, -93.38, 84.34, -734.3 } };
35
__m128d n14 = { -73.378, 934.31 };
36
__m256 n15 =
37
{
38
  13.73, -8193.318, 384.74, 734.9,
39
  193.83, 312.78, 7884.34, -8134.3
40
};
41
__m128i n16 = { 831, -3849 };
42
 
43
void
44
__attribute__((noinline))
45
m256_test (struct m128 a1, struct m256d a2, __m256i a3, int a4, double a5,
46
           __m128i a6, __m128d a7, __m256 a8, __m128 a9, __m128i a10,
47
           int a11, double a12, struct m256d a13, __m128d a14, __m256 a15,
48
           __m128i a16)
49
{
50
  assert (__builtin_memcmp (&a1, &n1, sizeof (a1)) == 0);
51
  assert (__builtin_memcmp (&a2, &n2, sizeof (a2)) == 0);
52
  assert (__builtin_memcmp (&a3, &n3, sizeof (a3)) == 0);
53
  assert (a4 == n4);
54
  assert (a5 == n5);
55
  assert (__builtin_memcmp (&a6, &n6, sizeof (a6)) == 0);
56
  assert (__builtin_memcmp (&a7, &n7, sizeof (a7)) == 0);
57
  assert (__builtin_memcmp (&a8, &n8, sizeof (a8)) == 0);
58
  assert (__builtin_memcmp (&a9, &n9, sizeof (a9)) == 0);
59
  assert (__builtin_memcmp (&a10, &n10, sizeof (a10)) == 0);
60
  assert (a11 == n11);
61
  assert (a12 == n12);
62
  assert (__builtin_memcmp (&a13, &n13, sizeof (a13)) == 0);
63
  assert (__builtin_memcmp (&a14, &n14, sizeof (a14)) == 0);
64
  assert (__builtin_memcmp (&a15, &n15, sizeof (a15)) == 0);
65
  assert (__builtin_memcmp (&a16, &n16, sizeof (a16)) == 0);
66
}
67
 
68
static void
69
avx_test (void)
70
{
71
  m256_test (n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12,
72
             n13, n14, n15, n16);
73
}

powered by: WebSVN 2.1.0

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