0.9.2.45:
[sbcl/lichteblau.git] / src / compiler / sparc / show.lisp
blobd16ac954e45f6b3a78bf4e1f2730b26efb5e2f86
1 ;;;; temporary printing utilities and similar noise
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
12 (in-package "SB!VM")
14 (define-vop (print)
15 (:args (object :scs (descriptor-reg any-reg) :target nl0))
16 (:results (result :scs (descriptor-reg)))
17 (:save-p t)
18 (:temporary (:sc any-reg :offset nl0-offset :from (:argument 0)) nl0)
19 (:temporary (:sc any-reg :offset cfunc-offset) cfunc)
20 (:temporary (:sc interior-reg :offset lip-offset) lip)
21 (:temporary (:scs (non-descriptor-reg)) temp)
22 (:temporary (:sc control-stack :offset nfp-save-offset) nfp-save)
23 (:vop-var vop)
24 (:generator 100
25 (let ((cur-nfp (current-nfp-tn vop)))
26 (when cur-nfp
27 (store-stack-tn nfp-save cur-nfp))
28 (move nl0 object)
29 (inst li cfunc (make-fixup "debug_print" :foreign))
30 (inst li temp (make-fixup "call_into_c" :foreign))
31 (inst jal lip temp)
32 (inst nop)
33 (when cur-nfp
34 (load-stack-tn cur-nfp nfp-save))
35 (move result nl0))))