Lines Matching refs:zSig0
598 int8 roundingPrecision, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 in roundAndPackFloatx80() argument
619 zSig0 |= ( zSig1 != 0 ); in roundAndPackFloatx80()
634 roundBits = zSig0 & roundMask; in roundAndPackFloatx80()
637 || ( ( zExp == 0x7FFE ) && ( zSig0 + roundIncrement < zSig0 ) ) in roundAndPackFloatx80()
646 || ( zSig0 <= zSig0 + roundIncrement ); in roundAndPackFloatx80()
647 shift64RightJamming( zSig0, 1 - zExp, &zSig0 ); in roundAndPackFloatx80()
649 roundBits = zSig0 & roundMask; in roundAndPackFloatx80()
652 zSig0 += roundIncrement; in roundAndPackFloatx80()
653 if ( (sbits64) zSig0 < 0 ) zExp = 1; in roundAndPackFloatx80()
658 zSig0 &= ~ roundMask; in roundAndPackFloatx80()
659 return packFloatx80( zSign, zExp, zSig0 ); in roundAndPackFloatx80()
663 zSig0 += roundIncrement; in roundAndPackFloatx80()
664 if ( zSig0 < roundIncrement ) { in roundAndPackFloatx80()
666 zSig0 = LIT64( 0x8000000000000000 ); in roundAndPackFloatx80()
672 zSig0 &= ~ roundMask; in roundAndPackFloatx80()
673 if ( zSig0 == 0 ) zExp = 0; in roundAndPackFloatx80()
674 return packFloatx80( zSign, zExp, zSig0 ); in roundAndPackFloatx80()
693 && ( zSig0 == LIT64( 0xFFFFFFFFFFFFFFFF ) ) in roundAndPackFloatx80()
713 || ( zSig0 < LIT64( 0xFFFFFFFFFFFFFFFF ) ); in roundAndPackFloatx80()
714 shift64ExtraRightJamming( zSig0, zSig1, 1 - zExp, &zSig0, &zSig1 ); in roundAndPackFloatx80()
730 ++zSig0; in roundAndPackFloatx80()
731 zSig0 &= in roundAndPackFloatx80()
733 if ( (sbits64) zSig0 < 0 ) zExp = 1; in roundAndPackFloatx80()
735 return packFloatx80( zSign, zExp, zSig0 ); in roundAndPackFloatx80()
740 ++zSig0; in roundAndPackFloatx80()
741 if ( zSig0 == 0 ) { in roundAndPackFloatx80()
743 zSig0 = LIT64( 0x8000000000000000 ); in roundAndPackFloatx80()
746 zSig0 &= ~ ( ( (bits64) ( zSig1<<1 ) == 0 ) & roundNearestEven ); in roundAndPackFloatx80()
750 if ( zSig0 == 0 ) zExp = 0; in roundAndPackFloatx80()
752 return packFloatx80( zSign, zExp, zSig0 ); in roundAndPackFloatx80()
767 int8 roundingPrecision, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 in normalizeRoundAndPackFloatx80() argument
772 if ( zSig0 == 0 ) { in normalizeRoundAndPackFloatx80()
773 zSig0 = zSig1; in normalizeRoundAndPackFloatx80()
777 shiftCount = countLeadingZeros64( zSig0 ); in normalizeRoundAndPackFloatx80()
778 shortShift128Left( zSig0, zSig1, shiftCount, &zSig0, &zSig1 ); in normalizeRoundAndPackFloatx80()
781 roundAndPackFloatx80( roundingPrecision, zSign, zExp, zSig0, zSig1 STATUS_VAR); in normalizeRoundAndPackFloatx80()
891 packFloat128( flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 ) in packFloat128() argument
896 z.high = ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<48 ) + zSig0; in packFloat128()
924 flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1, bits64 zSig2 STATUS_PARAM) in roundAndPackFloat128() argument
951 zSig0, in roundAndPackFloat128()
979 zSig0, in roundAndPackFloat128()
985 zSig0, zSig1, zSig2, - zExp, &zSig0, &zSig1, &zSig2 ); in roundAndPackFloat128()
1003 add128( zSig0, zSig1, 0, 1, &zSig0, &zSig1 ); in roundAndPackFloat128()
1007 if ( ( zSig0 | zSig1 ) == 0 ) zExp = 0; in roundAndPackFloat128()
1009 return packFloat128( zSign, zExp, zSig0, zSig1 ); in roundAndPackFloat128()
1025 flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 STATUS_PARAM) in normalizeRoundAndPackFloat128() argument
1030 if ( zSig0 == 0 ) { in normalizeRoundAndPackFloat128()
1031 zSig0 = zSig1; in normalizeRoundAndPackFloat128()
1035 shiftCount = countLeadingZeros64( zSig0 ) - 15; in normalizeRoundAndPackFloat128()
1038 shortShift128Left( zSig0, zSig1, shiftCount, &zSig0, &zSig1 ); in normalizeRoundAndPackFloat128()
1042 zSig0, zSig1, 0, - shiftCount, &zSig0, &zSig1, &zSig2 ); in normalizeRoundAndPackFloat128()
1045 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 STATUS_VAR); in normalizeRoundAndPackFloat128()
1130 bits64 zSig0; in int32_to_float128() local
1136 zSig0 = absA; in int32_to_float128()
1137 return packFloat128( zSign, 0x402E - shiftCount, zSig0<<shiftCount, 0 ); in int32_to_float128()
1261 bits64 zSig0, zSig1; in int64_to_float128() local
1270 zSig0 = absA; in int64_to_float128()
1275 zSig0 = 0; in int64_to_float128()
1277 shortShift128Left( zSig0, zSig1, shiftCount, &zSig0, &zSig1 ); in int64_to_float128()
1278 return packFloat128( zSign, zExp, zSig0, zSig1 ); in int64_to_float128()
2645 bits64 aSig, zSig0, zSig1; in float64_to_float128() local
2659 shift128Right( aSig, 0, 4, &zSig0, &zSig1 ); in float64_to_float128()
2660 return packFloat128( aSign, aExp + 0x3C00, zSig0, zSig1 ); in float64_to_float128()
2939 bits64 aSig, bSig, zSig0, zSig1; in float64_mul() local
2977 mul64To128( aSig, bSig, &zSig0, &zSig1 ); in float64_mul()
2978 zSig0 |= ( zSig1 != 0 ); in float64_mul()
2979 if ( 0 <= (sbits64) ( zSig0<<1 ) ) { in float64_mul()
2980 zSig0 <<= 1; in float64_mul()
2983 return roundAndPackFloat64( zSign, zExp, zSig0 STATUS_VAR ); in float64_mul()
3624 bits64 aSig, zSig0, zSig1; in floatx80_to_float128() local
3632 shift128Right( aSig<<1, 0, 16, &zSig0, &zSig1 ); in floatx80_to_float128()
3633 return packFloat128( aSign, aExp, zSig0, zSig1 ); in floatx80_to_float128()
3723 bits64 aSig, bSig, zSig0, zSig1; in addFloatx80Sigs() local
3757 zSig0 = aSig + bSig; in addFloatx80Sigs()
3759 normalizeFloatx80Subnormal( zSig0, &zExp, &zSig0 ); in addFloatx80Sigs()
3765 zSig0 = aSig + bSig; in addFloatx80Sigs()
3766 if ( (sbits64) zSig0 < 0 ) goto roundAndPack; in addFloatx80Sigs()
3768 shift64ExtraRightJamming( zSig0, zSig1, 1, &zSig0, &zSig1 ); in addFloatx80Sigs()
3769 zSig0 |= LIT64( 0x8000000000000000 ); in addFloatx80Sigs()
3774 STATUS(floatx80_rounding_precision), zSign, zExp, zSig0, zSig1 STATUS_VAR ); in addFloatx80Sigs()
3789 bits64 aSig, bSig, zSig0, zSig1; in subFloatx80Sigs() local
3825 sub128( bSig, 0, aSig, zSig1, &zSig0, &zSig1 ); in subFloatx80Sigs()
3837 sub128( aSig, 0, bSig, zSig1, &zSig0, &zSig1 ); in subFloatx80Sigs()
3842 STATUS(floatx80_rounding_precision), zSign, zExp, zSig0, zSig1 STATUS_VAR ); in subFloatx80Sigs()
3898 bits64 aSig, bSig, zSig0, zSig1; in floatx80_mul() local
3936 mul64To128( aSig, bSig, &zSig0, &zSig1 ); in floatx80_mul()
3937 if ( 0 < (sbits64) zSig0 ) { in floatx80_mul()
3938 shortShift128Left( zSig0, zSig1, 1, &zSig0, &zSig1 ); in floatx80_mul()
3943 STATUS(floatx80_rounding_precision), zSign, zExp, zSig0, zSig1 STATUS_VAR ); in floatx80_mul()
3957 bits64 aSig, bSig, zSig0, zSig1; in floatx80_div() local
4004 zSig0 = estimateDiv128To64( aSig, rem1, bSig ); in floatx80_div()
4005 mul64To128( bSig, zSig0, &term0, &term1 ); in floatx80_div()
4008 --zSig0; in floatx80_div()
4023 STATUS(floatx80_rounding_precision), zSign, zExp, zSig0, zSig1 STATUS_VAR ); in floatx80_div()
4134 bits64 aSig0, aSig1, zSig0, zSig1, doubleZSig0; in floatx80_sqrt() local
4159 zSig0 = estimateSqrt32( aExp, aSig0>>32 ); in floatx80_sqrt()
4161 zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0<<32 ) + ( zSig0<<30 ); in floatx80_sqrt()
4162 doubleZSig0 = zSig0<<1; in floatx80_sqrt()
4163 mul64To128( zSig0, zSig0, &term0, &term1 ); in floatx80_sqrt()
4166 --zSig0; in floatx80_sqrt()
4168 add128( rem0, rem1, zSig0>>63, doubleZSig0 | 1, &rem0, &rem1 ); in floatx80_sqrt()
4186 shortShift128Left( 0, zSig1, 1, &zSig0, &zSig1 ); in floatx80_sqrt()
4187 zSig0 |= doubleZSig0; in floatx80_sqrt()
4190 STATUS(floatx80_rounding_precision), 0, zExp, zSig0, zSig1 STATUS_VAR ); in floatx80_sqrt()
4795 bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; in addFloat128Sigs() local
4842 add128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); in addFloat128Sigs()
4845 return packFloat128( zSign, 0, zSig0, zSig1 ); in addFloat128Sigs()
4848 zSig0 |= LIT64( 0x0002000000000000 ); in addFloat128Sigs()
4853 add128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); in addFloat128Sigs()
4855 if ( zSig0 < LIT64( 0x0002000000000000 ) ) goto roundAndPack; in addFloat128Sigs()
4859 zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 ); in addFloat128Sigs()
4861 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 STATUS_VAR ); in addFloat128Sigs()
4876 bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1; in subFloat128Sigs() local
4923 sub128( bSig0, bSig1, aSig0, aSig1, &zSig0, &zSig1 ); in subFloat128Sigs()
4941 sub128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); in subFloat128Sigs()
4945 return normalizeRoundAndPackFloat128( zSign, zExp - 14, zSig0, zSig1 STATUS_VAR ); in subFloat128Sigs()
5001 bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3; in float128_mul() local
5043 mul128To256( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1, &zSig2, &zSig3 ); in float128_mul()
5044 add128( zSig0, zSig1, aSig0, aSig1, &zSig0, &zSig1 ); in float128_mul()
5046 if ( LIT64( 0x0002000000000000 ) <= zSig0 ) { in float128_mul()
5048 zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 ); in float128_mul()
5051 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 STATUS_VAR ); in float128_mul()
5065 bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; in float128_div() local
5117 zSig0 = estimateDiv128To64( aSig0, aSig1, bSig0 ); in float128_div()
5118 mul128By64To192( bSig0, bSig1, zSig0, &term0, &term1, &term2 ); in float128_div()
5121 --zSig0; in float128_div()
5134 shift128ExtraRightJamming( zSig0, zSig1, 0, 15, &zSig0, &zSig1, &zSig2 ); in float128_div()
5135 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 STATUS_VAR ); in float128_div()
5259 bits64 aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0; in float128_sqrt() local
5286 zSig0 = estimateSqrt32( aExp, aSig0>>17 ); in float128_sqrt()
5288 zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0<<32 ) + ( zSig0<<30 ); in float128_sqrt()
5289 doubleZSig0 = zSig0<<1; in float128_sqrt()
5290 mul64To128( zSig0, zSig0, &term0, &term1 ); in float128_sqrt()
5293 --zSig0; in float128_sqrt()
5295 add128( rem0, rem1, zSig0>>63, doubleZSig0 | 1, &rem0, &rem1 ); in float128_sqrt()
5313 shift128ExtraRightJamming( zSig0, zSig1, 0, 14, &zSig0, &zSig1, &zSig2 ); in float128_sqrt()
5314 return roundAndPackFloat128( 0, zExp, zSig0, zSig1, zSig2 STATUS_VAR ); in float128_sqrt()