Changeset 5c90e3e in mainline for uspace/lib/softfloat/add.c
- Timestamp:
- 2012-10-18T22:38:27Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 508fff8
- Parents:
- b801f2d (diff), 7d248e3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/lib/softfloat/add.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/softfloat/add.c
rb801f2d r5c90e3e 90 90 /* both are denormalized */ 91 91 frac1 += frac2; 92 if (frac1 & FLOAT32_HIDDEN_BIT_MASK ) {92 if (frac1 & FLOAT32_HIDDEN_BIT_MASK) { 93 93 /* result is not denormalized */ 94 94 a.parts.exp = 1; … … 112 112 frac2 <<= 6; 113 113 114 if (expdiff < (FLOAT32_FRACTION_SIZE + 2) ) {114 if (expdiff < (FLOAT32_FRACTION_SIZE + 2)) { 115 115 frac2 >>= expdiff; 116 116 frac1 += frac2; … … 121 121 } 122 122 123 if (frac1 & (FLOAT32_HIDDEN_BIT_MASK << 7) ) {123 if (frac1 & (FLOAT32_HIDDEN_BIT_MASK << 7)) { 124 124 ++exp1; 125 125 frac1 >>= 1; … … 135 135 } 136 136 137 if ((exp1 == FLOAT32_MAX_EXPONENT ) || (exp2 > exp1)) {137 if ((exp1 == FLOAT32_MAX_EXPONENT) || (exp2 > exp1)) { 138 138 /* overflow - set infinity as result */ 139 139 a.parts.exp = FLOAT32_MAX_EXPONENT; … … 250 250 } 251 251 252 if ((exp1 == FLOAT64_MAX_EXPONENT ) || (exp2 > exp1)) {252 if ((exp1 == FLOAT64_MAX_EXPONENT) || (exp2 > exp1)) { 253 253 /* overflow - set infinity as result */ 254 254 a.parts.exp = FLOAT64_MAX_EXPONENT; … … 259 259 a.parts.exp = exp1; 260 260 /* Clear hidden bit and shift */ 261 a.parts.fraction = ((frac1 >> 6 ) & (~FLOAT64_HIDDEN_BIT_MASK));261 a.parts.fraction = ((frac1 >> 6) & (~FLOAT64_HIDDEN_BIT_MASK)); 262 262 return a; 263 263 }
Note:
See TracChangeset
for help on using the changeset viewer.
