X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Falpha%2Fnlx.lisp;h=2e414f2c59d54db3f8b6b50cdba9de8fc747c96f;hb=f9ef8b045b60ae064c7bd40af599b46707ea4d8a;hp=3fd46b201824f0fe994dc345398e6d6bf0ba1f42;hpb=aa2dc9529460ea0d9c99998dc87283fc1a43e808;p=sbcl.git diff --git a/src/compiler/alpha/nlx.lisp b/src/compiler/alpha/nlx.lisp index 3fd46b2..2e414f2 100644 --- a/src/compiler/alpha/nlx.lisp +++ b/src/compiler/alpha/nlx.lisp @@ -1,4 +1,4 @@ -;;;; the definitions of VOPs used for non-local exit (throw, lexical +;;;; the 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 @@ -14,59 +14,46 @@ ;;; Make an environment-live stack TN for saving the SP for NLX entry. (!def-vm-support-routine make-nlx-sp-tn (env) - (environment-live-tn + (physenv-live-tn (make-representation-tn *fixnum-primitive-type* immediate-arg-scn) env)) ;;; Make a TN for the argument count passing location for a ;;; non-local entry. -(!def-vm-support-routine make-nlx-entry-argument-start-location () +(!def-vm-support-routine make-nlx-entry-arg-start-location () (make-wired-tn *fixnum-primitive-type* immediate-arg-scn ocfp-offset)) - ;;;; save and restoring the 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 +;;;; 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 +;;;; additional stacks (as e.g. there was an interpreter "eval stack" +;;;; before sbcl-0.7.0), then this would be the place to restore the ;;;; top pointers. - -;;; 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 () - (list (make-normal-tn *backend-t-primitive-type*) - (make-normal-tn *backend-t-primitive-type*) - (make-normal-tn *backend-t-primitive-type*) - (make-normal-tn *backend-t-primitive-type*))) - (define-vop (save-dynamic-state) (:results (catch :scs (descriptor-reg)) (nfp :scs (descriptor-reg)) - (nsp :scs (descriptor-reg)) - (eval :scs (descriptor-reg))) + (nsp :scs (descriptor-reg))) (:vop-var vop) (:generator 13 (load-symbol-value catch *current-catch-block*) (let ((cur-nfp (current-nfp-tn vop))) (when cur-nfp (inst mskll cur-nfp 4 nfp))) - (inst mskll nsp-tn 4 nsp) - (load-symbol-value eval *eval-stack-top*))) + (inst mskll nsp-tn 4 nsp))) (define-vop (restore-dynamic-state) (:args (catch :scs (descriptor-reg)) (nfp :scs (descriptor-reg)) - (nsp :scs (descriptor-reg)) - (eval :scs (descriptor-reg))) + (nsp :scs (descriptor-reg))) (:vop-var vop) (:temporary (:sc any-reg) temp) (:generator 10 (store-symbol-value catch *current-catch-block*) - (store-symbol-value eval *eval-stack-top*) (inst mskll nsp-tn 0 temp) (let ((cur-nfp (current-nfp-tn vop))) (when cur-nfp @@ -94,7 +81,7 @@ (:temporary (:scs (descriptor-reg)) temp) (:temporary (:scs (non-descriptor-reg)) ndescr) (:generator 22 - (inst lda block (* (tn-offset tn) sb!vm:word-bytes) cfp-tn) + (inst lda block (* (tn-offset tn) sb!vm:n-word-bytes) cfp-tn) (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) @@ -107,14 +94,14 @@ ;;; specified tag, and link the block into the Current-Catch list. (define-vop (make-catch-block) (:args (tn) - (tag :scs (descriptor-reg))) + (tag :scs (any-reg descriptor-reg))) (:info entry-label) (:results (block :scs (any-reg))) (:temporary (:scs (descriptor-reg)) temp) (:temporary (:scs (descriptor-reg) :target block :to (:result 0)) result) (:temporary (:scs (non-descriptor-reg)) ndescr) (:generator 44 - (inst lda result (* (tn-offset tn) sb!vm:word-bytes) cfp-tn) + (inst lda result (* (tn-offset tn) sb!vm:n-word-bytes) cfp-tn) (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) @@ -135,7 +122,7 @@ (:args (tn)) (:temporary (:scs (descriptor-reg)) new-uwp) (:generator 7 - (inst lda new-uwp (* (tn-offset tn) sb!vm:word-bytes) cfp-tn) + (inst lda new-uwp (* (tn-offset tn) sb!vm:n-word-bytes) cfp-tn) (store-symbol-value new-uwp *current-unwind-protect-block*))) (define-vop (unlink-catch-block) @@ -249,10 +236,10 @@ ;; Copy stuff on stack. (emit-label loop) (loadw temp src) - (inst lda src sb!vm:word-bytes src) + (inst lda src sb!vm:n-word-bytes src) (storew temp dst) (inst lda num (fixnumize -1) num) - (inst lda dst sb!vm:word-bytes dst) + (inst lda dst sb!vm:n-word-bytes dst) (inst bne num loop) (emit-label done)