Abstracts the int128 type and provides an native version, if available, or a implements it using a pair of int64_t’s.
This is activated by setting the configuration flag --with-test-override-wide-multiply=int128_struct
.
The primary purpose of this PR is to take advantage of MSVC’s umulh intrinsic that we can use to simulate an int128 type which MSVC does not have (AFAIU). This PR lays out the groundwork for this level of MSVC support, but doesn’t include the configuration logic to enable it yet.
For completeness, and implementation of umulh
and mulh
are also provided for compilers that support neither the intrinsic nor the int128 type (such as CompCert?). This also opens up the possibility of removing the 32-bit field and scalar implementations should that ever be desired.