1 // REQUIRES: arm-target-arch || armv6m-target-arch
2 // RUN: %clang_builtins %s %librt -o %t && %run %t
10 extern __attribute__((pcs("aapcs"))) double __aeabi_drsub(double a
, double b
);
12 int test__aeabi_drsub(double a
, double b
, double expected
)
14 double actual
= __aeabi_drsub(a
, b
);
15 if (actual
!= expected
)
16 printf("error in __aeabi_drsub(%f, %f) = %f, expected %f\n",
17 a
, b
, actual
, expected
);
18 return actual
!= expected
;
25 if (test__aeabi_drsub(1.0, 1.0, 0.0))
27 if (test__aeabi_drsub(1234.567, 765.4321, -469.134900))
29 if (test__aeabi_drsub(-123.0, -678.0, -555.0))
31 if (test__aeabi_drsub(0.0, -0.0, 0.0))