summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/nmadd-1.c
blob: 123d48799ed8160e219f690c0e0d77ad64085074 (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
29
30
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math isa=4 -mhard-float" } */
/* { dg-final { scan-assembler "nmadd.s" } } */
/* { dg-final { scan-assembler "nmadd.d" } } */
/* { dg-final { scan-assembler "nmsub.s" } } */
/* { dg-final { scan-assembler "nmsub.d" } } */

NOMIPS16 float
sub1 (float f, float g, float h)
{
  return -((f * g) + h);
}

NOMIPS16 double
sub2 (double f, double g, double h)
{
  return -((f * g) + h);
}

NOMIPS16 float
sub3 (float f, float g, float h)
{
  return -((f * g) - h);
}

NOMIPS16 double
sub4 (double f, double g, double h)
{
  return -((f * g) - h);
}