Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | remove a dead APInt ctor. | Chris Lattner | 2008-08-17 | 1 | -0/+1 | |
| | | | | llvm-svn: 54869 | |||||
* | Don't assume underlying APInt type is limited | Dale Johannesen | 2008-05-14 | 1 | -1/+1 | |
| | | | | | | to 64 bits. llvm-svn: 51135 | |||||
* | Remove undefined behavior in hex string->APFloat | Dale Johannesen | 2008-05-14 | 1 | -1/+1 | |
| | | | | | | conversion. Try 0x1.0000a4p+0f. Neil, please review. llvm-svn: 51132 | |||||
* | Make firstEightPowers const. | Dan Gohman | 2008-05-12 | 1 | -2/+2 | |
| | | | | llvm-svn: 50975 | |||||
* | Suppress -Wshorten-64-to-32 warnings for 64-bit hosts. | Evan Cheng | 2008-05-02 | 1 | -23/+25 | |
| | | | | llvm-svn: 50590 | |||||
* | Check that APFloat::convert is not trying to target | Dale Johannesen | 2008-04-20 | 1 | -0/+1 | |
| | | | | | | | | | ppc long double, which doesn't work. This may break some stuff temporarily, but I want to avoid the propagation of code that assumes this works. llvm-svn: 49983 | |||||
* | Make several symbols static. | Dan Gohman | 2008-04-10 | 1 | -18/+18 | |
| | | | | llvm-svn: 49496 | |||||
* | Add a method to APFloat to convert directly from APInt. | Dan Gohman | 2008-02-29 | 1 | -0/+17 | |
| | | | | llvm-svn: 47738 | |||||
* | Added "Profile" method to APFloat for use with FoldingSet. | Ted Kremenek | 2008-02-11 | 1 | -0/+6 | |
| | | | | | | | | | | Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. llvm-svn: 46957 | |||||
* | Chris' change to print an approximation to long doubles | Dale Johannesen | 2008-01-31 | 1 | -1/+2 | |
| | | | | | | | exposed a bug in APFloat's long double->double conversion of NaNs. Broke several things in the ieee part of gcc testsuite. llvm-svn: 46617 | |||||
* | Remove top-level const qualifiers from casts, avoiding associated | Dan Gohman | 2008-01-29 | 1 | -10/+10 | |
| | | | | | | compiler warnings. llvm-svn: 46509 | |||||
* | Remove attribution from file headers, per discussion on llvmdev. | Chris Lattner | 2007-12-29 | 1 | -2/+2 | |
| | | | | llvm-svn: 45418 | |||||
* | proper #include order. | Chris Lattner | 2007-12-08 | 1 | -1/+1 | |
| | | | | llvm-svn: 44707 | |||||
* | Prior commit updated wrong if, apologies. | Neil Booth | 2007-12-05 | 1 | -2/+2 | |
| | | | | llvm-svn: 44614 | |||||
* | Handle zero correctly. | Neil Booth | 2007-12-05 | 1 | -3/+3 | |
| | | | | llvm-svn: 44613 | |||||
* | Handle 0 correctly in string->APFloat conversion. | Dale Johannesen | 2007-12-05 | 1 | -1/+1 | |
| | | | | llvm-svn: 44594 | |||||
* | Fix denormal check in float->APInt conversion. | Dale Johannesen | 2007-11-17 | 1 | -1/+1 | |
| | | | | | | PR 1804. llvm-svn: 44201 | |||||
* | Remove some unnecessary C-style statics. | Neil Booth | 2007-11-02 | 1 | -6/+8 | |
| | | | | | | Restore an assertion that arithmetic can be performed on this format. llvm-svn: 43638 | |||||
* | Add back line whose removal somehow crept into prior patch | Neil Booth | 2007-11-01 | 1 | -0/+1 | |
| | | | | llvm-svn: 43627 | |||||
* | When converting to integer, do bit manipulations in the destination | Neil Booth | 2007-11-01 | 1 | -71/+107 | |
| | | | | | | | | | | | memory rather than in a copy of the APFloat. This avoids problems when the destination is wider than our significand and is cleaner. Also provide deterministic values in all cases where conversion fails, namely zero for NaNs and the minimal or maximal value respectively for underflow or overflow. llvm-svn: 43626 | |||||
* | Clarified operator precedence. | Hartmut Kaiser | 2007-10-25 | 1 | -2/+2 | |
| | | | | | | Silenced VC++ warning. llvm-svn: 43372 | |||||
* | Fast-track obviously over-large and over-small exponents during decimal-> | Neil Booth | 2007-10-15 | 1 | -8/+44 | |
| | | | | | | | | | | integer conversion. In some such cases this makes us one or two orders of magnitude faster than NetBSD's libc. Glibc seems to have a similar fast path. Also, tighten up some upper bounds to save a bit of memory. llvm-svn: 42984 | |||||
* | Consolidate logic for creating NaNs. Silence compiler warning. | Neil Booth | 2007-10-14 | 1 | -10/+15 | |
| | | | | llvm-svn: 42966 | |||||
* | Whether arithmetic is supported is a property of the semantics. Make it | Neil Booth | 2007-10-14 | 1 | -41/+36 | |
| | | | | | | so, and clean up the checks by putting them in an inline function. llvm-svn: 42965 | |||||
* | Separate out parsing of decimal number. Use this to only allocate | Neil Booth | 2007-10-14 | 1 | -97/+150 | |
| | | | | | | | memory for the significand once up-front. Also ignore insignificant trailing zeroes; this saves unnecessary multiplications later. llvm-svn: 42964 | |||||
* | If the power of 5 is exact, and the reciprocal exact, the error is zero not ↵ | Neil Booth | 2007-10-13 | 1 | -1/+1 | |
| | | | | | | one half-ulps. This prevents an infinite loop in rare cases. llvm-svn: 42950 | |||||
* | Remove duplicate comment. | Neil Booth | 2007-10-12 | 1 | -11/+0 | |
| | | | | llvm-svn: 42913 | |||||
* | Implement correctly-rounded decimal->binary conversion, i.e. conversion | Neil Booth | 2007-10-12 | 1 | -6/+349 | |
| | | | | | | | | | | | from user input strings. Such conversions are more intricate and subtle than they may appear; it is unlikely I have got it completely right first time. I would appreciate being informed of any bugs and incorrect roundings you might discover. llvm-svn: 42912 | |||||
* | Remove a field that was never used. | Neil Booth | 2007-10-12 | 1 | -9/+6 | |
| | | | | llvm-svn: 42911 | |||||
* | If we're trying to be arbitrary precision, unsigned char clearly won't cut ↵ | Neil Booth | 2007-10-12 | 1 | -1/+1 | |
| | | | | | | it. Needed for dec->bin conversions. llvm-svn: 42910 | |||||
* | Next PPC long double bits. First cut at constants. | Dale Johannesen | 2007-10-11 | 1 | -6/+157 | |
| | | | | | | | | | No compile-time support for constant operations yet, just format transformations. Make readers and writers work. Split constants into 2 doubles in Legalize. llvm-svn: 42865 | |||||
* | Use APInt::tcExtract. It's cleaner, and works :) | Neil Booth | 2007-10-08 | 1 | -19/+14 | |
| | | | | llvm-svn: 42746 | |||||
* | Add back convertFromSignExtendedInteger. | Neil Booth | 2007-10-07 | 1 | -0/+30 | |
| | | | | llvm-svn: 42735 | |||||
* | Now that convertFromUnsignedParts has a sane, constant interface, | Neil Booth | 2007-10-07 | 1 | -5/+1 | |
| | | | | | | | convertFromZeroExtendedInteger can be simplified as it doesn't need to make a copy of the source bignum. llvm-svn: 42734 | |||||
* | Reimplement convertFromUnsignedInteger so it is passed a const bignum. | Neil Booth | 2007-10-07 | 1 | -18/+29 | |
| | | | | | | | | | It used to modify its argument in-place. This interface is saner and the implementation more efficient. It will be needed for decimal->binary conversion. llvm-svn: 42733 | |||||
* | convertFromInteger, as originally written, expected sign-extended | Neil Booth | 2007-10-07 | 1 | -4/+6 | |
| | | | | | | | | input. APInt unfortunately zero-extends signed integers, so Dale modified the function to expect zero-extended input. Make this assumption explicit in the function name. llvm-svn: 42732 | |||||
* | combineLostFractions does not need to be a member function | Neil Booth | 2007-10-07 | 1 | -16/+15 | |
| | | | | llvm-svn: 42729 | |||||
* | Cleaner, more general exponent output. | Neil Booth | 2007-10-06 | 1 | -21/+22 | |
| | | | | llvm-svn: 42690 | |||||
* | silence warnings in no-assert build. | Chris Lattner | 2007-10-06 | 1 | -23/+20 | |
| | | | | llvm-svn: 42687 | |||||
* | Generalize tcFullMultiply so that the operands can be of differing | Neil Booth | 2007-10-06 | 1 | -3/+4 | |
| | | | | | | | | 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 | |||||
* | Add APFloat -> hexadecimal string conversion, as per %a and %A in C99. | Neil Booth | 2007-10-03 | 1 | -3/+240 | |
| | | | | | | Useful for diagnostics and debugging. llvm-svn: 42598 | |||||
* | Tweak RoundAwayFromZero the bit number below which is truncated, and make | Neil Booth | 2007-10-03 | 1 | -8/+13 | |
| | | | | | | | | it const. Preparation for APFloat -> hexadecimal string conversion. llvm-svn: 42576 | |||||
* | Simplify and fix signed int -> FP conversions. | Dale Johannesen | 2007-09-30 | 1 | -11/+3 | |
| | | | | llvm-svn: 42483 | |||||
* | Whitespace and compiler warning cleanup. | Neil Booth | 2007-09-26 | 1 | -76/+91 | |
| | | | | llvm-svn: 42373 | |||||
* | Make APFloat->int conversions deterministic even in | Dale Johannesen | 2007-09-25 | 1 | -5/+33 | |
| | | | | | | cases with undefined behavior. llvm-svn: 42328 | |||||
* | Fix long double<->shorter FP type conversions | Dale Johannesen | 2007-09-25 | 1 | -12/+29 | |
| | | | | | | of zero, infinity, and NaNs. llvm-svn: 42298 | |||||
* | Handle storage complications of float->float conversions. | Neil Booth | 2007-09-22 | 1 | -18/+23 | |
| | | | | llvm-svn: 42220 | |||||
* | Change APFloat::convertFromInteger to take the incoming | Dale Johannesen | 2007-09-21 | 1 | -16/+19 | |
| | | | | | | | | | | 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 | |||||
* | Fix PR 1688. See comments there. | Dale Johannesen | 2007-09-20 | 1 | -13/+25 | |
| | | | | llvm-svn: 42181 | |||||
* | Remove spurious consts. This fixes warnings with compilers that | Dan Gohman | 2007-09-14 | 1 | -2/+2 | |
| | | | | | | are strict about such things. llvm-svn: 41956 |