Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/other/i386-1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do run { target i?86-*-* x86_64-*-* } } */ |
2 /* { dg-options "-msse2" } */ | |
3 /* { dg-require-effective-target sse2_runtime } */ | |
4 | |
5 #include <xmmintrin.h> | |
6 | |
7 static void | |
8 sse2_test (void) | |
9 { | |
10 float a = 1.0f; | |
11 float b = 2.0f; | |
12 float c = 3.0f; | |
13 float r; | |
14 | |
15 __m128 v = _mm_set_ps(a, b, c, 0); | |
16 | |
17 v = (__m128)_mm_srli_si128((__m128i)v, 4); | |
18 _mm_store_ss(&r, v); | |
19 if (r != 3.0f) | |
20 abort (); | |
21 } | |
22 | |
23 int | |
24 main () | |
25 { | |
26 sse2_test (); | |
27 return 0; | |
28 } |