1 /* { dg-do run } */
2 /* { dg-options "-O1 -fno-inline --save-temps" } */
3
4 extern double fabs (double);
5 extern float fabsf (float);
6 extern void abort ();
7 extern void exit (int);
8
9 void
fabd_d(double x,double y,double d)10 fabd_d (double x, double y, double d)
11 {
12 if ((fabs (x - y) - d) > 0.00001)
13 abort ();
14 }
15
16 /* { dg-final { scan-assembler "fabd\td\[0-9\]+" } } */
17
18 void
fabd_f(float x,float y,float d)19 fabd_f (float x, float y, float d)
20 {
21 if ((fabsf (x - y) - d) > 0.00001)
22 abort ();
23 }
24
25 /* { dg-final { scan-assembler "fabd\ts\[0-9\]+" } } */
26
27 int
main()28 main ()
29 {
30 fabd_d (10.0, 5.0, 5.0);
31 fabd_d (5.0, 10.0, 5.0);
32 fabd_f (10.0, 5.0, 5.0);
33 fabd_f (5.0, 10.0, 5.0);
34
35 return 0;
36 }
37
38 /* { dg-final { cleanup-saved-temps } } */
39