#
fffdf105 |
| 17-May-2007 |
Reid Spencer <rspencer@reidspencer.com> |
For lshr by 0 bits, just return *this as a short cut. This also prevents undefined behavior when the width > 64 bits.
llvm-svn: 37153
|
#
a93c981f |
| 16-May-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Fix a bug in the "fromString" method where radix 2,8 and 16 values were not being generated correctly because the shl operator does not mutate its object but returns a new value. Also, make the disti
Fix a bug in the "fromString" method where radix 2,8 and 16 values were 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
show more ...
|
#
98ed7db7 |
| 14-May-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Make the results for the rotate functions correct when rotateAmt == 0.
llvm-svn: 37026
|
#
4c50b52f |
| 13-May-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Add some things needed by the llvm-gcc version supporting bit accurate integer types: 1. Functions to compute div/rem at the same time. 2. Further assurance that an APInt with 0 bitwidth cannot be co
Add some things needed by the llvm-gcc version supporting bit accurate integer 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
show more ...
|
#
81ee020f |
| 12-May-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Fix shl to produce the correct result when the bitwidth is > 64 and the shift amount is 0. Previously this code would do a lshr by the bit width which can lead to incorrect results.
llvm-svn: 37010
|
#
dad2d093 |
| 03-May-2007 |
Chris Lattner <sabre@nondot.org> |
silence some annoying gcc 4.3 warnings
llvm-svn: 36680
|
#
67378b22 |
| 14-Apr-2007 |
Reid Spencer <rspencer@reidspencer.com> |
We want the number of bits needed, not the power of 2.
llvm-svn: 35977
|
#
9329e7b6 |
| 13-Apr-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Implement a getBitsNeeded method to determine how many bits are needed to represent a string in binary form by an APInt.
llvm-svn: 35968
|
#
c49f2ef2 |
| 11-Apr-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Fix an approximate calculation in an assertion not to give false negatives.
llvm-svn: 35901
|
#
0458c1db |
| 21-Mar-2007 |
Zhou Sheng <zhousheng00@gmail.com> |
Fix a bug in getAllOnesValue() which broke some test cases for bitwidth > 64.
llvm-svn: 35232
|
#
e06855e6 |
| 20-Mar-2007 |
Jeff Cohen <jeffc@jolt-lang.org> |
Fix (and simplify) 48-bit byte swap. Get pos/neg infinity the correct way.
llvm-svn: 35223
|
#
b1ec2e8e |
| 19-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Fix coding standards violation.
llvm-svn: 35189
|
#
6fae35ac |
| 19-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Implement extension of sign bits for negative values in the uint64_t constructor. This helps to fix test/Assembler/2007-03-19-NegValue.ll
llvm-svn: 35180
|
#
6223c058 |
| 12-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Revert the last patch as it violates the conditions of sext/zext.
llvm-svn: 35068
|
#
3999ffa0 |
| 12-Mar-2007 |
Zhou Sheng <zhousheng00@gmail.com> |
For APInt::z/sext(width), if width == BitWidth, just return *this.
llvm-svn: 35065
|
#
b622c11f |
| 05-Mar-2007 |
Jeff Cohen <jeffc@jolt-lang.org> |
Unbreak VC++ build.
llvm-svn: 34917
|
#
1825dd0d |
| 02-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Fix ashr for bitwidths > 64. This is now validated up to 1024 bits.
llvm-svn: 34852
|
#
cf817561 |
| 02-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Use a better algorithm for rounding sqrt results. Change the FIXME about this to a NOTE: because pari/gp results start to get rounded incorrectly after 192 bits of precision. APInt and pari/gp never
Use a better algorithm for rounding sqrt results. Change the FIXME about 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
show more ...
|
#
c44bdae1 |
| 02-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Add a FIXME
llvm-svn: 34828
|
#
c442c84c |
| 02-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Fix a problem where shifting by 64-bits leads to incorrect results on PPC but not on X86 becuase shift by word size is "undefined".
llvm-svn: 34825
|
#
1b8dfcba |
| 01-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Combine two lines that can be.
llvm-svn: 34818
|
#
2f6ad4d3 |
| 01-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Make the static table of results in sqrt const.
llvm-svn: 34791
|
#
742d1704 |
| 01-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Add methods for bit width modification: sextOrTrunc, zextOrTrunc.
llvm-svn: 34789
|
#
c8841d2e |
| 01-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Use a real table in sqrt to shorten and quicken the code. Thanks for the idea Chris.
llvm-svn: 34779
|
#
d99feafd |
| 01-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Add a square root function.
llvm-svn: 34775
|