• Home
  • Raw
  • Download

Lines Matching refs:zSig

235 INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig )  in packFloat32()  argument
239 ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig); in packFloat32()
265 static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig STATUS_PARAM) in roundAndPackFloat32()
289 roundBits = zSig & 0x7F; in roundAndPackFloat32()
293 && ( (sbits32) ( zSig + roundIncrement ) < 0 ) ) in roundAndPackFloat32()
303 || ( zSig + roundIncrement < 0x80000000 ); in roundAndPackFloat32()
304 shift32RightJamming( zSig, - zExp, &zSig ); in roundAndPackFloat32()
306 roundBits = zSig & 0x7F; in roundAndPackFloat32()
311 zSig = ( zSig + roundIncrement )>>7; in roundAndPackFloat32()
312 zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); in roundAndPackFloat32()
313 if ( zSig == 0 ) zExp = 0; in roundAndPackFloat32()
314 return packFloat32( zSign, zExp, zSig ); in roundAndPackFloat32()
328 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig STATUS_PARAM) in normalizeRoundAndPackFloat32()
332 shiftCount = countLeadingZeros32( zSig ) - 1; in normalizeRoundAndPackFloat32()
333 return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount STATUS_VAR); in normalizeRoundAndPackFloat32()
399 INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig ) in packFloat64() argument
403 ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<52 ) + zSig); in packFloat64()
429 static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig STATUS_PARAM) in roundAndPackFloat64()
453 roundBits = zSig & 0x3FF; in roundAndPackFloat64()
457 && ( (sbits64) ( zSig + roundIncrement ) < 0 ) ) in roundAndPackFloat64()
467 || ( zSig + roundIncrement < LIT64( 0x8000000000000000 ) ); in roundAndPackFloat64()
468 shift64RightJamming( zSig, - zExp, &zSig ); in roundAndPackFloat64()
470 roundBits = zSig & 0x3FF; in roundAndPackFloat64()
475 zSig = ( zSig + roundIncrement )>>10; in roundAndPackFloat64()
476 zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven ); in roundAndPackFloat64()
477 if ( zSig == 0 ) zExp = 0; in roundAndPackFloat64()
478 return packFloat64( zSign, zExp, zSig ); in roundAndPackFloat64()
492 normalizeRoundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig STATUS_PARAM) in normalizeRoundAndPackFloat64()
496 shiftCount = countLeadingZeros64( zSig ) - 1; in normalizeRoundAndPackFloat64()
497 return roundAndPackFloat64( zSign, zExp - shiftCount, zSig<<shiftCount STATUS_VAR); in normalizeRoundAndPackFloat64()
562 INLINE floatx80 packFloatx80( flag zSign, int32 zExp, bits64 zSig ) in packFloatx80() argument
566 z.low = zSig; in packFloatx80()
1079 bits64 zSig; in int32_to_float64() local
1085 zSig = absA; in int32_to_float64()
1086 return packFloat64( zSign, 0x432 - shiftCount, zSig<<shiftCount ); in int32_to_float64()
1104 bits64 zSig; in int32_to_floatx80() local
1110 zSig = absA; in int32_to_floatx80()
1111 return packFloatx80( zSign, 0x403E - shiftCount, zSig<<shiftCount ); in int32_to_floatx80()
1603 bits32 aSig, bSig, zSig; in addFloat32Sigs() local
1650 zSig = 0x40000000 + aSig + bSig; in addFloat32Sigs()
1655 zSig = ( aSig + bSig )<<1; in addFloat32Sigs()
1657 if ( (sbits32) zSig < 0 ) { in addFloat32Sigs()
1658 zSig = aSig + bSig; in addFloat32Sigs()
1662 return roundAndPackFloat32( zSign, zExp, zSig STATUS_VAR ); in addFloat32Sigs()
1677 bits32 aSig, bSig, zSig; in subFloat32Sigs() local
1715 zSig = bSig - aSig; in subFloat32Sigs()
1733 zSig = aSig - bSig; in subFloat32Sigs()
1737 return normalizeRoundAndPackFloat32( zSign, zExp, zSig STATUS_VAR ); in subFloat32Sigs()
1795 bits32 zSig; in float32_mul() local
1834 zSig = zSig64; in float32_mul()
1835 if ( 0 <= (sbits32) ( zSig<<1 ) ) { in float32_mul()
1836 zSig <<= 1; in float32_mul()
1839 return roundAndPackFloat32( zSign, zExp, zSig STATUS_VAR ); in float32_mul()
1853 bits32 aSig, bSig, zSig; in float32_div() local
1897 zSig = ( ( (bits64) aSig )<<32 ) / bSig; in float32_div()
1898 if ( ( zSig & 0x3F ) == 0 ) { in float32_div()
1899 zSig |= ( (bits64) bSig * zSig != ( (bits64) aSig )<<32 ); in float32_div()
1901 return roundAndPackFloat32( zSign, zExp, zSig STATUS_VAR ); in float32_div()
2015 bits32 aSig, zSig; in float32_sqrt() local
2038 zSig = estimateSqrt32( aExp, aSig ) + 2; in float32_sqrt()
2039 if ( ( zSig & 0x7F ) <= 5 ) { in float32_sqrt()
2040 if ( zSig < 2 ) { in float32_sqrt()
2041 zSig = 0x7FFFFFFF; in float32_sqrt()
2045 term = ( (bits64) zSig ) * zSig; in float32_sqrt()
2048 --zSig; in float32_sqrt()
2049 rem += ( ( (bits64) zSig )<<1 ) | 1; in float32_sqrt()
2051 zSig |= ( rem != 0 ); in float32_sqrt()
2053 shift32RightJamming( zSig, 1, &zSig ); in float32_sqrt()
2055 return roundAndPackFloat32( 0, zExp, zSig STATUS_VAR ); in float32_sqrt()
2068 bits32 aSig, zSig, i; in float32_log2() local
2090 zSig = aExp << 23; in float32_log2()
2096 zSig |= i; in float32_log2()
2101 zSig = -zSig; in float32_log2()
2103 return normalizeRoundAndPackFloat32( zSign, 0x85, zSig STATUS_VAR ); in float32_log2()
2441 bits32 zSig; in float64_to_float32() local
2451 zSig = aSig; in float64_to_float32()
2452 if ( aExp || zSig ) { in float64_to_float32()
2453 zSig |= 0x40000000; in float64_to_float32()
2456 return roundAndPackFloat32( aSign, aExp, zSig STATUS_VAR ); in float64_to_float32()
2471 static bits16 packFloat16(flag zSign, int16 zExp, bits16 zSig) in packFloat16() argument
2473 return (((bits32)zSign) << 15) + (((bits32)zExp) << 10) + zSig; in packFloat16()
2749 bits64 aSig, bSig, zSig; in addFloat64Sigs() local
2796 zSig = LIT64( 0x4000000000000000 ) + aSig + bSig; in addFloat64Sigs()
2801 zSig = ( aSig + bSig )<<1; in addFloat64Sigs()
2803 if ( (sbits64) zSig < 0 ) { in addFloat64Sigs()
2804 zSig = aSig + bSig; in addFloat64Sigs()
2808 return roundAndPackFloat64( zSign, zExp, zSig STATUS_VAR ); in addFloat64Sigs()
2823 bits64 aSig, bSig, zSig; in subFloat64Sigs() local
2861 zSig = bSig - aSig; in subFloat64Sigs()
2879 zSig = aSig - bSig; in subFloat64Sigs()
2883 return normalizeRoundAndPackFloat64( zSign, zExp, zSig STATUS_VAR ); in subFloat64Sigs()
2997 bits64 aSig, bSig, zSig; in float64_div() local
3043 zSig = estimateDiv128To64( aSig, 0, bSig ); in float64_div()
3044 if ( ( zSig & 0x1FF ) <= 2 ) { in float64_div()
3045 mul64To128( bSig, zSig, &term0, &term1 ); in float64_div()
3048 --zSig; in float64_div()
3051 zSig |= ( rem1 != 0 ); in float64_div()
3053 return roundAndPackFloat64( zSign, zExp, zSig STATUS_VAR ); in float64_div()
3152 bits64 aSig, zSig, doubleZSig; in float64_sqrt() local
3175 zSig = estimateSqrt32( aExp, aSig>>21 ); in float64_sqrt()
3177 zSig = estimateDiv128To64( aSig, 0, zSig<<32 ) + ( zSig<<30 ); in float64_sqrt()
3178 if ( ( zSig & 0x1FF ) <= 5 ) { in float64_sqrt()
3179 doubleZSig = zSig<<1; in float64_sqrt()
3180 mul64To128( zSig, zSig, &term0, &term1 ); in float64_sqrt()
3183 --zSig; in float64_sqrt()
3185 add128( rem0, rem1, zSig>>63, doubleZSig | 1, &rem0, &rem1 ); in float64_sqrt()
3187 zSig |= ( ( rem0 | rem1 ) != 0 ); in float64_sqrt()
3189 return roundAndPackFloat64( 0, zExp, zSig STATUS_VAR ); in float64_sqrt()
3202 bits64 aSig, aSig0, aSig1, zSig, i; in float64_log2() local
3224 zSig = (bits64)aExp << 52; in float64_log2()
3230 zSig |= i; in float64_log2()
3235 zSig = -zSig; in float64_log2()
3236 return normalizeRoundAndPackFloat64( zSign, 0x408, zSig STATUS_VAR ); in float64_log2()
3594 bits64 aSig, zSig; in floatx80_to_float64() local
3605 shift64RightJamming( aSig, 1, &zSig ); in floatx80_to_float64()
3607 return roundAndPackFloat64( aSign, aExp, zSig STATUS_VAR ); in floatx80_to_float64()
4586 bits32 zSig; in float128_to_float32() local
4600 zSig = aSig0; in float128_to_float32()
4601 if ( aExp || zSig ) { in float128_to_float32()
4602 zSig |= 0x40000000; in float128_to_float32()
4605 return roundAndPackFloat32( aSign, aExp, zSig STATUS_VAR ); in float128_to_float32()