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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [sse4_1-movntdqa.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target sse4 } */
3
/* { dg-options "-O2 -msse4.1" } */
4
 
5
#ifndef CHECK_H
6
#define CHECK_H "sse4_1-check.h"
7
#endif
8
 
9
#ifndef TEST
10
#define TEST sse4_1_test
11
#endif
12
 
13
#include CHECK_H
14
 
15
#include <smmintrin.h>
16
#include <string.h>
17
 
18
#define NUM 20
19
 
20
static void
21
init_movntdqa (int *src)
22
{
23
  int i, j, sign = 1;
24
 
25
  for (i = 0; i < NUM; i++)
26
    for (j = 0; j < 4; j++)
27
      {
28
        src[i * 4 + j] = j * i * i * sign;
29
        sign = -sign;
30
      }
31
}
32
 
33
static void
34
TEST (void)
35
{
36
  union
37
    {
38
      __m128i x[NUM];
39
      int i[NUM * 4];
40
    } dst, src;
41
  int i;
42
 
43
  init_movntdqa (src.i);
44
 
45
  for (i = 0; i < NUM; i++)
46
    dst.x[i] = _mm_stream_load_si128 (&src.x[i]);
47
 
48
  for (i = 0; i < NUM; i++)
49
    if (memcmp (&dst.x[i], &src.x[i], sizeof(src.x[i])))
50
      abort ();
51
}

powered by: WebSVN 2.1.0

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