Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/dfp-td-3.c

raw
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" } */
5
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" 3 } } */
10
11 /* These tests verify we generate fneg, fabs and fnabs and
12 associated fmr's since these are not done in place. */
13
14 _Decimal128
15 func1 (_Decimal128 a, _Decimal128 b)
16 {
17 return -b;
18 }
19
20 _Decimal128
21 func2 (_Decimal128 a, _Decimal128 b)
22 {
23 return __builtin_fabsd128 (b);
24 }
25
26 _Decimal128
27 func3 (_Decimal128 a, _Decimal128 b)
28 {
29 return - __builtin_fabsd128 (b);
30 }