X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fppc%2Fassem-rtns.lisp;h=e6839a993bfd38d179de272ad11cb03d1f7d4c95;hb=e240610bcc02cfe6f970131a362502d33be114c5;hp=b84f882e4a297d9f002d30a79ce93ebd6fe84369;hpb=cab2c71bb1bb8a575d9eebdae335e731daa64183;p=sbcl.git diff --git a/src/assembly/ppc/assem-rtns.lisp b/src/assembly/ppc/assem-rtns.lisp index b84f882..e6839a9 100644 --- a/src/assembly/ppc/assem-rtns.lisp +++ b/src/assembly/ppc/assem-rtns.lisp @@ -21,7 +21,7 @@ (:temp dst any-reg cfunc-offset) (:temp temp descriptor-reg l0-offset) - + ;; These are needed so we can get at the register args. (:temp a0 descriptor-reg a0-offset) (:temp a1 descriptor-reg a1-offset) @@ -55,7 +55,7 @@ (inst stw temp dst 0) (inst addi dst dst n-word-bytes) (inst bge loop) - + (inst b done) DEFAULT-A0-AND-ON @@ -66,12 +66,12 @@ DEFAULT-A3-AND-ON (inst mr a3 null-tn) DONE - + ;; Clear the stack. (move ocfp-tn cfp-tn) (move cfp-tn ocfp) (inst add csp-tn ocfp-tn nvals) - + ;; Return. (lisp-return lra lip)) @@ -107,7 +107,7 @@ ;; Calculate NARGS (as a fixnum) (inst sub nargs csp-tn args) - + ;; Load the argument regs (must do this now, 'cause the blt might ;; trash these locations) (inst lwz a0 args (* 0 n-word-bytes)) @@ -120,7 +120,7 @@ (inst addi src args (* n-word-bytes register-arg-count)) (inst ble done) (inst addi dst cfp-tn (* n-word-bytes register-arg-count)) - + LOOP ;; Copy one arg. (inst lwz temp src 0) @@ -129,7 +129,7 @@ (inst addic. count count (fixnumize -1)) (inst addi dst dst n-word-bytes) (inst bgt loop) - + DONE ;; We are done. Do the jump. (loadw temp lexenv closure-fun-slot fun-pointer-lowtag) @@ -140,71 +140,71 @@ ;;;; 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) - (:arg start (any-reg descriptor-reg) ocfp-offset) - (:arg count (any-reg descriptor-reg) nargs-offset) - (:temp lra descriptor-reg lra-offset) - (:temp lip interior-reg lip-offset) - (:temp cur-uwp any-reg nl0-offset) - (:temp next-uwp any-reg nl1-offset) - (:temp target-uwp any-reg nl2-offset)) + (:return-style :none) + (:translate %continue-unwind) + (:policy :fast-safe)) + ((:arg block (any-reg descriptor-reg) a0-offset) + (:arg start (any-reg descriptor-reg) ocfp-offset) + (:arg count (any-reg descriptor-reg) nargs-offset) + (:temp lra descriptor-reg lra-offset) + (:temp lip interior-reg lip-offset) + (:temp cur-uwp any-reg nl0-offset) + (:temp next-uwp any-reg nl1-offset) + (:temp target-uwp any-reg nl2-offset)) (declare (ignore start count)) - (let ((error (generate-error-code nil invalid-unwind-error))) + (let ((error (generate-error-code nil 'invalid-unwind-error))) (inst cmpwi block 0) (inst beq error)) - - (load-symbol-value cur-uwp *current-unwind-protect-block*) + + (load-tl-symbol-value cur-uwp *current-unwind-protect-block*) (loadw target-uwp block unwind-block-current-uwp-slot) (inst cmpw cur-uwp target-uwp) (inst bne do-uwp) - + (move cur-uwp block) DO-EXIT - + (loadw cfp-tn cur-uwp unwind-block-current-cont-slot) (loadw code-tn cur-uwp unwind-block-current-code-slot) (loadw lra cur-uwp unwind-block-entry-pc-slot) - (lisp-return lra lip :frob-code nil) + (lisp-return lra lip) DO-UWP (loadw next-uwp cur-uwp unwind-block-current-uwp-slot) - (store-symbol-value next-uwp *current-unwind-protect-block*) + (store-tl-symbol-value next-uwp *current-unwind-protect-block* cfp-tn) (inst b do-exit)) (define-assembly-routine (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)) - + (: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)) + (declare (ignore start count)) - (load-symbol-value catch *current-catch-block*) - + (load-tl-symbol-value catch *current-catch-block*) + loop - - (let ((error (generate-error-code nil unseen-throw-tag-error target))) + + (let ((error (generate-error-code nil 'unseen-throw-tag-error target))) (inst cmpwi catch 0) (inst beq error)) - + (loadw tag catch catch-block-tag-slot) (inst cmpw tag target) (inst beq exit) (loadw catch catch catch-block-previous-catch-slot) (inst b loop) - - exit - - (move target catch) - (inst ba (make-fixup 'unwind :assembly-routine))) - + exit + (move target catch) + ;; reuse catch + (inst lr catch (make-fixup 'unwind :assembly-routine)) + (inst mtlr catch) + (inst blr))