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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [other/] [i386-1.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2
/* { dg-options "-march=pentium4" } */
3
/* { dg-require-effective-target ilp32 } */
4
 
5
#include 
6
#include 
7
#include "../../gcc.dg/i386-cpuid.h"
8
 
9
int main(int argc, char** argv) {
10
  float a = 1.0f;
11
  float b = 2.0f;
12
  float c = 3.0f;
13
  float r;
14
 
15
  unsigned long cpu_facilities;
16
 
17
  cpu_facilities = i386_cpuid ();
18
 
19
  if ((cpu_facilities & (bit_MMX | bit_SSE | bit_SSE2 | bit_CMOV))
20
      != (bit_MMX | bit_SSE | bit_SSE2 | bit_CMOV))
21
    /* If host has no vector support, pass.  */
22
    return 0;
23
 
24
  __m128 v = _mm_set_ps(a, b, c, 0);
25
 
26
  v = (__m128)_mm_srli_si128((__m128i)v, 4);
27
  _mm_store_ss(&r, v);
28
  if (r != 3.0f)
29
    abort ();
30
  exit (0);
31
}

powered by: WebSVN 2.1.0

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