]>
git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/test/builtins/Unit/floatsidfvfp_test.c
1 // RUN: %clang_builtins %s %librt -o %t && %run %t
2 //===-- floatsidfvfp_test.c - Test __floatsidfvfp -------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 // This file tests __floatsidfvfp for the compiler_rt library.
13 //===----------------------------------------------------------------------===//
21 extern COMPILER_RT_ABI
double __floatsidfvfp(int a
);
23 #if __arm__ && __VFP_FP__
24 int test__floatsidfvfp(int a
)
26 double actual
= __floatsidfvfp(a
);
28 if (actual
!= expected
)
29 printf("error in test__ floatsidfvfp(%d) = %f, expected %f\n",
31 return actual
!= expected
;
37 #if __arm__ && __VFP_FP__
38 if (test__floatsidfvfp(0))
40 if (test__floatsidfvfp(1))
42 if (test__floatsidfvfp(-1))
44 if (test__floatsidfvfp(0x7FFFFFFF))
46 if (test__floatsidfvfp(0x80000000))