[all-commits] [llvm/llvm-project] 18da0c: [libc] clean up FPUtil long doubles

michaelrj-google via All-commits all-commits at lists.llvm.org
Thu Nov 11 10:17:51 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18da0c0a287707b2f80880c14d77e4f071aae88d
      https://github.com/llvm/llvm-project/commit/18da0c0a287707b2f80880c14d77e4f071aae88d
  Author: Michael Jones <michaelrj at google.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M libc/src/__support/FPUtil/FloatProperties.h
    M libc/src/__support/FPUtil/LongDoubleBitsX86.h

  Log Message:
  -----------
  [libc] clean up FPUtil long doubles

Add quietNaNMask consts to FloatProperties and make LongDoubleBitsX86
clear the extra bits that aren't set when initializing with an 80 bit
long double.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D113625


  Commit: 4cdf9884b60de758243c85a6ac1f94aa975fd10d
      https://github.com/llvm/llvm-project/commit/4cdf9884b60de758243c85a6ac1f94aa975fd10d
  Author: Michael Jones <michaelrj at google.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M libc/src/__support/str_to_float.h
    M libc/test/src/__support/str_to_float_test.cpp
    M libc/test/src/stdlib/strtof_test.cpp

  Log Message:
  -----------
  [libc] tweak strtof errno behavior

When strtof/d/ld return a subnormal number they may set errno to
ERANGE. This change makes this behavior more consistent by making any
decimal number converting to a subnormal set errno to ERANGE. This
brings it in line with hexadecimals, which currently only set errno to
ERANGE if the number is truncated when converting to a subnormal.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D113626


Compare: https://github.com/llvm/llvm-project/compare/420ad7ce7d5a...4cdf9884b60d


More information about the All-commits mailing list