Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-addsd-1.c
blob00f226525add1a0774256031420f264f6c22870e
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mvsx -Wno-psabi" } */
3 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
4 /* { dg-require-effective-target p8vector_hw } */
7 #include <stdint.h>
8 #include <stdio.h>
10 #ifndef CHECK_H
11 #define CHECK_H "sse2-check.h"
12 #endif
14 #include CHECK_H
16 #ifndef TEST
17 #define TEST sse2_test_addsd_1
18 #endif
20 #include <emmintrin.h>
22 static __m128d
23 __attribute__((noinline, unused))
24 test (__m128d s1, __m128d s2)
26 __asm("" : "+v"(s1), "+v"(s2));
27 return _mm_add_sd (s1, s2);
30 static void
31 TEST (void)
33 union128d u, s1, s2;
34 double e[2];
36 s1.x = _mm_set_pd (2134.3343,1234.635654);
37 s2.x = _mm_set_pd (41124.234,2344.2354);
38 u.x = test (s1.x, s2.x);
40 e[0] = s1.a[0] + s2.a[0];
41 e[1] = s1.a[1];
43 if (check_union128d (u, e))
45 #if DEBUG
46 printf ("sse2_test_addsd_1; check_union128d failed\n");
47 printf ("\t [%f,%f] + [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
48 s2.a[1], u.a[0], u.a[1]);
49 printf ("\t expect [%f,%f]\n", e[0], e[1]);
50 #endif
51 abort ();