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