51{
57 bool signZ, signB;
62 (*addCarryMRoutinePtr)(
68 );
72
73
74
79
80
81 if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
83 uiZ96 = uiA96;
84 if ( expB == 0x7FFF ) {
86 if ( (expA == 0x7FFF) && (uiZ96 != uiA96) ) {
88 return;
89 }
90 }
95 return;
96 }
97
98
101 negateB = (signZ != signB);
103 signZ = signB;
104 expA = expB;
106 tempPtr = aWPtr;
107 aWPtr = bWPtr;
108 bWPtr = tempPtr;
109 uiA96 = uiB96;
111 }
114 if ( expA ) {
115 --expA;
116 sig96A |= 0x00010000;
117 if ( expB ) {
118 --expB;
119 sig96B |= 0x00010000;
120 }
121 }
122
123
124 addCarryMRoutinePtr =
126 expDiff = expA - expB;
127 if ( expDiff ) {
128
129
137 carry = 0;
138 if ( negateB ) {
139 sig96B = ~sig96B;
142 carry = ! wordSigZ;
143 }
144 carry =
145 (*addCarryMRoutinePtr)(
146 3,
149 carry,
151 );
152 wordSigZ = sig96A + sig96B + carry;
153 } else {
154
155
157 carry =
158 (*addCarryMRoutinePtr)(
159 3,
162 negateB,
164 );
165 if ( negateB ) {
166 wordSigZ = sig96A + ~sig96B + carry;
167 if ( wordSigZ & 0x80000000 ) {
168 signZ = ! signZ;
169 carry =
173 1,
175 );
176 wordSigZ = sig96B + ~sig96A + carry;
177 } else {
178 if (
179 ! wordSigZ && ! extSigZ[
indexWord( 5, 3 )]
183 )
184 ) {
190 return;
191 }
192 }
193 } else {
194 wordSigZ = sig96A + sig96B + carry;
195 }
196 }
198
199
201 if ( 0x00010000 <= wordSigZ ) {
202 if ( 0x00020000 <= wordSigZ ) {
203 ++expA;
205 }
207 }
208 (*roundPackRoutinePtr)( signZ, expA, extSigZ, zWPtr );
209
210}
void softfloat_invalidF128M(uint32_t *)
void softfloat_normRoundPackMToF128M(bool, int32_t, uint32_t *, uint32_t *)
#define fracF128UI96(a96)
void softfloat_roundPackMToF128M(bool, int32_t, uint32_t *, uint32_t *)
#define packToF128UI96(sign, exp, sig96)
bool softfloat_tryPropagateNaNF128M(const uint32_t *, const uint32_t *, uint32_t *)
#define signF128UI96(a96)
#define indexMultiwordLo(total, n)
#define indexWordLo(total)
#define indexWord(total, n)
#define indexMultiword(total, m, n)
#define indexWordHi(total)
#define softfloat_shiftRightJam160M(aPtr, dist, zPtr)
uint_fast8_t softfloat_addCarryM(uint_fast8_t size_words, const uint32_t *aPtr, const uint32_t *bPtr, uint_fast8_t carry, uint32_t *zPtr)
uint_fast8_t softfloat_addComplCarryM(uint_fast8_t size_words, const uint32_t *aPtr, const uint32_t *bPtr, uint_fast8_t carry, uint32_t *zPtr)
#define softfloat_shortShiftRightJam160M(aPtr, dist, zPtr)
#define softfloat_addComplCarry96M(aPtr, bPtr, carry, zPtr)
THREAD_LOCAL uint_fast8_t softfloat_roundingMode