| // RUN: %clang_builtins %s %librt -o %t && %run %t |
| //===-- divsf3vfp_test.c - Test __divsf3vfp -------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| // This file tests __divsf3vfp for the compiler_rt library. |
| //===----------------------------------------------------------------------===// |
| extern COMPILER_RT_ABI float __divsf3vfp(float a, float b); |
| #if __arm__ && __VFP_FP__ |
| int test__divsf3vfp(float a, float b) |
| float actual = __divsf3vfp(a, b); |
| printf("error in test__divsf3vfp(%f, %f) = %f, expected %f\n", |
| return actual != expected; |
| #if __arm__ && __VFP_FP__ |
| if (test__divsf3vfp(1.0, 1.0)) |
| if (test__divsf3vfp(12345.678, 1.23)) |
| if (test__divsf3vfp(0.0, HUGE_VALF)) |
| if (test__divsf3vfp(10.0, -2.0)) |