aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-20 08:51:03 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-20 08:51:03 +0000
commitfb77b2ba13c96715e80f73cdec930c2abce95209 (patch)
tree6e06d07229232f2a78b457e37b07469941b3b47c /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent1bed091776651c0fb3ba07831668c1f476e0e9d4 (diff)
downloadllvm-fb77b2ba13c96715e80f73cdec930c2abce95209.zip
llvm-fb77b2ba13c96715e80f73cdec930c2abce95209.tar.gz
llvm-fb77b2ba13c96715e80f73cdec930c2abce95209.tar.bz2
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. llvm-svn: 34449
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions