summaryrefslogtreecommitdiff
path: root/lib/builtins/int_math.h
Commit message (Collapse)AuthorAgeFilesLines
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] [builtins] Add logb/logbf/logbl methods to compiler-rt to ↵Jordan Rupprecht2018-09-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | avoid libm dependencies when possible. Summary: The complex division builtins (div?c3) use logb methods from libm to scale numbers during division and avoid rounding issues. However, these come from libm, meaning anyone that uses --rtlib=compiler-rt also has to include -lm. Implement logb* methods for standard ieee 754 floats so we can avoid -lm on those platforms, falling back to the old behavior (using either logb() or `__builtin_logb()`) when not supported. These new methods are defined internally as `__compiler_rt_logb` so as not to conflict with the libm definitions in any way. This fixes just the libm methods mentioned in PR32279 and PR28652. libc is still required, although that seems to not be an issue. Note: this is proposed as an alternative to just adding -lm: D49330. Reviewers: efriedma, compnerd, scanon, echristo Reviewed By: echristo Subscribers: jsji, echristo, nemanjai, dberris, mgorny, kbarton, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49514 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@342917 91177308-0d34-0410-b5e6-96231b3b80d8
* builtins: fix buildSaleem Abdulrasool2015-10-071-1/+1
| | | | | | | __GNUC__ indicates the GNU compiler, not __GNU__. This got through due to building with clang rather than gcc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249516 91177308-0d34-0410-b5e6-96231b3b80d8
* builtins: use MSVC intrinsics with clSaleem Abdulrasool2015-10-071-5/+52
| | | | | | | | Use MSVCRT functions for floating-point builtins unavailable on MSVC. Patch by Tee Hao Wei! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249513 91177308-0d34-0410-b5e6-96231b3b80d8
* Move original compiler-rt functions (libgcc replacement) to lib/builtins ↵Alexey Samsonov2014-02-141-0/+67
directory git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201393 91177308-0d34-0410-b5e6-96231b3b80d8