Skip to content

Commit

Permalink
<xcharconv_ryu.h>: __umulh is already an intrinsic for `_M_HYBRID…
Browse files Browse the repository at this point in the history
…_X86_ARM64` (microsoft#4330)
  • Loading branch information
StephanTLavavej authored Jan 19, 2024
1 parent 0cb9eb4 commit 442029c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stl/inc/xcharconv_ryu.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ _NODISCARD inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64

#ifndef _WIN64

#if !defined(_M_HYBRID_X86_ARM64)
// Returns the high 64 bits of the 128-bit product of __a and __b.
_NODISCARD inline uint64_t __umulh(const uint64_t __a, const uint64_t __b) {
// Reuse the __ryu_umul128 implementation.
Expand All @@ -220,6 +221,7 @@ _NODISCARD inline uint64_t __umulh(const uint64_t __a, const uint64_t __b) {
(void) __ryu_umul128(__a, __b, &__hi);
return __hi;
}
#endif // ^^^ !defined(_M_HYBRID_X86_ARM64) ^^^

// On 32-bit platforms, compilers typically generate calls to library
// functions for 64-bit divisions, even if the divisor is a constant.
Expand Down

0 comments on commit 442029c

Please sign in to comment.