[libc] Add hardware implementations of fma and fmaf for x86_64 and aarch64.
authorSiva Chandra <sivachandra@google.com>
Tue, 20 Apr 2021 04:06:25 +0000 (04:06 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 21 Apr 2021 04:31:27 +0000 (04:31 +0000)
commit95934c3a37cb00e4fff6042c52837b42f6219772
treee081a7816d360af7ac0f594870838392a66d00e1
parent05eeed9691aeb3e0316712195b998e9078cdceb0
[libc] Add hardware implementations of fma and fmaf for x86_64 and aarch64.

The current generic implementation of the fmaf function has been moved
to the FPUtil directory. This allows one use the fma operation from
implementations of other math functions like the trignometric functions
without depending on/requiring the fma/fmaf/fmal function targets. If
this pattern ends being convenient, we will switch all generic math
implementations to this pattern.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D100811
14 files changed:
libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/src/math/CMakeLists.txt
libc/src/math/fma.cpp [new file with mode: 0644]
libc/src/math/fma.h [new file with mode: 0644]
libc/src/math/fmaf.cpp [new file with mode: 0644]
libc/src/math/generic/CMakeLists.txt
libc/test/src/math/CMakeLists.txt
libc/test/src/math/fma_test.cpp [new file with mode: 0644]
libc/utils/FPUtil/FMA.h [new file with mode: 0644]
libc/utils/FPUtil/aarch64/FMA.h [new file with mode: 0644]
libc/utils/FPUtil/generic/FMA.h [moved from libc/src/math/generic/fmaf.cpp with 82% similarity]
libc/utils/FPUtil/generic/README.md [new file with mode: 0644]
libc/utils/FPUtil/x86_64/FMA.h [new file with mode: 0644]