Changeset 7c3fb9b in mainline for uspace/lib/softfloat
- Timestamp:
- 2018-05-17T08:29:01Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ff23ff
- Parents:
- fac0ac7
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
- Location:
- uspace/lib/softfloat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/softfloat/comparison.c
rfac0ac7 r7c3fb9b 85 85 int is_float32_signan(float32 f) 86 86 { 87 /* SigNaN : exp = 0xff and fraction = 0xxxxx..x (binary), 88 * where at least one x is nonzero */ 87 /* 88 * SigNaN : exp = 0xff and fraction = 0xxxxx..x (binary), 89 * where at least one x is nonzero 90 */ 89 91 return ((f.parts.exp == 0xFF) && 90 92 (f.parts.fraction < 0x400000) && (f.parts.fraction)); … … 99 101 int is_float64_signan(float64 d) 100 102 { 101 /* SigNaN : exp = 0x7ff and fraction = 0xxxxx..x (binary), 102 * where at least one x is nonzero */ 103 /* 104 * SigNaN : exp = 0x7ff and fraction = 0xxxxx..x (binary), 105 * where at least one x is nonzero 106 */ 103 107 return ((d.parts.exp == 0x7FF) && 104 108 (d.parts.fraction) && (d.parts.fraction < 0x8000000000000ll)); … … 113 117 int is_float128_signan(float128 ld) 114 118 { 115 /* SigNaN : exp = 0x7fff and fraction = 0xxxxx..x (binary), 116 * where at least one x is nonzero */ 119 /* 120 * SigNaN : exp = 0x7fff and fraction = 0xxxxx..x (binary), 121 * where at least one x is nonzero 122 */ 117 123 return ((ld.parts.exp == 0x7FFF) && 118 124 (ld.parts.frac_hi || ld.parts.frac_lo) && -
uspace/lib/softfloat/div.c
rfac0ac7 r7c3fb9b 481 481 &tmp_lolo /* dummy */, &tmp_hihi, &tmp_hilo, &tmp_lohi); 482 482 483 /* sub192(afrac_hi, afrac_lo, 0, 483 /* 484 * sub192(afrac_hi, afrac_lo, 0, 484 485 * tmp_hihi, tmp_hilo, tmp_lohi 485 * &rem_hihi, &rem_hilo, &rem_lohi); */ 486 * &rem_hihi, &rem_hilo, &rem_lohi); 487 */ 486 488 sub128(afrac_hi, afrac_lo, tmp_hihi, tmp_hilo, &rem_hihi, &rem_hilo); 487 489 if (tmp_lohi > 0) { … … 492 494 while ((int64_t) rem_hihi < 0) { 493 495 --cfrac_hi; 494 /* add192(rem_hihi, rem_hilo, rem_lohi, 496 /* 497 * add192(rem_hihi, rem_hilo, rem_lohi, 495 498 * 0, bfrac_hi, bfrac_lo, 496 * &rem_hihi, &rem_hilo, &rem_lohi); */ 499 * &rem_hihi, &rem_hilo, &rem_lohi); 500 */ 497 501 add128(rem_hilo, rem_lohi, bfrac_hi, bfrac_lo, &rem_hilo, &rem_lohi); 498 502 if (lt128(rem_hilo, rem_lohi, bfrac_hi, bfrac_lo)) { … … 507 511 &tmp_hihi /* dummy */, &tmp_hilo, &tmp_lohi, &tmp_lolo); 508 512 509 /* sub192(rem_hilo, rem_lohi, 0, 513 /* 514 * sub192(rem_hilo, rem_lohi, 0, 510 515 * tmp_hilo, tmp_lohi, tmp_lolo, 511 * &rem_hilo, &rem_lohi, &rem_lolo); */ 516 * &rem_hilo, &rem_lohi, &rem_lolo); 517 */ 512 518 sub128(rem_hilo, rem_lohi, tmp_hilo, tmp_lohi, &rem_hilo, &rem_lohi); 513 519 if (tmp_lolo > 0) { … … 518 524 while ((int64_t) rem_hilo < 0) { 519 525 --cfrac_lo; 520 /* add192(rem_hilo, rem_lohi, rem_lolo, 526 /* 527 * add192(rem_hilo, rem_lohi, rem_lolo, 521 528 * 0, bfrac_hi, bfrac_lo, 522 * &rem_hilo, &rem_lohi, &rem_lolo); */ 529 * &rem_hilo, &rem_lohi, &rem_lolo); 530 */ 523 531 add128(rem_lohi, rem_lolo, bfrac_hi, bfrac_lo, &rem_lohi, &rem_lolo); 524 532 if (lt128(rem_lohi, rem_lolo, bfrac_hi, bfrac_lo)) {
Note:
See TracChangeset
for help on using the changeset viewer.