1 /* { dg-do compile { target "mips*-*-*" } } */
2 /* { dg-options "-O2 -fno-fast-math -mips4" } */
3 /* { dg-final { scan-assembler "nmadd.s" } } */
4 /* { dg-final { scan-assembler "nmadd.d" } } */
5 /* { dg-final { scan-assembler "nmsub.s" } } */
6 /* { dg-final { scan-assembler "nmsub.d" } } */
8 #if (__mips != 4 && __mips != 64) || __mips_soft_float
9 asm ("# nmadd.s nmadd.d nmsub.s nmsub.d");
12 sub1 (float f
, float g
, float h
)
14 return -((f
* g
) + h
);
18 sub2 (double f
, double g
, double h
)
20 return -((f
* g
) + h
);
24 sub3 (float f
, float g
, float h
)
26 return -((f
* g
) - h
);
30 sub4 (double f
, double g
, double h
)
32 return -((f
* g
) - h
);