X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Ffloat.lisp;h=5996928fa98329e47aa947e434ba53bf1f9f65a7;hb=b63c4fb9b98fa8188e17ba926e150ba417a74635;hp=5ae9ef2c49a82e4434c4c025d8ad166343a4d5e0;hpb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;p=sbcl.git diff --git a/src/compiler/sparc/float.lisp b/src/compiler/sparc/float.lisp index 5ae9ef2..5996928 100644 --- a/src/compiler/sparc/float.lisp +++ b/src/compiler/sparc/float.lisp @@ -1314,7 +1314,7 @@ ;; high 32 bits of the FSR, which contain the additional ;; %fcc's on the sparc V9. If not, we don't need this, but we ;; do need to make sure that the unused bits are written as - ;; zeroes, according the the V9 architecture manual. + ;; zeroes, according the V9 architecture manual. (inst sra new 0) (inst srlx my-fsr 32) (inst sllx my-fsr 32) @@ -2396,14 +2396,14 @@ (defun %%min (x y) (declare (type (or (unsigned-byte 32) (signed-byte 32) single-float double-float) x y)) - (if (< x y) + (if (<= x y) x y)) #+nil (defun %%max (x y) (declare (type (or (unsigned-byte 32) (signed-byte 32) single-float double-float) x y)) - (if (> x y) + (if (>= x y) x y)) #+nil (macrolet @@ -2538,11 +2538,11 @@ (lvar-type y))))))) (defoptimizer (min derive-type) ((x y)) - (multiple-value-bind (definitely-< definitely->=) - (ir1-transform-<-helper x y) - (cond (definitely-< + (multiple-value-bind (definitely-> definitely-<=) + (ir1-transform-<-helper y x) + (cond (definitely-<= (lvar-type x)) - (definitely->= + (definitely-> (lvar-type y)) (t (make-canonical-union-type (list (lvar-type x) @@ -2575,7 +2575,7 @@ (arg2 (gensym))) `(let ((,arg1 x) (,arg2 y)) - (if (> ,arg1 ,arg2) + (if (>= ,arg1 ,arg2) ,arg1 ,arg2))))))) (deftransform min ((x y) (real real) *) @@ -2602,7 +2602,7 @@ (arg2 (gensym))) `(let ((,arg1 x) (,arg2 y)) - (if (< ,arg1 ,arg2) + (if (<= ,arg1 ,arg2) ,arg1 ,arg2))))))) ) ; PROGN