41#include "specialize.h"
44#ifdef SOFTFLOAT_FAST_INT64
75 uint64_t sigZ, lastBitMask, roundBitsMask;
89 if ( !(sigA &
UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) {
99 if ( exp <= 0x3FFE ) {
101 switch ( roundingMode ) {
103 if ( !(sigA &
UINT64_C( 0x7FFFFFFFFFFFFFFF )) )
break;
105 if ( exp == 0x3FFE )
goto mag1;
108 if ( signUI64 )
goto mag1;
111 if ( !signUI64 )
goto mag1;
113#ifdef SOFTFLOAT_ROUND_ODD
122 uiZ64 = signUI64 | 0x3FFF;
123 sigZ =
UINT64_C( 0x8000000000000000 );
128 if ( 0x403E <= exp ) {
129 if ( exp == 0x7FFF ) {
130 if ( sigA &
UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
134 sigZ =
UINT64_C( 0x8000000000000000 );
138 uiZ64 = signUI64 | exp;
143 uiZ64 = signUI64 | exp;
144 lastBitMask = (
uint64_t) 1<<(0x403E - exp);
145 roundBitsMask = lastBitMask - 1;
148 sigZ += lastBitMask>>1;
150 sigZ += lastBitMask>>1;
151 if ( !(sigZ & roundBitsMask) ) sigZ &= ~lastBitMask;
155 sigZ += roundBitsMask;
157 sigZ &= ~roundBitsMask;
160 sigZ =
UINT64_C( 0x8000000000000000 );
162 if ( sigZ != sigA ) {
163#ifdef SOFTFLOAT_ROUND_ODD
void softfloat_propagateNaNExtF80M(const struct extFloat80M *aSPtr, const struct extFloat80M *bSPtr, struct extFloat80M *zSPtr)
extFloat80_t extF80_roundToInt(extFloat80_t a, uint_fast8_t roundingMode, bool exact)
void extF80M_roundToInt(const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact, extFloat80_t *zPtr)
#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