X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fc-call.lisp;h=0db8dd16be79b2e7305c15e358eb492e4503aef1;hb=6fb6e66f531dfb6140ec3e0cc8f84f6ecd1927ca;hp=b9c2240dee1ddd278be4dded4ec613d006e45202;hpb=adf0d51d2bde8b723276bacf94641df9aa5ae561;p=sbcl.git diff --git a/src/compiler/x86/c-call.lisp b/src/compiler/x86/c-call.lisp index b9c2240..0db8dd1 100644 --- a/src/compiler/x86/c-call.lisp +++ b/src/compiler/x86/c-call.lisp @@ -12,10 +12,7 @@ (in-package "SB!VM") -(file-comment - "$Header$") - -;; The move-argument vop is going to store args on the stack for +;; The MOVE-ARGUMENT vop is going to store args on the stack for ;; call-out. These tn's will be used for that. move-arg is normally ;; used for things going down the stack but C wants to have args ;; indexed in the positive direction. @@ -25,7 +22,7 @@ (sc-number-or-lose sc-name) offset)) -(defstruct arg-state +(defstruct (arg-state (:copier nil)) (stack-frame-size 0)) (def-alien-type-method (integer :arg-tn) (type state) @@ -64,7 +61,7 @@ (setf (arg-state-stack-frame-size state) (1+ stack-frame-size)) (my-make-wired-tn 'single-float 'single-stack stack-frame-size))) -(defstruct result-state +(defstruct (result-state (:copier nil)) (num-results 0)) (defun result-reg-offset (slot) @@ -121,18 +118,18 @@ (when values (invoke-alien-type-method :result-tn (car values) state)))) -(def-vm-support-routine make-call-out-tns (type) +(!def-vm-support-routine make-call-out-tns (type) (let ((arg-state (make-arg-state))) (collect ((arg-tns)) (dolist #+nil ;; this reversed list seems to cause the alien botches!! - (arg-type (reverse (alien-function-type-arg-types type))) - (arg-type (alien-function-type-arg-types type)) + (arg-type (reverse (alien-fun-type-arg-types type))) + (arg-type (alien-fun-type-arg-types type)) (arg-tns (invoke-alien-type-method :arg-tn arg-type arg-state))) (values (my-make-wired-tn 'positive-fixnum 'any-reg esp-offset) (* (arg-state-stack-frame-size arg-state) word-bytes) (arg-tns) (invoke-alien-type-method :result-tn - (alien-function-type-result-type type) + (alien-fun-type-result-type type) (make-result-state)))))) (define-vop (foreign-symbol-address) @@ -197,7 +194,7 @@ (:info amount) (:results (result :scs (sap-reg any-reg))) (:generator 0 - (assert (location= result esp-tn)) + (aver (location= result esp-tn)) (unless (zerop amount) (let ((delta (logandc2 (+ amount 3) 3))) (inst sub esp-tn delta))) @@ -214,14 +211,14 @@ (:info amount) (:results (result :scs (sap-reg any-reg))) (:generator 0 - (assert (not (location= result esp-tn))) + (aver (not (location= result esp-tn))) (unless (zerop amount) (let ((delta (logandc2 (+ amount 3) 3))) (inst sub (make-ea :dword :disp (+ nil-value (static-symbol-offset '*alien-stack*) (ash symbol-value-slot word-shift) - (- other-pointer-type))) + (- other-pointer-lowtag))) delta))) (load-symbol-value result *alien-stack*))) @@ -234,5 +231,5 @@ :disp (+ nil-value (static-symbol-offset '*alien-stack*) (ash symbol-value-slot word-shift) - (- other-pointer-type))) + (- other-pointer-lowtag))) delta)))))