Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add assert for non-hexadecimal radixes. | Bill Wendling | 2008-03-16 | 1 | -0/+4 | |
| | | | | llvm-svn: 48421 | |||||
* | Fix a typo. It's causing consumer-typeset to miscompile. Perhaps more. | Evan Cheng | 2008-03-07 | 1 | -1/+1 | |
| | | | | llvm-svn: 48035 | |||||
* | Add support to APInt for shift and rotate operations with APInt | Dan Gohman | 2008-02-29 | 1 | -0/+27 | |
| | | | | | | instead of uint32_t for the shift/rotate count operand type. llvm-svn: 47741 | |||||
* | Fixed bug in APInt::Profile() where the BitWidth field was not included in the | Ted Kremenek | 2008-02-19 | 1 | -0/+2 | |
| | | | | | | | profile of the APSInt object. This caused unexpected Profile collisions where none should have occurred. llvm-svn: 47338 | |||||
* | Fix a warning about comparison between signed and unsigned, | Dan Gohman | 2008-02-14 | 1 | -1/+1 | |
| | | | | | | being consistent with the rest of the APInt implementation. llvm-svn: 47138 | |||||
* | Add countTrailingOnes member functions to APInt. | Dan Gohman | 2008-02-13 | 1 | -0/+12 | |
| | | | | llvm-svn: 47086 | |||||
* | Added FoldingSet style 'profiling' support for APInt. | Ted Kremenek | 2008-01-19 | 1 | -1/+13 | |
| | | | | llvm-svn: 46188 | |||||
* | Remove attribution from file headers, per discussion on llvmdev. | Chris Lattner | 2007-12-29 | 1 | -2/+2 | |
| | | | | llvm-svn: 45418 | |||||
* | Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case | Anton Korobeynikov | 2007-12-24 | 1 | -1/+1 | |
| | | | | llvm-svn: 45342 | |||||
* | Don't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the | Reid Spencer | 2007-12-11 | 1 | -14/+23 | |
| | | | | | | Support libraries separately into their own module. llvm-svn: 44852 | |||||
* | Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros. | Chris Lattner | 2007-11-23 | 1 | -1/+1 | |
| | | | | llvm-svn: 44296 | |||||
* | Fix APInt::countTrailingZeros to return BitWidth if the input is zero ↵ | Chris Lattner | 2007-11-23 | 1 | -2/+2 | |
| | | | | | | instead of returning some random large number. llvm-svn: 44294 | |||||
* | Don't attempt to mask no bits | Neil Booth | 2007-10-12 | 1 | -1/+2 | |
| | | | | llvm-svn: 42909 | |||||
* | Add a new function tcExtract for extracting a bignum from an | Neil Booth | 2007-10-08 | 1 | -34/+76 | |
| | | | | | | | | | | | | | arbitrary range of bits embedded in the middle of another bignum. This kind of operation is desirable in many cases of software floating point, e.g. converting bignum integers to floating point numbers of fixed precision (you want to extract the precision most significant bits). Elsewhere, add an assertion, and exit the shift functions early if the shift count is zero. llvm-svn: 42745 | |||||
* | Fix and clarify some comments. | Neil Booth | 2007-10-06 | 1 | -12/+12 | |
| | | | | llvm-svn: 42670 | |||||
* | Generalize tcFullMultiply so that the operands can be of differing | Neil Booth | 2007-10-06 | 1 | -13/+20 | |
| | | | | | | | | part widths. Also, return the number of parts actually required to hold the result's value. Remove an over-cautious condition from rounding of float->hex conversion. llvm-svn: 42669 | |||||
* | Change APFloat::convertFromInteger to take the incoming | Dale Johannesen | 2007-09-21 | 1 | -1/+1 | |
| | | | | | | | | | | bit width instead of number of words allocated, which makes it actually work for int->APF conversions. Adjust callers. Add const to one of the APInt constructors to prevent surprising match when called with const argument. llvm-svn: 42210 | |||||
* | Do not hide APInt::dump() inside #ifndef NDEBUG. | Devang Patel | 2007-09-17 | 1 | -4/+0 | |
| | | | | llvm-svn: 42068 | |||||
* | Remove the assumption that FP's are either float or | Dale Johannesen | 2007-09-14 | 1 | -1/+1 | |
| | | | | | | | | | | | | | double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). llvm-svn: 41967 | |||||
* | rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned() | Chris Lattner | 2007-08-23 | 1 | -2/+2 | |
| | | | | | | Add an APSInt::toString() method. llvm-svn: 41309 | |||||
* | initial checkin of Neil's APFloat work. | Chris Lattner | 2007-08-20 | 1 | -10/+30 | |
| | | | | llvm-svn: 41203 | |||||
* | This adds a bunch of static functions that implement unsigned | Chris Lattner | 2007-08-16 | 1 | -0/+566 | |
| | | | | | | | | | | | two's complement bignum arithmetic. They could be used to implement much of APInt, but the idea is they are enough to implement APFloat as well, which the current APInt interface is not suited for. Patch by Neil Booth! llvm-svn: 41124 | |||||
* | Fix an assertion introduced by my last change to the toString method. We | Reid Spencer | 2007-05-19 | 1 | -2/+2 | |
| | | | | | | | can't use getZExtValue() to extract the low order bits for each digit. Instead, we need to access the low order word directly. llvm-svn: 37242 | |||||
* | Get rid of leading zeros in the output of toString. | Reid Spencer | 2007-05-17 | 1 | -8/+27 | |
| | | | | llvm-svn: 37175 | |||||
* | For lshr by 0 bits, just return *this as a short cut. This also prevents | Reid Spencer | 2007-05-17 | 1 | -0/+6 | |
| | | | | | | undefined behavior when the width > 64 bits. llvm-svn: 37153 | |||||
* | Fix a bug in the "fromString" method where radix 2,8 and 16 values were | Reid Spencer | 2007-05-16 | 1 | -8/+13 | |
| | | | | | | | | not being generated correctly because the shl operator does not mutate its object but returns a new value. Also, make the distinction between radix 16 and the others more clear. llvm-svn: 37111 | |||||
* | Make the results for the rotate functions correct when rotateAmt == 0. | Reid Spencer | 2007-05-14 | 1 | -0/+4 | |
| | | | | llvm-svn: 37026 | |||||
* | Add some things needed by the llvm-gcc version supporting bit accurate integer | Reid Spencer | 2007-05-13 | 1 | -1/+67 | |
| | | | | | | | | | | | types: 1. Functions to compute div/rem at the same time. 2. Further assurance that an APInt with 0 bitwidth cannot be constructed. 3. Left and right rotate operations. 4. An exactLogBase2 function which requires an exact power of two or it returns -1. llvm-svn: 37025 | |||||
* | Fix shl to produce the correct result when the bitwidth is > 64 and the | Reid Spencer | 2007-05-12 | 1 | -0/+6 | |
| | | | | | | | shift amount is 0. Previously this code would do a lshr by the bit width which can lead to incorrect results. llvm-svn: 37010 | |||||
* | silence some annoying gcc 4.3 warnings | Chris Lattner | 2007-05-03 | 1 | -7/+10 | |
| | | | | llvm-svn: 36680 | |||||
* | We want the number of bits needed, not the power of 2. | Reid Spencer | 2007-04-14 | 1 | -1/+1 | |
| | | | | llvm-svn: 35977 | |||||
* | Implement a getBitsNeeded method to determine how many bits are needed to | Reid Spencer | 2007-04-13 | 1 | -0/+37 | |
| | | | | | | represent a string in binary form by an APInt. llvm-svn: 35968 | |||||
* | Fix an approximate calculation in an assertion not to give false negatives. | Reid Spencer | 2007-04-11 | 1 | -1/+1 | |
| | | | | llvm-svn: 35901 | |||||
* | Fix a bug in getAllOnesValue() which broke | Zhou Sheng | 2007-03-21 | 1 | -1/+1 | |
| | | | | | | some test cases for bitwidth > 64. llvm-svn: 35232 | |||||
* | Fix (and simplify) 48-bit byte swap. | Jeff Cohen | 2007-03-20 | 1 | -9/+8 | |
| | | | | | | Get pos/neg infinity the correct way. llvm-svn: 35223 | |||||
* | Fix coding standards violation. | Reid Spencer | 2007-03-19 | 1 | -1/+1 | |
| | | | | llvm-svn: 35189 | |||||
* | Implement extension of sign bits for negative values in the uint64_t | Reid Spencer | 2007-03-19 | 1 | -1/+5 | |
| | | | | | | constructor. This helps to fix test/Assembler/2007-03-19-NegValue.ll llvm-svn: 35180 | |||||
* | Revert the last patch as it violates the conditions of sext/zext. | Reid Spencer | 2007-03-12 | 1 | -4/+0 | |
| | | | | llvm-svn: 35068 | |||||
* | For APInt::z/sext(width), if width == BitWidth, just return *this. | Zhou Sheng | 2007-03-12 | 1 | -0/+4 | |
| | | | | llvm-svn: 35065 | |||||
* | Unbreak VC++ build. | Jeff Cohen | 2007-03-05 | 1 | -1/+9 | |
| | | | | llvm-svn: 34917 | |||||
* | Fix ashr for bitwidths > 64. This is now validated up to 1024 bits. | Reid Spencer | 2007-03-02 | 1 | -33/+49 | |
| | | | | llvm-svn: 34852 | |||||
* | Use a better algorithm for rounding sqrt results. Change the FIXME about | Reid Spencer | 2007-03-02 | 1 | -8/+12 | |
| | | | | | | | | | this to a NOTE: because pari/gp results start to get rounded incorrectly after 192 bits of precision. APInt and pari/gp never differ by more than 1, but APInt is more accurate because it does not lose precision after 192 bits as does pari/gp. llvm-svn: 34834 | |||||
* | Add a FIXME | Reid Spencer | 2007-03-02 | 1 | -0/+3 | |
| | | | | llvm-svn: 34828 | |||||
* | Fix a problem where shifting by 64-bits leads to incorrect results on PPC | Reid Spencer | 2007-03-02 | 1 | -1/+4 | |
| | | | | | | but not on X86 becuase shift by word size is "undefined". llvm-svn: 34825 | |||||
* | Combine two lines that can be. | Reid Spencer | 2007-03-01 | 1 | -2/+1 | |
| | | | | llvm-svn: 34818 | |||||
* | Make the static table of results in sqrt const. | Reid Spencer | 2007-03-01 | 1 | -1/+1 | |
| | | | | llvm-svn: 34791 | |||||
* | Add methods for bit width modification: sextOrTrunc, zextOrTrunc. | Reid Spencer | 2007-03-01 | 1 | -0/+16 | |
| | | | | llvm-svn: 34789 | |||||
* | Use a real table in sqrt to shorten and quicken the code. | Reid Spencer | 2007-03-01 | 1 | -14/+10 | |
| | | | | | | Thanks for the idea Chris. llvm-svn: 34779 | |||||
* | Add a square root function. | Reid Spencer | 2007-03-01 | 1 | -6/+87 | |
| | | | | llvm-svn: 34775 | |||||
* | Make the trunc/sext/zext methods return APInt& so that these operations | Reid Spencer | 2007-02-28 | 1 | -7/+8 | |
| | | | | | | can be chained together with other operations. llvm-svn: 34743 |