Add support for more sparc VIS 3.0 instructions.
[gcc.git] / gcc / testsuite / gcc.target / sparc / fhalve.c
1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=niagara3 -mvis" } */
3
4 float test_fhadds (float x, float y)
5 {
6 return __builtin_vis_fhadds (x, y);
7 }
8
9 double test_fhaddd (double x, double y)
10 {
11 return __builtin_vis_fhaddd (x, y);
12 }
13
14 float test_fhsubs (float x, float y)
15 {
16 return __builtin_vis_fhsubs (x, y);
17 }
18
19 double test_fhsubd (double x, double y)
20 {
21 return __builtin_vis_fhsubd (x, y);
22 }
23
24 float test_fnhadds (float x, float y)
25 {
26 return __builtin_vis_fnhadds (x, y);
27 }
28
29 double test_fnhaddd (double x, double y)
30 {
31 return __builtin_vis_fnhaddd (x, y);
32 }
33
34 /* { dg-final { scan-assembler "fhadds\t%" } } */
35 /* { dg-final { scan-assembler "fhaddd\t%" } } */
36 /* { dg-final { scan-assembler "fhsubs\t%" } } */
37 /* { dg-final { scan-assembler "fhsubd\t%" } } */
38 /* { dg-final { scan-assembler "fnhadds\t%" } } */
39 /* { dg-final { scan-assembler "fnhaddd\t%" } } */