• Home
  • Raw
  • Download

Lines Matching +full:8 +full:- +full:bit

2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
24 #define panda_bit_utils_ctz __builtin_ctz // NOLINT(cppcoreguidelines-macro-usage)
25 #define panda_bit_utils_ctzll __builtin_ctzll // NOLINT(cppcoreguidelines-macro-usage)
55 … // -0.0(double) is the special case for std::atanh() function compiled in linux for windows. in Atanh()
56 return -0.0; in Atanh()
66 // Ensure the size of the integer is no more than 8 bytes (64 bits). in WhichPowerOfTwo()
67 static_assert(sizeof(T) <= 8); in WhichPowerOfTwo()
68 // Use __builtin_ctzll for 8 bytes (64 bits) and __builtin_ctz for 32-bit integers. in WhichPowerOfTwo()
69 …return sizeof(T) == 8 ? __builtin_ctzll(static_cast<uint64_t>(value)) : __builtin_ctz(static_cast<… in WhichPowerOfTwo()
78 if (rhs == -1) { in SignedDiv32()
79 return lhs == std::numeric_limits<int32_t>::min() ? lhs : -lhs; in SignedDiv32()
89 if (rhs == -1) { in SignedDiv64()
90 return lhs == std::numeric_limits<int64_t>::min() ? lhs : -lhs; in SignedDiv64()
97 if (rhs == 0 || rhs == -1) { in SignedMod32()
108 // Check for overflow by examining the sign bit.(bit 31 in a 32-bit integer) in SignedAddOverflow32()
115 uint32_t res = static_cast<uint32_t>(lhs) - static_cast<uint32_t>(rhs); in SignedSubOverflow32()
117 // Check for overflow by examining the sign bit.(bit 31 in a 32-bit integer) in SignedSubOverflow32()
143 return -std::numeric_limits<T>::infinity(); in Divide()
167 UnsignedType result = aUnsigned - bUnsigned; in SubWithWraparound()
187 const UnsignedType kMask = (sizeof(a) * 8) - 1; in ShlWithWraparound()
199 return -a; in NegateWithWraparound()