blob: c9132bbf8a473625bd058b27067b94f2ebaabc74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -mcpu=power5 -std=c99 -msoft-float" } */
/* { dg-final { scan-assembler-not "fmadd" } } */
/* { dg-final { scan-assembler-not "xsfmadd" } } */
/* Test whether -msoft-float turns off the macros math.h uses for
FP_FAST_FMA{,F,L}. */
#ifdef __FP_FAST_FMA
#error "__FP_FAST_FMA should not be defined"
#endif
#ifdef __FP_FAST_FMAF
#error "__FP_FAST_FMAF should not be defined"
#endif
double
builtin_fma (double b, double c, double d)
{
return __builtin_fma (b, c, d); /* bl fma */
}
float
builtin_fmaf (float b, float c, float d)
{
return __builtin_fmaf (b, c, -d); /* bl fmaf */
}
|