(note-this-location vop :single-value-return)
(move csp-tn ocfp-tn)
(inst nop))
- (inst compute-code-from-lra code-tn code-tn lra-label temp))
+ (inst compute-code-from-lra code-tn lra-tn lra-label temp))
(let ((regs-defaulted (gen-label))
(defaulting-done (gen-label))
(default-stack-vals (gen-label)))
(inst b defaulting-done)
(trace-table-entry trace-table-normal))))))
- (inst compute-code-from-lra code-tn code-tn lra-label temp)))
+ (inst compute-code-from-lra code-tn lra-tn lra-label temp)))
(values))
\f
(inst b variable-values)
(inst nop))
- (inst compute-code-from-lra code-tn code-tn lra-label temp)
+ (inst compute-code-from-lra code-tn lra-tn lra-label temp)
(inst addi csp-tn csp-tn 4)
(storew (first *register-arg-tns*) csp-tn -1)
(inst subi start csp-tn 4)
(assemble (*elsewhere*)
(trace-table-entry trace-table-fun-prologue)
(emit-label variable-values)
- (inst compute-code-from-lra code-tn code-tn lra-label temp)
+ (inst compute-code-from-lra code-tn lra-tn lra-label temp)
(do ((arg *register-arg-tns* (rest arg))
(i 0 (1+ i)))
((null arg))
;;; Return a single value using the unknown-values convention.
(define-vop (return-single)
- (:args (old-fp :scs (any-reg))
- (return-pc :scs (descriptor-reg))
+ (:args (old-fp :scs (any-reg) :to :eval)
+ (return-pc :scs (descriptor-reg) :target lra)
(value))
(:ignore value)
+ (:temporary (:sc descriptor-reg :offset lra-offset :from (:argument 1)) lra)
(:temporary (:scs (interior-reg)) lip)
(:vop-var vop)
(:generator 6
(trace-table-entry trace-table-fun-epilogue)
+ (move lra return-pc)
;; Clear the number stack.
(let ((cur-nfp (current-nfp-tn vop)))
(when cur-nfp
(move csp-tn cfp-tn)
(move cfp-tn old-fp)
;; Out of here.
- (lisp-return return-pc lip :offset 2)
+ (lisp-return lra lip :offset 2)
(trace-table-entry trace-table-normal)))
;;; Do unknown-values return of a fixed number of values. The Values are
(define-vop (return)
(:args
(old-fp :scs (any-reg))
- (return-pc :scs (descriptor-reg) :to (:eval 1))
+ (return-pc :scs (descriptor-reg) :to (:eval 1) :target lra)
(values :more t))
(:ignore values)
(:info nvals)
(:temporary (:sc descriptor-reg :offset a1-offset :from (:eval 0)) a1)
(:temporary (:sc descriptor-reg :offset a2-offset :from (:eval 0)) a2)
(:temporary (:sc descriptor-reg :offset a3-offset :from (:eval 0)) a3)
+ (:temporary (:sc descriptor-reg :offset lra-offset :from (:eval 1)) lra)
(:temporary (:sc any-reg :offset nargs-offset) nargs)
(:temporary (:sc any-reg :offset ocfp-offset) val-ptr)
(:temporary (:scs (interior-reg)) lip)
(:vop-var vop)
(:generator 6
(trace-table-entry trace-table-fun-epilogue)
+ (move lra return-pc)
;; Clear the number stack.
(let ((cur-nfp (current-nfp-tn vop)))
(when cur-nfp
(move csp-tn cfp-tn)
(move cfp-tn old-fp)
;; Out of here.
- (lisp-return return-pc lip :offset 2))
+ (lisp-return lra lip :offset 2))
(t
;; Establish the values pointer and values count.
(move val-ptr cfp-tn)
(dolist (reg (subseq (list a0 a1 a2 a3) nvals))
(move reg null-tn)))
;; And away we go.
- (lisp-return return-pc lip)))
+ (lisp-return lra lip)))
(trace-table-entry trace-table-normal)))
;;; Do unknown-values return of an arbitrary number of values (passed
(:vop-var vop)
(:generator 13
(trace-table-entry trace-table-fun-epilogue)
+ (move lra lra-arg)
(let ((not-single (gen-label)))
;; Clear the number stack.
(let ((cur-nfp (current-nfp-tn vop)))
;; Nope, not the single case.
(emit-label not-single)
(move old-fp old-fp-arg)
- (move lra lra-arg)
(move vals vals-arg)
(move nvals nvals-arg)
(inst lr temp (make-fixup 'return-multiple :assembly-routine))
;; (loadw ,lip ,function function-code-offset function-pointer-type)
(inst addi ,lip ,function (- (* n-word-bytes simple-fun-code-offset) fun-pointer-lowtag))
(inst mtctr ,lip)
- (move code-tn ,function)
(inst bctr)))
-(defmacro lisp-return (return-pc lip &key (offset 0) (frob-code t))
+(defmacro lisp-return (return-pc lip &key (offset 0))
"Return to RETURN-PC."
`(progn
(inst addi ,lip ,return-pc (- (* (1+ ,offset) n-word-bytes) other-pointer-lowtag))
(inst mtlr ,lip)
- ,@(if frob-code
- `((move code-tn ,return-pc)))
(inst blr)))
(defmacro emit-return-pc (label)
/* Compute the correct value for reg_CODE based on the LRA.
This is a "simple" matter of subtracting a constant from
- reg_CODE (where the LRA is stored by the return sequence) to
+ reg_LRA (where the LRA is stored by the return sequence) to
obtain a tagged pointer to the enclosing code component. Both
values are tagged OTHER_POINTER_LOWTAG, so we just have to
account for the eight words (see calculation for
RETURN_PC_HEADER_WIDETAG, above) between the two addresses.
Restoring reg_CODE doesn't appear to be strictly necessary
here, but let's observe the niceties.*/
- addi reg_CODE, reg_CODE, -32
+ addi reg_CODE, reg_LRA, -32
/* Multiple values are stored relative to reg_OCFP, which we
set to be the current top-of-stack. */
fun_end_breakpoint_multiple_values:
/* Compute the correct value for reg_CODE. See the
explanation for the single-value case, above. */
- addi reg_CODE, reg_CODE, -32
+ addi reg_CODE, reg_LRA, -32
/* The actual magic trap. */
CSYMBOL(fun_end_breakpoint_trap):