mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 03:56:08 +00:00

In 32-bit systems, sizeof(size_t) is 4, so we fail to build an 128-bit integer in mul_shift_mod_1e9, which ends up ignoring the top bits in the mantissa. This patch fixes the issue by calling the Uint constructor directly. If it's a system that supports 128-bit integers, the constructor that takes a value will be called, if the system doesn't support 128-bit integers (like rv32), mantissa is already a UInt. Reviewed By: lntue, michaelrj Differential Revision: https://reviews.llvm.org/D156813
LLVM libc ========= This directory and its subdirectories contain source code for llvm-libc, a retargetable implementation of the C standard library. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.