Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
a85f2a01
by Raymond Toy at 2024-07-17T16:44:16+00:00
-
ba2176ab
by Raymond Toy at 2024-07-17T16:44:27+00:00
2 changed files:
Changes:
... | ... | @@ -1809,8 +1809,7 @@ |
1809 | 1809 | (round-it pos)))))))
|
1810 | 1810 | |
1811 | 1811 | (defun round-derive-type-quot (number-type divisor-type)
|
1812 | - (let* ((rem-type (rem-result-type number-type divisor-type))
|
|
1813 | - (number-interval (numeric-type->interval number-type))
|
|
1812 | + (let* ((number-interval (numeric-type->interval number-type))
|
|
1814 | 1813 | (divisor-interval (numeric-type->interval divisor-type)))
|
1815 | 1814 | (let ((quot (round-quotient-bound
|
1816 | 1815 | (interval-div number-interval
|
... | ... | @@ -1819,9 +1818,7 @@ |
1819 | 1818 | ,(or (interval-high quot) '*))))))
|
1820 | 1819 | |
1821 | 1820 | (defun round-derive-type-rem (number-type divisor-type)
|
1822 | - (let* ((rem-type (rem-result-type number-type divisor-type))
|
|
1823 | - (number-interval (numeric-type->interval number-type))
|
|
1824 | - (divisor-interval (numeric-type->interval divisor-type)))
|
|
1821 | + (let* ((rem-type (rem-result-type number-type divisor-type)))
|
|
1825 | 1822 | (multiple-value-bind (class format)
|
1826 | 1823 | (ecase rem-type
|
1827 | 1824 | (integer
|
... | ... | @@ -1835,13 +1832,6 @@ |
1835 | 1832 | (values 'float nil))
|
1836 | 1833 | (real
|
1837 | 1834 | (values nil nil)))
|
1838 | - #+nil
|
|
1839 | - (when (member rem-type '(float single-float double-float
|
|
1840 | - #+long-float long-float
|
|
1841 | - #+double-double double-double-float))
|
|
1842 | - (setf rem (interval-func #'(lambda (x)
|
|
1843 | - (coerce x rem-type))
|
|
1844 | - rem)))
|
|
1845 | 1835 | (make-numeric-type :class class
|
1846 | 1836 | :format format
|
1847 | 1837 | :low nil
|
... | ... | @@ -773,10 +773,11 @@ |
773 | 773 | (inst ,opinst x (,ea y)))
|
774 | 774 | (,stack-sc
|
775 | 775 | (inst ,opinst x (,ea-stack y)))))
|
776 | - ((and ,commutative (location= y r))
|
|
777 | - ;; y = r and the operation is commutative, so just
|
|
778 | - ;; do the operation with r and x.
|
|
779 | - (inst ,opinst y x))
|
|
776 | + ,@(when commutative
|
|
777 | + `(((location= y r)
|
|
778 | + ;; y = r and the operation is commutative, so just
|
|
779 | + ;; do the operation with r and x.
|
|
780 | + (inst ,opinst y x))))
|
|
780 | 781 | ((not (location= r y))
|
781 | 782 | ;; x, y, and r are three different regs. So just
|
782 | 783 | ;; move r to x and do the operation on r.
|
... | ... | @@ -1994,8 +1995,9 @@ |
1994 | 1995 | `(cond
|
1995 | 1996 | ((location= x r)
|
1996 | 1997 | (inst ,opinst x y))
|
1997 | - ((and ,commutative (location= y r))
|
|
1998 | - (inst ,opinst y x))
|
|
1998 | + ,@(when commutative
|
|
1999 | + `(((location= y r)
|
|
2000 | + (inst ,opinst y x))))
|
|
1999 | 2001 | ((not (location= r y))
|
2000 | 2002 | (inst ,movinst r x)
|
2001 | 2003 | (inst ,opinst r y))
|