diff options
Diffstat (limited to 'libc/src/math/generic')
-rw-r--r-- | libc/src/math/generic/CMakeLists.txt | 78 | ||||
-rw-r--r-- | libc/src/math/generic/f16add.cpp | 19 | ||||
-rw-r--r-- | libc/src/math/generic/f16addf128.cpp | 19 | ||||
-rw-r--r-- | libc/src/math/generic/f16addl.cpp | 19 | ||||
-rw-r--r-- | libc/src/math/generic/f16sub.cpp | 19 | ||||
-rw-r--r-- | libc/src/math/generic/f16subf128.cpp | 19 | ||||
-rw-r--r-- | libc/src/math/generic/f16subl.cpp | 19 |
7 files changed, 192 insertions, 0 deletions
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt index d6ea8c5..2e4ed8f 100644 --- a/libc/src/math/generic/CMakeLists.txt +++ b/libc/src/math/generic/CMakeLists.txt @@ -3796,6 +3796,19 @@ add_entrypoint_object( ) add_entrypoint_object( + f16add + SRCS + f16add.cpp + HDRS + ../f16add.h + DEPENDS + libc.src.__support.macros.properties.types + libc.src.__support.FPUtil.generic.add_sub + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( f16addf SRCS f16addf.cpp @@ -3809,6 +3822,45 @@ add_entrypoint_object( ) add_entrypoint_object( + f16addl + SRCS + f16addl.cpp + HDRS + ../f16addl.h + DEPENDS + libc.src.__support.macros.properties.types + libc.src.__support.FPUtil.generic.add_sub + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( + f16addf128 + SRCS + f16addf128.cpp + HDRS + ../f16addf128.h + DEPENDS + libc.src.__support.macros.properties.types + libc.src.__support.FPUtil.generic.add_sub + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( + f16sub + SRCS + f16sub.cpp + HDRS + ../f16sub.h + DEPENDS + libc.src.__support.macros.properties.types + libc.src.__support.FPUtil.generic.add_sub + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( f16subf SRCS f16subf.cpp @@ -3822,6 +3874,32 @@ add_entrypoint_object( ) add_entrypoint_object( + f16subl + SRCS + f16subl.cpp + HDRS + ../f16subl.h + DEPENDS + libc.src.__support.macros.properties.types + libc.src.__support.FPUtil.generic.add_sub + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( + f16subf128 + SRCS + f16subf128.cpp + HDRS + ../f16subf128.h + DEPENDS + libc.src.__support.macros.properties.types + libc.src.__support.FPUtil.generic.add_sub + COMPILE_OPTIONS + -O3 +) + +add_entrypoint_object( f16div SRCS f16div.cpp diff --git a/libc/src/math/generic/f16add.cpp b/libc/src/math/generic/f16add.cpp new file mode 100644 index 0000000..ef9b43e --- /dev/null +++ b/libc/src/math/generic/f16add.cpp @@ -0,0 +1,19 @@ +//===-- Implementation of f16add 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/f16add.h" +#include "src/__support/FPUtil/generic/add_sub.h" +#include "src/__support/common.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(float16, f16add, (double x, double y)) { + return fputil::generic::add<float16>(x, y); +} + +} // namespace LIBC_NAMESPACE diff --git a/libc/src/math/generic/f16addf128.cpp b/libc/src/math/generic/f16addf128.cpp new file mode 100644 index 0000000..61c458f --- /dev/null +++ b/libc/src/math/generic/f16addf128.cpp @@ -0,0 +1,19 @@ +//===-- Implementation of f16addf128 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/f16addf128.h" +#include "src/__support/FPUtil/generic/add_sub.h" +#include "src/__support/common.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(float16, f16addf128, (float128 x, float128 y)) { + return fputil::generic::add<float16>(x, y); +} + +} // namespace LIBC_NAMESPACE diff --git a/libc/src/math/generic/f16addl.cpp b/libc/src/math/generic/f16addl.cpp new file mode 100644 index 0000000..d32d09d --- /dev/null +++ b/libc/src/math/generic/f16addl.cpp @@ -0,0 +1,19 @@ +//===-- Implementation of f16addl 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/f16addl.h" +#include "src/__support/FPUtil/generic/add_sub.h" +#include "src/__support/common.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(float16, f16addl, (long double x, long double y)) { + return fputil::generic::add<float16>(x, y); +} + +} // namespace LIBC_NAMESPACE diff --git a/libc/src/math/generic/f16sub.cpp b/libc/src/math/generic/f16sub.cpp new file mode 100644 index 0000000..114c8ad --- /dev/null +++ b/libc/src/math/generic/f16sub.cpp @@ -0,0 +1,19 @@ +//===-- Implementation of f16sub 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/f16sub.h" +#include "src/__support/FPUtil/generic/add_sub.h" +#include "src/__support/common.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(float16, f16sub, (double x, double y)) { + return fputil::generic::sub<float16>(x, y); +} + +} // namespace LIBC_NAMESPACE diff --git a/libc/src/math/generic/f16subf128.cpp b/libc/src/math/generic/f16subf128.cpp new file mode 100644 index 0000000..1f9ff28 --- /dev/null +++ b/libc/src/math/generic/f16subf128.cpp @@ -0,0 +1,19 @@ +//===-- Implementation of f16subf128 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/f16subf128.h" +#include "src/__support/FPUtil/generic/add_sub.h" +#include "src/__support/common.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(float16, f16subf128, (float128 x, float128 y)) { + return fputil::generic::sub<float16>(x, y); +} + +} // namespace LIBC_NAMESPACE diff --git a/libc/src/math/generic/f16subl.cpp b/libc/src/math/generic/f16subl.cpp new file mode 100644 index 0000000..31970af --- /dev/null +++ b/libc/src/math/generic/f16subl.cpp @@ -0,0 +1,19 @@ +//===-- Implementation of f16subl 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/f16subl.h" +#include "src/__support/FPUtil/generic/add_sub.h" +#include "src/__support/common.h" + +namespace LIBC_NAMESPACE { + +LLVM_LIBC_FUNCTION(float16, f16subl, (long double x, long double y)) { + return fputil::generic::sub<float16>(x, y); +} + +} // namespace LIBC_NAMESPACE |