X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fshow.lisp;h=a23882e4badecbe828eb82788a78ed0255a201f7;hb=7dfa54273d2ebc6c2be9a39ab5cd6df639d340c9;hp=f0e0201d36a66954f7316b19952b045d410d3b73;hpb=78fa16bf55be44cc16845be84d98023e83fb14bc;p=sbcl.git diff --git a/src/compiler/x86-64/show.lisp b/src/compiler/x86-64/show.lisp index f0e0201..a23882e 100644 --- a/src/compiler/x86-64/show.lisp +++ b/src/compiler/x86-64/show.lisp @@ -17,21 +17,24 @@ (define-vop (print) (:args (object :scs (descriptor-reg any-reg))) (:temporary (:sc unsigned-reg - :offset rax-offset - :target result - :from :eval - :to (:result 0)) - rax) + :offset rax-offset + :target result + :from :eval + :to (:result 0)) + rax) (:temporary (:sc unsigned-reg) call-target) (:results (result :scs (descriptor-reg))) (:save-p t) (:generator 100 - (inst push object) - (inst lea rax (make-fixup (extern-alien-name "debug_print") :foreign)) - (inst lea call-target - (make-ea :qword - :disp (make-fixup (extern-alien-name "call_into_c") - :foreign))) + (move rax object) + (inst push rbp-tn) + (inst mov rbp-tn rsp-tn) + (inst push rbp-tn) + (inst and rsp-tn -16) + (storew rax rsp-tn) + (inst mov rax (make-fixup "debug_print" :foreign)) + (inst mov call-target (make-fixup "call_into_c" :foreign)) (inst call call-target) - (inst add rsp-tn n-word-bytes) + (inst mov rsp-tn rbp-tn) + (inst pop rbp-tn) (move result rax)))