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-pextrq.c] - Blame information for rev 328

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

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target lp64 } */
3
/* { dg-require-effective-target sse4 } */
4
/* { dg-options "-O2 -msse4.1" } */
5
 
6
#ifndef CHECK_H
7
#define CHECK_H "sse4_1-check.h"
8
#endif
9
 
10
#ifndef TEST
11
#define TEST sse4_1_test
12
#endif
13
 
14
#include CHECK_H
15
 
16
#include <smmintrin.h>
17
 
18
#define msk0   0
19
#define msk1   1
20
 
21
static void
22
__attribute__((noinline))
23
TEST (void)
24
{
25
  union
26
    {
27
      __m128i x;
28
      long long ll[2];
29
    } val1;
30
  long long res[2];
31
  int masks[2];
32
  int i;
33
 
34
  val1.ll[0] = 0x0807060504030201LL;
35
  val1.ll[1] = 0x100F0E0D0C0B0A09LL;
36
 
37
  res[0] = _mm_extract_epi64 (val1.x, msk0);
38
  res[1] = _mm_extract_epi64 (val1.x, msk1);
39
 
40
  masks[0] = msk0;
41
  masks[1] = msk1;
42
 
43
  for (i = 0; i < 2; i++)
44
    if (res[i] != val1.ll [masks[i]])
45
      abort ();
46
}

powered by: WebSVN 2.1.0

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