Commit a2205647 by Uros Bizjak Committed by Uros Bizjak

i386-1.C: Include i386-cpuid.h.

	* g++.dg/other/i386-1.C: Include i386-cpuid.h.  Pass if
	CPU has no SSE support.

From-SVN: r105885
parent e4b600fb
2005-10-25 Uros Bizjak <uros@kss-loka.si>
* g++.dg/other/i386-1.C: Include i386-cpuid.h. Pass if
CPU has no SSE support.
2005-10-24 Jerry DeLisle <jvdelisle@verizon.net>
PR libgfortran/24224
......@@ -3,6 +3,7 @@
#include <xmmintrin.h>
#include <stdio.h>
#include "../../gcc.dg/i386-cpuid.h"
int main(int argc, char** argv) {
float a = 1.0f;
......@@ -10,6 +11,15 @@ int main(int argc, char** argv) {
float c = 3.0f;
float r;
unsigned long cpu_facilities;
cpu_facilities = i386_cpuid ();
if ((cpu_facilities & (bit_MMX | bit_SSE | bit_CMOV))
!= (bit_MMX | bit_SSE | bit_CMOV))
/* If host has no vector support, pass. */
return 0;
__m128 v = _mm_set_ps(a, b, c, 0);
v = (__m128)_mm_srli_si128((__m128i)v, 4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment