1.0.23.29: Specify the required double-stack alignment for MIPS.
[sbcl/tcr.git] / src / compiler / mips / show.lisp
blob78a236aa63ef48b5a8dbfcc8fae43c3b0a059534
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")
15 (define-vop (print)
16 (:args (object :scs (descriptor-reg any-reg) :target nl0))
17 (:results (result :scs (descriptor-reg)))
18 (:save-p t)
19 (:temporary (:sc any-reg :offset nl0-offset :from (:argument 0)) nl0)
20 (:temporary (:sc any-reg :offset cfunc-offset) cfunc)
21 (:temporary (:sc control-stack :offset nfp-save-offset) nfp-save)
22 (:vop-var vop)
23 (:generator 100
24 (let ((cur-nfp (current-nfp-tn vop)))
25 (when cur-nfp
26 (store-stack-tn nfp-save cur-nfp))
27 (move nl0 object)
28 (inst li cfunc (make-fixup "debug_print" :foreign))
29 (inst jal (make-fixup "call_into_c" :foreign))
30 (inst subu nsp-tn 16)
31 (inst addu nsp-tn 16)
32 (when cur-nfp
33 (load-stack-tn cur-nfp nfp-save))
34 (move result nl0))))