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 li
(make-fixup ',name
:assembly-routine
) temp
)
19 (inst jsr lip-tn temp
))
20 '((:temporary
(:sc non-descriptor-reg
) temp
))
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
)
34 (inst li
(make-fixup ',name
:assembly-routine
) temp1
)
35 (inst jsr lip-tn temp1
(make-fixup ',name
:assembly-routine
))
36 (emit-return-pc lra-label
)
37 (note-this-location ,vop
:single-value-return
)
38 (without-scheduling ()
41 (inst compute-code-from-lra code-tn code-tn
44 (maybe-load-stack-nfp-tn cur-nfp
,nfp-save temp1
))))
45 `((:temporary
(:scs
(non-descriptor-reg) :from
(:eval
0) :to
(:eval
1))
47 (:temporary
(:sc descriptor-reg
:offset lra-offset
48 :from
(:eval
0) :to
(:eval
1))
50 (:temporary
(:scs
(control-stack) :offset nfp-save-offset
)
52 (:temporary
(:scs
(non-descriptor-reg)) temp1
)
55 (!def-vm-support-routine generate-return-sequence
(style)
58 `((inst ret zero-tn lip-tn
)))
60 `((lisp-return (make-random-tn :kind
:normal
67 (defun return-machine-address (scp)
68 (context-register scp lip-offset
))