- ,@(unless (eq return :tail)
- '((lra-label (gen-label))))
- (filler
- (list :load-nargs
- ,@(if (eq return :tail)
- '((unless (location= ocfp ocfp-pass)
- :load-ocfp)
- (unless (location= lra lra-pass)
- :load-lra)
- (when cur-nfp
- :frob-nfp))
- '((when cur-nfp
- :frob-nfp)
- :comp-lra
- :save-fp
- :load-fp)))))
- (labels
- ((do-next-filler ()
- (when filler
- (ecase (pop filler)
- ((nil) (do-next-filler))
- (:load-nargs
- ,@(if variable
- `((inst sub csp-tn new-fp nargs-pass)
- ,@(let ((index -1))
- (mapcar #'(lambda (name)
- `(loadw ,name new-fp
- ,(incf index)))
- register-arg-names)))
- '((inst li (fixnumize nargs) nargs-pass))))
- ,@(if (eq return :tail)
- '((:load-ocfp
- (sc-case ocfp
- (any-reg
- (inst move ocfp ocfp-pass))
- (control-stack
- (loadw ocfp-pass cfp-tn (tn-offset ocfp)))))
- (:load-lra
- (sc-case lra
- (descriptor-reg
- (inst move lra lra-pass))
- (control-stack
- (loadw lra-pass cfp-tn (tn-offset lra)))))
- (:frob-nfp
- (inst move cur-nfp nsp-tn)))
- `((:frob-nfp
- (store-stack-tn nfp-save cur-nfp))
- (:comp-lra
- (inst compute-lra-from-code
- code-tn lra-label temp lra-pass))
- (:save-fp
- (inst move cfp-tn ocfp-pass))
- (:load-fp
- ,(if variable
- '(move new-fp cfp-tn)
- '(if (> nargs register-arg-count)
- (move new-fp cfp-tn)
- (move csp-tn cfp-tn))))))))))
-
- ,@(if named
- `((sc-case fdefn
- (descriptor-reg (move fdefn fdefn-pass))
- (control-stack
- (loadw fdefn-pass cfp-tn (tn-offset fdefn))
- (do-next-filler))
- (constant
- (loadw fdefn-pass code-tn (tn-offset fdefn)
- other-pointer-lowtag)
- (do-next-filler)))
- (loadw lip fdefn-pass fdefn-raw-addr-slot
- other-pointer-lowtag)
- (do-next-filler))
- `((sc-case arg-fun
- (descriptor-reg (move arg-fun lexenv))
- (control-stack
- (loadw lexenv cfp-tn (tn-offset arg-fun))
- (do-next-filler))
- (constant
- (loadw lexenv code-tn (tn-offset arg-fun)
- other-pointer-lowtag)
- (do-next-filler)))
- (loadw function lexenv closure-fun-slot
- fun-pointer-lowtag)
- (do-next-filler)
- (inst addi (- (ash simple-fun-code-offset word-shift)
- fun-pointer-lowtag)
- function lip)))
- (loop
- (cond ((null filler)
- (return))
- ((null (car filler))
- (pop filler))
- ((null (cdr filler))
- (return))
- (t
- (do-next-filler))))
-
- (note-this-location vop :call-site)
- (inst bv lip :nullify (null filler))
- (do-next-filler))
-
- ,@(ecase return
- (:fixed
- '((emit-return-pc lra-label)
- (default-unknown-values vop values nvals
- move-temp temp lra-label)
- (when cur-nfp
- (load-stack-tn cur-nfp nfp-save))))
- (:unknown
- '((emit-return-pc lra-label)
- (note-this-location vop :unknown-return)
- (receive-unknown-values values-start nvals start count
- lra-label temp)
- (when cur-nfp
- (load-stack-tn cur-nfp nfp-save))))
- (:tail)))
+ ,@(unless (eq return :tail)
+ '((lra-label (gen-label))))
+ (filler
+ (list :load-nargs
+ ,@(if (eq return :tail)
+ '((unless (location= ocfp ocfp-pass)
+ :load-ocfp)
+ (unless (location= lra lra-pass)
+ :load-lra)
+ (when cur-nfp
+ :frob-nfp))
+ '((when cur-nfp
+ :frob-nfp)
+ :comp-lra
+ :save-fp
+ :load-fp)))))
+ (labels
+ ((do-next-filler ()
+ (when filler
+ (ecase (pop filler)
+ ((nil) (do-next-filler))
+ (:load-nargs
+ ,@(if variable
+ `((inst sub csp-tn new-fp nargs-pass)
+ ,@(let ((index -1))
+ (mapcar #'(lambda (name)
+ `(loadw ,name new-fp
+ ,(incf index)))
+ register-arg-names)))
+ '((inst li (fixnumize nargs) nargs-pass))))
+ ,@(if (eq return :tail)
+ '((:load-ocfp
+ (sc-case ocfp
+ (any-reg
+ (inst move ocfp ocfp-pass))
+ (control-stack
+ (loadw ocfp-pass cfp-tn (tn-offset ocfp)))))
+ (:load-lra
+ (sc-case lra
+ (descriptor-reg
+ (inst move lra lra-pass))
+ (control-stack
+ (loadw lra-pass cfp-tn (tn-offset lra)))))
+ (:frob-nfp
+ (inst move cur-nfp nsp-tn)))
+ `((:frob-nfp
+ (store-stack-tn nfp-save cur-nfp))
+ (:comp-lra
+ (inst compute-lra-from-code
+ code-tn lra-label temp lra-pass))
+ (:save-fp
+ (inst move cfp-tn ocfp-pass))
+ (:load-fp
+ ,(if variable
+ '(move new-fp cfp-tn)
+ '(if (> nargs register-arg-count)
+ (move new-fp cfp-tn)
+ (move csp-tn cfp-tn))))))))))
+
+ ,@(if named
+ `((sc-case fdefn
+ (descriptor-reg (move fdefn fdefn-pass))
+ (control-stack
+ (loadw fdefn-pass cfp-tn (tn-offset fdefn))
+ (do-next-filler))
+ (constant
+ (loadw fdefn-pass code-tn (tn-offset fdefn)
+ other-pointer-lowtag)
+ (do-next-filler)))
+ (loadw lip fdefn-pass fdefn-raw-addr-slot
+ other-pointer-lowtag)
+ (do-next-filler))
+ `((sc-case arg-fun
+ (descriptor-reg (move arg-fun lexenv))
+ (control-stack
+ (loadw lexenv cfp-tn (tn-offset arg-fun))
+ (do-next-filler))
+ (constant
+ (loadw lexenv code-tn (tn-offset arg-fun)
+ other-pointer-lowtag)
+ (do-next-filler)))
+ (loadw function lexenv closure-fun-slot
+ fun-pointer-lowtag)
+ (do-next-filler)
+ (inst addi (- (ash simple-fun-code-offset word-shift)
+ fun-pointer-lowtag)
+ function lip)))
+ (loop
+ (cond ((null filler)
+ (return))
+ ((null (car filler))
+ (pop filler))
+ ((null (cdr filler))
+ (return))
+ (t
+ (do-next-filler))))
+
+ (note-this-location vop :call-site)
+ (inst bv lip :nullify (null filler))
+ (do-next-filler))
+
+ ,@(ecase return
+ (:fixed
+ '((emit-return-pc lra-label)
+ (default-unknown-values vop values nvals
+ move-temp temp lra-label)
+ (when cur-nfp
+ (load-stack-tn cur-nfp nfp-save))))
+ (:unknown
+ '((emit-return-pc lra-label)
+ (note-this-location vop :unknown-return)
+ (receive-unknown-values values-start nvals start count
+ lra-label temp)
+ (when cur-nfp
+ (load-stack-tn cur-nfp nfp-save))))
+ (:tail)))