X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fnlx.lisp;h=a0030d41516ffc92dc020f6f8ab82e8e6c409d48;hb=0dcc957ae6bf24809fda82fd59c134e70058c42a;hp=f354b9227bc58fa07a134c8a1ddd244654ca71c4;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/compiler/x86/nlx.lisp b/src/compiler/x86/nlx.lisp index f354b92..a0030d4 100644 --- a/src/compiler/x86/nlx.lisp +++ b/src/compiler/x86/nlx.lisp @@ -11,21 +11,18 @@ (in-package "SB!VM") -(file-comment - "$Header$") - ;;; Make an environment-live stack TN for saving the SP for NLX entry. -(def-vm-support-routine make-nlx-sp-tn (env) +(!def-vm-support-routine make-nlx-sp-tn (env) (environment-live-tn (make-representation-tn *fixnum-primitive-type* any-reg-sc-number) 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-argument-start-location () (make-wired-tn *fixnum-primitive-type* any-reg-sc-number ebx-offset)) (defun catch-block-ea (tn) - (assert (sc-is tn catch-block)) + (aver (sc-is tn catch-block)) (make-ea :dword :base ebp-tn :disp (- (* (+ (tn-offset tn) catch-block-size) word-bytes)))) @@ -44,7 +41,7 @@ ;;; 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 () +(!def-vm-support-routine make-dynamic-state-tns () (make-n-tns 3 *backend-t-primitive-type*)) (define-vop (save-dynamic-state) @@ -52,8 +49,8 @@ (eval :scs (descriptor-reg)) (alien-stack :scs (descriptor-reg))) (:generator 13 - (load-symbol-value catch sb!impl::*current-catch-block*) - (load-symbol-value eval sb!impl::*eval-stack-top*) + (load-symbol-value catch *current-catch-block*) + (load-symbol-value eval *eval-stack-top*) (load-symbol-value alien-stack *alien-stack*))) (define-vop (restore-dynamic-state) @@ -61,8 +58,8 @@ (eval :scs (descriptor-reg)) (alien-stack :scs (descriptor-reg))) (:generator 10 - (store-symbol-value catch sb!impl::*current-catch-block*) - (store-symbol-value eval sb!impl::*eval-stack-top*) + (store-symbol-value catch *current-catch-block*) + (store-symbol-value eval *eval-stack-top*) (store-symbol-value alien-stack *alien-stack*))) (define-vop (current-stack-pointer) @@ -86,7 +83,7 @@ (:results (block :scs (any-reg))) (:generator 22 (inst lea block (catch-block-ea tn)) - (load-symbol-value temp sb!impl::*current-unwind-protect-block*) + (load-symbol-value temp *current-unwind-protect-block*) (storew temp block unwind-block-current-uwp-slot) (storew ebp-tn block unwind-block-current-cont-slot) (storew (make-fixup nil :code-object entry-label) @@ -102,15 +99,15 @@ (:temporary (:sc descriptor-reg) temp) (:generator 44 (inst lea block (catch-block-ea tn)) - (load-symbol-value temp sb!impl::*current-unwind-protect-block*) + (load-symbol-value temp *current-unwind-protect-block*) (storew temp block unwind-block-current-uwp-slot) (storew ebp-tn block unwind-block-current-cont-slot) (storew (make-fixup nil :code-object entry-label) block catch-block-entry-pc-slot) (storew tag block catch-block-tag-slot) - (load-symbol-value temp sb!impl::*current-catch-block*) + (load-symbol-value temp *current-catch-block*) (storew temp block catch-block-previous-catch-slot) - (store-symbol-value block sb!impl::*current-catch-block*))) + (store-symbol-value block *current-catch-block*))) ;;; Just set the current unwind-protect to TN's address. This instantiates an ;;; unwind block as an unwind-protect. @@ -119,25 +116,25 @@ (:temporary (:sc unsigned-reg) new-uwp) (:generator 7 (inst lea new-uwp (catch-block-ea tn)) - (store-symbol-value new-uwp sb!impl::*current-unwind-protect-block*))) + (store-symbol-value new-uwp *current-unwind-protect-block*))) (define-vop (unlink-catch-block) (:temporary (:sc unsigned-reg) block) (:policy :fast-safe) (:translate %catch-breakup) (:generator 17 - (load-symbol-value block sb!impl::*current-catch-block*) + (load-symbol-value block *current-catch-block*) (loadw block block catch-block-previous-catch-slot) - (store-symbol-value block sb!impl::*current-catch-block*))) + (store-symbol-value block *current-catch-block*))) (define-vop (unlink-unwind-protect) (:temporary (:sc unsigned-reg) block) (:policy :fast-safe) (:translate %unwind-protect-breakup) (:generator 17 - (load-symbol-value block sb!impl::*current-unwind-protect-block*) + (load-symbol-value block *current-unwind-protect-block*) (loadw block block unwind-block-current-uwp-slot) - (store-symbol-value block sb!impl::*current-unwind-protect-block*))) + (store-symbol-value block *current-unwind-protect-block*))) ;;;; NLX entry VOPs (define-vop (nlx-entry) @@ -157,7 +154,7 @@ (cond ((zerop nvals)) ((= nvals 1) (let ((no-values (gen-label))) - (inst mov (tn-ref-tn values) *nil-value*) + (inst mov (tn-ref-tn values) nil-value) (inst jecxz no-values) (loadw (tn-ref-tn values) start -1) (emit-label no-values))) @@ -183,7 +180,7 @@ (assemble (*elsewhere*) (dolist (def (defaults)) (emit-label (car def)) - (inst mov (cdr def) *nil-value*)) + (inst mov (cdr def) nil-value)) (inst jmp defaulting-done)))))) (inst mov esp-tn sp)))