X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fppc%2Fnlx.lisp;h=b950e5ed924f8e610aadbc2d2209fb0f0149a08a;hb=2253ebaef8a0a1527d2282a1c10f48c62e0d4a83;hp=58506d002c6c15651fa7c4075aa74c3337fdd6d3;hpb=db0691b05cc99ce010ecae78bb532b594aea1859;p=sbcl.git diff --git a/src/compiler/ppc/nlx.lisp b/src/compiler/ppc/nlx.lisp index 58506d0..b950e5e 100644 --- a/src/compiler/ppc/nlx.lisp +++ b/src/compiler/ppc/nlx.lisp @@ -1,43 +1,37 @@ -;;; Written by Rob MacLachlan -;;; +;;;; the PPC definitions of VOPs used for non-local exit (throw, +;;;; lexical exit, etc.) + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; This software is derived from the CMU CL system, which was +;;;; written at Carnegie Mellon University and released into the +;;;; public domain. The software is in the public domain and is +;;;; provided with absolutely no warranty. See the COPYING and CREDITS +;;;; files for more information. + (in-package "SB!VM") -;;; MAKE-NLX-SP-TN -- Interface -;;; -;;; Make an environment-live stack TN for saving the SP for NLX entry. -;;; +;;; Make an environment-live stack TN for saving the SP for NLX entry. (!def-vm-support-routine make-nlx-sp-tn (env) (physenv-live-tn (make-representation-tn *fixnum-primitive-type* immediate-arg-scn) env)) -;;; Make-NLX-Entry-Arg-Start-Location -- Interface -;;; -;;; Make a TN for the argument count passing location for a +;;; Make a TN for the argument count passing location for a ;;; non-local entry. -;;; (!def-vm-support-routine make-nlx-entry-arg-start-location () (make-wired-tn *fixnum-primitive-type* immediate-arg-scn ocfp-offset)) -;;; Save and restore dynamic environment. -;;; -;;; These VOPs are used in the reentered function to restore the appropriate -;;; dynamic environment. Currently we only save the Current-Catch and binding -;;; stack pointer. We don't need to save/restore the current unwind-protect, -;;; since unwind-protects are implicitly processed during unwinding. If there -;;; were any additional stacks, then this would be the place to restore the top +;;; These VOPs are used in the reentered function to restore the +;;; appropriate dynamic environment. Currently we only save the +;;; CURRENT-CATCH and binding stack pointer. We don't need to +;;; save/restore the current unwind-protect, since UNWIND-PROTECTs are +;;; implicitly processed during unwinding. If there were any +;;; additional stacks, then this would be the place to restore the top ;;; pointers. - -;;; Make-Dynamic-State-TNs -- Interface -;;; -;;; Return a list of TNs that can be used to snapshot the dynamic state for -;;; use with the Save/Restore-Dynamic-Environment VOPs. -;;; -(!def-vm-support-routine make-dynamic-state-tns () - (make-n-tns 4 *backend-t-primitive-type*)) - (define-vop (save-dynamic-state) (:results (catch :scs (descriptor-reg)) (nfp :scs (descriptor-reg)) @@ -86,13 +80,13 @@ (:temporary (:scs (descriptor-reg)) temp) (:temporary (:scs (non-descriptor-reg)) ndescr) (:generator 22 - (inst addi block cfp-tn (* (tn-offset tn) sb!vm:n-word-bytes)) + (inst addi block cfp-tn (* (tn-offset tn) n-word-bytes)) (load-symbol-value temp *current-unwind-protect-block*) - (storew temp block sb!vm:unwind-block-current-uwp-slot) - (storew cfp-tn block sb!vm:unwind-block-current-cont-slot) - (storew code-tn block sb!vm:unwind-block-current-code-slot) + (storew temp block unwind-block-current-uwp-slot) + (storew cfp-tn block unwind-block-current-cont-slot) + (storew code-tn block unwind-block-current-code-slot) (inst compute-lra-from-code temp code-tn entry-label ndescr) - (storew temp block sb!vm:catch-block-entry-pc-slot))) + (storew temp block catch-block-entry-pc-slot))) ;;; Like Make-Unwind-Block, except that we also store in the specified tag, and @@ -107,17 +101,17 @@ (:temporary (:scs (descriptor-reg) :target block :to (:result 0)) result) (:temporary (:scs (non-descriptor-reg)) ndescr) (:generator 44 - (inst addi result cfp-tn (* (tn-offset tn) sb!vm:n-word-bytes)) + (inst addi result cfp-tn (* (tn-offset tn) n-word-bytes)) (load-symbol-value temp *current-unwind-protect-block*) - (storew temp result sb!vm:catch-block-current-uwp-slot) - (storew cfp-tn result sb!vm:catch-block-current-cont-slot) - (storew code-tn result sb!vm:catch-block-current-code-slot) + (storew temp result catch-block-current-uwp-slot) + (storew cfp-tn result catch-block-current-cont-slot) + (storew code-tn result catch-block-current-code-slot) (inst compute-lra-from-code temp code-tn entry-label ndescr) - (storew temp result sb!vm:catch-block-entry-pc-slot) + (storew temp result catch-block-entry-pc-slot) - (storew tag result sb!vm:catch-block-tag-slot) + (storew tag result catch-block-tag-slot) (load-symbol-value temp *current-catch-block*) - (storew temp result sb!vm:catch-block-previous-catch-slot) + (storew temp result catch-block-previous-catch-slot) (store-symbol-value result *current-catch-block*) (move block result))) @@ -130,7 +124,7 @@ (:args (tn)) (:temporary (:scs (descriptor-reg)) new-uwp) (:generator 7 - (inst addi new-uwp cfp-tn (* (tn-offset tn) sb!vm:n-word-bytes)) + (inst addi new-uwp cfp-tn (* (tn-offset tn) n-word-bytes)) (store-symbol-value new-uwp *current-unwind-protect-block*))) @@ -140,7 +134,7 @@ (:translate %catch-breakup) (:generator 17 (load-symbol-value block *current-catch-block*) - (loadw block block sb!vm:catch-block-previous-catch-slot) + (loadw block block catch-block-previous-catch-slot) (store-symbol-value block *current-catch-block*))) (define-vop (unlink-unwind-protect) @@ -149,7 +143,7 @@ (:translate %unwind-protect-breakup) (:generator 17 (load-symbol-value block *current-unwind-protect-block*) - (loadw block block sb!vm:unwind-block-current-uwp-slot) + (loadw block block unwind-block-current-uwp-slot) (store-symbol-value block *current-unwind-protect-block*)))