mirror of
https://github.com/boostorg/charconv.git
synced 2026-02-09 11:02:30 +00:00
Fix _umul128 pointer type
This commit is contained in:
@@ -792,9 +792,9 @@ BOOST_CHARCONV_SAFEBUFFERS inline uint128 umul128(std::uint64_t x, std::uint64_t
|
||||
|
||||
#elif defined(BOOST_CHARCONV_HAS_MSVC_64BIT_INTRINSICS)
|
||||
|
||||
std::uint64_t high;
|
||||
unsigned long long high;
|
||||
std::uint64_t low = _umul128(x, y, &high);
|
||||
return {high, low};
|
||||
return {static_cast<std::uint64_t>(high), low};
|
||||
|
||||
// https://developer.arm.com/documentation/dui0802/a/A64-General-Instructions/UMULH
|
||||
#elif defined(__arm__)
|
||||
|
||||
@@ -250,7 +250,9 @@ value128 full_multiplication(uint64_t a, uint64_t b) {
|
||||
answer.high = __umulh(a, b);
|
||||
answer.low = a * b;
|
||||
#elif defined(BOOST_CHARCONV_FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__))
|
||||
answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64
|
||||
unsigned long long high;
|
||||
answer.low = _umul128(a, b, &high); // _umul128 not available on ARM64
|
||||
answer.high = static_cast<uint64_t>(high);
|
||||
#elif defined(BOOST_CHARCONV_FASTFLOAT_64BIT)
|
||||
__uint128_t r = ((__uint128_t)a) * b;
|
||||
answer.low = uint64_t(r);
|
||||
|
||||
Reference in New Issue
Block a user