[libc][math] Implement full multiplication and quick_mul_hi for UInt class.
authorTue Ly <lntue@google.com>
Wed, 23 Nov 2022 04:39:17 +0000 (23:39 -0500)
committerTue Ly <lntue@google.com>
Fri, 2 Dec 2022 22:53:38 +0000 (17:53 -0500)
commitb80f535879a371dde7541a72a6392a67b37da420
tree6cd7fdbd849a0a952219423a67f2344b3752674a
parent0c2b7fa8691e9d1f6c7dd656e44321ef8c84ae87
[libc][math] Implement full multiplication and quick_mul_hi for UInt class.

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.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138541
libc/src/__support/UInt.h
libc/test/src/__support/CMakeLists.txt
libc/test/src/__support/uint_test.cpp [moved from libc/test/src/__support/uint128_test.cpp with 85% similarity]
libc/utils/UnitTest/LibcTest.cpp