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/] [pr13685.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
/* PR target/13685 */
2
/* { dg-do run } */
3
/* { dg-options "-Os -msse" } */
4
#include <stdlib.h>
5
#include <stdio.h>
6
#include <xmmintrin.h>
7
#include "../../gcc.dg/i386-cpuid.h"
8
 
9
void foo (__m128 *, __m64 *, int);
10
 
11
__m128 xmm0 = { 0 };
12
__m64 mm0 = { 0 };
13
 
14
int
15
main ()
16
{
17
  unsigned long cpu_facilities = i386_cpuid ();
18
 
19
  if ((cpu_facilities & (bit_MMX | bit_SSE | bit_CMOV))
20
      != (bit_MMX | bit_SSE | bit_CMOV))
21
    /* If host has no SSE support, pass.  */
22
    return 0;
23
 
24
  foo (&xmm0, &mm0, 4);
25
  return 0;
26
}
27
 
28
void
29
foo (__m128 *dst, __m64 *src, int n)
30
{
31
  __m128 xmm0 = { 0 };
32
  while (n > 64)
33
    {
34
      puts ("");
35
      xmm0 = _mm_cvtpi32_ps (xmm0, *src);
36
      *dst = xmm0;
37
      n--;
38
    }
39
}

powered by: WebSVN 2.1.0

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