0.6.8.16:
[sbcl.git] / src / assembly / x86 / support.lisp
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3 ;;;;
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.
9
10 (in-package "SB!VM")
11
12 (!def-vm-support-routine generate-call-sequence (name style vop)
13   (ecase style
14     (:raw
15      (values
16       `((inst call (make-fixup ',name :assembly-routine)))
17       nil))
18     (:full-call
19      (values
20       `((note-this-location ,vop :call-site)
21         (inst call (make-fixup ',name :assembly-routine))
22         (note-this-location ,vop :single-value-return)
23         (move esp-tn ebx-tn))
24       '((:save-p :compute-only))))
25     (:none
26      (values
27       `((inst jmp (make-fixup ',name :assembly-routine)))
28       nil))))
29
30 (!def-vm-support-routine generate-return-sequence (style)
31   (ecase style
32     (:raw
33      `(inst ret))
34     (:full-call
35      `(
36        (inst pop eax-tn)
37
38        (inst add eax-tn 2)
39        (inst jmp eax-tn)))
40     (:none)))