Skip to content
Snippets Groups Projects
Commit 1e8c6115 authored by wlott's avatar wlott
Browse files

Added ``return-single'' vop, which is the same as ``return'' but is

optimized for the single value return case.
parent 6d3852c0
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,11 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.43 1992/04/01 19:56:11 wlott Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.44 1992/04/27 20:03:15 wlott Exp $")
;;;
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.43 1992/04/01 19:56:11 wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.44 1992/04/27 20:03:15 wlott Exp $
;;;
;;; This file contains the VM definition of function call for the MIPS.
;;;
......@@ -915,6 +915,29 @@ default-value-8
;;;; Unknown values return:
;;; Return a single value using the unknown-values convention.
;;;
(define-vop (return-single)
(:args (old-fp :scs (any-reg))
(return-pc :scs (descriptor-reg))
(value))
(:ignore value)
(:temporary (:scs (interior-reg)) lip)
(:vop-var vop)
(:generator 6
;; Clear the number stack.
(trace-table-entry trace-table-function-epilogue)
(let ((cur-nfp (current-nfp-tn vop)))
(when cur-nfp
(inst addu nsp-tn cur-nfp
(bytes-needed-for-non-descriptor-stack-frame))))
;; Clear the control stack, and restore the frame pointer.
(move csp-tn cfp-tn)
(move cfp-tn old-fp)
;; Out of here.
(lisp-return return-pc lip :offset 2)
(trace-table-entry trace-table-normal)))
;;; Do unknown-values return of a fixed number of values. The Values are
;;; required to be set up in the standard passing locations. Nvals is the
......
;;; -*- Package: SPARC -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the Spice Lisp project at
;;; Carnegie-Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of Spice Lisp, please contact
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of CMU Common Lisp, please contact
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/call.lisp,v 1.11 1992/04/27 20:03:45 wlott Exp $")
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/call.lisp,v 1.10 1992/04/01 20:11:48 wlott Exp $
;;; **********************************************************************
;;;
;;; This file contains the VM definition of function call for the SPARC.
;;;
......@@ -896,6 +898,29 @@ default-value-8
;;;; Unknown values return:
;;; Return a single value using the unknown-values convention.
;;;
(define-vop (return-single)
(:args (old-fp :scs (any-reg))
(return-pc :scs (descriptor-reg))
(value))
(:ignore value)
(:vop-var vop)
(:generator 6
(trace-table-entry trace-table-function-epilogue)
;; Clear the number stack.
(let ((cur-nfp (current-nfp-tn vop)))
(when cur-nfp
(inst add nsp-tn cur-nfp
(- (bytes-needed-for-non-descriptor-stack-frame)
number-stack-displacement))))
;; Clear the control stack, and restore the frame pointer.
(move csp-tn cfp-tn)
(move cfp-tn old-fp)
;; Out of here.
(lisp-return return-pc :offset 2)))
(trace-table-entry trace-table-normal)))
;;; Do unknown-values return of a fixed number of values. The Values are
;;; required to be set up in the standard passing locations. Nvals is the
;;; number of values returned.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment