blob: 74b66b32a00be7011d396f419ed4fd6e96b843b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/* { dg-do run } */
/* { dg-options "-O3 -mpower8-vector -Wno-psabi" } */
/* { dg-require-effective-target p8vector_hw } */
#ifndef CHECK_H
#define CHECK_H "sse2-check.h"
#endif
#include CHECK_H
#ifndef TEST
#define TEST sse2_test_movmskpd_1
#endif
#include <emmintrin.h>
#ifdef _ARCH_PWR8
static int
__attribute__((noinline, unused))
test (__m128d p)
{
__asm("" : "+v"(p));
return _mm_movemask_pd (p);
}
#endif
static void
TEST (void)
{
#ifdef _ARCH_PWR8
double source[2] = {1.234, -2234.23};
union128d s1;
int d;
int e;
s1.x = _mm_loadu_pd (source);
d = test (s1.x);
e = 0;
if (source[0] < 0)
e |= 1;
if (source[1] < 0)
e |= 1 << 1;
if (checkVi (&d, &e, 1))
#if DEBUG
{
printf ("sse2_test_movmskpd_1; check_union128d failed\n");
printf ("\t [%f,%f] -> [%d]\n",
s1.a[0], s1.a[1], d);
printf ("\t expect [%d]\n",
e);
}
#else
abort ();
#endif
#endif
}
|