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-set-epi32-1.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-options "-O2 -msse2" } */
3
/* { dg-require-effective-target sse2 } */
4
 
5
#include "sse2-check.h"
6
 
7
#ifdef DEBUG
8
#include <stdio.h>
9
#endif
10
 
11
#include <emmintrin.h>
12
 
13
static void
14
__attribute__((noinline))
15
test (unsigned int *v)
16
{
17
  union
18
    {
19
      __m128i x;
20
      unsigned int i[4];
21
    } u;
22
  unsigned int i;
23
 
24
  u.x = _mm_set_epi32 (v[3], v[2], v[1], v[0]);
25
 
26
  for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
27
    if (v[i] != u.i[i])
28
      {
29
#ifdef DEBUG
30
        printf ("%i: 0x%x != 0x%x\n", i, v[i], u.i[i]);
31
#endif
32
        abort ();
33
      }
34
}
35
 
36
static void
37
sse2_test (void)
38
{
39
  unsigned int v[4]
40
    = { 0x7B5B5465, 0x73745665, 0x63746F72, 0x5D53475D };
41
  test (v);
42
}

powered by: WebSVN 2.1.0

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