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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr46419.c] - Blame information for rev 764

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -msse" } */
3
/* { dg-require-effective-target sse } */
4
 
5
#include "sse-check.h"
6
 
7
#include <xmmintrin.h>
8
 
9
void __attribute__((noinline))
10
sse_test (void)
11
{
12
  char image[4];
13
  __m128 image4;
14
  float out[4] __attribute__ ((aligned (16)));
15
  int i;
16
 
17
  for (i = 0; i < 4; i++)
18
    image[i] = i + 1;
19
 
20
  image4 =
21
    _mm_cvtpi8_ps (_mm_setr_pi8
22
                   (image[0], image[1], image[2], image[3], 0, 0, 0, 0));
23
  _mm_store_ps (out, image4);
24
  _mm_empty ();
25
 
26
  for (i = 0; i < 4; i++)
27
    if (out[i] != (float) (i + 1))
28
      abort ();
29
 
30
  image4 =
31
    _mm_cvtpu8_ps (_mm_setr_pi8
32
                   (image[0], image[1], image[2], image[3], 0, 0, 0, 0));
33
  _mm_store_ps (out, image4);
34
  _mm_empty ();
35
 
36
  for (i = 0; i < 4; i++)
37
    if (out[i] != (float) (i + 1))
38
      abort ();
39
}

powered by: WebSVN 2.1.0

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