OSDN Git Service

* gcc.target/i386/pr34256.c: Update number of mov insns
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / paired-5.c
1 /* { dg-do compile { target powerpc-*-linux*paired* } } */
2 /* { dg-options "-mpaired -m32 -ffinite-math-only" } */
3
4 /* Test PowerPC PAIRED extensions.  */
5
6 #include <paired.h>
7 #include <stdlib.h>
8
9 static float out[2] __attribute__ ((aligned (8)));
10
11 vector float b = { 3.0, 5.0 };
12 vector float c = { 2.0, 5.0 };
13
14 vector float a = { 0.0, 0.0 };
15 void
16 test_api ()
17 {
18
19   if (paired_cmpu1_eq (b, c))
20     {
21       a = paired_add (b, c);
22       paired_stx (a, 0, out);
23     }
24   if ((out[0] != 5.0) || (out[1] != 10.0))
25     abort ();
26 }
27
28 int
29 main ()
30 {
31   test_api ();
32   return (0);
33 }
34