X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fshow.lisp;h=04b63e183d3e6bcc8c131a822d573e570594b7d0;hb=3d544b84f2b7ecd617d220145a775079df6c7919;hp=2cd27b1b9ce26df9283caabc47ec1aa7ab5b83ff;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/compiler/x86/show.lisp b/src/compiler/x86/show.lisp index 2cd27b1..04b63e1 100644 --- a/src/compiler/x86/show.lisp +++ b/src/compiler/x86/show.lisp @@ -12,24 +12,36 @@ (in-package "SB!VM") -(file-comment - "$Header$") - ;;; FIXME: should probably become conditional on #!+SB-SHOW ;;; FIXME: should be called DEBUG-PRINT or COLD-PRINT (define-vop (print) (:args (object :scs (descriptor-reg any-reg))) (:temporary (:sc unsigned-reg - :offset eax-offset - :target result - :from :eval - :to (:result 0)) - eax) + :offset eax-offset + :target result + :from :eval + :to (:result 0)) + eax) + #!+darwin + (:temporary (:sc unsigned-reg + :offset esi-offset) + prev-stack-pointer) (:results (result :scs (descriptor-reg))) (:save-p t) (:generator 100 + #!-darwin (inst push object) - (inst lea eax (make-fixup (extern-alien-name "debug_print") :foreign)) - (inst call (make-fixup (extern-alien-name "call_into_c") :foreign)) - (inst add esp-tn word-bytes) + #!+darwin + (progn + ;; the stack should be 16-byte aligned on Darwin + (inst mov prev-stack-pointer esp-tn) + (inst sub esp-tn n-word-bytes) + (align-stack-pointer esp-tn) + (storew object esp-tn)) + (inst lea eax (make-fixup "debug_print" :foreign)) + (inst call (make-fixup "call_into_c" :foreign)) + #!-darwin + (inst add esp-tn n-word-bytes) + #!+darwin + (inst mov esp-tn prev-stack-pointer) (move result eax)))