From: Thiemo Seufer Date: Wed, 7 Sep 2005 23:06:19 +0000 (+0000) Subject: LESS MAGIC NUMBERS. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9a641acd464b948a8ef57d37907a6995333f570a;p=sbcl.git LESS MAGIC NUMBERS. --- diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 89f14b5..b26bab9 100644 --- a/src/compiler/mips/arith.lisp +++ b/src/compiler/mips/arith.lisp @@ -396,7 +396,7 @@ (:temporary (:scs (non-descriptor-reg)) temp) (:translate *) (:generator 4 - (inst sra temp y 2) + (inst sra temp y n-fixnum-tag-bits) (inst mult x temp) (inst mflo r))) @@ -428,7 +428,7 @@ (inst nop) (inst div x y) (inst mflo temp) - (inst sll q temp 2) + (inst sll q temp n-fixnum-tag-bits) (inst mfhi r))) (define-vop (fast-truncate/unsigned fast-unsigned-binop) @@ -893,7 +893,7 @@ (:results (digit :scs (unsigned-reg))) (:result-types unsigned-num) (:generator 1 - (inst sra digit fixnum 2))) + (inst sra digit fixnum n-fixnum-tag-bits))) (define-vop (bignum-floor) (:translate sb!bignum:%floor) diff --git a/src/compiler/mips/array.lisp b/src/compiler/mips/array.lisp index 9137ad9..bcbe0ea 100644 --- a/src/compiler/mips/array.lisp +++ b/src/compiler/mips/array.lisp @@ -30,7 +30,7 @@ (inst addu header rank (fixnumize (1- array-dimensions-offset))) (inst sll header n-widetag-bits) (inst or header header type) - (inst srl header 2) + (inst srl header n-fixnum-tag-bits) (pseudo-atomic (pa-flag) (inst or result alloc-tn other-pointer-lowtag) (storew header result 0 other-pointer-lowtag) @@ -55,7 +55,7 @@ (loadw temp x 0 other-pointer-lowtag) (inst sra temp n-widetag-bits) (inst subu temp (1- array-dimensions-offset)) - (inst sll res temp 2))) + (inst sll res temp n-fixnum-tag-bits))) ;;;; Bounds checking routine. (define-vop (check-bound) @@ -157,7 +157,7 @@ (:temporary (:scs (non-descriptor-reg) :to (:result 0)) temp result) (:generator 20 (inst srl temp index ,bit-shift) - (inst sll temp 2) + (inst sll temp n-fixnum-tag-bits) (inst addu lip object temp) (inst lw result lip (- (* vector-data-offset n-word-bytes) @@ -169,7 +169,7 @@ `((inst sll temp ,(1- (integer-length bits))))) (inst srl result temp) (inst and result ,(1- (ash 1 bits))) - (inst sll value result 2))) + (inst sll value result n-fixnum-tag-bits))) (define-vop (,(symbolicate 'data-vector-ref-c/ type)) (:translate data-vector-ref) (:policy :fast-safe) @@ -210,7 +210,7 @@ (:temporary (:scs (non-descriptor-reg) :from (:argument 1)) shift) (:generator 25 (inst srl temp index ,bit-shift) - (inst sll temp 2) + (inst sll temp n-fixnum-tag-bits) (inst addu lip object temp) (inst lw old lip (- (* vector-data-offset n-word-bytes) @@ -470,7 +470,7 @@ (:temporary (:scs (interior-reg)) lip) (:temporary (:scs (any-reg) :from (:argument 1)) shift) (:generator 6 - (inst sll shift index 2) + (inst sll shift index n-fixnum-tag-bits) (inst addu lip object shift) (let ((real-tn (complex-double-reg-real-tn value))) (ld-double real-tn lip (- (* vector-data-offset n-word-bytes) @@ -494,7 +494,7 @@ (:temporary (:scs (interior-reg)) lip) (:temporary (:scs (any-reg) :from (:argument 1)) shift) (:generator 6 - (inst sll shift index 2) + (inst sll shift index n-fixnum-tag-bits) (inst addu lip object shift) (let ((value-real (complex-double-reg-real-tn value)) (result-real (complex-double-reg-real-tn result))) diff --git a/version.lisp-expr b/version.lisp-expr index 2c0821c..9e63868 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".) -"0.9.4.40" +"0.9.4.41"