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 (!def-vm-support-routine generate-call-sequence (name style vop)
18 `((inst jal (make-fixup ',name :assembly-routine))
22 (let ((temp (make-symbol "TEMP"))
23 (nfp-save (make-symbol "NFP-SAVE"))
24 (lra (make-symbol "LRA")))
26 `((let ((lra-label (gen-label))
27 (cur-nfp (current-nfp-tn ,vop)))
29 (store-stack-tn ,nfp-save cur-nfp))
30 (inst compute-lra-from-code ,lra code-tn lra-label ,temp)
31 (note-next-instruction ,vop :call-site)
32 (inst j (make-fixup ',name :assembly-routine))
34 (without-scheduling ()
35 (emit-return-pc lra-label)
36 (note-this-location ,vop :single-value-return)
37 (inst move csp-tn ocfp-tn)
39 (inst compute-code-from-lra code-tn code-tn
42 (load-stack-tn cur-nfp ,nfp-save))))
43 `((:temporary (:scs (non-descriptor-reg) :from (:eval 0) :to (:eval 1))
45 (:temporary (:sc descriptor-reg :offset lra-offset
46 :from (:eval 0) :to (:eval 1))
48 (:temporary (:scs (control-stack) :offset nfp-save-offset)
52 (!def-vm-support-routine generate-return-sequence (style)
58 `((lisp-return (make-random-tn :kind :normal
65 (defun return-machine-address (scp)
66 (context-register scp lip-offset))