Lines Matching refs:zSig

177 INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig )  in packFloat32()  argument
186 : "g" (f), "g" (zSign), "g" (zExp), "g" (zSig) in packFloat32()
190 return ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig; in packFloat32()
217 … float32 roundAndPackFloat32( struct roundingData *roundData, flag zSign, int16 zExp, bits32 zSig ) in roundAndPackFloat32() argument
241 roundBits = zSig & 0x7F; in roundAndPackFloat32()
245 && ( (sbits32) ( zSig + roundIncrement ) < 0 ) ) in roundAndPackFloat32()
254 || ( zSig + roundIncrement < 0x80000000 ); in roundAndPackFloat32()
255 shift32RightJamming( zSig, - zExp, &zSig ); in roundAndPackFloat32()
257 roundBits = zSig & 0x7F; in roundAndPackFloat32()
262 zSig = ( zSig + roundIncrement )>>7; in roundAndPackFloat32()
263 zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); in roundAndPackFloat32()
264 if ( zSig == 0 ) zExp = 0; in roundAndPackFloat32()
265 return packFloat32( zSign, zExp, zSig ); in roundAndPackFloat32()
280 normalizeRoundAndPackFloat32( struct roundingData *roundData, flag zSign, int16 zExp, bits32 zSig ) in normalizeRoundAndPackFloat32() argument
284 shiftCount = countLeadingZeros32( zSig ) - 1; in normalizeRoundAndPackFloat32()
285 return roundAndPackFloat32( roundData, zSign, zExp - shiftCount, zSig<<shiftCount ); in normalizeRoundAndPackFloat32()
358 INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig ) in packFloat64() argument
361 return ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<52 ) + zSig; in packFloat64()
388 … float64 roundAndPackFloat64( struct roundingData *roundData, flag zSign, int16 zExp, bits64 zSig ) in roundAndPackFloat64() argument
412 roundBits = zSig & 0x3FF; in roundAndPackFloat64()
416 && ( (sbits64) ( zSig + roundIncrement ) < 0 ) ) in roundAndPackFloat64()
427 || ( zSig + roundIncrement < LIT64( 0x8000000000000000 ) ); in roundAndPackFloat64()
428 shift64RightJamming( zSig, - zExp, &zSig ); in roundAndPackFloat64()
430 roundBits = zSig & 0x3FF; in roundAndPackFloat64()
435 zSig = ( zSig + roundIncrement )>>10; in roundAndPackFloat64()
436 zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven ); in roundAndPackFloat64()
437 if ( zSig == 0 ) zExp = 0; in roundAndPackFloat64()
438 return packFloat64( zSign, zExp, zSig ); in roundAndPackFloat64()
453 normalizeRoundAndPackFloat64( struct roundingData *roundData, flag zSign, int16 zExp, bits64 zSig ) in normalizeRoundAndPackFloat64() argument
457 shiftCount = countLeadingZeros64( zSig ) - 1; in normalizeRoundAndPackFloat64()
458 return roundAndPackFloat64( roundData, zSign, zExp - shiftCount, zSig<<shiftCount ); in normalizeRoundAndPackFloat64()
528 INLINE floatx80 packFloatx80( flag zSign, int32 zExp, bits64 zSig ) in packFloatx80() argument
532 z.low = zSig; in packFloatx80()
785 bits64 zSig; in int32_to_float64() local
791 zSig = absA; in int32_to_float64()
792 return packFloat64( aSign, 0x432 - shiftCount, zSig<<shiftCount ); in int32_to_float64()
811 bits64 zSig; in int32_to_floatx80() local
817 zSig = absA; in int32_to_floatx80()
818 return packFloatx80( zSign, 0x403E - shiftCount, zSig<<shiftCount ); in int32_to_floatx80()
840 bits64 zSig; in float32_to_int32() local
848 zSig = aSig; in float32_to_int32()
849 zSig <<= 32; in float32_to_int32()
850 if ( 0 < shiftCount ) shift64RightJamming( zSig, shiftCount, &zSig ); in float32_to_int32()
851 return roundAndPackInt32( roundData, aSign, zSig ); in float32_to_int32()
1032 bits32 aSig, bSig, zSig; in addFloat32Sigs() local
1076 zSig = 0x40000000 + aSig + bSig; in addFloat32Sigs()
1081 zSig = ( aSig + bSig )<<1; in addFloat32Sigs()
1083 if ( (sbits32) zSig < 0 ) { in addFloat32Sigs()
1084 zSig = aSig + bSig; in addFloat32Sigs()
1088 return roundAndPackFloat32( roundData, zSign, zExp, zSig ); in addFloat32Sigs()
1104 bits32 aSig, bSig, zSig; in subFloat32Sigs() local
1142 zSig = bSig - aSig; in subFloat32Sigs()
1160 zSig = aSig - bSig; in subFloat32Sigs()
1164 return normalizeRoundAndPackFloat32( roundData, zSign, zExp, zSig ); in subFloat32Sigs()
1225 bits32 zSig; in float32_mul() local
1264 zSig = zSig64; in float32_mul()
1265 if ( 0 <= (sbits32) ( zSig<<1 ) ) { in float32_mul()
1266 zSig <<= 1; in float32_mul()
1269 return roundAndPackFloat32( roundData, zSign, zExp, zSig ); in float32_mul()
1284 bits32 aSig, bSig, zSig; in float32_div() local
1331 zSig = tmp; in float32_div()
1333 if ( ( zSig & 0x3F ) == 0 ) { in float32_div()
1334 zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 ); in float32_div()
1336 return roundAndPackFloat32( roundData, zSign, zExp, zSig ); in float32_div()
1454 bits32 aSig, zSig; in float32_sqrt() local
1477 zSig = estimateSqrt32( aExp, aSig ) + 2; in float32_sqrt()
1478 if ( ( zSig & 0x7F ) <= 5 ) { in float32_sqrt()
1479 if ( zSig < 2 ) { in float32_sqrt()
1480 zSig = 0xFFFFFFFF; in float32_sqrt()
1484 term = ( (bits64) zSig ) * zSig; in float32_sqrt()
1487 --zSig; in float32_sqrt()
1488 rem += ( ( (bits64) zSig )<<1 ) | 1; in float32_sqrt()
1490 zSig |= ( rem != 0 ); in float32_sqrt()
1493 shift32RightJamming( zSig, 1, &zSig ); in float32_sqrt()
1494 return roundAndPackFloat32( roundData, 0, zExp, zSig ); in float32_sqrt()
1801 bits32 zSig; in float64_to_float32() local
1811 zSig = aSig; in float64_to_float32()
1812 if ( aExp || zSig ) { in float64_to_float32()
1813 zSig |= 0x40000000; in float64_to_float32()
1816 return roundAndPackFloat32( roundData, aSign, aExp, zSig ); in float64_to_float32()
1928 bits64 aSig, bSig, zSig; in addFloat64Sigs() local
1972 zSig = LIT64( 0x4000000000000000 ) + aSig + bSig; in addFloat64Sigs()
1977 zSig = ( aSig + bSig )<<1; in addFloat64Sigs()
1979 if ( (sbits64) zSig < 0 ) { in addFloat64Sigs()
1980 zSig = aSig + bSig; in addFloat64Sigs()
1984 return roundAndPackFloat64( roundData, zSign, zExp, zSig ); in addFloat64Sigs()
2000 bits64 aSig, bSig, zSig; in subFloat64Sigs() local
2038 zSig = bSig - aSig; in subFloat64Sigs()
2056 zSig = aSig - bSig; in subFloat64Sigs()
2060 return normalizeRoundAndPackFloat64( roundData, zSign, zExp, zSig ); in subFloat64Sigs()
2178 bits64 aSig, bSig, zSig; in float64_div() local
2224 zSig = estimateDiv128To64( aSig, 0, bSig ); in float64_div()
2225 if ( ( zSig & 0x1FF ) <= 2 ) { in float64_div()
2226 mul64To128( bSig, zSig, &term0, &term1 ); in float64_div()
2229 --zSig; in float64_div()
2232 zSig |= ( rem1 != 0 ); in float64_div()
2234 return roundAndPackFloat64( roundData, zSign, zExp, zSig ); in float64_div()
2335 bits64 aSig, zSig; in float64_sqrt() local
2359 zSig = estimateSqrt32( aExp, aSig>>21 ); in float64_sqrt()
2360 zSig <<= 31; in float64_sqrt()
2362 zSig = estimateDiv128To64( aSig, 0, zSig ) + zSig + 2; in float64_sqrt()
2363 if ( ( zSig & 0x3FF ) <= 5 ) { in float64_sqrt()
2364 if ( zSig < 2 ) { in float64_sqrt()
2365 zSig = LIT64( 0xFFFFFFFFFFFFFFFF ); in float64_sqrt()
2369 mul64To128( zSig, zSig, &term0, &term1 ); in float64_sqrt()
2372 --zSig; in float64_sqrt()
2373 shortShift128Left( 0, zSig, 1, &term0, &term1 ); in float64_sqrt()
2377 zSig |= ( ( rem0 | rem1 ) != 0 ); in float64_sqrt()
2380 shift64RightJamming( zSig, 1, &zSig ); in float64_sqrt()
2381 return roundAndPackFloat64( roundData, 0, zExp, zSig ); in float64_sqrt()
2645 bits64 aSig, zSig; in floatx80_to_float64() local
2656 shift64RightJamming( aSig, 1, &zSig ); in floatx80_to_float64()
2658 return roundAndPackFloat64( roundData, aSign, aExp, zSig ); in floatx80_to_float64()