From: Juho Snellman Date: Sat, 8 Jan 2005 00:55:56 +0000 (+0000) Subject: 0.8.18.19: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=460003761254b8f06a88868301f597a5cb0cca94;p=sbcl.git 0.8.18.19: Fix a few AMD64 issues. * Fix broken logic in SIGNED-BYTE-32-P for negative numbers when NOT-P is true. (Reported by Todd Sabin on sbcl-devel, 2005-01-06). * Correct incorrectly spelled type names in DUMP-I-VECTOR. (Patch by Cheuksan Edward Wang). * Sap-operations on floats were using broken x87 code. Replace with SSE. (Patch by Cheuksan Edward Wang). --- diff --git a/src/compiler/dump.lisp b/src/compiler/dump.lisp index ede2e77..c51e480 100644 --- a/src/compiler/dump.lisp +++ b/src/compiler/dump.lisp @@ -896,10 +896,10 @@ (dump-unsigned-vector 32 (* 4 len))) #-sb-xc-host #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) - ((simple-array (unsigned-byte-63) (*)) + ((simple-array (unsigned-byte 63) (*)) (dump-unsigned-vector 63 (* 8 len))) #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) - ((simple-array (unsigned-byte-64) (*)) + ((simple-array (unsigned-byte 64) (*)) (dump-unsigned-vector 64 (* 8 len))) ((simple-array (signed-byte 8) (*)) (dump-signed-vector 8 len)) diff --git a/src/compiler/x86-64/sap.lisp b/src/compiler/x86-64/sap.lisp index 0c7c99e..7cc36d3 100644 --- a/src/compiler/x86-64/sap.lisp +++ b/src/compiler/x86-64/sap.lisp @@ -289,8 +289,7 @@ (:results (result :scs (double-reg))) (:result-types double-float) (:generator 5 - (with-empty-tn@fp-top(result) - (inst fldd (make-ea :dword :base sap :index offset))))) + (inst movsd result (make-ea :qword :base sap :index offset)))) (define-vop (sap-ref-double-c) (:translate sap-ref-double) @@ -301,8 +300,7 @@ (:results (result :scs (double-reg))) (:result-types double-float) (:generator 4 - (with-empty-tn@fp-top(result) - (inst fldd (make-ea :dword :base sap :disp offset))))) + (inst movsd result (make-ea :qword :base sap :disp offset)))) (define-vop (%set-sap-ref-double) (:translate %set-sap-ref-double) @@ -314,24 +312,8 @@ (:results (result :scs (double-reg))) (:result-types double-float) (:generator 5 - (cond ((zerop (tn-offset value)) - ;; Value is in ST0. - (inst fstd (make-ea :dword :base sap :index offset)) - (unless (zerop (tn-offset result)) - ;; Value is in ST0 but not result. - (inst fstd result))) - (t - ;; Value is not in ST0. - (inst fxch value) - (inst fstd (make-ea :dword :base sap :index offset)) - (cond ((zerop (tn-offset result)) - ;; The result is in ST0. - (inst fstd value)) - (t - ;; Neither value or result are in ST0. - (unless (location= value result) - (inst fstd result)) - (inst fxch value))))))) + (inst movsd (make-ea :qword :base sap :index offset) value) + (move result value))) (define-vop (%set-sap-ref-double-c) (:translate %set-sap-ref-double) @@ -343,24 +325,8 @@ (:results (result :scs (double-reg))) (:result-types double-float) (:generator 4 - (cond ((zerop (tn-offset value)) - ;; Value is in ST0. - (inst fstd (make-ea :qword :base sap :disp offset)) - (unless (zerop (tn-offset result)) - ;; Value is in ST0 but not result. - (inst fstd result))) - (t - ;; Value is not in ST0. - (inst fxch value) - (inst fstd (make-ea :qword :base sap :disp offset)) - (cond ((zerop (tn-offset result)) - ;; The result is in ST0. - (inst fstd value)) - (t - ;; Neither value or result are in ST0. - (unless (location= value result) - (inst fstd result)) - (inst fxch value))))))) + (inst movsd (make-ea :qword :base sap :disp offset) value) + (move result value))) ;;;; SAP-REF-SINGLE @@ -373,8 +339,7 @@ (:results (result :scs (single-reg))) (:result-types single-float) (:generator 5 - (with-empty-tn@fp-top(result) - (inst fld (make-ea :dword :base sap :index offset))))) + (inst movss result (make-ea :dword :base sap :index offset)))) (define-vop (sap-ref-single-c) (:translate sap-ref-single) @@ -385,8 +350,7 @@ (:results (result :scs (single-reg))) (:result-types single-float) (:generator 4 - (with-empty-tn@fp-top(result) - (inst fld (make-ea :dword :base sap :disp offset))))) + (inst movss result (make-ea :dword :base sap :disp offset)))) (define-vop (%set-sap-ref-single) (:translate %set-sap-ref-single) @@ -398,24 +362,8 @@ (:results (result :scs (single-reg))) (:result-types single-float) (:generator 5 - (cond ((zerop (tn-offset value)) - ;; Value is in ST0 - (inst fst (make-ea :dword :base sap :index offset)) - (unless (zerop (tn-offset result)) - ;; Value is in ST0 but not result. - (inst fst result))) - (t - ;; Value is not in ST0. - (inst fxch value) - (inst fst (make-ea :dword :base sap :index offset)) - (cond ((zerop (tn-offset result)) - ;; The result is in ST0. - (inst fst value)) - (t - ;; Neither value or result are in ST0 - (unless (location= value result) - (inst fst result)) - (inst fxch value))))))) + (inst movss (make-ea :dword :base sap :index offset) value) + (move result value))) (define-vop (%set-sap-ref-single-c) (:translate %set-sap-ref-single) @@ -427,24 +375,8 @@ (:results (result :scs (single-reg))) (:result-types single-float) (:generator 4 - (cond ((zerop (tn-offset value)) - ;; Value is in ST0 - (inst fst (make-ea :dword :base sap :disp offset)) - (unless (zerop (tn-offset result)) - ;; Value is in ST0 but not result. - (inst fst result))) - (t - ;; Value is not in ST0. - (inst fxch value) - (inst fst (make-ea :dword :base sap :disp offset)) - (cond ((zerop (tn-offset result)) - ;; The result is in ST0. - (inst fst value)) - (t - ;; Neither value or result are in ST0 - (unless (location= value result) - (inst fst result)) - (inst fxch value))))))) + (inst movss (make-ea :dword :base sap :disp offset) value) + (move result value))) ;;;; SAP-REF-LONG #+nil diff --git a/src/compiler/x86-64/type-vops.lisp b/src/compiler/x86-64/type-vops.lisp index 46d6bc2..6dbaaab 100644 --- a/src/compiler/x86-64/type-vops.lisp +++ b/src/compiler/x86-64/type-vops.lisp @@ -176,9 +176,10 @@ (inst sar rax-tn (+ 32 3 -1)) (if not-p (progn - (inst jmp :nz target) + (inst jmp :nz maybe) (inst jmp not-target)) (inst jmp :z target)) + MAYBE (inst cmp rax-tn -1) (inst jmp (if not-p :ne :eq) target) NOT-TARGET)) diff --git a/version.lisp-expr b/version.lisp-expr index dc8e7f4..a3d6b65 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.18.18" +"0.8.18.19"