[libc] Fix float to string conversion in 32-bit systems
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
parent
37ef6407
Please register or sign in to comment