rs6000: Fix gcc.target/powerpc testsuite target requirements.
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-hw3.c
blobb3bbeb25678a9e9faf20b8e62659e4a233d11ddc
1 /* { dg-do compile { target lp64 } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-require-effective-target float128 } */
4 /* { dg-options "-mpower9-vector -O2 -ffast-math -std=c11" } */
6 /* Test to make sure the compiler calls the external function instead of doing
7 the built-in processing for _Float128 functions that have hardware support
8 in ISA 3.0/power9 if are in strict standards mode, where the <func>f128 name
9 is not a synonym for __builtin_<func>f128. */
11 extern _Float128 copysignf128 (_Float128, _Float128);
12 extern _Float128 sqrtf128 (_Float128);
13 extern _Float128 fmaf128 (_Float128, _Float128, _Float128);
15 _Float128
16 do_copysign (_Float128 a, _Float128 b)
18 return copysignf128 (a, b);
21 _Float128
22 do_sqrt (_Float128 a)
24 return sqrtf128 (a);
27 _Float128
28 do_fma (_Float128 a, _Float128 b, _Float128 c)
30 return fmaf128 (a, b, c);
33 _Float128
34 do_fms (_Float128 a, _Float128 b, _Float128 c)
36 return fmaf128 (a, b, -c);
39 _Float128
40 do_nfma (_Float128 a, _Float128 b, _Float128 c)
42 return -fmaf128 (a, b, c);
45 _Float128
46 do_nfms (_Float128 a, _Float128 b, _Float128 c)
48 return -fmaf128 (a, b, -c);
51 /* { dg-final { scan-assembler-not {\mxscpsgnqp\M} } } */
52 /* { dg-final { scan-assembler-not {\mxssqrtqp\M} } } */
53 /* { dg-final { scan-assembler-not {\mxsmaddqp\M} } } */
54 /* { dg-final { scan-assembler-not {\mxsmsubqp\M} } } */
55 /* { dg-final { scan-assembler-not {\mxsnmaddqp\M} } } */
56 /* { dg-final { scan-assembler-not {\mxsnmsubqp\M} } } */
57 /* { dg-final { scan-assembler-times {\mbl\M} 6 } } */