51{
57 bool signZ, signB;
60 void
61 (*roundPackRoutinePtr)(
65
66
67
72
73
74 if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
76 uiZ64 = uiA64;
77 if ( expB == 0x7FFF ) {
79 if ( (expA == 0x7FFF) && (uiZ64 != uiA64) ) {
81 return;
82 }
83 }
86 return;
87 }
88
89
92 negateB = (signZ != signB);
93 if ( expA < expB ) {
94 signZ = signB;
95 expA = expB;
97 tempSPtr = aSPtr;
98 aSPtr = bSPtr;
99 bSPtr = tempSPtr;
100 }
101 if ( ! expB ) {
102 expB = 1;
103 if ( ! expA ) expA = 1;
104 }
107
108
110 expDiff = expA - expB;
111 if ( expDiff ) {
112
113
118 sigB =
121 if ( negateB ) {
122 sigZ -= sigB;
124 if ( sigZExtra ) {
125 --sigZ;
126 sigZExtra = -sigZExtra;
127 }
128 if ( ! (sigZ &
UINT64_C( 0x8000000000000000 )) ) {
129 if ( sigZ &
UINT64_C( 0x4000000000000000 ) ) {
130 --expA;
131 sigZ = sigZ<<1 | sigZExtra>>31;
132 sigZExtra <<= 1;
133 } else {
135 }
136 }
137 } else {
138 sigZ += sigB;
139 if ( sigZ &
UINT64_C( 0x8000000000000000 ) )
goto sigZ;
141 goto completeNormAfterAdd;
142 }
143 } else {
144
145
146 sigZExtra = 0;
147 if ( negateB ) {
148 if ( sigZ < sigB ) {
149 signZ = ! signZ;
150 sigZ = sigB - sigZ;
151 } else {
152 sigZ -= sigB;
153 if ( ! sigZ ) {
157 return;
158 }
159 }
161 } else {
162 sigZ += sigB;
163 if ( sigZ < sigB ) {
165 completeNormAfterAdd:
166 ++expA;
167 sigZ =
UINT64_C( 0x8000000000000000 ) | sigZ>>1;
168 } else {
169 if ( ! (sigZ &
UINT64_C( 0x8000000000000000 )) ) {
171 }
172 }
173 }
174 }
176 sigZ:
179
180
181 roundPack:
182 (*roundPackRoutinePtr)(
184
185}
void softfloat_normRoundPackMToExtF80M(bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M *)
#define packToExtF80UI64(sign, exp)
#define expExtF80UI64(a64)
void softfloat_invalidExtF80M(struct extFloat80M *)
void softfloat_roundPackMToExtF80M(bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M *)
#define signExtF80UI64(a64)
bool softfloat_tryPropagateNaNExtF80M(const struct extFloat80M *, const struct extFloat80M *, struct extFloat80M *)
#define indexWordLo(total)
#define indexWord(total, n)
#define softfloat_shiftRightJam96M(aPtr, dist, zPtr)
THREAD_LOCAL uint_fast8_t softfloat_roundingMode
THREAD_LOCAL uint_fast8_t extF80_roundingPrecision
unsigned __int64 uint64_t