llvm/lib/Support
Reid Spencer 9c0696f153 First version that can process arith.cpp test case up to 1024 bits:
1. Ensure pVal is set to 0 in each constructor.
2. Fix roundToDouble to make correct calculations and not read beyond the
   end of allocated memory.
3. Implement Knuth's "classical algorithm" for division from scratch and
   eliminate buffer overflows and uninitialized mememory reads. Document
   it properly too.
4. Implement a wrapper function for KnuthDiv which handles the 64-bit to
   32-bit conversion and back. It also implement short division for the
   n == 1 case that Knuth's algorithm can't handle.
5. Simplify the logic of udiv and urem a little, make them exit early, and
   have them use the "divide" wrapper function to perform the division
   or remainder operation.
6. Move the toString function to the end of the file, closer to where
   the division functions are located.

Note: division is still broken for some > 64 bit values, but at least it
      doesn't crash any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34449 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 08:51:03 +00:00
..
bzip2 Use archive libraries instead of object files for VMCore, BCReader, 2006-06-01 01:30:27 +00:00
Allocator.cpp Don't use <sstream> in Streams.h but <iosfwd> instead. 2006-12-07 23:41:45 +00:00
Annotation.cpp Fix a static dtor issue 2006-10-04 22:13:11 +00:00
APInt.cpp First version that can process arith.cpp test case up to 1024 bits: 2007-02-20 08:51:03 +00:00
CommandLine.cpp Add PrintVersionMessage() that tools can use to print version number 2007-02-01 01:43:37 +00:00
Compressor.cpp This patch (written by Reid) changes compressor to never throw an exception. 2006-07-07 17:00:12 +00:00
ConstantRange.cpp Fix comments to match names of functions. 2007-02-11 00:58:49 +00:00
Debug.cpp The previous implementation of LLVM Streams wasn't removing symbols. This 2007-01-03 22:37:27 +00:00
Dwarf.cpp Adding new Dwarf constants. 2006-08-21 21:18:10 +00:00
FileUtilities.cpp Make the absolute/relative tolerance information easier to read/understand. 2006-11-25 08:38:44 +00:00
FoldingSet.cpp Encode small integers more densely in foldingset, avoiding overflowing the SmallVector as often. 2007-02-04 01:48:10 +00:00
GraphWriter.cpp Add possibility to set memory limit for binaries run via libSystem. This 2007-02-16 19:11:07 +00:00
IsInf.cpp remove IncludeFile turds in MathExtras.h, which bloats every .o file that 2006-08-11 23:52:54 +00:00
IsNAN.cpp remove IncludeFile turds in MathExtras.h, which bloats every .o file that 2006-08-11 23:52:54 +00:00
Makefile For PR797: 2006-08-23 20:39:25 +00:00
ManagedStatic.cpp Not all managedstatics need object pointers. 2007-02-20 06:18:57 +00:00
PluginLoader.cpp Don't use <sstream> in Streams.h but <iosfwd> instead. 2006-12-07 23:41:45 +00:00
SlowOperationInformer.cpp Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are 2006-12-07 01:30:32 +00:00
SmallPtrSet.cpp do not let the table fill up with tombstones. 2007-02-07 01:11:25 +00:00
Statistic.cpp eliminate constructor from Statistic class. It is now impossible to get a 2006-12-19 23:17:40 +00:00
Streams.cpp The previous implementation of LLVM Streams wasn't removing symbols. This 2007-01-03 22:37:27 +00:00
StringExtras.cpp Add a helper function 2006-11-28 22:32:35 +00:00
StringMap.cpp Add support for removing elements out of StringMap. 2007-02-11 20:58:00 +00:00
SystemUtils.cpp Don't use <sstream> in Streams.h but <iosfwd> instead. 2006-12-07 23:41:45 +00:00
Timer.cpp Removed more <iostream> includes 2006-12-07 20:28:15 +00:00