[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / dfp-dd-2.c
blob668b21d4b4cf8dded79bb4ee1ad77b00691028c4
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 _Decimal64
12 func1 (_Decimal64 a, _Decimal64 b)
14 return -b;
17 _Decimal64
18 func2 (_Decimal64 a, _Decimal64 b)
20 return __builtin_fabsd64 (b);
23 _Decimal64
24 func3 (_Decimal64 a, _Decimal64 b)
26 return - __builtin_fabsd64 (b);