1 ;;;; the machine-specific support routines needed by the file assembler
3 ;;;; This software is part of the SBCL system. See the README file for
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.
14 (defun generate-call-sequence (name style vop options
)
15 (declare (ignore options
))
19 `((inst jal
(make-fixup ',name
:assembly-routine
))
23 (let ((temp (make-symbol "TEMP"))
24 (nfp-save (make-symbol "NFP-SAVE"))
25 (lra (make-symbol "LRA")))
27 `((let ((lra-label (gen-label))
28 (cur-nfp (current-nfp-tn ,vop
)))
30 (store-stack-tn ,nfp-save cur-nfp
))
31 (inst compute-lra-from-code
,lra code-tn lra-label
,temp
)
32 (note-next-instruction ,vop
:call-site
)
33 (inst j
(make-fixup ',name
:assembly-routine
))
35 (without-scheduling ()
36 (emit-return-pc lra-label
)
37 (note-this-location ,vop
:single-value-return
)
38 (inst move csp-tn ocfp-tn
)
40 (inst compute-code-from-lra code-tn code-tn
43 (load-stack-tn cur-nfp
,nfp-save
))))
44 `((:temporary
(:scs
(non-descriptor-reg) :from
(:eval
0) :to
(:eval
1))
46 (:temporary
(:sc descriptor-reg
:offset lra-offset
47 :from
(:eval
0) :to
(:eval
1))
49 (:temporary
(:scs
(control-stack) :offset nfp-save-offset
)
53 (defun generate-return-sequence (style)
59 `((lisp-return (make-random-tn :kind
:normal
66 #-sb-xc-host
; CONTEXT-REGISTER is not defined at xc-time
67 (defun return-machine-address (scp)
68 (context-register scp lip-offset
))