X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fassembly%2Fmips%2Fassem-rtns.lisp;h=f0f6397462ad96df93bc51b74252dcec15823cf1;hb=49b994b480409bc9bb184945d7d66f5d15299042;hp=c1726557e0e18da04ce4ef14b0162f446d09889f;hpb=4ae1b794a5d6a90794468cf8017f5307f2c30dfe;p=sbcl.git diff --git a/src/assembly/mips/assem-rtns.lisp b/src/assembly/mips/assem-rtns.lisp index c172655..f0f6397 100644 --- a/src/assembly/mips/assem-rtns.lisp +++ b/src/assembly/mips/assem-rtns.lisp @@ -17,7 +17,7 @@ ;; These are just needed to facilitate the transfer (:temp lip interior-reg lip-offset) (:temp count any-reg nl2-offset) - (:temp dst any-reg nl4-offset) + (:temp dst any-reg nl3-offset) (:temp temp descriptor-reg l0-offset) ;; These are needed so we can get at the register args. @@ -59,28 +59,28 @@ (inst subu count (fixnumize 1)) (inst bne count zero-tn loop) (inst addu dst n-word-bytes) - + (inst b done) (inst nop) DEFAULT-A0-AND-ON - (inst move a0 null-tn) - (inst move a1 null-tn) + (move a0 null-tn) + (move a1 null-tn) DEFAULT-A2-AND-ON - (inst move a2 null-tn) + (move a2 null-tn) DEFAULT-A3-AND-ON - (inst move a3 null-tn) + (move a3 null-tn) DEFAULT-A4-AND-ON - (inst move a4 null-tn) + (move a4 null-tn) DEFAULT-A5-AND-ON - (inst move a5 null-tn) + (move a5 null-tn) DONE - + ;; Clear the stack. (move ocfp-tn cfp-tn) (move cfp-tn ocfp) (inst addu csp-tn ocfp-tn nvals) - + ;; Return. (lisp-return lra lip)) @@ -119,7 +119,7 @@ ;; Calculate NARGS (as a fixnum) (inst subu nargs csp-tn args) - + ;; Load the argument regs (must do this now, 'cause the blt might ;; trash these locations) (inst lw a0 args (* 0 n-word-bytes)) @@ -134,7 +134,7 @@ (inst blez count done) (inst addu src args (* n-word-bytes register-arg-count)) (inst addu dst cfp-tn (* n-word-bytes register-arg-count)) - + LOOP ;; Copy one arg. (inst lw temp src) @@ -143,18 +143,18 @@ (inst addu count (fixnumize -1)) (inst bgtz count loop) (inst addu dst dst n-word-bytes) - + DONE ;; We are done. Do the jump. - (progn - (loadw temp lexenv closure-fun-slot fun-pointer-lowtag) - (lisp-jump temp lip))) + (loadw temp lexenv closure-fun-slot fun-pointer-lowtag) + (lisp-jump temp lip)) ;;;; Non-local exit noise. (define-assembly-routine (unwind + (:return-style :none) (:translate %continue-unwind) (:policy :fast-safe)) ((:arg block (any-reg descriptor-reg) a0-offset) @@ -168,56 +168,55 @@ (declare (ignore start count)) (let ((error (generate-error-code nil invalid-unwind-error))) - (inst beq block zero-tn error)) - + (inst beq block zero-tn error) + (inst nop)) + (load-symbol-value cur-uwp *current-unwind-protect-block*) (loadw target-uwp block unwind-block-current-uwp-slot) (inst bne cur-uwp target-uwp do-uwp) (inst nop) - + (move cur-uwp block) - do-exit - + DO-EXIT + (loadw cfp-tn cur-uwp unwind-block-current-cont-slot) (loadw code-tn cur-uwp unwind-block-current-code-slot) - (progn - (loadw lra cur-uwp unwind-block-entry-pc-slot) - (lisp-return lra lip :frob-code nil)) + (loadw lra cur-uwp unwind-block-entry-pc-slot) + (lisp-return lra lip :frob-code nil) - do-uwp + DO-UWP (loadw next-uwp cur-uwp unwind-block-current-uwp-slot) (inst b do-exit) (store-symbol-value next-uwp *current-unwind-protect-block*)) (define-assembly-routine - throw + (throw + (:return-style :none)) ((:arg target descriptor-reg a0-offset) (:arg start any-reg ocfp-offset) (:arg count any-reg nargs-offset) (:temp catch any-reg a1-offset) (:temp tag descriptor-reg a2-offset)) - - (progn start count) ; We just need them in the registers. + + (declare (ignore start count)) ; We only need them in the registers. (load-symbol-value catch *current-catch-block*) - - loop - + + LOOP + (let ((error (generate-error-code nil unseen-throw-tag-error target))) (inst beq catch zero-tn error) (inst nop)) - + (loadw tag catch catch-block-tag-slot) (inst beq tag target exit) (inst nop) - (loadw catch catch catch-block-previous-catch-slot) (inst b loop) - (inst nop) - - exit - - (move target catch) + (loadw catch catch catch-block-previous-catch-slot) + + EXIT + (inst j (make-fixup 'unwind :assembly-routine)) - (inst nop)) + (move target catch t))