Index: libc/src/math/CMakeLists.txt =================================================================== --- libc/src/math/CMakeLists.txt +++ libc/src/math/CMakeLists.txt @@ -40,30 +40,6 @@ ) endfunction() -add_entrypoint_object( - fmaf - SRCS - fmaf.cpp - HDRS - fmaf.h - DEPENDS - libc.src.__support.FPUtil.fma - COMPILE_OPTIONS - -O3 -) - -add_entrypoint_object( - fma - SRCS - fma.cpp - HDRS - fma.h - DEPENDS - libc.src.__support.FPUtil.fma - COMPILE_OPTIONS - -O3 -) - add_math_entrypoint_object(acosf) add_math_entrypoint_object(acoshf) @@ -107,6 +83,9 @@ add_math_entrypoint_object(floorf) add_math_entrypoint_object(floorl) +add_math_entrypoint_object(fma) +add_math_entrypoint_object(fmaf) + add_math_entrypoint_object(fmax) add_math_entrypoint_object(fmaxf) add_math_entrypoint_object(fmaxl) Index: libc/src/math/fma.cpp =================================================================== --- libc/src/math/fma.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===-- Implementation of fma function ------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -#include "src/math/fma.h" -#include "src/__support/common.h" - -#include "src/__support/FPUtil/FMA.h" - -namespace __llvm_libc { - -LLVM_LIBC_FUNCTION(double, fma, (double x, double y, double z)) { - return fputil::fma(x, y, z); -} - -} // namespace __llvm_libc Index: libc/src/math/fmaf.cpp =================================================================== --- libc/src/math/fmaf.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===-- Implementation of fmaf function -----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -#include "src/math/fmaf.h" -#include "src/__support/common.h" - -#include "src/__support/FPUtil/FMA.h" - -namespace __llvm_libc { - -LLVM_LIBC_FUNCTION(float, fmaf, (float x, float y, float z)) { - return fputil::fma(x, y, z); -} - -} // namespace __llvm_libc Index: libc/src/math/generic/CMakeLists.txt =================================================================== --- libc/src/math/generic/CMakeLists.txt +++ libc/src/math/generic/CMakeLists.txt @@ -1491,3 +1491,27 @@ COMPILE_OPTIONS -O3 ) + +add_entrypoint_object( + fmaf + SRCS + fmaf.cpp + HDRS + ../fmaf.h + DEPENDS + libc.src.__support.FPUtil.fma + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( + fma + SRCS + fma.cpp + HDRS + ../fma.h + DEPENDS + libc.src.__support.FPUtil.fma + COMPILE_OPTIONS + -O3 +)