X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Fsupport.lisp;h=5c285939585a7ff2f096b5b2fc7d0e588e122ed4;hb=36717964ebcff8353035062789c08f223feccf1a;hp=0d2427e8b180a7fa3fc1f5b3058959e1e4c9270b;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/assembly/x86/support.lisp b/src/assembly/x86/support.lisp index 0d2427e..5c28593 100644 --- a/src/assembly/x86/support.lisp +++ b/src/assembly/x86/support.lisp @@ -9,35 +9,38 @@ (in-package "SB!VM") -(file-comment - "$Header$") +;;; The :full-call assembly-routines must use the same full-call +;;; unknown-values return convention as a normal call, as some +;;; of the routines will tail-chain to a static-function. The +;;; routines themselves, however, take all of their arguments +;;; in registers (this will typically be one or two arguments, +;;; and is one of the lower bounds on the number of argument- +;;; passing registers), and thus don't need a call frame, which +;;; simplifies things for the normal call/return case. When it +;;; is neccessary for one of the assembly-functions to call a +;;; static-function it will construct the required call frame. +;;; Also, none of the assembly-routines return other than one +;;; value, which again simplifies the return path. +;;; -- AB, 2006/Feb/05. -(def-vm-support-routine generate-call-sequence (name style vop) +(defun generate-call-sequence (name style vop) (ecase style - (:raw + ((:raw :none) (values `((inst call (make-fixup ',name :assembly-routine))) nil)) (:full-call (values `((note-this-location ,vop :call-site) - (inst call (make-fixup ',name :assembly-routine)) - (note-this-location ,vop :single-value-return) - (move esp-tn ebx-tn)) - '((:save-p :compute-only)))) - (:none - (values - `((inst jmp (make-fixup ',name :assembly-routine))) - nil)))) + (inst call (make-fixup ',name :assembly-routine)) + (note-this-location ,vop :single-value-return)) + '((:save-p :compute-only)))))) -(def-vm-support-routine generate-return-sequence (style) +(defun generate-return-sequence (style) (ecase style (:raw `(inst ret)) (:full-call - `( - (inst pop eax-tn) - - (inst add eax-tn 2) - (inst jmp eax-tn))) + `((inst clc) + (inst ret))) (:none)))