]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/builtins/Unit/floatsisfvfp_test.c
1 //===-- floatsisfvfp_test.c - Test __floatsisfvfp -------------------------===//
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 __floatsisfvfp for the compiler_rt library.
12 //===----------------------------------------------------------------------===//
20 extern COMPILER_RT_ABI
float __floatsisfvfp(int a
);
23 int test__floatsisfvfp(int a
)
25 float actual
= __floatsisfvfp(a
);
27 if (actual
!= expected
)
28 printf("error in test__floatsisfvfp(%d) = %f, expected %f\n",
30 return actual
!= expected
;
37 if (test__floatsisfvfp(0))
39 if (test__floatsisfvfp(1))
41 if (test__floatsisfvfp(-1))
43 if (test__floatsisfvfp(0x7FFFFFFF))
45 if (test__floatsisfvfp(0x80000000))