summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Basic/FixedPointTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. 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: 351636
* Removed the OverflowConversionsToFract tests for now. Will add them backLeonard Chan2018-08-061-45/+0
| | | | | | in once I figure out why this doesn't work on windows. llvm-svn: 339038
* Fix for failing test from sanitizer-x86_64-linux-fast where there was aLeonard Chan2018-08-061-0/+7
| | | | | | left shift on a negative value. llvm-svn: 339037
* [Fixed Point Arithmetic] Fixed Point ConstantLeonard Chan2018-08-061-0/+683
This patch proposes an abstract type that represents fixed point numbers, similar to APInt or APSInt that was discussed in https://reviews.llvm.org/D48456#inline-425585. This type holds a value, scale, and saturation and is meant to perform intermediate calculations on constant fixed point values. Currently this class is used as a way for handling the conversions between fixed point numbers with different sizes and radixes. For example, if I'm casting from a signed _Accum to a saturated unsigned short _Accum, I will need to check the value of the signed _Accum to see if it fits into the short _Accum which involves getting and comparing against the max/min values of the short _Accum. The FixedPointNumber class currently handles the radix shifting and extension when converting to a signed _Accum. Differential Revision: https://reviews.llvm.org/D48661 llvm-svn: 339028
OpenPOWER on IntegriCloud