[libc-commits] [PATCH] D105561: [libc] Capture floating point encoding and arrange it sequentially in memory with structs

Arthur Eubanks via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 9 08:34:55 PDT 2021


aeubanks added a comment.

mostly looks good



================
Comment at: libc/utils/FPUtil/FPBits.h:50
   // type is provided for such reinterpretations.
   using UIntType = typename FPUIntType<T>::Type;
 
----------------
`FloatProp::BitsType` seems more consistent (you can move the `using FloatProp` here)


================
Comment at: libc/utils/FPUtil/FPBits.h:63
+    void setMantissa(UIntType mantVal) {
+      mantVal &= (FloatProp::mantissaMask);
+      assert((mantVal & ~(FloatProp::mantissaMask)) == 0);
----------------
the next assert will never fail with this line (same for setExponent())


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