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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [sse2-vec-1.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2
/* { dg-options "-O2 -msse2" } */
3
 
4
#include "sse2-check.h"
5
 
6
#include <emmintrin.h>
7
 
8
#define msk0   0
9
#define msk1   1
10
 
11
static void
12
sse2_test (void)
13
{
14
  union
15
    {
16
      __m128d x;
17
      double d[2];
18
    } val1;
19
  double res[2];
20
  int masks[2];
21
  int i;
22
 
23
  val1.d[0] = 23.;
24
  val1.d[1] = 45;
25
 
26
  res[0] = __builtin_ia32_vec_ext_v2df ((__v2df)val1.x, msk0);
27
  res[1] = __builtin_ia32_vec_ext_v2df ((__v2df)val1.x, msk1);
28
 
29
  masks[0] = msk0;
30
  masks[1] = msk1;
31
 
32
  for (i = 0; i < 2; i++)
33
    if (res[i] != val1.d [masks[i]])
34
      abort ();
35
}

powered by: WebSVN 2.1.0

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