Changeset 7811
- Timestamp:
- Dec 4, 2007, 1:55:28 PM (17 years ago)
- Location:
- branches/ia32
- Files:
-
- 3 edited
-
level-1/l1-numbers.lisp (modified) (18 diffs)
-
lib/number-macros.lisp (modified) (1 diff)
-
lib/numbers.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ia32/level-1/l1-numbers.lisp
r6027 r7811 463 463 (%setf-double-float result TEMP))) 464 464 465 #+ (and ppc32-target (not darwinppc-target))465 #+32-bit-target 466 466 (defun %single-float-expt! (b e result) 467 467 (declare (single-float b e result)) 468 ( ppc32::with-stack-short-floats ((temp))468 (with-stack-short-floats ((temp)) 469 469 (%setf-short-float temp (#_powf b e)) 470 470 (%sf-check-exception-2 'expt b e (%ffi-exception-status)) 471 471 (%setf-short-float result TEMP))) 472 473 #+(and ppc32-target darwinppc-target)474 (defun %single-float-expt! (b e result)475 (declare (single-float b e result))476 (with-stack-double-floats ((b2 b)477 (e2 e)478 (result2))479 (%double-float-expt! b2 e2 result2)480 (%double-float->short-float result2 result)))481 472 482 473 #+64-bit-target … … 494 485 (%setf-double-float result TEMP))) 495 486 496 #+ (and ppc32-target (not darwinppc-target))487 #+32-bit-target 497 488 (defun %single-float-sin! (n result) 498 489 (declare (single-float n result)) 499 ( ppc32::with-stack-short-floats ((temp))490 (with-stack-short-floats ((temp)) 500 491 (%setf-short-float TEMP (#_sinf n)) 501 492 (%sf-check-exception-1 'sin n (%ffi-exception-status)) 502 493 (%setf-short-float result TEMP))) 503 494 504 #+(and ppc32-target darwinppc-target)505 (defun %single-float-sin! (n result)506 (declare (single-float n result))507 (with-stack-double-floats ((n2 n)508 (result2))509 (%double-float-sin! n2 result2)510 (%double-float->short-float result2 result)))511 512 495 #+64-bit-target 513 496 (defun %single-float-sin (n) … … 524 507 (%setf-double-float result TEMP))) 525 508 526 #+ (and ppc32-target (not darwinppc-target))509 #+32-bit-target 527 510 (defun %single-float-cos! (n result) 528 511 (declare (single-float n result)) 529 ( ppc32::with-stack-short-floats ((temp))512 (with-stack-short-floats ((temp)) 530 513 (%setf-short-float TEMP (#_cosf n)) 531 514 (%sf-check-exception-1 'cos n (%ffi-exception-status)) 532 515 (%setf-short-float result TEMP))) 533 516 534 #+(and ppc32-target darwinppc-target)535 (defun %single-float-cos! (n result)536 (declare (single-float n result))537 (with-stack-double-floats ((n2 n)538 (result2))539 (%double-float-cos! n2 result2)540 (%double-float->short-float result2 result)))541 542 517 #+64-bit-target 543 518 (defun %single-float-cos (n) … … 554 529 (%setf-double-float result TEMP))) 555 530 556 #+ (and ppc32-target (not darwinppc-target))531 #+32-bit-target 557 532 (defun %single-float-acos! (n result) 558 533 (declare (single-float n result)) 559 ( ppc32::with-stack-short-floats ((temp))534 (with-stack-short-floats ((temp)) 560 535 (%setf-short-float TEMP (#_acosf n)) 561 536 (%sf-check-exception-1 'acos n (%ffi-exception-status)) 562 537 (%setf-short-float result TEMP))) 563 538 564 #+(and ppc32-target darwinppc-target)565 (defun %single-float-acos! (n result)566 (declare (single-float n result))567 (with-stack-double-floats ((n2 n)568 (result2))569 (%double-float-acos! n2 result2)570 (%double-float->short-float result2 result)))571 572 539 #+64-bit-target 573 540 (defun %single-float-acos (n) … … 584 551 (%setf-double-float result TEMP))) 585 552 586 #+ (and ppc32-target (not darwinppc-target))553 #+32-bit-target 587 554 (defun %single-float-asin! (n result) 588 555 (declare (single-float n result)) 589 ( ppc32::with-stack-short-floats ((temp))556 (with-stack-short-floats ((temp)) 590 557 (%setf-short-float TEMP (#_asinf n)) 591 558 (%sf-check-exception-1 'asin n (%ffi-exception-status)) 592 559 (%setf-short-float result TEMP))) 593 560 594 #+(and ppc32-target darwinppc-target)595 (defun %single-float-asin! (n result)596 (declare (single-float n result))597 (with-stack-double-floats ((n2 n)598 (result2))599 (%double-float-asin! n2 result2)600 (%double-float->short-float result2 result)))601 602 561 #+64-bit-target 603 562 (defun %single-float-asin (n) … … 614 573 (%setf-double-float result TEMP))) 615 574 616 #+ (and ppc32-target (not darwinppc-target))575 #+32-bit-target 617 576 (defun %single-float-cosh! (n result) 618 577 (declare (single-float n result)) 619 ( ppc32::with-stack-short-floats ((temp))578 (with-stack-short-floats ((temp)) 620 579 (%setf-short-float TEMP (#_coshf n)) 621 580 (%sf-check-exception-1 'cosh n (%ffi-exception-status)) 622 581 (%setf-short-float result TEMP))) 623 582 624 #+(and ppc32-target darwinppc-target)625 (defun %single-float-cosh! (n result)626 (declare (single-float n result))627 (with-stack-double-floats ((n2 n)628 (result2))629 (%double-float-cosh! n2 result2)630 (%double-float->short-float result2 result)))631 632 583 #+64-bit-target 633 584 (defun %single-float-cosh (n) … … 637 588 result)) 638 589 639 640 590 (defun %double-float-log! (n result) 641 591 (declare (double-float n result)) … … 645 595 (%setf-double-float result TEMP))) 646 596 647 #+ppc32-target 648 (progn 649 #-darwinppc-target 597 #+32-bit-target 650 598 (defun %single-float-log! (n result) 651 599 (declare (single-float n result)) 652 ( ppc32::with-stack-short-floats ((temp))600 (with-stack-short-floats ((temp)) 653 601 (%setf-short-float TEMP (#_logf n)) 654 602 (%sf-check-exception-1 'log n (%ffi-exception-status)) 655 603 (%setf-short-float result TEMP))) 656 657 #+darwinppc-target658 (defun %single-float-log! (n result)659 (declare (single-float n result))660 (with-stack-double-floats ((n2 n)661 (result2))662 (%double-float-log! n2 result2)663 (%double-float->short-float result2 result)))664 )665 604 666 605 #+64-bit-target … … 677 616 (%setf-double-float result TEMP))) 678 617 679 #+ (and ppc32-target (not darwinppc-target))618 #+32-bit-target 680 619 (defun %single-float-tan! (n result) 681 620 (declare (single-float n result)) 682 ( ppc32::with-stack-short-floats ((temp))621 (with-stack-short-floats ((temp)) 683 622 (%setf-short-float TEMP (#_tanf n)) 684 623 (%sf-check-exception-1 'tan n (%ffi-exception-status)) 685 624 (%setf-short-float result TEMP))) 686 625 687 #+(and ppc32-target darwinppc-target)688 (defun %single-float-tan! (n result)689 (declare (single-float n result))690 (with-stack-double-floats ((n2 n)691 (result2))692 (%double-float-tan! n2 result2)693 (%double-float->short-float result2 result)))694 695 626 #+64-bit-target 696 627 (defun %single-float-tan (n) … … 708 639 709 640 710 #+ (and ppc32-target (not darwinppc-target))641 #+32-bit-target 711 642 (defun %single-float-atan! (n result) 712 643 (declare (single-float n result)) 713 ( ppc32::with-stack-short-floats ((temp))644 (with-stack-short-floats ((temp)) 714 645 (%setf-short-float TEMP (#_atanf n)) 715 646 (%sf-check-exception-1 'atan n (%ffi-exception-status)) 716 647 (%setf-short-float result TEMP))) 717 718 #+(and ppc32-target darwinppc-target)719 (defun %single-float-atan! (n result)720 (declare (single-float n result))721 (with-stack-double-floats ((n2 n)722 (result2))723 (%double-float-atan! n2 result2)724 (%double-float->short-float result2 result)))725 648 726 649 #+64-bit-target … … 738 661 (%setf-double-float result TEMP))) 739 662 740 #+ (and ppc32-target (not darwinppc-target))663 #+32-bit-target 741 664 (defun %single-float-atan2! (x y result) 742 665 (declare (single-float x y result)) 743 ( ppc32::with-stack-short-floats ((temp))666 (with-stack-short-floats ((temp)) 744 667 (%setf-short-float TEMP (#_atan2f x y)) 745 668 (%sf-check-exception-2 'atan2 x y (%ffi-exception-status)) 746 669 (%setf-short-float result TEMP))) 747 748 #+(and ppc32-target darwinppc-target)749 (defun %single-float-atan2! (x y result)750 (declare (single-float x y result))751 (with-stack-double-floats ((x2 x)752 (y2 y)753 (result2))754 (%double-float-atan2! x2 y2 result2)755 (%double-float->short-float result2 result)))756 670 757 671 #+64-bit-target … … 769 683 (%setf-double-float result TEMP))) 770 684 771 #+ (and ppc32-target (not darwinppc-target))685 #+32-bit-target 772 686 (defun %single-float-exp! (n result) 773 687 (declare (single-float n result)) 774 ( ppc32::with-stack-short-floats ((temp))688 (with-stack-short-floats ((temp)) 775 689 (%setf-short-float TEMP (#_expf n)) 776 690 (%sf-check-exception-1 'exp n (%ffi-exception-status)) 777 691 (%setf-short-float result TEMP))) 778 692 779 #+(and ppc32-target darwinppc-target)780 (defun %single-float-exp! (n result)781 (declare (single-float n result))782 (with-stack-double-floats ((n2 n)783 (result2))784 (%double-float-exp! n2 result2)785 (%double-float->short-float result2 result)))786 787 693 #+64-bit-target 788 694 (defun %single-float-exp (n) … … 799 705 (%setf-double-float result TEMP))) 800 706 801 #+ (and ppc32-target (not darwinppc-target))707 #+32-bit-target 802 708 (defun %single-float-sinh! (n result) 803 709 (declare (single-float n result)) 804 ( ppc32::with-stack-short-floats ((temp))710 (with-stack-short-floats ((temp)) 805 711 (%setf-short-float TEMP (#_sinhf n)) 806 712 (%sf-check-exception-1 'sinh n (%ffi-exception-status)) 807 713 (%setf-short-float result TEMP))) 808 714 809 #+(and darwinppc-target ppc32-target)810 (defun %single-float-sinh! (n result)811 (declare (single-float n result))812 (with-stack-double-floats ((n2 n)813 (result2))814 (%double-float-sinh! n2 result2)815 (%double-float->short-float result2 result)))816 817 715 #+64-bit-target 818 716 (defun %single-float-sinh (n) … … 822 720 result)) 823 721 824 825 826 722 (defun %double-float-tanh! (n result) 827 723 (declare (double-float n result)) … … 831 727 (%setf-double-float result TEMP))) 832 728 833 834 #+(and ppc32-target (not darwinppc-target)) 729 #+32-bit-target 835 730 (defun %single-float-tanh! (n result) 836 731 (declare (single-float n result)) 837 ( ppc32::with-stack-short-floats ((temp))732 (with-stack-short-floats ((temp)) 838 733 (%setf-short-float TEMP (#_tanhf n)) 839 734 (%sf-check-exception-1 'tanh n (%ffi-exception-status)) 840 735 (%setf-short-float result TEMP))) 841 736 842 #+(and ppc32-target darwinppc-target)843 (defun %single-float-tanh! (n result)844 (declare (single-float n result))845 (with-stack-double-floats ((n2 n)846 (result2))847 (%double-float-tanh! n2 result2)848 (%double-float->short-float result2 result)))849 850 737 #+64-bit-target 851 738 (defun %single-float-tanh (n) … … 863 750 864 751 865 #+ (and ppc32-target (not darwinppc-target))752 #+32-bit-target 866 753 (defun %single-float-asinh! (n result) 867 754 (declare (single-float n result)) 868 ( ppc32::with-stack-short-floats ((temp))755 (with-stack-short-floats ((temp)) 869 756 (%setf-short-float TEMP (#_asinhf n)) 870 757 (%sf-check-exception-1 'asinh n (%ffi-exception-status)) 871 758 (%setf-short-float result TEMP))) 872 759 873 #+(and ppc32-target darwinppc-target)874 (defun %single-float-asinh! (n result)875 (declare (single-float n result))876 (with-stack-double-floats ((n2 n)877 (result2))878 (%double-float-asinh! n2 result2)879 (%double-float->short-float result2 result)))880 881 760 #+64-bit-target 882 761 (defun %single-float-asinh (n) … … 893 772 (%setf-double-float result TEMP))) 894 773 895 #+ (and ppc32-target (not darwinppc-target))774 #+32-bit-target 896 775 (defun %single-float-acosh! (n result) 897 776 (declare (single-float n result)) 898 ( ppc32::with-stack-short-floats ((temp))777 (with-stack-short-floats ((temp)) 899 778 (%setf-short-float TEMP (#_acoshf n)) 900 779 (%sf-check-exception-1 'acosh n (%ffi-exception-status)) 901 780 (%setf-short-float result TEMP))) 902 781 903 #+(and ppc32-target darwinppc-target)904 (defun %single-float-acosh! (n result)905 (declare (single-float n result))906 (with-stack-double-floats ((n2 n)907 (result2))908 (%double-float-acosh! n2 result2)909 (%double-float->short-float result2 result)))910 911 782 #+64-bit-target 912 783 (defun %single-float-acosh (n) … … 923 794 (%setf-double-float result TEMP))) 924 795 925 #+ (and ppc32-target (not darwinppc-target))796 #+32-bit-target 926 797 (defun %single-float-atanh! (n result) 927 798 (declare (single-float n result)) 928 ( ppc32::with-stack-short-floats ((temp))799 (with-stack-short-floats ((temp)) 929 800 (%setf-short-float TEMP (#_atanhf n)) 930 801 (%sf-check-exception-1 'atanh n (%ffi-exception-status)) 931 802 (%setf-short-float result TEMP))) 932 933 #+(and ppc32-target darwinppc-target)934 (defun %single-float-atanh! (n result)935 (declare (single-float n result))936 (with-stack-double-floats ((n2 n)937 (result2))938 (%double-float-atanh! n2 result2)939 (%double-float->short-float result2 result)))940 803 941 804 #+64-bit-target -
branches/ia32/lib/number-macros.lisp
r3605 r7811 39 39 (declare-arch-specific-macro %imagpart) 40 40 41 (defmacro with-stack-short-floats (specs &body body) 42 (collect ((binds) 43 (inits) 44 (names)) 45 (dolist (spec specs) 46 (let ((name (first spec))) 47 (binds `(,name (%make-sfloat))) 48 (names name) 49 (let ((init (second spec))) 50 (when init 51 (inits `(%short-float ,init ,name)))))) 52 `(let* ,(binds) 53 (declare (dynamic-extent ,@(names)) 54 (short-float ,@(names))) 55 ,@(inits) 56 ,@body))) 41 57 42 58 (defmacro with-stack-double-floats (specs &body body) -
branches/ia32/lib/numbers.lisp
r6012 r7811 687 687 (%double-float-sinh! x (%make-dfloat)) 688 688 #+32-bit-target 689 ( ppc32::with-stack-short-floats ((sx x))689 (with-stack-short-floats ((sx x)) 690 690 (%single-float-sinh! sx (%make-sfloat))) 691 691 #+64-bit-target … … 700 700 (%double-float-cosh! x (%make-dfloat)) 701 701 #+32-bit-target 702 ( ppc32::with-stack-short-floats ((sx x))702 (with-stack-short-floats ((sx x)) 703 703 (%single-float-cosh! sx (%make-sfloat))) 704 704 #+64-bit-target … … 712 712 (%double-float-tanh! x (%make-dfloat)) 713 713 #+32-bit-target 714 ( ppc32::with-stack-short-floats ((sx x))714 (with-stack-short-floats ((sx x)) 715 715 (%single-float-tanh! sx (%make-sfloat))) 716 716 #+64-bit-target … … 724 724 (%double-float-asinh! x (%make-dfloat)) 725 725 #+32-bit-target 726 ( ppc32::with-stack-short-floats ((sx x))726 (with-stack-short-floats ((sx x)) 727 727 (%single-float-asinh! sx (%make-sfloat))) 728 728 #+64-bit-target … … 735 735 (%double-float-acosh! x (%make-dfloat)) 736 736 #+32-bit-target 737 ( ppc32::with-stack-short-floats ((sx x))737 (with-stack-short-floats ((sx x)) 738 738 (%single-float-acosh! sx (%make-sfloat))) 739 739 #+64-bit-target
Note:
See TracChangeset
for help on using the changeset viewer.
