X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fc-call.lisp;h=afbe8578a1680b0a6076c200f052899eaa1c3ec0;hb=ba871531b6b394da295c9a4527346e1e6327ccca;hp=32fb566f0d3a5a22f398c7574984cada9b97016c;hpb=ee41b142b86e50983bd885141eaf2ede02815000;p=sbcl.git diff --git a/src/compiler/x86-64/c-call.lisp b/src/compiler/x86-64/c-call.lisp index 32fb566..afbe857 100644 --- a/src/compiler/x86-64/c-call.lisp +++ b/src/compiler/x86-64/c-call.lisp @@ -150,6 +150,10 @@ (lambda-vars arg) (cond ((and (alien-integer-type-p type) (> (sb!alien::alien-integer-type-bits type) 64)) + ;; CLH: FIXME! This should really be + ;; #xffffffffffffffff. nyef says: "Passing + ;; 128-bit integers to ALIEN functions on x86-64 + ;; believed to be broken." (new-args `(logand ,arg #xffffffff)) (new-args `(ash ,arg -64)) (new-arg-types (parse-alien-type '(unsigned 64) env)) @@ -331,27 +335,16 @@ (- other-pointer-lowtag))) delta))))) -;;; these are not strictly part of the c-call convention, but are -;;; needed for the WITH-PRESERVED-POINTERS macro used for "locking -;;; down" lisp objects so that GC won't move them while foreign -;;; functions go to work. - -(define-vop (push-word-on-c-stack) - (:translate push-word-on-c-stack) - (:args (val :scs (sap-reg))) - (:policy :fast-safe) - (:arg-types system-area-pointer) - (:generator 2 - (inst push val))) - -(define-vop (pop-words-from-c-stack) - (:translate pop-words-from-c-stack) - (:args) - (:arg-types (:constant (unsigned-byte 60))) - (:info number) +;;; not strictly part of the c-call convention, but needed for the +;;; WITH-PINNED-OBJECTS macro used for "locking down" lisp objects so +;;; that GC won't move them while foreign functions go to work. +(define-vop (touch-object) + (:translate touch-object) + (:args (object)) + (:ignore object) (:policy :fast-safe) - (:generator 2 - (inst add rsp-tn (fixnumize number)))) + (:arg-types t) + (:generator 0)) ;;; Callbacks