X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86%2Fshow.lisp;h=5fb38b9b5976588754c66979a12b6d3f29f652a7;hb=cd8fe50554652680dde36396d7862fc6cc83839c;hp=cdc1d11977528c94c45b8f83b4192bdc1c281352;hpb=a2ff6543c79752bfe42578f794bda1c28167fd10;p=sbcl.git diff --git a/src/compiler/x86/show.lisp b/src/compiler/x86/show.lisp index cdc1d11..5fb38b9 100644 --- a/src/compiler/x86/show.lisp +++ b/src/compiler/x86/show.lisp @@ -17,16 +17,25 @@ (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 - (inst push object) + ;; the stack should be 16-byte aligned on Darwin + #!-darwin (inst push object) + #!+darwin (progn (inst mov prev-stack-pointer esp-tn) + (inst sub esp-tn n-word-bytes) + (inst and esp-tn -16) + (storew object esp-tn)) (inst lea eax (make-fixup "debug_print" :foreign)) (inst call (make-fixup "call_into_c" :foreign)) - (inst add esp-tn n-word-bytes) + #!-darwin (inst add esp-tn n-word-bytes) + #!+darwin (inst mov esp-tn prev-stack-pointer) (move result eax)))