68{
75 uint64_t sigZ, lastBitMask, roundBitsMask;
76
77
78
81
82
87
88
89 if ( !(sigA &
UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) {
90 if ( !sigA ) {
91 uiZ64 = signUI64;
92 sigZ = 0;
93 goto uiZ;
94 }
96 }
97
98
99 if ( exp <= 0x3FFE ) {
101 switch ( roundingMode ) {
103 if ( !(sigA &
UINT64_C( 0x7FFFFFFFFFFFFFFF )) )
break;
105 if ( exp == 0x3FFE ) goto mag1;
106 break;
108 if ( signUI64 ) goto mag1;
109 break;
111 if ( !signUI64 ) goto mag1;
112 break;
113#ifdef SOFTFLOAT_ROUND_ODD
115 goto mag1;
116#endif
117 }
118 uiZ64 = signUI64;
119 sigZ = 0;
120 goto uiZ;
121 mag1:
122 uiZ64 = signUI64 | 0x3FFF;
123 sigZ =
UINT64_C( 0x8000000000000000 );
124 goto uiZ;
125 }
126
127
128 if ( 0x403E <= exp ) {
129 if ( exp == 0x7FFF ) {
130 if ( sigA &
UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
132 return;
133 }
134 sigZ =
UINT64_C( 0x8000000000000000 );
135 } else {
136 sigZ = sigA;
137 }
138 uiZ64 = signUI64 | exp;
139 goto uiZ;
140 }
141
142
143 uiZ64 = signUI64 | exp;
144 lastBitMask = (
uint64_t) 1<<(0x403E - exp);
145 roundBitsMask = lastBitMask - 1;
146 sigZ = sigA;
148 sigZ += lastBitMask>>1;
150 sigZ += lastBitMask>>1;
151 if ( !(sigZ & roundBitsMask) ) sigZ &= ~lastBitMask;
152 } else if (
154 ) {
155 sigZ += roundBitsMask;
156 }
157 sigZ &= ~roundBitsMask;
158 if ( !sigZ ) {
159 ++uiZ64;
160 sigZ =
UINT64_C( 0x8000000000000000 );
161 }
162 if ( sigZ != sigA ) {
163#ifdef SOFTFLOAT_ROUND_ODD
165#endif
167 }
168 uiZ:
171 return;
172
173}
void softfloat_propagateNaNExtF80M(const struct extFloat80M *aSPtr, const struct extFloat80M *bSPtr, struct extFloat80M *zSPtr)
#define packToExtF80UI64(sign, exp)
#define expExtF80UI64(a64)
int softfloat_normExtF80SigM(uint64_t *)
THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags
@ softfloat_round_near_even
@ softfloat_round_near_maxMag
unsigned __int64 uint64_t