OSDN Git Service

2008-03-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / paired-1.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
8 static float in1[2] __attribute__ ((aligned (8))) =
9 {6.0, 7.0};
10 static float in2[2] __attribute__ ((aligned (8))) =
11 {4.0, 3.0};
12
13 static float out[2] __attribute__ ((aligned (8)));
14
15 vector float a, b, c, d;
16 void
17 test_api ()
18 {
19   b = paired_lx (0, in1);
20   c = paired_lx (0, in2);
21
22   a = paired_sub (b, c);
23
24   paired_stx (a, 0, out);
25 }
26
27 int
28 main ()
29 {
30   test_api ();
31   return (0);
32 }
33