c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / dfp-td-2.c
blob11705f6659dbe13ab5d92b3ca458afc46a7ca22b
1 /* Test generation of DFP instructions for POWER6. */
2 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
3 /* { dg-require-effective-target dfp } */
4 /* { dg-options "-std=gnu99 -O1 -mdejagnu-cpu=power6" } */
6 /* { dg-final { scan-assembler-times "fneg" 1 } } */
7 /* { dg-final { scan-assembler-times "fabs" 1 } } */
8 /* { dg-final { scan-assembler-times "fnabs" 1 } } */
9 /* { dg-final { scan-assembler-times "fmr" 0 } } */
11 /* These tests verify we only generate fneg, fabs and fnabs
12 instructions and no fmr's since these are done in place. */
14 _Decimal128
15 func1 (_Decimal128 a)
17 return -a;
20 _Decimal128
21 func2 (_Decimal128 a)
23 return __builtin_fabsd128 (a);
26 _Decimal128
27 func3 (_Decimal128 a)
29 return - __builtin_fabsd128 (a);