[llvm-commits] [compiler-rt] r107409 - /compiler-rt/trunk/lib/truncdfsf2.c
Stephen Canon
scanon at apple.com
Thu Jul 1 11:02:15 PDT 2010
Author: scanon
Date: Thu Jul 1 13:02:15 2010
New Revision: 107409
URL: http://llvm.org/viewvc/llvm-project?rev=107409&view=rev
Log:
... and one more fix to remove some warnings in the new double -> float conversion
Modified:
compiler-rt/trunk/lib/truncdfsf2.c
Modified: compiler-rt/trunk/lib/truncdfsf2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/truncdfsf2.c?rev=107409&r1=107408&r2=107409&view=diff
==============================================================================
--- compiler-rt/trunk/lib/truncdfsf2.c (original)
+++ compiler-rt/trunk/lib/truncdfsf2.c Thu Jul 1 13:02:15 2010
@@ -76,12 +76,10 @@
const int srcExpBias = srcInfExp >> 1;
const src_rep_t srcMinNormal = SRC_REP_C(1) << srcSigBits;
- const src_rep_t srcSignificandMask = srcMinNormal - 1;
+ const src_rep_t significandMask = srcMinNormal - 1;
const src_rep_t srcInfinity = (src_rep_t)srcInfExp << srcSigBits;
const src_rep_t srcSignMask = SRC_REP_C(1) << (srcSigBits + srcExpBits);
const src_rep_t srcAbsMask = srcSignMask - 1;
- const src_rep_t srcQNaN = SRC_REP_C(1) << (srcSigBits - 1);
- const src_rep_t srcNaNCode = srcQNaN - 1;
const src_rep_t roundMask = (SRC_REP_C(1) << (srcSigBits - dstSigBits)) - 1;
const src_rep_t halfway = SRC_REP_C(1) << (srcSigBits - dstSigBits - 1);
@@ -143,7 +141,7 @@
const int aExp = aAbs >> srcSigBits;
const int shift = srcExpBias - dstExpBias - aExp + 1;
- const src_rep_t significand = aRep & srcSignificandMask | srcMinNormal;
+ const src_rep_t significand = (aRep & significandMask) | srcMinNormal;
// Right shift by the denormalization amount with sticky.
if (shift > srcSigBits) {
More information about the llvm-commits
mailing list