Implement full multiplication UInt<A> * UInt<B> -> UInt<A + B> and
quick_mul_hi that returns the higher half of the product UInt<A> * UInt<A>.
These 2 functions will be used for dyadic floating point class.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/src/__support/UInt.h | ||
---|---|---|
219 | Can you add more commentary here explaining how this is different from operator*? IIUC, operator* returns the LS Bits of the result, while this is will return the MS Bits of the result with an additional condition that the LS-Bit of the result need not be the same as that in the MS Bits of the result produced by ful_mul. | |
libc/test/src/__support/uint_test.cpp | ||
510 | Please fix. | |
libc/utils/UnitTest/LibcTest.cpp | ||
294 | While OK for this change, I think this is going beyond manageable limits. We should refactor the test infrastructure with some urgency so that we can put these specializations next to the special types. |
libc/src/__support/UInt.h | ||
---|---|---|
219 | Add an example of where this kind of multiplication will be useful. |
Can you add more commentary here explaining how this is different from operator*? IIUC, operator* returns the LS Bits of the result, while this is will return the MS Bits of the result with an additional condition that the LS-Bit of the result need not be the same as that in the MS Bits of the result produced by ful_mul.