diff options
| author | Siva Chandra <sivachandra@google.com> | 2021-02-03 00:37:16 -0800 |
|---|---|---|
| committer | Siva Chandra <sivachandra@google.com> | 2021-02-03 10:46:00 -0800 |
| commit | bbb7555403855f5c2a61d62ae59f1e970ea37ec1 (patch) | |
| tree | e8a7846cf7322b0c6e430255997db7456e23c8e4 /libc/src/math/generic/fabsf.cpp | |
| parent | 15aa78abb6ca22294e72767d5ed2aea0b1cf23f9 (diff) | |
[libc][NFC] Move generic math implementations to the generic directory.
This expands the pattern suggest in https://reviews.llvm.org/D95850 to all
math functions.
Diffstat (limited to 'libc/src/math/generic/fabsf.cpp')
| -rw-r--r-- | libc/src/math/generic/fabsf.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libc/src/math/generic/fabsf.cpp b/libc/src/math/generic/fabsf.cpp new file mode 100644 index 000000000000..120e6a8570f4 --- /dev/null +++ b/libc/src/math/generic/fabsf.cpp @@ -0,0 +1,17 @@ +//===-- Implementation of fabsf 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/fabsf.h" +#include "src/__support/common.h" +#include "utils/FPUtil/BasicOperations.h" + +namespace __llvm_libc { + +LLVM_LIBC_FUNCTION(float, fabsf, (float x)) { return fputil::abs(x); } + +} // namespace __llvm_libc |
