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

Subversion Repositories openrisc

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

Go to most recent revision | 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
__m128 n1 = { -283.3, -23.3, 213.4, 1119.03 };
9
__m256d n2 = { -93.83, 893.318, 3884.34, -3134.3 };
10
__m256i n3 = { 893, -3180, 3334, -3984 };
11
int n4 = -30;
12
double n5 = 40.3;
13
__m128i n6 = { 8931, -13984 };
14
__m128d n7 = { 1893.318, -31134.3 };
15
__m256 n8 =
16
{
17
  -913.87, 8193.518, 312884.34, -9134.9,
18
  -19093.83, 89312.318, 7884.84, -4134.3
19
};
20
__m128 n9 = { -1283.3, -213.3, 3213.4, 81119.03 };
21
__m128i n10 = { 28131, -313684 };
22
int n11 = 103;
23
double n12 = -3004.3;
24
__m256d n13 = { 913.73, -93.38, 84.34, -734.3 };
25
__m128d n14 = { -73.378, 934.31 };
26
__m256 n15 =
27
{
28
  13.73, -8193.318, 384.74, 734.9,
29
  193.83, 312.78, 7884.34, -8134.3
30
};
31
__m128i n16 = { 831, -3849 };
32
 
33
void
34
__attribute__((noinline))
35
m256_test (__m128 a1, __m256d a2, __m256i a3, int a4, double a5,
36
           __m128i a6, __m128d a7, __m256 a8, __m128 a9, __m128i a10,
37
           int a11, double a12, __m256d a13, __m128d a14, __m256 a15,
38
           __m128i a16)
39
{
40
  assert (__builtin_memcmp (&a1, &n1, sizeof (a1)) == 0);
41
  assert (__builtin_memcmp (&a2, &n2, sizeof (a2)) == 0);
42
  assert (__builtin_memcmp (&a3, &n3, sizeof (a3)) == 0);
43
  assert (a4 == n4);
44
  assert (a5 == n5);
45
  assert (__builtin_memcmp (&a6, &n6, sizeof (a6)) == 0);
46
  assert (__builtin_memcmp (&a7, &n7, sizeof (a7)) == 0);
47
  assert (__builtin_memcmp (&a8, &n8, sizeof (a8)) == 0);
48
  assert (__builtin_memcmp (&a9, &n9, sizeof (a9)) == 0);
49
  assert (__builtin_memcmp (&a10, &n10, sizeof (a10)) == 0);
50
  assert (a11 == n11);
51
  assert (a12 == n12);
52
  assert (__builtin_memcmp (&a13, &n13, sizeof (a13)) == 0);
53
  assert (__builtin_memcmp (&a14, &n14, sizeof (a14)) == 0);
54
  assert (__builtin_memcmp (&a15, &n15, sizeof (a15)) == 0);
55
  assert (__builtin_memcmp (&a16, &n16, sizeof (a16)) == 0);
56
}
57
 
58
static void
59
avx_test (void)
60
{
61
  m256_test (n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12,
62
             n13, n14, n15, n16);
63
}

powered by: WebSVN 2.1.0

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