| 1705 | *----------------------------------------------------------------------------*/ |
| 1706 | |
| 1707 | floatx80 float64_to_floatx80(float64 a, float_status *status) |
| 1708 | { |
| 1709 | flag aSign; |
| 1710 | int aExp; |
| 1711 | uint64_t aSig; |
| 1712 | |
| 1713 | aSig = extractFloat64Frac( a ); |
| 1714 | aExp = extractFloat64Exp( a ); |
| 1715 | aSign = extractFloat64Sign( a ); |
| 1716 | if ( aExp == 0x7FF ) { |
| 1717 | if ( aSig ) return commonNaNToFloatx80( float64ToCommonNaN( a, status ), status ); |
| 1718 | return packFloatx80( aSign, 0x7FFF, floatx80_default_infinity_low ); |
| 1719 | } |
| 1720 | if ( aExp == 0 ) { |
| 1721 | if ( aSig == 0 ) return packFloatx80( aSign, 0, 0 ); |
| 1722 | normalizeFloat64Subnormal( aSig, &aExp, &aSig ); |
| 1723 | } |
| 1724 | return |
| 1725 | packFloatx80( |
| 1726 | aSign, aExp + 0x3C00, ( aSig | LIT64( 0x0010000000000000 ) )<<11 ); |
| 1727 | |
| 1728 | } |
| 1729 | |
| 1730 | #ifdef SOFTFLOAT_68K // 31-12-2016: Added for Previous |
| 1731 | floatx80 float64_to_floatx80_allowunnormal( float64 a, float_status *status ) |
no test coverage detected