Lines Matching refs:zSig
77 float64 packFloat64(flag zSign, int16 zExp, bits64 zSig);
79 float32 packFloat32(flag zSign, int16 zExp, bits32 zSig);
99 bits64 zSig);
102 static float32 roundAndPackFloat32(flag zSign, int16 zExp, bits32 zSig);
104 bits32 zSig);
105 static float64 roundAndPackFloat64(flag zSign, int16 zExp, bits64 zSig);
144 float64 packFloat64(flag zSign, int16 zExp, bits64 zSig) in packFloat64() argument
146 return (((bits64) zSign) << 63) + (((bits64) zExp) << 52) + zSig; in packFloat64()
214 static float64 normalizeRoundAndPackFloat64(flag zSign, int16 zExp, bits64 zSig) in normalizeRoundAndPackFloat64() argument
218 shiftCount = countLeadingZeros64(zSig) - 1; in normalizeRoundAndPackFloat64()
220 zSig << shiftCount); in normalizeRoundAndPackFloat64()
227 bits64 aSig, bSig, zSig; in subFloat64Sigs() local
262 zSig = bSig - aSig; in subFloat64Sigs()
278 zSig = aSig - bSig; in subFloat64Sigs()
282 return normalizeRoundAndPackFloat64(zSign, zExp, zSig); in subFloat64Sigs()
288 bits64 aSig, bSig, zSig; in addFloat64Sigs() local
326 zSig = LIT64(0x4000000000000000) + aSig + bSig; in addFloat64Sigs()
331 zSig = (aSig + bSig) << 1; in addFloat64Sigs()
333 if ((sbits64) zSig < 0) { in addFloat64Sigs()
334 zSig = aSig + bSig; in addFloat64Sigs()
338 return roundAndPackFloat64(zSign, zExp, zSig); in addFloat64Sigs()
342 float32 packFloat32(flag zSign, int16 zExp, bits32 zSig) in packFloat32() argument
344 return (((bits32) zSign) << 31) + (((bits32) zExp) << 23) + zSig; in packFloat32()
360 static float32 roundAndPackFloat32(flag zSign, int16 zExp, bits32 zSig) in roundAndPackFloat32() argument
372 roundBits = zSig & 0x7F; in roundAndPackFloat32()
376 && ((sbits32) (zSig + roundIncrement) < 0)) in roundAndPackFloat32()
384 || (zSig + roundIncrement < 0x80000000); in roundAndPackFloat32()
385 shift32RightJamming(zSig, -zExp, &zSig); in roundAndPackFloat32()
387 roundBits = zSig & 0x7F; in roundAndPackFloat32()
394 zSig = (zSig + roundIncrement) >> 7; in roundAndPackFloat32()
395 zSig &= ~(((roundBits ^ 0x40) == 0) & roundNearestEven); in roundAndPackFloat32()
396 if (zSig == 0) in roundAndPackFloat32()
398 return packFloat32(zSign, zExp, zSig); in roundAndPackFloat32()
402 static float32 normalizeRoundAndPackFloat32(flag zSign, int16 zExp, bits32 zSig) in normalizeRoundAndPackFloat32() argument
406 shiftCount = countLeadingZeros32(zSig) - 1; in normalizeRoundAndPackFloat32()
408 zSig << shiftCount); in normalizeRoundAndPackFloat32()
411 static float64 roundAndPackFloat64(flag zSign, int16 zExp, bits64 zSig) in roundAndPackFloat64() argument
423 roundBits = zSig & 0x3FF; in roundAndPackFloat64()
427 && ((sbits64) (zSig + roundIncrement) < 0)) in roundAndPackFloat64()
435 || (zSig + roundIncrement < in roundAndPackFloat64()
437 shift64RightJamming(zSig, -zExp, &zSig); in roundAndPackFloat64()
439 roundBits = zSig & 0x3FF; in roundAndPackFloat64()
446 zSig = (zSig + roundIncrement) >> 10; in roundAndPackFloat64()
447 zSig &= ~(((roundBits ^ 0x200) == 0) & roundNearestEven); in roundAndPackFloat64()
448 if (zSig == 0) in roundAndPackFloat64()
450 return packFloat64(zSign, zExp, zSig); in roundAndPackFloat64()
457 bits32 aSig, bSig, zSig; in subFloat32Sigs() local
492 zSig = bSig - aSig; in subFloat32Sigs()
508 zSig = aSig - bSig; in subFloat32Sigs()
512 return normalizeRoundAndPackFloat32(zSign, zExp, zSig); in subFloat32Sigs()
519 bits32 aSig, bSig, zSig; in addFloat32Sigs() local
557 zSig = 0x40000000 + aSig + bSig; in addFloat32Sigs()
562 zSig = (aSig + bSig) << 1; in addFloat32Sigs()
564 if ((sbits32) zSig < 0) { in addFloat32Sigs()
565 zSig = aSig + bSig; in addFloat32Sigs()
569 return roundAndPackFloat32(zSign, zExp, zSig); in addFloat32Sigs()
720 bits64 aSig, bSig, zSig; in float64_div() local
760 zSig = estimateDiv128To64(aSig, 0, bSig); in float64_div()
761 if ((zSig & 0x1FF) <= 2) { in float64_div()
762 mul64To128(bSig, zSig, &term0, &term1); in float64_div()
765 --zSig; in float64_div()
768 zSig |= (rem1 != 0); in float64_div()
770 return roundAndPackFloat64(zSign, zExp, zSig); in float64_div()
779 uint64_t zSig; in float32_div() local
814 zSig = (((bits64) aSig) << 32); in float32_div()
815 do_div(zSig, bSig); in float32_div()
817 if ((zSig & 0x3F) == 0) { in float32_div()
818 zSig |= (((bits64) bSig) * zSig != ((bits64) aSig) << 32); in float32_div()
820 return roundAndPackFloat32(zSign, zExp, (bits32)zSig); in float32_div()
830 unsigned int zSig; in float32_mul() local
856 zSig = zSig64; in float32_mul()
857 if (0 <= (signed int)(zSig << 1)) { in float32_mul()
858 zSig <<= 1; in float32_mul()
861 return roundAndPackFloat32(zSign, zExp, zSig); in float32_mul()
917 bits32 zSig; in float64_to_float32() local
924 zSig = aSig; in float64_to_float32()
925 if ( aExp || zSig ) { in float64_to_float32()
926 zSig |= 0x40000000; in float64_to_float32()
929 return roundAndPackFloat32(aSign, aExp, zSig); in float64_to_float32()