[libc] Use '+' constraint on inline assemblyAs suggested by @mcgrathr in D118099Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D119978
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Re-apply https://reviews.llvm.org/D118173 with fix for aarch64.Reviewed By: michaelrjDifferential Revision: h
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Re-apply https://reviews.llvm.org/D118173 with fix for aarch64.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D118433
show more ...
[libc] Revert "Refactor sqrt implementations and add tests for generic sqrt implementations."This reverts commit 21c4c82c2026bac1f53be54923c0663d41d0a0aa.
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Refactor sqrt implementations:- Move architecture specific instructions from `src/math/<arch>` to `src/__support
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Refactor sqrt implementations:- Move architecture specific instructions from `src/math/<arch>` to `src/__support/FPUtil/<arch>` folder.- Move generic implementation of `sqrt` to `src/__support/FPUtil/generic` folder and add it as a header library.- Use `src/__support/FPUtil/sqrt.h` for architecture/generic selections.- Add unit tests for generic implementation of `sqrt`.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D118173
[libc][NFC] Workaround clang assertion in inline asmThe clobber list "cc" is added to inline assembly to workaround a clang assertion that triggers when building with a clang built with assertions
[libc][NFC] Workaround clang assertion in inline asmThe clobber list "cc" is added to inline assembly to workaround a clang assertion that triggers when building with a clang built with assertions enabled. See bug [53391](https://github.com/llvm/llvm-project/issues/53391).See https://godbolt.org/z/z3bc6a9PM showing functionally same output assembly.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D118099
[libc] Add hardware implementations of x86_64 sqrt functions.
[libc] Add x86_64 implementations of double precision cos, sin and tan.The implementations use the x86_64 FPU instructions. These instructionsare extremely slow compared to a polynomial based soft
[libc] Add x86_64 implementations of double precision cos, sin and tan.The implementations use the x86_64 FPU instructions. These instructionsare extremely slow compared to a polynomial based softwareimplementation. Also, their accuracy falls drastically once the inputgoes beyond 2PI. To improve both the speed and accuracy, we will betaking the following approach going forward:1. As a follow up to this CL, we will implement a range reduction algorithmwhich will expand the accuracy to the entire double precision range.2. After that, we will replace the HW instructions with a polynomialimplementation to improve the run time.After step 2, the implementations will be accurate, performant and targetarchitecture independent.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D102384