summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/int_math.h
Commit message (Collapse)AuthorAgeFilesLines
* [builtins] Use single line C++/C99 comment stylePetr Hosek2019-04-281-25/+23
| | | | | | | | | | | Use the uniform single line C++/99 style for code comments. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60352 llvm-svn: 359411
* [builtins] Reformat builtins with clang-formatPetr Hosek2019-04-281-8/+8
| | | | | | | | | | | Update formatting to use the LLVM style. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60351 llvm-svn: 359410
* Remove unneeded ymath.h include from int_math.hReid Kleckner2019-04-041-1/+0
| | | | | | | | | | | | This avoids a conflict between stdbool.h, which defines bool to _Bool in xkeycheck.h. From what I can tell, ymath.h is an internal header, and the intention is that users should include math.h directly instead. It doesn't appear to provide declarations of anything required for our builtins. This include was added back in r249513 from 2015, and it's possible that ymath.h provided something this code needed at the time, but today it does not. llvm-svn: 357728
* 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. llvm-svn: 351648
* [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 llvm-svn: 342917
* 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. llvm-svn: 249516
* 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! llvm-svn: 249513
* Move original compiler-rt functions (libgcc replacement) to lib/builtins ↵Alexey Samsonov2014-02-141-0/+67
directory llvm-svn: 201393
OpenPOWER on IntegriCloud