Skip to content

Commit

Permalink
0.9.5.66:
Browse files Browse the repository at this point in the history
	Fix the umpteenth sign-extension problem on x86-64 (invalid
        types for SIGN-EXTEND VOP).
  • Loading branch information
jsnell committed Oct 15, 2005
1 parent 2fee5f3 commit 253daee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/compiler/x86-64/c-call.lisp
Expand Up @@ -190,15 +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 (fixnum) fixnum (foldable flushable movable))
(defknown sign-extend ((signed-byte 64)) (signed-byte 64)
(foldable flushable movable))

(define-vop (sign-extend)
(:translate sign-extend)
(:policy :fast-safe)
(:args (val :scs (any-reg)))
(:arg-types fixnum)
(:results (res :scs (any-reg)))
(:result-types fixnum)
(:args (val :scs (signed-reg)))
(:arg-types signed-byte-64)
(:results (res :scs (signed-reg)))
(:result-types signed-byte-64)
(:generator 1
(inst movsxd res
(make-random-tn :kind :normal
Expand Down
2 changes: 1 addition & 1 deletion tests/callback.impure.lisp
Expand Up @@ -134,7 +134,7 @@

;;; tests for a sign extension problem in callback argument handling on x86-64

(with-test (:name sign-extension :fails-on :x86-64)
(with-test (:name sign-extension)
(let ((*add-two-ints*
(sb-alien::alien-callback (function int int int) #'+)))
(assert (= (alien-funcall *add-two-ints* #x-80000000 1)
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -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.5.65"
"0.9.5.66"

0 comments on commit 253daee

Please sign in to comment.