d502a82092 
								
							 
						 
						
							
							
								
								Remove duplicate comment.  
							
							... 
							
							
							
							llvm-svn: 42913 
							
						 
						
							2007-10-12 16:05:57 +00:00  
				
					
						
							
							
								 
						
							
								b93d90e98c 
								
							 
						 
						
							
							
								
								Implement correctly-rounded decimal->binary conversion, i.e. conversion  
							
							... 
							
							
							
							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 
							
						 
						
							2007-10-12 16:02:31 +00:00  
				
					
						
							
							
								 
						
							
								e9dbe094aa 
								
							 
						 
						
							
							
								
								Remove a field that was never used.  
							
							... 
							
							
							
							llvm-svn: 42911 
							
						 
						
							2007-10-12 15:35:10 +00:00  
				
					
						
							
							
								 
						
							
								146fdb3eeb 
								
							 
						 
						
							
							
								
								If we're trying to be arbitrary precision, unsigned char clearly won't cut it.  Needed for dec->bin conversions.  
							
							... 
							
							
							
							llvm-svn: 42910 
							
						 
						
							2007-10-12 15:33:27 +00:00  
				
					
						
							
							
								 
						
							
								007aa378ad 
								
							 
						 
						
							
							
								
								Next PPC long double bits.  First cut at constants.  
							
							... 
							
							
							
							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 
							
						 
						
							2007-10-11 18:07:22 +00:00  
				
					
						
							
							
								 
						
							
								49c6aab7b8 
								
							 
						 
						
							
							
								
								Use APInt::tcExtract.  It's cleaner, and works :)  
							
							... 
							
							
							
							llvm-svn: 42746 
							
						 
						
							2007-10-08 14:39:42 +00:00  
				
					
						
							
							
								 
						
							
								03f58ab706 
								
							 
						 
						
							
							
								
								Add back convertFromSignExtendedInteger.  
							
							... 
							
							
							
							llvm-svn: 42735 
							
						 
						
							2007-10-07 12:15:41 +00:00  
				
					
						
							
							
								 
						
							
								ba205229e7 
								
							 
						 
						
							
							
								
								Now that convertFromUnsignedParts has a sane, constant interface,  
							
							... 
							
							
							
							convertFromZeroExtendedInteger can be simplified as it doesn't need
to make a copy of the source bignum.
llvm-svn: 42734 
							
						 
						
							2007-10-07 12:10:57 +00:00  
				
					
						
							
							
								 
						
							
								6c1c8588ae 
								
							 
						 
						
							
							
								
								Reimplement convertFromUnsignedInteger so it is passed a const bignum.  
							
							... 
							
							
							
							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 
							
						 
						
							2007-10-07 12:07:53 +00:00  
				
					
						
							
							
								 
						
							
								5f00973393 
								
							 
						 
						
							
							
								
								convertFromInteger, as originally written, expected sign-extended  
							
							... 
							
							
							
							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 
							
						 
						
							2007-10-07 11:45:55 +00:00  
				
					
						
							
							
								 
						
							
								d3985924f4 
								
							 
						 
						
							
							
								
								combineLostFractions does not need to be a member function  
							
							... 
							
							
							
							llvm-svn: 42729 
							
						 
						
							2007-10-07 08:51:21 +00:00  
				
					
						
							
							
								 
						
							
								32897f5eb0 
								
							 
						 
						
							
							
								
								Cleaner, more general exponent output.  
							
							... 
							
							
							
							llvm-svn: 42690 
							
						 
						
							2007-10-06 07:29:25 +00:00  
				
					
						
							
							
								 
						
							
								2a9bcb9ea7 
								
							 
						 
						
							
							
								
								silence warnings in no-assert build.  
							
							... 
							
							
							
							llvm-svn: 42687 
							
						 
						
							2007-10-06 06:13:42 +00:00  
				
					
						
							
							
								 
						
							
								0ea72a9a91 
								
							 
						 
						
							
							
								
								Generalize tcFullMultiply so that the operands can be of differing  
							
							... 
							
							
							
							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 
							
						 
						
							2007-10-06 00:24:48 +00:00  
				
					
						
							
							
								 
						
							
								8f1946fa22 
								
							 
						 
						
							
							
								
								Add APFloat -> hexadecimal string conversion, as per %a and %A in C99.  
							
							... 
							
							
							
							Useful for diagnostics and debugging.
llvm-svn: 42598 
							
						 
						
							2007-10-03 22:26:02 +00:00  
				
					
						
							
							
								 
						
							
								1ca1f80b38 
								
							 
						 
						
							
							
								
								Tweak RoundAwayFromZero the bit number below which is truncated, and make  
							
							... 
							
							
							
							it const.
Preparation for APFloat -> hexadecimal string conversion.
llvm-svn: 42576 
							
						 
						
							2007-10-03 15:16:41 +00:00  
				
					
						
							
							
								 
						
							
								28a2c4a9c4 
								
							 
						 
						
							
							
								
								Simplify and fix signed int -> FP conversions.  
							
							... 
							
							
							
							llvm-svn: 42483 
							
						 
						
							2007-09-30 18:17:01 +00:00  
				
					
						
							
							
								 
						
							
								9acbf5aaf9 
								
							 
						 
						
							
							
								
								Whitespace and compiler warning cleanup.  
							
							... 
							
							
							
							llvm-svn: 42373 
							
						 
						
							2007-09-26 21:33:42 +00:00  
				
					
						
							
							
								 
						
							
								e7439eff5a 
								
							 
						 
						
							
							
								
								Make APFloat->int conversions deterministic even in  
							
							... 
							
							
							
							cases with undefined behavior.
llvm-svn: 42328 
							
						 
						
							2007-09-25 23:07:07 +00:00  
				
					
						
							
							
								 
						
							
								4f55d9fe0f 
								
							 
						 
						
							
							
								
								Fix long double<->shorter FP type conversions  
							
							... 
							
							
							
							of zero, infinity, and NaNs.
llvm-svn: 42298 
							
						 
						
							2007-09-25 17:25:00 +00:00  
				
					
						
							
							
								 
						
							
								a8d7269269 
								
							 
						 
						
							
							
								
								Handle storage complications of float->float conversions.  
							
							... 
							
							
							
							llvm-svn: 42220 
							
						 
						
							2007-09-22 02:56:19 +00:00  
				
					
						
							
							
								 
						
							
								4230512f32 
								
							 
						 
						
							
							
								
								Change APFloat::convertFromInteger to take the incoming  
							
							... 
							
							
							
							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 
							
						 
						
							2007-09-21 22:09:37 +00:00  
				
					
						
							
							
								 
						
							
								146a0ea071 
								
							 
						 
						
							
							
								
								Fix PR 1688.  See comments there.  
							
							... 
							
							
							
							llvm-svn: 42181 
							
						 
						
							2007-09-20 23:47:58 +00:00  
				
					
						
							
							
								 
						
							
								58c468fb09 
								
							 
						 
						
							
							
								
								Remove spurious consts. This fixes warnings with compilers that  
							
							... 
							
							
							
							are strict about such things.
llvm-svn: 41956 
							
						 
						
							2007-09-14 20:08:19 +00:00  
				
					
						
							
							
								 
						
							
								521988b604 
								
							 
						 
						
							
							
								
								Compensate for partCount change in Bogus definition  
							
							... 
							
							
							
							(could break hash table in ConstantFP)
llvm-svn: 41874 
							
						 
						
							2007-09-12 01:22:05 +00:00  
				
					
						
							
							
								 
						
							
								245dceb06d 
								
							 
						 
						
							
							
								
								Add APInt interfaces to APFloat (allows directly  
							
							... 
							
							
							
							access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).
llvm-svn: 41858 
							
						 
						
							2007-09-11 18:32:33 +00:00  
				
					
						
							
							
								 
						
							
								728687c423 
								
							 
						 
						
							
							
								
								Fix mod so it actually works.  Fix conversions to  
							
							... 
							
							
							
							native types to handle denormals correctly.
llvm-svn: 41726 
							
						 
						
							2007-09-05 20:39:49 +00:00  
				
					
						
							
							
								 
						
							
								689d17d282 
								
							 
						 
						
							
							
								
								Oops, should be part of 41664; won't work very well without this piece.  
							
							... 
							
							
							
							llvm-svn: 41665 
							
						 
						
							2007-08-31 23:35:31 +00:00  
				
					
						
							
							
								 
						
							
								3cf889f75e 
								
							 
						 
						
							
							
								
								Enhance APFloat to retain bits of NaNs (fixes oggenc).  
							
							... 
							
							
							
							Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.
llvm-svn: 41632 
							
						 
						
							2007-08-31 04:03:46 +00:00  
				
					
						
							
							
								 
						
							
								d246b2ca5c 
								
							 
						 
						
							
							
								
								Change LegalFPImmediates to use APFloat.  
							
							... 
							
							
							
							Add APFloat interfaces to ConstantFP, SelectionDAG.
Fix integer bit in double->APFloat conversion.
Convert LegalizeDAG to use APFloat interface in
ConstantFPSDNode uses.
llvm-svn: 41587 
							
						 
						
							2007-08-30 00:23:21 +00:00  
				
					
						
							
							
								 
						
							
								bdea32d812 
								
							 
						 
						
							
							
								
								Poison APFloat::operator==.  Replace existing uses with bitwiseIsEqual.  
							
							... 
							
							
							
							This means backing out the preceding change to Constants.cpp, alas.
llvm-svn: 41378 
							
						 
						
							2007-08-24 22:09:56 +00:00  
				
					
						
							
							
								 
						
							
								918c33c67a 
								
							 
						 
						
							
							
								
								Revised per review feedback from previous patch.  
							
							... 
							
							
							
							llvm-svn: 41353 
							
						 
						
							2007-08-24 05:08:11 +00:00  
				
					
						
							
							
								 
						
							
								3da18eb22a 
								
							 
						 
						
							
							
								
								silence some warnings in an optimized build.  
							
							... 
							
							
							
							llvm-svn: 41352 
							
						 
						
							2007-08-24 03:02:34 +00:00  
				
					
						
							
							
								 
						
							
								a719a60609 
								
							 
						 
						
							
							
								
								Change internal representation of ConstantFP to use APFloat.  
							
							... 
							
							
							
							Interface to rest of the compiler unchanged, as yet.
llvm-svn: 41348 
							
						 
						
							2007-08-24 00:56:33 +00:00  
				
					
						
							
							
								 
						
							
								fe02c1f97f 
								
							 
						 
						
							
							
								
								initial checkin of Neil's APFloat work.  
							
							... 
							
							
							
							llvm-svn: 41203 
							
						 
						
							2007-08-20 22:49:32 +00:00