41#include "specialize.h"
53 struct exp32_sig64 normExpSig;
67 if ( !(sigA &
UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) {
74 exp += normExpSig.exp;
75 sigA = normExpSig.sig;
79 if ( 0x403E <= exp ) {
80 if ( exp == 0x7FFF ) {
81 if ( sigA &
UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
87 sigZ =
UINT64_C( 0x8000000000000000 );
91 uiZ64 = signUI64 | exp;
94 if ( exp <= 0x3FFE ) {
96 switch ( roundingMode ) {
98 if ( !(sigA &
UINT64_C( 0x7FFFFFFFFFFFFFFF )) )
break;
100 if ( exp == 0x3FFE )
goto mag1;
103 if ( signUI64 )
goto mag1;
106 if ( !signUI64 )
goto mag1;
108#ifdef SOFTFLOAT_ROUND_ODD
117 uiZ64 = signUI64 | 0x3FFF;
118 sigZ =
UINT64_C( 0x8000000000000000 );
123 uiZ64 = signUI64 | exp;
125 roundBitsMask = lastBitMask - 1;
128 sigZ += lastBitMask>>1;
130 sigZ += lastBitMask>>1;
131 if ( !(sigZ & roundBitsMask) ) sigZ &= ~lastBitMask;
135 sigZ += roundBitsMask;
137 sigZ &= ~roundBitsMask;
140 sigZ =
UINT64_C( 0x8000000000000000 );
142 if ( sigZ != sigA ) {
143#ifdef SOFTFLOAT_ROUND_ODD
149 uZ.s.signExp = uiZ64;
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
struct uint128 softfloat_propagateNaNExtF80UI(uint_fast16_t uiA64, uint_fast64_t uiA0, uint_fast16_t uiB64, uint_fast64_t uiB0)
extFloat80_t extF80_roundToInt(extFloat80_t a, uint_fast8_t roundingMode, bool exact)
#define packToExtF80UI64(sign, exp)
#define expExtF80UI64(a64)
THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags
@ softfloat_round_near_even
@ softfloat_round_near_maxMag
struct exp32_sig64 softfloat_normSubnormalExtF80Sig(uint_fast64_t sig)