1.0.23.46: Remove redundant uses of zero-tn in the MIPS backend.
authorThiemo Seufer <ths@networkno.de>
Wed, 17 Dec 2008 14:43:26 +0000 (14:43 +0000)
committerThiemo Seufer <ths@networkno.de>
Wed, 17 Dec 2008 14:43:26 +0000 (14:43 +0000)
src/compiler/mips/arith.lisp
src/compiler/mips/array.lisp
src/compiler/mips/call.lisp
src/compiler/mips/cell.lisp
src/compiler/mips/macros.lisp
src/compiler/mips/nlx.lisp
src/compiler/mips/subprim.lisp
src/compiler/mips/type-vops.lisp
src/compiler/mips/values.lisp
version.lisp-expr

index 8be4e93..c7e57d8 100644 (file)
     (inst bgez amount positive)
     (inst subu ndesc zero-tn amount)
     (inst slt temp ndesc 32)
-    (inst bne temp zero-tn done)
+    (inst bne temp done)
     (inst srl result number ndesc)
     (inst b done)
     (move result zero-tn t)
     (inst bgez amount positive)
     (inst subu ndesc zero-tn amount)
     (inst slt temp ndesc 31)
-    (inst bne temp zero-tn done)
+    (inst bne temp done)
     (inst sra result number ndesc)
     (inst b done)
     (inst sra result number 31)
   (:save-p :compute-only)
   (:generator 11
     (let ((zero (generate-error-code vop division-by-zero-error x y)))
-      (inst beq y zero-tn zero))
+      (inst beq y zero))
     (inst nop)
     (inst div x y)
     (inst mflo temp)
   (:save-p :compute-only)
   (:generator 12
     (let ((zero (generate-error-code vop division-by-zero-error x y)))
-      (inst beq y zero-tn zero))
+      (inst beq y zero))
     (inst nop)
     (inst divu x y)
     (inst mflo q)
   (:save-p :compute-only)
   (:generator 12
     (let ((zero (generate-error-code vop division-by-zero-error x y)))
-      (inst beq y zero-tn zero))
+      (inst beq y zero))
     (inst nop)
     (inst div x y)
     (inst mflo q)
              (inst slt temp x y)
              (inst sltu temp x y))
          (if not-p
-             (inst beq temp zero-tn target)
-             (inst bne temp zero-tn target))))
+             (inst beq temp target)
+             (inst bne temp target))))
   (inst nop))
 
 (define-conditional-vop >
                (inst slt temp x y)
                (inst sltu temp x y))
            (if not-p
-               (inst bne temp zero-tn target)
-               (inst beq temp zero-tn target))))
+               (inst bne temp target)
+               (inst beq temp target))))
         (t
          (if signed
              (inst slt temp y x)
              (inst sltu temp y x))
          (if not-p
-             (inst beq temp zero-tn target)
-             (inst bne temp zero-tn target))))
+             (inst beq temp target)
+             (inst bne temp target))))
   (inst nop))
 
 ;;; EQL/FIXNUM is funny because the first arg can be of any type, not just a
index e9dafbc..2f501b2 100644 (file)
@@ -72,7 +72,7 @@
     (let ((error (generate-error-code vop invalid-array-index-error
                                       array bound index)))
       (inst sltu temp index bound)
-      (inst beq temp zero-tn error)
+      (inst beq temp error)
       (inst nop)
       (move result index))))
 \f
index 5e47120..97057d8 100644 (file)
@@ -1171,7 +1171,7 @@ default-value-8
       (move context context-arg)
       (move count count-arg)
       ;; Check to see if there are any arguments.
-      (inst beq count zero-tn done)
+      (inst beq count done)
       (move result null-tn t)
 
       ;; We need to do this atomically.
@@ -1199,7 +1199,7 @@ default-value-8
 
         ;; Dec count, and if != zero, go back for more.
         (inst addu count count (fixnumize -1))
-        (inst bne count zero-tn loop)
+        (inst bne count loop)
 
         ;; Store the value in the car (in delay slot)
         (storew temp dst 0 list-pointer-lowtag)
@@ -1248,7 +1248,7 @@ default-value-8
     (let ((err-lab
            (generate-error-code vop invalid-arg-count-error nargs)))
       (cond ((zerop count)
-             (inst bne nargs zero-tn err-lab)
+             (inst bne nargs err-lab)
              (inst nop))
             (t
              (inst li temp (fixnumize count))
index 75756ec..4bab30f 100644 (file)
@@ -60,7 +60,7 @@
     (loadw value obj-temp symbol-value-slot other-pointer-lowtag)
     (let ((err-lab (generate-error-code vop unbound-symbol-error obj-temp)))
       (inst xor temp value unbound-marker-widetag)
-      (inst beq temp zero-tn err-lab)
+      (inst beq temp err-lab)
       (inst nop))))
 
 ;;; Like CHECKED-CELL-REF, only we are a predicate to see if the cell is bound.
@@ -78,8 +78,8 @@
     (loadw value object symbol-value-slot other-pointer-lowtag)
     (inst xor temp value unbound-marker-widetag)
     (if not-p
-        (inst beq temp zero-tn target)
-        (inst bne temp zero-tn target))
+        (inst beq temp target)
+        (inst bne temp target))
     (inst nop)))
 
 (define-vop (fast-symbol-value cell-ref)
       (load-type type function (- fun-pointer-lowtag))
       (inst nop)
       (inst xor type simple-fun-header-widetag)
-      (inst beq type zero-tn normal-fn)
+      (inst beq type normal-fn)
       (inst addu lip function
             (- (ash simple-fun-code-offset word-shift)
                fun-pointer-lowtag))
 
       (emit-label loop)
       (loadw symbol bsp-tn (- binding-symbol-slot binding-size))
-      (inst beq symbol zero-tn skip)
+      (inst beq symbol skip)
       (loadw value bsp-tn (- binding-value-slot binding-size))
       (storew value symbol symbol-value-slot other-pointer-lowtag)
       (storew zero-tn bsp-tn (- binding-symbol-slot binding-size))
index 1a1e3d3..da719e2 100644 (file)
@@ -202,8 +202,8 @@ placed inside the PSEUDO-ATOMIC, and presumably initializes the object."
        (:signed
         (inst slt temp x y)))
      (if not-p
-         (inst beq temp zero-tn target)
-         (inst bne temp zero-tn target)))
+         (inst beq temp target)
+         (inst bne temp target)))
     (:gt
      (ecase flavor
        (:unsigned
@@ -211,8 +211,8 @@ placed inside the PSEUDO-ATOMIC, and presumably initializes the object."
        (:signed
         (inst slt temp y x)))
      (if not-p
-         (inst beq temp zero-tn target)
-         (inst bne temp zero-tn target))))
+         (inst beq temp target)
+         (inst bne temp target))))
   (inst nop))
 
 
index ed25b12..8aa7a0c 100644 (file)
     (cond ((zerop nvals))
           ((= nvals 1)
            (let ((no-values (gen-label)))
-             (inst beq count zero-tn no-values)
+             (inst beq count no-values)
              (move (tn-ref-tn values) null-tn t)
              (loadw (tn-ref-tn values) start)
              (emit-label no-values)))
                      (tn (tn-ref-tn tn-ref)))
                  (defaults (cons default-lab tn))
 
-                 (inst beq count zero-tn default-lab)
+                 (inst beq count default-lab)
                  (inst addu count count (fixnumize -1))
                  (sc-case tn
                           ((descriptor-reg any-reg)
       (sc-case new-start
         (any-reg (move new-start dst))
         (control-stack (store-stack-tn new-start dst)))
-      (inst beq num zero-tn done)
+      (inst beq num done)
       (inst nop)
       (sc-case new-count
         (any-reg (move new-count num))
       (inst addu src src n-word-bytes)
       (inst addu num num (fixnumize -1))
       (storew temp dst)
-      (inst bne num zero-tn loop)
+      (inst bne num loop)
       (inst addu dst dst n-word-bytes)
 
       (emit-label done)
index 28542c6..4bd07b7 100644 (file)
@@ -28,7 +28,7 @@
       (inst beq ptr null-tn done)
       (inst and temp ptr lowtag-mask)
       (inst xor temp list-pointer-lowtag)
-      (inst bne temp zero-tn not-list)
+      (inst bne temp not-list)
       (inst nop)
 
       (loadw ptr ptr cons-cdr-slot list-pointer-lowtag)
index eb0c5f6..248c4a0 100644 (file)
   (assemble ()
     (inst and temp value fixnum-tag-mask)
     (if not-p
-        (inst bne temp zero-tn target)
-        (inst beq temp zero-tn target))
+        (inst bne temp target)
+        (inst beq temp target))
     (inst nop)))
 
 (defun %test-fixnum-and-headers (value target not-p headers &key temp)
   (let ((drop-through (gen-label)))
     (assemble ()
       (inst and temp value fixnum-tag-mask)
-      (inst beq temp zero-tn (if not-p drop-through target)))
+      (inst beq temp (if not-p drop-through target)))
     (%test-headers value target not-p nil headers
                    :drop-through drop-through :temp temp)))
 
@@ -33,8 +33,8 @@
     (inst and temp value widetag-mask)
     (inst xor temp immediate)
     (if not-p
-        (inst bne temp zero-tn target)
-        (inst beq temp zero-tn target))
+        (inst bne temp target)
+        (inst beq temp target))
     (inst nop)))
 
 (defun %test-lowtag (value target not-p lowtag &key temp)
@@ -42,8 +42,8 @@
     (inst and temp value lowtag-mask)
     (inst xor temp lowtag)
     (if not-p
-        (inst bne temp zero-tn target)
-        (inst beq temp zero-tn target))
+        (inst bne temp target)
+        (inst beq temp target))
     (inst nop)))
 
 (defun %test-headers (value target not-p function-p headers
@@ -71,9 +71,9 @@
                 (setf delta header)
                 (if last
                     (if not-p
-                        (inst bne temp zero-tn target)
-                        (inst beq temp zero-tn target))
-                    (inst beq temp zero-tn when-true)))
+                        (inst bne temp target)
+                        (inst beq temp target))
+                    (inst beq temp when-true)))
                (t
                 (let ((start (car header))
                       (end (cdr header)))
           (values target not-target))
     (assemble ()
       (inst and temp value fixnum-tag-mask)
-      (inst beq temp zero-tn yep)
+      (inst beq temp yep)
       (inst and temp value lowtag-mask)
       (inst xor temp other-pointer-lowtag)
-      (inst bne temp zero-tn nope)
+      (inst bne temp nope)
       (inst nop)
       (loadw temp value 0 other-pointer-lowtag)
       (inst xor temp (+ (ash 1 n-widetag-bits) bignum-widetag))
       (if not-p
-          (inst bne temp zero-tn target)
-          (inst beq temp zero-tn target))
+          (inst bne temp target)
+          (inst beq temp target))
       (inst nop)))
   (values))
 
     (assemble ()
       ;; Is it a fixnum?
       (inst and temp value fixnum-tag-mask)
-      (inst beq temp zero-tn fixnum)
+      (inst beq temp fixnum)
       (move temp value t)
 
       ;; If not, is it an other pointer?
       (inst and temp value lowtag-mask)
       (inst xor temp other-pointer-lowtag)
-      (inst bne temp zero-tn nope)
+      (inst bne temp nope)
       (inst nop)
       ;; Get the header.
       (loadw temp value 0 other-pointer-lowtag)
       ;; Is it one?
       (inst xor temp (+ (ash 1 n-widetag-bits) bignum-widetag))
-      (inst beq temp zero-tn single-word)
+      (inst beq temp single-word)
       ;; If it's other than two, we can't be an (unsigned-byte 32)
       (inst xor temp (logxor (+ (ash 1 n-widetag-bits) bignum-widetag)
                              (+ (ash 2 n-widetag-bits) bignum-widetag)))
-      (inst bne temp zero-tn nope)
+      (inst bne temp nope)
       ;; Get the second digit.
       (loadw temp value (1+ bignum-digits-offset) other-pointer-lowtag)
       ;; All zeros, its an (unsigned-byte 32).
-      (inst beq temp zero-tn yep)
+      (inst beq temp yep)
       (inst nop)
       (inst b nope)
 
index e753372..a04921b 100644 (file)
@@ -48,9 +48,8 @@
   (:generator 1
     (move src last-preserved-ptr)
     (move dest last-nipped-ptr)
-    (move temp zero-tn)
     (inst sltu temp src csp-tn)
-    (inst beq temp zero-tn DONE)
+    (inst beq temp DONE)
     (inst nop) ; not strictly necessary
     LOOP
     (loadw temp src)
@@ -58,7 +57,7 @@
     (inst add src src n-word-bytes)
     (storew temp dest -1)
     (inst sltu temp src csp-tn)
-    (inst bne temp zero-tn LOOP)
+    (inst bne temp LOOP)
     (inst nop)
     DONE
     (move csp-tn dest)
     (storew temp csp-tn -1)
     (inst and ndescr list lowtag-mask)
     (inst xor ndescr list-pointer-lowtag)
-    (inst beq ndescr zero-tn loop)
+    (inst beq ndescr loop)
     (inst nop)
     (error-call vop bogus-arg-to-values-list-error list)
 
       (any-reg
        (inst addu src context skip)))
     (move count num)
-    (inst beq num zero-tn done)
+    (inst beq num done)
     (move start csp-tn t)
     (move dst csp-tn)
     (inst addu csp-tn count)
index 4ef58be..da8ca75 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".)
-"1.0.23.45"
+"1.0.23.46"