X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Fc-call.lisp;h=fcaecfbd7d560f27b2ec03457fc781753dadc7a0;hb=f6b2e375747a54a1bfa34ead9f9af2d4e8b5aa38;hp=06004e7c3b1e7bab3d49c47c36717fd41c536afc;hpb=14e6b397a2e33ba61a752ed908d398d30fbd4ed9;p=sbcl.git diff --git a/src/compiler/mips/c-call.lisp b/src/compiler/mips/c-call.lisp index 06004e7..fcaecfb 100644 --- a/src/compiler/mips/c-call.lisp +++ b/src/compiler/mips/c-call.lisp @@ -131,7 +131,7 @@ (invoke-alien-type-method :result-tn type state)) values))) -(!def-vm-support-routine make-call-out-tns (type) +(defun make-call-out-tns (type) (let ((arg-state (make-arg-state))) (collect ((arg-tns)) (dolist (arg-type (alien-fun-type-arg-types type)) @@ -271,6 +271,7 @@ (define-vop (alloc-number-stack-space) (:info amount) + (:result-types system-area-pointer) (:results (result :scs (sap-reg any-reg))) (:temporary (:scs (unsigned-reg) :to (:result 0)) temp) (:generator 0 @@ -315,6 +316,7 @@ ;;; callback wrapper #-sb-xc-host (defun alien-callback-assembler-wrapper (index result-type argument-types) + #!+sb-doc "Cons up a piece of code which calls enter-alien-callback with INDEX and a pointer to the arguments." (flet ((make-gpr (n) @@ -450,7 +452,15 @@ and a pointer to the arguments." (finalize-segment segment) ;; Now that the segment is done, convert it to a static ;; vector we can point foreign code to. - (let ((buffer (sb!assem::segment-buffer segment))) - (make-static-vector (length buffer) - :element-type '(unsigned-byte 8) - :initial-contents buffer))))) + (let* ((buffer (sb!assem::segment-buffer segment)) + (vector (make-static-vector (length buffer) + :element-type '(unsigned-byte 8) + :initial-contents buffer)) + (sap (sb!sys:vector-sap vector))) + (sb!alien:alien-funcall + (sb!alien:extern-alien "os_flush_icache" + (function void + system-area-pointer + unsigned-long)) + sap (length buffer)) + vector))))