[libc-commits] [PATCH] D150905: [libc] Use MPFR for strtofloat fuzzing
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu May 18 15:12:42 PDT 2023
lntue accepted this revision.
lntue added inline comments.
This revision is now accepted and ready to land.
================
Comment at: libc/src/__support/str_to_float.h:276
+ // Handle overflow in the middle
+ approx_upper += (approx_middle < approx_middle_a) ? UInt128(1) << 64 : 0;
----------------
Does replacing `UInt128(1) << 64` with `UInt128({0, 1})` work?
================
Comment at: libc/src/__support/str_to_float.h:282
UInt128 final_approx_lower =
approx_lower + (static_cast<UInt128>(low64(approx_middle)) << 64);
UInt128 final_approx_upper = approx_upper + high64(approx_middle) +
----------------
Does replacing `static_cast<UInt128>(low64(approx_middle)) << 64` with `UInt128({0, low64(approx_middle)})` work?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150905/new/
https://reviews.llvm.org/D150905
More information about the libc-commits
mailing list