Commit c1ea994
committed
libgcc/m68k: Fixes for soft float
Fix __extenddfxf2:
* Remove bogus denorm handling block which would never execute --
the converted exp value is always positive as EXCESSX > EXCESSD.
* Compute the whole significand in dl instead of doing part of it in
ldl.
* Mask off exponent from dl.l.upper so the denorm shift test
works.
* Insert the hidden one bit into dl.l.upper as needed.
Fix __truncxfdf2 denorm handling. All that is required is to shift the
significand right by the correct amount; it already has all of the
necessary bits set including the explicit one. Compute the shift
amount, then perform the wide shift across both elements of the
significand.
Fix __fixxfsi:
* The value was off by a factor of two as the significand contains
32 bits, not 31 so we need to shift by one more than the equivalent
code in __fixdfsi.
* Simplify the code having realized that the lower 32 bits of the
significand can never appear in the results.
Return positive qNaN instead of negative. For floats, qNaN is 0x7fff_ffff. For
doubles, qNaN is 0x7fff_ffff_ffff_ffff.
Return correctly signed zero on float and double divide underflow. This means
that Ld$underflow now expects d7 to contain the sign bit, just like the other
return paths.
Signed-off-by: Keith Packard <keithp@keithp.com>1 parent 862467c commit c1ea994
2 files changed
+45
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
454 | 457 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 458 | + | |
| 459 | + | |
466 | 460 | | |
467 | | - | |
468 | | - | |
469 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
470 | 464 | | |
471 | | - | |
472 | 465 | | |
| 466 | + | |
473 | 467 | | |
474 | | - | |
475 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
476 | 480 | | |
477 | | - | |
478 | 481 | | |
479 | | - | |
| 482 | + | |
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
| |||
508 | 511 | | |
509 | 512 | | |
510 | 513 | | |
511 | | - | |
| 514 | + | |
| 515 | + | |
512 | 516 | | |
513 | 517 | | |
514 | 518 | | |
515 | 519 | | |
516 | | - | |
| 520 | + | |
517 | 521 | | |
518 | | - | |
519 | | - | |
| 522 | + | |
| 523 | + | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
523 | | - | |
524 | | - | |
525 | | - | |
| 527 | + | |
| 528 | + | |
526 | 529 | | |
527 | 530 | | |
528 | 531 | | |
| |||
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
588 | | - | |
589 | 591 | | |
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
596 | | - | |
| 598 | + | |
597 | 599 | | |
598 | | - | |
| 600 | + | |
599 | 601 | | |
600 | 602 | | |
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
604 | | - | |
| 606 | + | |
605 | 607 | | |
606 | 608 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 609 | + | |
616 | 610 | | |
617 | | - | |
| 611 | + | |
618 | 612 | | |
619 | 613 | | |
620 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
703 | | - | |
| 703 | + | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
711 | 712 | | |
712 | 713 | | |
713 | 714 | | |
| 715 | + | |
714 | 716 | | |
715 | 717 | | |
716 | 718 | | |
| |||
2082 | 2084 | | |
2083 | 2085 | | |
2084 | 2086 | | |
| 2087 | + | |
2085 | 2088 | | |
2086 | 2089 | | |
2087 | 2090 | | |
| |||
2187 | 2190 | | |
2188 | 2191 | | |
2189 | 2192 | | |
| 2193 | + | |
2190 | 2194 | | |
2191 | 2195 | | |
2192 | 2196 | | |
| |||
2549 | 2553 | | |
2550 | 2554 | | |
2551 | 2555 | | |
2552 | | - | |
| 2556 | + | |
2553 | 2557 | | |
2554 | 2558 | | |
2555 | 2559 | | |
| |||
2615 | 2619 | | |
2616 | 2620 | | |
2617 | 2621 | | |
2618 | | - | |
| 2622 | + | |
2619 | 2623 | | |
| 2624 | + | |
2620 | 2625 | | |
2621 | 2626 | | |
2622 | 2627 | | |
| |||
0 commit comments