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/] [sse4a-montsd.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 sse4a } */
3
/* { dg-options "-O2 -msse4a" } */
4
 
5
#include "sse4a-check.h"
6
 
7
#include <ammintrin.h>
8
 
9
static void
10
sse4a_test_movntsd (double *out, double *in)
11
{
12
  __m128d in_v2df = _mm_load_sd (in);
13
  _mm_stream_sd (out, in_v2df);
14
}
15
 
16
static int
17
chk_sd (double *v1, double *v2)
18
{
19
  int n_fails = 0;
20
  if (v1[0] != v2[0])
21
    n_fails += 1;
22
  return n_fails;
23
}
24
 
25
double vals[10] =
26
  {
27
    100.0,  200.0, 300.0, 400.0, 5.0,
28
    -1.0, .345, -21.5, 9.32,  8.41
29
  };
30
 
31
static void
32
sse4a_test (void)
33
{
34
  int i;
35
  int fail = 0;
36
  double *out;
37
 
38
  out = (double *) malloc (sizeof (double));
39
  for (i = 0; i < 10; i += 1)
40
    {
41
      sse4a_test_movntsd (out, &vals[i]);
42
 
43
      fail += chk_sd (out, &vals[i]);
44
    }
45
 
46
  if (fail != 0)
47
    abort ();
48
}

powered by: WebSVN 2.1.0

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