46{
48 bool roundNearEven;
50 bool doIncrement, isTiny;
52 INIT_UINTM4( 0x0001FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF );
54
55
56
60 doIncrement = (0x80000000 <= sigExtra);
62 doIncrement =
63 (roundingMode
65 && sigExtra;
66 }
67
68
70 if ( exp < 0 ) {
71
72
73 isTiny =
76 || (exp < -1)
77 || ! doIncrement
80 < 0);
82 exp = 0;
84 if ( isTiny && sigExtra ) {
86 }
87 doIncrement = (0x80000000 <= sigExtra);
88 if (
89 ! roundNearEven
91 ) {
92 doIncrement =
93 (roundingMode
95 && sigExtra;
96 }
97 } else if (
98 (0x7FFD < exp)
99 || ((exp == 0x7FFD) && doIncrement
102 == 0))
103 ) {
104
105
108 if (
109 roundNearEven
111 || (roundingMode
113 ) {
115 uj = 0;
116 } else {
118 uj = 0xFFFFFFFF;
119 }
124 return;
125 }
126 }
127
128
130 if ( sigExtra ) {
132#ifdef SOFTFLOAT_ROUND_ODD
134 uj |= 1;
135 goto noIncrementPackReturn;
136 }
137#endif
138 }
139 if ( doIncrement ) {
140 ++uj;
141 if ( uj ) {
142 if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) uj &= ~1;
147 } else {
152 if ( ui ) {
155 } else {
156 ++uj;
159 if ( ! uj ) ++ui;
160 }
161 }
162 } else {
163 noIncrementPackReturn:
167 uj |= ui;
170 uj |= ui;
172 uj |= ui;
173 if ( ! uj ) exp = 0;
174 }
176
177}
void softfloat_raiseFlags(uint_fast8_t flags)
#define packToF128UI96(sign, exp, sig96)
#define indexMultiwordHi(total, n)
#define INIT_UINTM4(v3, v2, v1, v0)
#define indexWordLo(total)
#define indexWord(total, n)
#define indexWordHi(total)
int_fast8_t softfloat_compare128M(const uint32_t *aPtr, const uint32_t *bPtr)
#define softfloat_shiftRightJam160M(aPtr, dist, zPtr)
THREAD_LOCAL uint_fast8_t softfloat_roundingMode
@ softfloat_flag_underflow
@ softfloat_flag_overflow
THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags
THREAD_LOCAL uint_fast8_t softfloat_detectTininess
@ softfloat_round_near_even
@ softfloat_round_near_maxMag
@ softfloat_tininess_beforeRounding