forked from OSchip/llvm-project
[libc][math] Fix broken aarch64 due to clz refactoring.
This commit is contained in:
parent
243fc3daf6
commit
349fee08d5
|
@ -51,8 +51,8 @@ inline void normalize<long double>(int &exponent, uint64_t &mantissa) {
|
|||
template <>
|
||||
inline void normalize<long double>(int &exponent, UInt128 &mantissa) {
|
||||
const uint64_t hi_bits = static_cast<uint64_t>(mantissa >> 64);
|
||||
const int shift = hi_bits ? (clz(hi_bits) - 15)
|
||||
: (clz(static_cast<uint64_t>(mantissa)) + 49);
|
||||
const int shift = hi_bits ? (unsafe_clz(hi_bits) - 15)
|
||||
: (unsafe_clz(static_cast<uint64_t>(mantissa)) + 49);
|
||||
exponent -= shift;
|
||||
mantissa <<= shift;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue