0.9.12.9:
authorCyrus Harmon <ch-sbcl@bobobeach.com>
Sat, 13 May 2006 16:21:50 +0000 (16:21 +0000)
committerCyrus Harmon <ch-sbcl@bobobeach.com>
Sat, 13 May 2006 16:21:50 +0000 (16:21 +0000)
Improve code legibility.
        NOTE: reapplying changes lost in the sf.net CVS outage

src/compiler/mips/array.lisp
src/compiler/mips/c-call.lisp
src/compiler/mips/macros.lisp
src/compiler/mips/show.lisp
version.lisp-expr

index bcbe0ea..624fb35 100644 (file)
   (def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
     signed-reg))
 
-;;; Integer vectors whos elements are smaller than a byte.  I.e. bit, 2-bit,
+;;; Integer vectors whose elements are smaller than a byte.  I.e. bit, 2-bit,
 ;;; and 4-bit vectors.
 (macrolet ((def-small-data-vector-frobs (type bits)
   (let* ((elements-per-word (floor n-word-bits bits))
          (bit-shift (1- (integer-length elements-per-word))))
     `(progn
-       (define-vop (,(symbolicate 'data-vector-ref/ type))
+       (define-vop (,(symbolicate 'DATA-VECTOR-REF/ type))
          (:note "inline array access")
          (:translate data-vector-ref)
          (:policy :fast-safe)
            (inst srl result temp)
            (inst and result ,(1- (ash 1 bits)))
            (inst sll value result n-fixnum-tag-bits)))
-       (define-vop (,(symbolicate 'data-vector-ref-c/ type))
+       (define-vop (,(symbolicate 'DATA-VECTOR-REF-C/ type))
          (:translate data-vector-ref)
          (:policy :fast-safe)
          (:args (object :scs (descriptor-reg)))
                (inst srl result (* extra ,bits)))
              (unless (= extra ,(1- elements-per-word))
                (inst and result ,(1- (ash 1 bits)))))))
-       (define-vop (,(symbolicate 'data-vector-set/ type))
+       (define-vop (,(symbolicate 'DATA-VECTOR-SET/ type))
          (:note "inline array store")
          (:translate data-vector-set)
          (:policy :fast-safe)
               (move result zero-tn))
              (unsigned-reg
               (move result value)))))
-       (define-vop (,(symbolicate 'data-vector-set-c/ type))
+       (define-vop (,(symbolicate 'DATA-VECTOR-SET-C/ type))
          (:translate data-vector-set)
          (:policy :fast-safe)
          (:args (object :scs (descriptor-reg))
index 0df24aa..a75e04d 100644 (file)
                             ;; 64-bit long long types are stored in
                             ;; consecutive locations, endian word order,
                             ;; aligned to 8 bytes.
-                            (if (oddp (length (new-args)))
-                                    (new-args nil))
+                            (when (oddp (length (new-args)))
+                              (new-args nil))
                             #!-little-endian
                             (progn (new-args `(ash ,arg -32))
                                    (new-args `(logand ,arg #xffffffff))
index a015232..9e09443 100644 (file)
        (:results (value :scs ,scs))
        (:result-types ,el-type)
        (:generator 5
-         (inst add lip object index)
-         (inst lw value lip (- (* ,offset n-word-bytes) ,lowtag))
-         (inst nop)))
+         (inst addu lip object index)
+         (loadw value lip ,offset ,lowtag)))
      (define-vop (,(symbolicate name "-C"))
        ,@(when translate
            `((:translate ,translate)))
        (:results (value :scs ,scs))
        (:result-types ,el-type)
        (:generator 4
-         (inst lw value object (- (* (+ ,offset index) n-word-bytes) ,lowtag))
-         (inst nop)))))
+         (loadw value object (+ ,offset index) ,lowtag)))))
 
 (defmacro define-full-setter (name type offset lowtag scs el-type
                                    &optional translate)
        (:results (result :scs ,scs))
        (:result-types ,el-type)
        (:generator 2
-         (inst add lip object index)
-         (inst sw value lip (- (* ,offset n-word-bytes) ,lowtag))
+         (inst addu lip object index)
+         (storew value lip ,offset ,lowtag)
          (move result value)))
      (define-vop (,(symbolicate name "-C"))
        ,@(when translate
        (:results (result :scs ,scs))
        (:result-types ,el-type)
        (:generator 1
-         (inst sw value object (- (* (+ ,offset index) n-word-bytes) ,lowtag))
+         (storew value object (+ ,offset index) ,lowtag)
          (move result value)))))
 
 
index c5ac7f8..78a236a 100644 (file)
@@ -27,8 +27,8 @@
       (move nl0 object)
       (inst li cfunc (make-fixup "debug_print" :foreign))
       (inst jal (make-fixup "call_into_c" :foreign))
-      (inst addu nsp-tn nsp-tn -16)
-      (inst addu nsp-tn nsp-tn 16)
+      (inst subu nsp-tn 16)
+      (inst addu nsp-tn 16)
       (when cur-nfp
         (load-stack-tn cur-nfp nfp-save))
       (move result nl0))))
index 1fc80f7..84598e1 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.12.8"
+"0.9.12.9"