Initial revision
[sbcl.git] / src / compiler / x86 / show.lisp
1 ;;;; VOPs which are useful for following the progress of the system
2 ;;;; early in boot
3
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
12
13 (in-package "SB!VM")
14
15 (file-comment
16  "$Header$")
17
18 ;;; FIXME: should probably become conditional on #!+SB-SHOW
19 ;;; FIXME: should be called DEBUG-PRINT or COLD-PRINT
20 (define-vop (print)
21   (:args (object :scs (descriptor-reg any-reg)))
22   (:temporary (:sc unsigned-reg
23                :offset eax-offset
24                :target result
25                :from :eval
26                :to (:result 0))
27               eax)
28   (:results (result :scs (descriptor-reg)))
29   (:save-p t)
30   (:generator 100
31     (inst push object)
32     (inst lea eax (make-fixup (extern-alien-name "debug_print") :foreign))
33     (inst call (make-fixup (extern-alien-name "call_into_c") :foreign))
34     (inst add esp-tn word-bytes)
35     (move result eax)))