From: Juho Snellman Date: Sun, 8 Jan 2006 06:31:23 +0000 (+0000) Subject: 0.9.8.24: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9a97f246037c49025a2aaf56f544bbb03f6170c3;p=sbcl.git 0.9.8.24: It's x86-64 sign-extension time, once again. The SB!VM:SIGN-EXTEND VOP wasn't getting selected, causing a full call for every use. Luckily it's only used only for alien calls whose return value is declared as a signed byte of 32 or fewer bits. --- diff --git a/src/compiler/x86-64/c-call.lisp b/src/compiler/x86-64/c-call.lisp index c067972..79117fe 100644 --- a/src/compiler/x86-64/c-call.lisp +++ b/src/compiler/x86-64/c-call.lisp @@ -190,16 +190,16 @@ ;;; The ABI specifies that signed short/int's are returned as 32-bit ;;; values. Negative values need to be sign-extended to 64-bits (done ;;; in a :NATURALIZE-GEN alien-type-method). -(defknown sign-extend ((signed-byte 64)) (signed-byte 64) +(defknown sign-extend ((signed-byte 32)) fixnum (foldable flushable movable)) (define-vop (sign-extend) (:translate sign-extend) (:policy :fast-safe) (:args (val :scs (signed-reg))) - (:arg-types signed-byte-64) + (:arg-types fixnum) (:results (res :scs (signed-reg))) - (:result-types signed-byte-64) + (:result-types fixnum) (:generator 1 (inst movsxd res (make-random-tn :kind :normal @@ -207,9 +207,8 @@ :offset (tn-offset val))))) (defun sign-extend (x) - (if (logbitp 31 x) - (dpb x (byte 32 0) -1) - (ldb (byte 32 0) x))) + (declare (type (signed-byte 32) x)) + (sign-extend x)) (define-vop (foreign-symbol-sap) (:translate foreign-symbol-sap) diff --git a/version.lisp-expr b/version.lisp-expr index fa7b1a0..5b8aa89 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.9.8.23" +"0.9.8.24"