1 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -msse4a" } */
5 #include "../../gcc.dg/i386-cpuid.h"
7 static void sse4a_test (void);
12 unsigned long cpu_facilities
;
14 cpu_facilities
= i386_extended_cpuid_ecx ();
16 /* Run SSE4a test only if host has SSE4a support. */
17 if ((cpu_facilities
& bit_SSE4a
))
24 sse4a_test_movntss (float *out
, float *in
)
26 __m128 in_v4sf
= _mm_load_ss (in
);
27 _mm_stream_ss (out
, in_v4sf
);
31 chk_ss (float *v1
, float *v2
)
41 100.0, 200.0, 300.0, 400.0, 5.0,
42 -1.0, .345, -21.5, 9.32, 8.41
52 out
= (float *) malloc (sizeof (float));
53 for (i
= 0; i
< 10; i
+= 1)
55 sse4a_test_movntss (out
, &vals
[i
]);
57 fail
+= chk_ss (out
, &vals
[i
]);