]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/builtins/Unit/arm/aeabi_drsub_test.c
1 //===-- aeabi_drsub.c - Test __aeabi_drsub --------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file tests __aeabi_drsub for the compiler_rt library.
12 //===----------------------------------------------------------------------===//
20 extern __attribute__((pcs("aapcs"))) double __aeabi_drsub(double a
, double b
);
22 int test__aeabi_drsub(double a
, double b
, double expected
)
24 double actual
= __aeabi_drsub(a
, b
);
25 if (actual
!= expected
)
26 printf("error in __aeabi_drsub(%f, %f) = %f, expected %f\n",
27 a
, b
, actual
, expected
);
28 return actual
!= expected
;
35 if (test__aeabi_drsub(1.0, 1.0, 0.0))
37 if (test__aeabi_drsub(1234.567, 765.4321, -469.134900))
39 if (test__aeabi_drsub(-123.0, -678.0, -555.0))
41 if (test__aeabi_drsub(0.0, -0.0, 0.0))