[libc-commits] [PATCH] D105561: [libc] Creating a struct that captures floating point encoding and manually arranges it sequentially in memory
Arthur Eubanks via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jul 8 14:32:27 PDT 2021
aeubanks added inline comments.
================
Comment at: libc/utils/FPUtil/FPBits.h:117
+ return uint16_t((valueFP & FloatProp::exponentMask) >>
+ (FloatProp::bitWidth - 1 - FloatProp::exponentWidth));
+ }
----------------
hedingarcia wrote:
> aeubanks wrote:
> > this is very confusing, can we just use `mantissaWidth`?
> The reason why we cannot use mantissaWidth is because in the 80-bit long double implementation the value for that field is 63 instead of 64. An explicit bit is considered in the 63 bit as the integer part of the significand (https://en.wikipedia.org/wiki/Extended_precision ). This exception leads to that long expression in getExponent(), because with only the value of mantissaWidth the shift will still require to move one bit in order to return all the bits of the exponent.
I thought that only applied to the version in LongDoubleBitsX86
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105561/new/
https://reviews.llvm.org/D105561
More information about the libc-commits
mailing list