41#include "specialize.h"
44#ifdef SOFTFLOAT_FAST_INT64
77 unsigned int index, lastIndex;
101 if ( !sigExtra && !(ui96 & 0x7FFFFFFF) )
goto ui96;
104 switch ( roundingMode ) {
108 if ( exp == 0x3FFE )
goto mag1;
111 if ( sign )
goto mag1;
114 if ( !sign )
goto mag1;
116#ifdef SOFTFLOAT_ROUND_ODD
129 if ( 0x406F <= exp ) {
146 bitPos = 0x406F - exp;
155 wordA = aWPtr[index];
156 if ( bitPos < 32 )
break;
157 if ( wordA ) extra = 1;
165 carry = (wordZ < wordA);
167 extrasMask =
bit - 1;
168 if ( exact && (extra || (wordA & extrasMask)) ) {
173 && !extra && !(wordZ & extrasMask)
176 zWPtr[index] = wordZ;
178 wordZ = aWPtr[index] + carry;
180 zWPtr[index] = wordZ & ~1;
188 extrasMask =
bit - 1;
189 if ( extra || (wordA & extrasMask) ) {
197 carry = (wordZ < wordA);
198#ifdef SOFTFLOAT_ROUND_ODD
205 wordZ &= ~extrasMask;
206 zWPtr[index] = wordZ;
208 while ( index != lastIndex ) {
210 wordZ = aWPtr[index] + carry;
211 zWPtr[index] = wordZ;
void softfloat_propagateNaNF128M(const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr)
float128_t f128_roundToInt(float128_t a, uint_fast8_t roundingMode, bool exact)
void f128M_roundToInt(const float128_t *aPtr, uint_fast8_t roundingMode, bool exact, float128_t *zPtr)
#define fracF128UI96(a96)
#define packToF128UI96(sign, exp, sig96)
#define signF128UI96(a96)
#define indexWordLo(total)
#define indexWord(total, n)
#define indexWordHi(total)
THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags
@ softfloat_round_near_even
@ softfloat_round_near_maxMag