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/] [sse2-pshuflw-1.c] - Blame information for rev 329

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

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -msse2" } */
3
/* { dg-require-effective-target sse2 } */
4
 
5
#ifndef CHECK_H
6
#define CHECK_H "sse2-check.h"
7
#endif
8
 
9
#ifndef TEST
10
#define TEST sse2_test
11
#endif
12
 
13
#define N 0xec
14
 
15
#include CHECK_H
16
 
17
#include <emmintrin.h>
18
 
19
static __m128i
20
__attribute__((noinline, unused))
21
test (__m128i s1)
22
{
23
  return _mm_shufflelo_epi16 (s1, N);
24
}
25
 
26
static void
27
TEST (void)
28
{
29
  union128i_q s1;
30
  union128i_w u;
31
  short  e[8] = {0};
32
  int i;
33
  int m1[4] = {0x3, 0x3<<2, 0x3<<4, 0x3<<6};
34
  int m2[4];
35
 
36
  s1.x = _mm_set_epi64x (0xabcde,0xef58a234);
37
  u.x = test (s1.x);
38
 
39
  for (i = 0; i < 4; i++)
40
    e[i+4] = (s1.a[1]>>(16 * i)) & 0xffff;
41
 
42
  for (i = 0; i < 4; i++)
43
    m2[i] = (N & m1[i])>>(2*i);
44
 
45
  for (i = 0; i < 4; i++)
46
    e[i] = (s1.a[0] >> (16 * m2[i])) & 0xffff;
47
 
48
  if (check_union128i_w(u, e))
49
    abort ();
50
}

powered by: WebSVN 2.1.0

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