From c823a0c4ad5be108455745c7b451228182d5d164 Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Wed, 17 Dec 2008 14:43:26 +0000 Subject: [PATCH] 1.0.23.46: Remove redundant uses of zero-tn in the MIPS backend. --- src/compiler/mips/arith.lisp | 22 +++++++++++----------- src/compiler/mips/array.lisp | 2 +- src/compiler/mips/call.lisp | 6 +++--- src/compiler/mips/cell.lisp | 10 +++++----- src/compiler/mips/macros.lisp | 8 ++++---- src/compiler/mips/nlx.lisp | 8 ++++---- src/compiler/mips/subprim.lisp | 2 +- src/compiler/mips/type-vops.lisp | 38 +++++++++++++++++++------------------- src/compiler/mips/values.lisp | 9 ++++----- version.lisp-expr | 2 +- 10 files changed, 53 insertions(+), 54 deletions(-) diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 8be4e93..c7e57d8 100644 --- a/src/compiler/mips/arith.lisp +++ b/src/compiler/mips/arith.lisp @@ -227,7 +227,7 @@ (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) @@ -253,7 +253,7 @@ (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) @@ -416,7 +416,7 @@ (: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) @@ -432,7 +432,7 @@ (: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) @@ -447,7 +447,7 @@ (: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) @@ -531,8 +531,8 @@ (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 > @@ -546,15 +546,15 @@ (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 diff --git a/src/compiler/mips/array.lisp b/src/compiler/mips/array.lisp index e9dafbc..2f501b2 100644 --- a/src/compiler/mips/array.lisp +++ b/src/compiler/mips/array.lisp @@ -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)))) diff --git a/src/compiler/mips/call.lisp b/src/compiler/mips/call.lisp index 5e47120..97057d8 100644 --- a/src/compiler/mips/call.lisp +++ b/src/compiler/mips/call.lisp @@ -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)) diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 75756ec..4bab30f 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -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) @@ -136,7 +136,7 @@ (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)) @@ -203,7 +203,7 @@ (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)) diff --git a/src/compiler/mips/macros.lisp b/src/compiler/mips/macros.lisp index 1a1e3d3..da719e2 100644 --- a/src/compiler/mips/macros.lisp +++ b/src/compiler/mips/macros.lisp @@ -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)) diff --git a/src/compiler/mips/nlx.lisp b/src/compiler/mips/nlx.lisp index ed25b12..8aa7a0c 100644 --- a/src/compiler/mips/nlx.lisp +++ b/src/compiler/mips/nlx.lisp @@ -155,7 +155,7 @@ (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))) @@ -168,7 +168,7 @@ (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) @@ -222,7 +222,7 @@ (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)) @@ -234,7 +234,7 @@ (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) diff --git a/src/compiler/mips/subprim.lisp b/src/compiler/mips/subprim.lisp index 28542c6..4bd07b7 100644 --- a/src/compiler/mips/subprim.lisp +++ b/src/compiler/mips/subprim.lisp @@ -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) diff --git a/src/compiler/mips/type-vops.lisp b/src/compiler/mips/type-vops.lisp index eb0c5f6..248c4a0 100644 --- a/src/compiler/mips/type-vops.lisp +++ b/src/compiler/mips/type-vops.lisp @@ -16,15 +16,15 @@ (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))) @@ -151,16 +151,16 @@ (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)) @@ -189,27 +189,27 @@ (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) diff --git a/src/compiler/mips/values.lisp b/src/compiler/mips/values.lisp index e753372..a04921b 100644 --- a/src/compiler/mips/values.lisp +++ b/src/compiler/mips/values.lisp @@ -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) @@ -134,7 +133,7 @@ (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) @@ -162,7 +161,7 @@ (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) diff --git a/version.lisp-expr b/version.lisp-expr index 4ef58be..da8ca75 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4