| 1653 | *----------------------------------------------------------------------------*/ |
| 1654 | |
| 1655 | floatx80 float32_to_floatx80(float32 a, float_status *status) |
| 1656 | { |
| 1657 | flag aSign; |
| 1658 | int aExp; |
| 1659 | uint32_t aSig; |
| 1660 | |
| 1661 | aSig = extractFloat32Frac( a ); |
| 1662 | aExp = extractFloat32Exp( a ); |
| 1663 | aSign = extractFloat32Sign( a ); |
| 1664 | if ( aExp == 0xFF ) { |
| 1665 | if ( aSig ) return commonNaNToFloatx80( float32ToCommonNaN( a, status ), status ); |
| 1666 | return packFloatx80( aSign, 0x7FFF, floatx80_default_infinity_low ); |
| 1667 | } |
| 1668 | if ( aExp == 0 ) { |
| 1669 | if ( aSig == 0 ) return packFloatx80( aSign, 0, 0 ); |
| 1670 | normalizeFloat32Subnormal( aSig, &aExp, &aSig ); |
| 1671 | } |
| 1672 | aSig |= 0x00800000; |
| 1673 | return packFloatx80( aSign, aExp + 0x3F80, ( (uint64_t) aSig )<<40 ); |
| 1674 | |
| 1675 | } |
| 1676 | |
| 1677 | #ifdef SOFTFLOAT_68K // 31-12-2016: Added for Previous |
| 1678 | floatx80 float32_to_floatx80_allowunnormal(float32 a , float_status *status) |
no test coverage detected