41 #include "softfloat.h" 57 roundIncrement = 0x40;
65 roundBits = sig & 0x7F;
68 if ( 0xFD <= (
unsigned int)
exp ) {
74 || (
exp < -1) || (sig + roundIncrement < 0x80000000);
77 roundBits = sig & 0x7F;
78 if ( isTiny && roundBits ) {
81 }
else if ( (0xFD <
exp) || (0x80000000 <= sig + roundIncrement) ) {
86 uiZ =
packToF32UI( sign, 0xFF, 0 ) - ! roundIncrement;
92 sig = (sig + roundIncrement)>>7;
95 #ifdef SOFTFLOAT_ROUND_ODD 102 sig &= ~(
uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven);
103 if ( ! sig )
exp = 0;
#define packToF32UI(sign, exp, sig)
THREAD_LOCAL uint_fast8_t softfloat_detectTininess
void softfloat_raiseFlags(uint_fast8_t)
uint32_t softfloat_shiftRightJam32(uint32_t a, uint_fast16_t dist)
float32_t softfloat_roundPackToF32(bool sign, int_fast16_t exp, uint_fast32_t sig)
THREAD_LOCAL uint_fast8_t softfloat_roundingMode
THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags