1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
12 (defun invoke-asm-routine (inst routine vop temp-reg
)
13 (declare (ignorable vop
))
14 (cond #!+immobile-code
15 ((sb!c
::code-immobile-p
(sb!c
::vop-node vop
))
16 (setq temp-reg
(make-fixup routine
:assembly-routine
)))
18 (inst mov temp-reg
(make-fixup routine
:assembly-routine
))))
20 (jmp (inst jmp temp-reg
))
21 (call (inst call temp-reg
))))
23 (defun generate-call-sequence (name style vop options
)
24 ;; It will be nice if we can eliminate the global assumption that
25 ;; a certain register (TEMP-REG-TN - currently R11) is always available.
26 (let ((call-tn (or (second (assoc :call-temps options
)) 'temp-reg-tn
)))
30 `((note-this-location ,vop
:call-site
)
31 (invoke-asm-routine 'call
',name
,vop
,call-tn
)
32 (note-this-location ,vop
:single-value-return
))
36 `((note-this-location ,vop
:call-site
)
37 (invoke-asm-routine 'call
',name
,vop
,call-tn
)
38 (note-this-location ,vop
:single-value-return
))
39 '((:save-p
:compute-only
))))
42 `((invoke-asm-routine 'jmp
',name
,vop
,call-tn
))
45 (defun generate-return-sequence (style)