Changeset f1f95f2 in mainline for softfloat/generic/div.c
- Timestamp:
- 2006-02-13T23:06:04Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d9f51ccc
- Parents:
- d3ca210
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
softfloat/generic/div.c
rd3ca210 rf1f95f2 192 192 { 193 193 float64 result; 194 __s 32aexp, bexp, cexp;194 __s64 aexp, bexp, cexp; 195 195 __u64 afrac, bfrac, cfrac; 196 196 __u64 remlo, remhi; … … 199 199 200 200 if (isFloat64NaN(a)) { 201 202 if (isFloat64SigNaN(b)) { 203 /*FIXME: SigNaN*/ 204 return b; 205 } 206 201 207 if (isFloat64SigNaN(a)) { 202 208 /*FIXME: SigNaN*/ … … 215 221 216 222 if (isFloat64Infinity(a)) { 217 if (isFloat64Infinity(b) ) {223 if (isFloat64Infinity(b) || isFloat64Zero(b)) { 218 224 /*FIXME: inf / inf */ 219 225 result.binary = FLOAT64_NAN; … … 260 266 if (aexp == 0) { 261 267 if (afrac == 0) { 262 result.parts.exp = 0;263 result.parts.fraction = 0;264 return result;268 result.parts.exp = 0; 269 result.parts.fraction = 0; 270 return result; 265 271 } 266 272 /* normalize it*/ 267 273 268 a frac <<= 1;274 aexp++; 269 275 /* afrac is nonzero => it must stop */ 270 276 while (! (afrac & FLOAT64_HIDDEN_BIT_MASK) ) { … … 275 281 276 282 if (bexp == 0) { 277 b frac <<= 1;283 bexp++; 278 284 /* bfrac is nonzero => it must stop */ 279 285 while (! (bfrac & FLOAT64_HIDDEN_BIT_MASK) ) {
Note:
See TracChangeset
for help on using the changeset viewer.