;;; Return a wired TN describing the N'th full call argument passing
;;; location.
-;;;
(!def-vm-support-routine standard-argument-location (n)
(declare (type unsigned-byte n))
(if (< n register-arg-count)
;;; is true, then use the standard (full call) location, otherwise use
;;; any legal location. Even in the non-standard case, this may be
;;; restricted by a desire to use a subroutine call instruction.
-;;;
(!def-vm-support-routine make-return-pc-passing-location (standard)
- #!+gengc (declare (ignore standard))
- #!-gengc
(if standard
(make-wired-tn *backend-t-primitive-type* register-arg-scn lra-offset)
- (make-restricted-tn *backend-t-primitive-type* register-arg-scn))
- #!+gengc
- (make-wired-tn *fixnum-primitive-type* immediate-arg-scn ra-offset))
+ (make-restricted-tn *backend-t-primitive-type* register-arg-scn)))
-;;; This is similar to Make-Return-PC-Passing-Location, but makes a
-;;; location to pass Old-FP in. This is (obviously) wired in the
+;;; This is similar to MAKE-RETURN-PC-PASSING-LOCATION, but makes a
+;;; location to pass OLD-FP in. This is (obviously) wired in the
;;; standard convention, but is totally unrestricted in non-standard
;;; conventions, since we can always fetch it off of the stack using
;;; the arg pointer.
-;;;
(!def-vm-support-routine make-old-fp-passing-location (standard)
(if standard
(make-wired-tn *fixnum-primitive-type* immediate-arg-scn ocfp-offset)
;;; debugger can find them at a known location.
(!def-vm-support-routine make-old-fp-save-location (env)
(specify-save-tn
- (environment-debug-live-tn (make-normal-tn *fixnum-primitive-type*) env)
+ (physenv-debug-live-tn (make-normal-tn *fixnum-primitive-type*) env)
(make-wired-tn *fixnum-primitive-type*
control-stack-arg-scn
ocfp-save-offset)))
(!def-vm-support-routine make-return-pc-save-location (env)
- (let ((ptype #!-gengc *backend-t-primitive-type*
- #!+gengc *fixnum-primitive-type*))
+ (let ((ptype *backend-t-primitive-type*))
(specify-save-tn
- (environment-debug-live-tn (make-normal-tn ptype) env)
- (make-wired-tn ptype control-stack-arg-scn
- #!-gengc lra-save-offset #!+gengc ra-save-offset))))
+ (physenv-debug-live-tn (make-normal-tn ptype) env)
+ (make-wired-tn ptype control-stack-arg-scn lra-save-offset))))
;;; Make a TN for the standard argument count passing location. We
;;; only need to make the standard location, since a count is never
(trace-table-entry trace-table-function-prologue)
(emit-label start-lab)
;; Allocate function header.
- (inst function-header-word)
- (dotimes (i (1- function-code-offset))
+ (inst simple-fun-header-word)
+ (dotimes (i (1- simple-fun-code-offset))
(inst lword 0))
;; The start of the actual code.
;; Compute CODE from the address of this entry point.
(trace-table-entry trace-table-function-prologue)
(move csp-tn res)
(inst lda csp-tn (* word-bytes (sb-allocated-size 'control-stack)) csp-tn)
- (when (ir2-environment-number-stack-p callee)
+ (when (ir2-physenv-number-stack-p callee)
(inst subq nsp-tn (bytes-needed-for-non-descriptor-stack-frame)
nsp-tn)
(move nsp-tn nfp))
(trace-table-entry trace-table-normal)))
;;; Allocate a partial frame for passing stack arguments in a full
-;;; call. Nargs is the number of arguments passed. If no stack
+;;; call. NARGS is the number of arguments passed. If no stack
;;; arguments are passed, then we don't have to do anything.
(define-vop (allocate-full-call-frame)
(:info nargs)
(move csp-tn res)
(inst lda csp-tn (* nargs word-bytes) csp-tn))))
-
-\f
;;; Emit code needed at the return-point from an unknown-values call
;;; for a fixed number of values. Values is the head of the TN-Ref
;;; list for the locations that the values are to be received into.
(move ocfp-tn csp-tn)
(inst nop))
(when lra-label
- #!-gengc (inst compute-code-from-lra code-tn code-tn lra-label temp)
- #!+gengc (inst compute-code-from-ra code-tn ra-tn lra-label temp)))
+ (inst compute-code-from-lra code-tn code-tn lra-label temp)))
(let ((regs-defaulted (gen-label))
(defaulting-done (gen-label))
(default-stack-vals (gen-label)))
(store-stack-tn (cdr def) null-tn)))))))
(when lra-label
- #!-gengc (inst compute-code-from-lra code-tn code-tn lra-label temp)
- #!+gengc (inst compute-code-from-ra code-tn ra-tn lra-label temp))))
+ (inst compute-code-from-lra code-tn code-tn lra-label temp))))
(values))
\f
;;;; unknown values receiving
(inst nop))
(when lra-label
- #!-gengc (inst compute-code-from-lra code-tn code-tn lra-label temp)
- #!+gengc (inst compute-code-from-ra code-tn ra-tn lra-label temp))
+ (inst compute-code-from-lra code-tn code-tn lra-label temp))
(inst addq csp-tn 4 csp-tn)
(storew (first *register-arg-tns*) csp-tn -1)
(inst subq csp-tn 4 start)
(assemble (*elsewhere*)
(emit-label variable-values)
(when lra-label
- #!-gengc (inst compute-code-from-lra code-tn code-tn lra-label temp)
- #!+gengc (inst compute-code-from-ra code-tn ra-tn lra-label temp))
+ (inst compute-code-from-lra code-tn code-tn lra-label temp))
(do ((arg *register-arg-tns* (rest arg))
(i 0 (1+ i)))
((null arg))
(:temporary (:sc control-stack :offset nfp-save-offset) nfp-save)
(:temporary (:scs (non-descriptor-reg)) temp)
(:generator 5
- (let (#!-gengc (label (gen-label))
+ (let ((label (gen-label))
(cur-nfp (current-nfp-tn vop)))
(when cur-nfp
(store-stack-tn nfp-save cur-nfp))
(return-pc :target return-pc-temp)
(vals :more t))
(:temporary (:sc any-reg :from (:argument 0)) ocfp-temp)
- (:temporary (:sc #!-gengc descriptor-reg #!+gengc any-reg
- :from (:argument 1))
+ (:temporary (:sc descriptor-reg any-reg :from (:argument 1))
return-pc-temp)
- #!-gengc (:temporary (:scs (interior-reg)) lip)
+ (:temporary (:scs (interior-reg)) lip)
(:move-args :known-return)
(:info val-locs)
(:ignore val-locs vals)
(move ocfp-temp cfp-tn)
(inst ret zero-tn lip 1)
(trace-table-entry trace-table-normal)))
-
\f
-;;;; Full call:
+;;;; full call:
;;;;
;;;; There is something of a cross-product effect with full calls.
;;;; Different versions are used depending on whether we know the
(do-next-filler)))
#!-gengc
(inst ldl function
- (- (ash closure-function-slot word-shift)
- function-pointer-type) lexenv)
+ (- (ash closure-fun-slot word-shift)
+ fun-pointer-type) lexenv)
#!-gengc
(do-next-filler)
#!-gengc
(inst addq function
- (- (ash function-code-offset word-shift)
- function-pointer-type) entry-point)
+ (- (ash simple-fun-code-offset word-shift)
+ fun-pointer-type) entry-point)
#!+gengc
(inst ldl entry-point
(- (ash closure-entry-point-slot word-shift)
- function-pointer-type) lexenv)
+ fun-pointer-type) lexenv)
#!+gengc
(do-next-filler)))
(loop
(move lexenv closure)))
;;; Copy a &MORE arg from the argument area to the end of the current
-;;; frame. FIXED is the number of non-more arguments.
+;;; frame. FIXED is the number of non-&MORE arguments.
(define-vop (copy-more-arg)
(:temporary (:sc any-reg :offset nl0-offset) result)
(:temporary (:sc any-reg :offset nl1-offset) count)
(do-regs (gen-label))
(done (gen-label)))
(when (< fixed register-arg-count)
- ;; Save a pointer to the results so we can fill in register args.
- ;; We don't need this if there are more fixed args than reg args.
+ ;; Save a pointer to the results so we can fill in register
+ ;; args. We don't need this if there are more fixed args than
+ ;; reg args.
(move csp-tn result))
;; Allocate the space on the stack.
(cond ((zerop fixed)
(inst ble count done)
(inst addq csp-tn count csp-tn)))
(when (< fixed register-arg-count)
- ;; We must stop when we run out of stack args, not when we run out of
- ;; more args.
+ ;; We must stop when we run out of stack args, not when we run
+ ;; out of &MORE args.
(inst subq nargs-tn (fixnumize register-arg-count) count))
;; Initialize dst to be end of stack.
(move csp-tn dst)
;; Everything of interest in registers.
(inst ble count do-regs)
- ;; Initialize src to be end of args.
+ ;; Initialize SRC to be end of args.
(inst addq cfp-tn nargs-tn src)
(emit-label loop)
(emit-label do-regs)
(when (< fixed register-arg-count)
- ;; Now we have to deposit any more args that showed up in registers.
- ;; We know there is at least one more arg, otherwise we would have
- ;; branched to done up at the top.
+ ;; Now we have to deposit any more args that showed up in
+ ;; registers. We know there is at least one &MORE arg,
+ ;; otherwise we would have branched to DONE up at the top.
(inst subq nargs-tn (fixnumize (1+ fixed)) count)
(do ((i fixed (1+ i)))
((>= i register-arg-count))
(inst subq count (fixnumize 1) count)))
(emit-label done))))
-;;; &More args are stored consecutively on the stack, starting
+;;; &MORE args are stored consecutively on the stack, starting
;;; immediately at the context pointer. The context pointer is not
;;; typed, so the lowtag is 0.
(define-full-reffer more-arg * 0 0 (descriptor-reg any-reg) * %more-arg)
;; Store the value in the car (in delay slot)
(storew temp dst 0 list-pointer-type)
- ;; Dec count, and if != zero, go back for more.
+ ;; Decrement count, and if != zero, go back for more.
(inst subq count (fixnumize 1) count)
(inst bne count loop)
(emit-label done))))
;;; Return the location and size of the &MORE arg glob created by
-;;; Copy-More-Arg. Supplied is the total number of arguments supplied
+;;; COPY-MORE-ARG. Supplied is the total number of arguments supplied
;;; (originally passed in NARGS.) Fixed is the number of non-&rest
;;; arguments.
;;;
-;;; We must duplicate some of the work done by Copy-More-Arg, since at
+;;; We must duplicate some of the work done by COPY-MORE-ARG, since at
;;; that time the environment is in a pretty brain-damaged state,
;;; preventing this info from being returned as values. What we do is
;;; compute supplied - fixed, and return a pointer that many words
(inst subq supplied (fixnumize fixed) count)
(inst subq csp-tn count context)))
-
-;;; Signal wrong argument count error if Nargs isn't equal to Count.
+;;; Signal wrong argument count error if NARGS isn't equal to COUNT.
(define-vop (verify-argument-count)
(:policy :fast-safe)
(:translate sb!c::%verify-argument-count)