0.9.8.24:
authorJuho Snellman <jsnell@iki.fi>
Sun, 8 Jan 2006 06:31:23 +0000 (06:31 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sun, 8 Jan 2006 06:31:23 +0000 (06:31 +0000)
        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.

src/compiler/x86-64/c-call.lisp
version.lisp-expr

index c067972..79117fe 100644 (file)
 ;;; 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
                          :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)
index fa7b1a0..5b8aa89 100644 (file)
@@ -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"