X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Fmacros.lisp;h=17c1ddc01dec67a1ff88b3cac3a74c324badb7bb;hb=4ae1b794a5d6a90794468cf8017f5307f2c30dfe;hp=d0b30b781cc9a998a89aebbc6e6a6af3215483a4;hpb=68fd2d2dd6f265669a8957accd8a33e62786a97e;p=sbcl.git diff --git a/src/compiler/sparc/macros.lisp b/src/compiler/sparc/macros.lisp index d0b30b7..17c1ddc 100644 --- a/src/compiler/sparc/macros.lisp +++ b/src/compiler/sparc/macros.lisp @@ -166,6 +166,7 @@ :element-type '(unsigned-byte 8) :fill-pointer 0 :adjustable t)))) + (declare (type (vector (unsigned-byte 8) 16) ,var)) (setf (fill-pointer ,var) 0) (unwind-protect (progn @@ -232,25 +233,23 @@ -;;; PSEUDO-ATOMIC -- Handy macro for making sequences look atomic. -;;; +;;; a handy macro for making sequences look atomic (defmacro pseudo-atomic ((&key (extra 0)) &rest forms) (let ((n-extra (gensym))) `(let ((,n-extra ,extra)) - ;; Set the pseudo-atomic flag + ;; Set the pseudo-atomic flag. (without-scheduling () (inst add alloc-tn 4)) ,@forms - ;; Reset the pseudo-atomic flag + ;; Reset the pseudo-atomic flag. (without-scheduling () #+nil (inst taddcctv alloc-tn (- ,n-extra 4)) - ;; Remove the pseudo-atomic flag + ;; Remove the pseudo-atomic flag. (inst add alloc-tn (- ,n-extra 4)) - ;; Check to see if pseudo-atomic interrupted flag is set (bit 0 = 1) + ;; Check to see if pseudo-atomic interrupted flag is set (bit 0 = 1). (inst andcc zero-tn alloc-tn 3) ;; The C code needs to process this correctly and fixup alloc-tn. - (inst t :ne pseudo-atomic-trap) - )))) + (inst t :ne pseudo-atomic-trap))))) ;;; FIXME: test typing macros. Should(?) be in type-vops.lisp, except ;;; that they're also used in subprim.lisp @@ -373,10 +372,12 @@ (when fixnump `((inst andcc zero-tn ,reg fixnum-tag-mask) ,(if (or lowtags hdrs) - `(inst b :eq ,(if not-p not-target target) - #!+sparc-v9 ,(if not-p :pn :pt)) - `(inst b ,(if not-p :ne :eq) ,target - #!+sparc-v9 ,(if not-p :pn :pt))))) + `(if (member :sparc-v9 *backend-subfeatures*) + (inst b :eq ,(if not-p not-target target) ,(if not-p :pn :pt)) + (inst b :eq ,(if not-p not-target target))) + `(if (member :sparc-v9 *backend-subfeatures*) + (inst b ,(if not-p :ne :eq) ,target ,(if not-p :pn :pt)) + (inst b ,(if not-p :ne :eq) ,target))))) (when (or lowtags hdrs) `((inst and ,temp ,reg lowtag-mask))) (when lowtags @@ -391,8 +392,9 @@ (1- lowtag-limit) lowtags))) (when hdrs `((inst cmp ,temp ,lowtag) - (inst b :ne ,(if not-p target not-target) - #!+sparc-v9 ,(if not-p :pn :pt)) + (if (member :sparc-v9 *backend-subfeatures*) + (inst b :ne ,(if not-p target not-target) ,(if not-p :pn :pt)) + (inst b :ne ,(if not-p target not-target))) (inst nop) (load-type ,temp ,reg (- ,lowtag)) ,@(gen-other-immediate-test temp target not-target not-p hdrs))))))