summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/abseil-cpp-tstring/y_absl/numeric
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2022-08-31 10:58:13 +0300
committerthegeorg <[email protected]>2022-08-31 10:58:13 +0300
commitdb58955e8e90ba21f2d9b82fa9af131f40ff1c6f (patch)
tree09c50f24532f69bc07d3ff991cf581c76ef5482a /contrib/restricted/abseil-cpp-tstring/y_absl/numeric
parent665b832313a6f533823ec2187458f2b33a70b093 (diff)
Update contrib/restricted/abseil-cpp-tstring to 20220623.0
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/numeric')
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/numeric/bits.h3
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.cc6
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h4
3 files changed, 8 insertions, 5 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/bits.h b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/bits.h
index a4dcd71f7ac..75cd272d777 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/bits.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/bits.h
@@ -133,7 +133,8 @@ template <class T>
Y_ABSL_INTERNAL_CONSTEXPR_CLZ inline
typename std::enable_if<std::is_unsigned<T>::value, T>::type
bit_width(T x) noexcept {
- return std::numeric_limits<T>::digits - countl_zero(x);
+ return std::numeric_limits<T>::digits -
+ static_cast<unsigned int>(countl_zero(x));
}
// Returns: If x == 0, 0; otherwise the maximal value y such that
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.cc
index 90b7181c7b8..fe9d65cc63b 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.cc
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.cc
@@ -42,11 +42,11 @@ namespace {
// Returns: 2
inline Y_ABSL_ATTRIBUTE_ALWAYS_INLINE int Fls128(uint128 n) {
if (uint64_t hi = Uint128High64(n)) {
- Y_ABSL_INTERNAL_ASSUME(hi != 0);
+ Y_ABSL_ASSUME(hi != 0);
return 127 - countl_zero(hi);
}
const uint64_t low = Uint128Low64(n);
- Y_ABSL_INTERNAL_ASSUME(low != 0);
+ Y_ABSL_ASSUME(low != 0);
return 63 - countl_zero(low);
}
@@ -332,6 +332,7 @@ std::ostream& operator<<(std::ostream& os, int128 v) {
Y_ABSL_NAMESPACE_END
} // namespace y_absl
+#ifdef Y_ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
namespace std {
constexpr bool numeric_limits<y_absl::uint128>::is_specialized;
constexpr bool numeric_limits<y_absl::uint128>::is_signed;
@@ -381,3 +382,4 @@ constexpr int numeric_limits<y_absl::int128>::max_exponent10;
constexpr bool numeric_limits<y_absl::int128>::traps;
constexpr bool numeric_limits<y_absl::int128>::tinyness_before;
} // namespace std
+#endif
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
index ef5ff99c785..34c920a032f 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
@@ -44,7 +44,7 @@
// builtin type. We need to make sure not to define operator wchar_t()
// alongside operator unsigned short() in these instances.
#define Y_ABSL_INTERNAL_WCHAR_T __wchar_t
-#if defined(_M_X64)
+#if defined(_M_X64) && !defined(_M_ARM64EC)
#include <intrin.h>
#pragma intrinsic(_umul128)
#endif // defined(_M_X64)
@@ -980,7 +980,7 @@ inline uint128 operator*(uint128 lhs, uint128 rhs) {
// can be used for uint128 storage.
return static_cast<unsigned __int128>(lhs) *
static_cast<unsigned __int128>(rhs);
-#elif defined(_MSC_VER) && defined(_M_X64)
+#elif defined(_MSC_VER) && defined(_M_X64) && !defined(_M_ARM64EC)
uint64_t carry;
uint64_t low = _umul128(Uint128Low64(lhs), Uint128Low64(rhs), &carry);
return MakeUint128(Uint128Low64(lhs) * Uint128High64(rhs) +