scanon added inline comments.

================
Comment at: lib/builtins/floatuntitf.c:73
+    long_double_bits fb;
+    fb.u.high.all = (du_int)(e + 16383) << 48            /* exponent */
+                  | ((a >> 64) & 0x0000ffffffffffffLL);  /* mantissa */
----------------
mgorny wrote:
> rengolin wrote:
> > rengolin wrote:
> > > mgorny wrote:
> > > > rengolin wrote:
> > > > > nit: an hexadecimal pattern here would be clearer. same above.
> > > > Do you mean something like: `(foo << 48) & 0xffff....`?
> > > No, just the `16383` to `0x3FFF`
> > Though, now I think your proposal may be better. :)
> > 
> > Whatever works, I'm not too concerned about that.
> Well, I used the decimal form because that's how the IEEE 754 standard 
> specifies it, so I guessed the correlation would be clearer that way.
FWIW, I think both are pretty obvious, but if you want to be totally explicit:

    const int bias = 0x3fff;
    ... (e + bias) ...


https://reviews.llvm.org/D27898



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to