X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Farray.lisp;h=a7828a0dead74c203f194ee55abc1ffdd8291410;hb=0bca0cb1bf5ce5572ab5cd7ba59f87fed1f2edb0;hp=3afdbc1c068178023bb65c1905948df63834e401;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/compiler/x86/array.lisp b/src/compiler/x86/array.lisp index 3afdbc1..a7828a0d 100644 --- a/src/compiler/x86/array.lisp +++ b/src/compiler/x86/array.lisp @@ -10,9 +10,6 @@ ;;;; files for more information. (in-package "SB!VM") - -(file-comment - "$Header$") ;;;; allocator for the array header @@ -29,18 +26,18 @@ (:generator 13 (inst lea bytes (make-ea :dword :base rank - :disp (+ (* (1+ array-dimensions-offset) word-bytes) + :disp (+ (* (1+ array-dimensions-offset) n-word-bytes) lowtag-mask))) (inst and bytes (lognot lowtag-mask)) (inst lea header (make-ea :dword :base rank :disp (fixnumize (1- array-dimensions-offset)))) - (inst shl header type-bits) + (inst shl header n-widetag-bits) (inst or header type) (inst shr header 2) (pseudo-atomic (allocation result bytes node) - (inst lea result (make-ea :dword :base result :disp other-pointer-type)) - (storew header result 0 other-pointer-type)))) + (inst lea result (make-ea :dword :base result :disp other-pointer-lowtag)) + (storew header result 0 other-pointer-lowtag)))) ;;;; additional accessors and setters for the array header @@ -50,11 +47,11 @@ ()) (define-full-reffer %array-dimension * - array-dimensions-offset other-pointer-type + array-dimensions-offset other-pointer-lowtag (any-reg) positive-fixnum sb!impl::%array-dimension) (define-full-setter %set-array-dimension * - array-dimensions-offset other-pointer-type + array-dimensions-offset other-pointer-lowtag (any-reg) positive-fixnum sb!impl::%set-array-dimension) (defknown sb!impl::%array-rank (t) index (flushable)) @@ -66,8 +63,8 @@ (:results (res :scs (unsigned-reg))) (:result-types positive-fixnum) (:generator 6 - (loadw res x 0 other-pointer-type) - (inst shr res type-bits) + (loadw res x 0 other-pointer-lowtag) + (inst shr res n-widetag-bits) (inst sub res (1- array-dimensions-offset)))) ;;;; bounds checking routine @@ -108,10 +105,10 @@ (macrolet ((def-full-data-vector-frobs (type element-type &rest scs) `(progn (define-full-reffer ,(symbolicate "DATA-VECTOR-REF/" type) - ,type vector-data-offset other-pointer-type ,scs + ,type vector-data-offset other-pointer-lowtag ,scs ,element-type data-vector-ref) (define-full-setter ,(symbolicate "DATA-VECTOR-SET/" type) - ,type vector-data-offset other-pointer-type ,scs + ,type vector-data-offset other-pointer-lowtag ,scs ,element-type data-vector-set)))) (def-full-data-vector-frobs simple-vector * descriptor-reg any-reg) (def-full-data-vector-frobs simple-array-unsigned-byte-32 unsigned-num @@ -124,7 +121,7 @@ ;;;; bit, 2-bit, and 4-bit vectors (macrolet ((def-small-data-vector-frobs (type bits) - (let* ((elements-per-word (floor sb!vm:word-bits bits)) + (let* ((elements-per-word (floor sb!vm:n-word-bits bits)) (bit-shift (1- (integer-length elements-per-word)))) `(progn (define-vop (,(symbolicate 'data-vector-ref/ type)) @@ -142,8 +139,8 @@ (inst shr ecx ,bit-shift) (inst mov result (make-ea :dword :base object :index ecx :scale 4 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))) (move ecx index) (inst and ecx ,(1- elements-per-word)) ,@(unless (= bits 1) @@ -161,7 +158,7 @@ (:generator 15 (multiple-value-bind (word extra) (floor index ,elements-per-word) (loadw result object (+ word vector-data-offset) - other-pointer-type) + other-pointer-lowtag) (unless (zerop extra) (inst shr result (* extra ,bits))) (unless (= extra ,(1- elements-per-word)) @@ -185,8 +182,8 @@ (inst shr word-index ,bit-shift) (inst lea ptr (make-ea :dword :base object :index word-index :scale 4 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))) (loadw old ptr) (move ecx index) (inst and ecx ,(1- elements-per-word)) @@ -223,8 +220,9 @@ (multiple-value-bind (word extra) (floor index ,elements-per-word) (inst mov old (make-ea :dword :base object - :disp (- (* (+ word vector-data-offset) word-bytes) - other-pointer-type))) + :disp (- (* (+ word vector-data-offset) + n-word-bytes) + other-pointer-lowtag))) (sc-case value (immediate (let* ((value (tn-value value)) @@ -243,8 +241,8 @@ (inst rol old shift))))) (inst mov (make-ea :dword :base object :disp (- (* (+ word vector-data-offset) - word-bytes) - other-pointer-type)) + n-word-bytes) + other-pointer-lowtag)) old) (sc-case value (immediate @@ -269,8 +267,9 @@ (:generator 5 (with-empty-tn@fp-top(value) (inst fld (make-ea :dword :base object :index index :scale 1 - :disp (- (* sb!vm:vector-data-offset sb!vm:word-bytes) - sb!vm:other-pointer-type)))))) + :disp (- (* sb!vm:vector-data-offset + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag)))))) (define-vop (data-vector-ref-c/simple-array-single-float) (:note "inline array access") @@ -285,9 +284,9 @@ (with-empty-tn@fp-top(value) (inst fld (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 4 index)) - sb!vm:other-pointer-type)))))) + sb!vm:other-pointer-lowtag)))))) (define-vop (data-vector-set/simple-array-single-float) (:note "inline array store") @@ -301,11 +300,11 @@ (:result-types single-float) (:generator 5 (cond ((zerop (tn-offset value)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fst (make-ea :dword :base object :index index :scale 1 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result)) ;; Value is in ST0 but not result. (inst fst result))) @@ -314,8 +313,8 @@ (inst fxch value) (inst fst (make-ea :dword :base object :index index :scale 1 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result)) ;; The result is in ST0. (inst fst value)) @@ -338,12 +337,12 @@ (:result-types single-float) (:generator 4 (cond ((zerop (tn-offset value)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fst (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 4 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result)) ;; Value is in ST0 but not result. (inst fst result))) @@ -352,9 +351,9 @@ (inst fxch value) (inst fst (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 4 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result)) ;; The result is in ST0. (inst fst value)) @@ -376,8 +375,9 @@ (:generator 7 (with-empty-tn@fp-top(value) (inst fldd (make-ea :dword :base object :index index :scale 2 - :disp (- (* sb!vm:vector-data-offset sb!vm:word-bytes) - sb!vm:other-pointer-type)))))) + :disp (- (* sb!vm:vector-data-offset + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag)))))) (define-vop (data-vector-ref-c/simple-array-double-float) (:note "inline array access") @@ -392,9 +392,9 @@ (with-empty-tn@fp-top(value) (inst fldd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index)) - sb!vm:other-pointer-type)))))) + sb!vm:other-pointer-lowtag)))))) (define-vop (data-vector-set/simple-array-double-float) (:note "inline array store") @@ -408,11 +408,11 @@ (:result-types double-float) (:generator 20 (cond ((zerop (tn-offset value)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fstd (make-ea :dword :base object :index index :scale 2 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result)) ;; Value is in ST0 but not result. (inst fstd result))) @@ -421,8 +421,8 @@ (inst fxch value) (inst fstd (make-ea :dword :base object :index index :scale 2 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result)) ;; The result is in ST0. (inst fstd value)) @@ -445,12 +445,12 @@ (:result-types double-float) (:generator 19 (cond ((zerop (tn-offset value)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fstd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result)) ;; Value is in ST0 but not result. (inst fstd result))) @@ -459,9 +459,9 @@ (inst fxch value) (inst fstd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result)) ;; The result is in ST0. (inst fstd value)) @@ -488,8 +488,8 @@ (with-empty-tn@fp-top(value) (inst fldl (make-ea :dword :base object :index temp :scale 1 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type)))))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag)))))) #!+long-float (define-vop (data-vector-ref-c/simple-array-long-float) @@ -505,9 +505,9 @@ (with-empty-tn@fp-top(value) (inst fldl (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 12 index)) - sb!vm:other-pointer-type)))))) + sb!vm:other-pointer-lowtag)))))) #!+long-float (define-vop (data-vector-set/simple-array-long-float) @@ -525,11 +525,11 @@ ;; temp = 3 * index (inst lea temp (make-ea :dword :base index :index index :scale 2)) (cond ((zerop (tn-offset value)) - ;; Value is in ST0 + ;; Value is in ST0. (store-long-float (make-ea :dword :base object :index temp :scale 1 - :disp (- (* sb!vm:vector-data-offset sb!vm:word-bytes) - sb!vm:other-pointer-type))) + :disp (- (* sb!vm:vector-data-offset sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result)) ;; Value is in ST0 but not result. (inst fstd result))) @@ -538,8 +538,8 @@ (inst fxch value) (store-long-float (make-ea :dword :base object :index temp :scale 1 - :disp (- (* sb!vm:vector-data-offset sb!vm:word-bytes) - sb!vm:other-pointer-type))) + :disp (- (* sb!vm:vector-data-offset sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result)) ;; The result is in ST0. (inst fstd value)) @@ -562,12 +562,12 @@ (:result-types long-float) (:generator 19 (cond ((zerop (tn-offset value)) - ;; Value is in ST0 + ;; Value is in ST0. (store-long-float (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 12 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result)) ;; Value is in ST0 but not result. (inst fstd result))) @@ -576,9 +576,9 @@ (inst fxch value) (store-long-float (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 12 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result)) ;; The result is in ST0. (inst fstd value)) @@ -604,14 +604,14 @@ (with-empty-tn@fp-top (real-tn) (inst fld (make-ea :dword :base object :index index :scale 2 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))))) (let ((imag-tn (complex-single-reg-imag-tn value))) (with-empty-tn@fp-top (imag-tn) (inst fld (make-ea :dword :base object :index index :scale 2 :disp (- (* (1+ sb!vm:vector-data-offset) - sb!vm:word-bytes) - sb!vm:other-pointer-type))))))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))))))) (define-vop (data-vector-ref-c/simple-array-complex-single-float) (:note "inline array access") @@ -627,16 +627,16 @@ (with-empty-tn@fp-top (real-tn) (inst fld (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index)) - sb!vm:other-pointer-type))))) + sb!vm:other-pointer-lowtag))))) (let ((imag-tn (complex-single-reg-imag-tn value))) (with-empty-tn@fp-top (imag-tn) (inst fld (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index) 4) - sb!vm:other-pointer-type))))))) + sb!vm:other-pointer-lowtag))))))) (define-vop (data-vector-set/simple-array-complex-single-float) (:note "inline array store") @@ -656,8 +656,8 @@ ;; Value is in ST0. (inst fst (make-ea :dword :base object :index index :scale 2 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result-real)) ;; Value is in ST0 but not result. (inst fst result-real))) @@ -666,8 +666,8 @@ (inst fxch value-real) (inst fst (make-ea :dword :base object :index index :scale 2 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result-real)) ;; The result is in ST0. (inst fst value-real)) @@ -681,9 +681,9 @@ (inst fxch value-imag) (inst fst (make-ea :dword :base object :index index :scale 2 :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) 4) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (location= value-imag result-imag) (inst fst result-imag)) (inst fxch value-imag)))) @@ -703,12 +703,12 @@ (let ((value-real (complex-single-reg-real-tn value)) (result-real (complex-single-reg-real-tn result))) (cond ((zerop (tn-offset value-real)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fst (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result-real)) ;; Value is in ST0 but not result. (inst fst result-real))) @@ -717,9 +717,9 @@ (inst fxch value-real) (inst fst (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result-real)) ;; The result is in ST0. (inst fst value-real)) @@ -733,9 +733,9 @@ (inst fxch value-imag) (inst fst (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 8 index) 4) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (location= value-imag result-imag) (inst fst result-imag)) (inst fxch value-imag)))) @@ -755,15 +755,15 @@ (with-empty-tn@fp-top (real-tn) (inst fldd (make-ea :dword :base object :index index :scale 4 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))))) (let ((imag-tn (complex-double-reg-imag-tn value))) (with-empty-tn@fp-top (imag-tn) (inst fldd (make-ea :dword :base object :index index :scale 4 :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) 8) - sb!vm:other-pointer-type))))))) + sb!vm:other-pointer-lowtag))))))) (define-vop (data-vector-ref-c/simple-array-complex-double-float) (:note "inline array access") @@ -779,16 +779,16 @@ (with-empty-tn@fp-top (real-tn) (inst fldd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 16 index)) - sb!vm:other-pointer-type))))) + sb!vm:other-pointer-lowtag))))) (let ((imag-tn (complex-double-reg-imag-tn value))) (with-empty-tn@fp-top (imag-tn) (inst fldd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 16 index) 8) - sb!vm:other-pointer-type))))))) + sb!vm:other-pointer-lowtag))))))) (define-vop (data-vector-set/simple-array-complex-double-float) (:note "inline array store") @@ -805,11 +805,11 @@ (let ((value-real (complex-double-reg-real-tn value)) (result-real (complex-double-reg-real-tn result))) (cond ((zerop (tn-offset value-real)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fstd (make-ea :dword :base object :index index :scale 4 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result-real)) ;; Value is in ST0 but not result. (inst fstd result-real))) @@ -818,8 +818,8 @@ (inst fxch value-real) (inst fstd (make-ea :dword :base object :index index :scale 4 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result-real)) ;; The result is in ST0. (inst fstd value-real)) @@ -833,9 +833,9 @@ (inst fxch value-imag) (inst fstd (make-ea :dword :base object :index index :scale 4 :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) 8) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (location= value-imag result-imag) (inst fstd result-imag)) (inst fxch value-imag)))) @@ -855,12 +855,12 @@ (let ((value-real (complex-double-reg-real-tn value)) (result-real (complex-double-reg-real-tn result))) (cond ((zerop (tn-offset value-real)) - ;; Value is in ST0 + ;; Value is in ST0. (inst fstd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 16 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result-real)) ;; Value is in ST0 but not result. (inst fstd result-real))) @@ -869,9 +869,9 @@ (inst fxch value-real) (inst fstd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 16 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result-real)) ;; The result is in ST0. (inst fstd value-real)) @@ -885,9 +885,9 @@ (inst fxch value-imag) (inst fstd (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 16 index) 8) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (location= value-imag result-imag) (inst fstd result-imag)) (inst fxch value-imag)))) @@ -911,15 +911,15 @@ (with-empty-tn@fp-top (real-tn) (inst fldl (make-ea :dword :base object :index temp :scale 2 :disp (- (* sb!vm:vector-data-offset - sb!vm:word-bytes) - sb!vm:other-pointer-type))))) + sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))))) (let ((imag-tn (complex-long-reg-imag-tn value))) (with-empty-tn@fp-top (imag-tn) (inst fldl (make-ea :dword :base object :index temp :scale 2 :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) 12) - sb!vm:other-pointer-type))))))) + sb!vm:other-pointer-lowtag))))))) #!+long-float (define-vop (data-vector-ref-c/simple-array-complex-long-float) @@ -936,16 +936,16 @@ (with-empty-tn@fp-top (real-tn) (inst fldl (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 24 index)) - sb!vm:other-pointer-type))))) + sb!vm:other-pointer-lowtag))))) (let ((imag-tn (complex-long-reg-imag-tn value))) (with-empty-tn@fp-top (imag-tn) (inst fldl (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 24 index) 12) - sb!vm:other-pointer-type))))))) + sb!vm:other-pointer-lowtag))))))) #!+long-float (define-vop (data-vector-set/simple-array-complex-long-float) @@ -966,11 +966,11 @@ (let ((value-real (complex-long-reg-real-tn value)) (result-real (complex-long-reg-real-tn result))) (cond ((zerop (tn-offset value-real)) - ;; Value is in ST0 + ;; Value is in ST0. (store-long-float (make-ea :dword :base object :index temp :scale 2 - :disp (- (* sb!vm:vector-data-offset sb!vm:word-bytes) - sb!vm:other-pointer-type))) + :disp (- (* sb!vm:vector-data-offset sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result-real)) ;; Value is in ST0 but not result. (inst fstd result-real))) @@ -979,8 +979,8 @@ (inst fxch value-real) (store-long-float (make-ea :dword :base object :index temp :scale 2 - :disp (- (* sb!vm:vector-data-offset sb!vm:word-bytes) - sb!vm:other-pointer-type))) + :disp (- (* sb!vm:vector-data-offset sb!vm:n-word-bytes) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result-real)) ;; The result is in ST0. (inst fstd value-real)) @@ -994,8 +994,8 @@ (inst fxch value-imag) (store-long-float (make-ea :dword :base object :index temp :scale 2 - :disp (- (+ (* sb!vm:vector-data-offset sb!vm:word-bytes) 12) - sb!vm:other-pointer-type))) + :disp (- (+ (* sb!vm:vector-data-offset sb!vm:n-word-bytes) 12) + sb!vm:other-pointer-lowtag))) (unless (location= value-imag result-imag) (inst fstd result-imag)) (inst fxch value-imag)))) @@ -1016,13 +1016,13 @@ (let ((value-real (complex-long-reg-real-tn value)) (result-real (complex-long-reg-real-tn result))) (cond ((zerop (tn-offset value-real)) - ;; Value is in ST0 + ;; Value is in ST0. (store-long-float (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 24 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (zerop (tn-offset result-real)) ;; Value is in ST0 but not result. (inst fstd result-real))) @@ -1032,9 +1032,9 @@ (store-long-float (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) (* 24 index)) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (cond ((zerop (tn-offset result-real)) ;; The result is in ST0. (inst fstd value-real)) @@ -1049,21 +1049,18 @@ (store-long-float (make-ea :dword :base object :disp (- (+ (* sb!vm:vector-data-offset - sb!vm:word-bytes) + sb!vm:n-word-bytes) ;; FIXME: There are so many of these bare constants ;; (24, 12..) in the LONG-FLOAT code that it's ;; ridiculous. I should probably just delete it all ;; instead of appearing to flirt with supporting ;; this maintenance nightmare. (* 24 index) 12) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (unless (location= value-imag result-imag) (inst fstd result-imag)) (inst fxch value-imag)))) - -;;;; dtc expanded and fixed the following: - ;;; unsigned-byte-8 (define-vop (data-vector-ref/simple-array-unsigned-byte-8) @@ -1077,8 +1074,8 @@ (:generator 5 (inst movzx value (make-ea :byte :base object :index index :scale 1 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))))) (define-vop (data-vector-ref-c/simple-array-unsigned-byte-8) (:translate data-vector-ref) @@ -1091,8 +1088,8 @@ (:generator 4 (inst movzx value (make-ea :byte :base object - :disp (- (+ (* vector-data-offset word-bytes) index) - other-pointer-type))))) + :disp (- (+ (* vector-data-offset n-word-bytes) index) + other-pointer-lowtag))))) (define-vop (data-vector-set/simple-array-unsigned-byte-8) (:translate data-vector-set) @@ -1109,8 +1106,8 @@ (:generator 5 (move eax value) (inst mov (make-ea :byte :base object :index index :scale 1 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type)) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag)) al-tn) (move result eax))) @@ -1130,8 +1127,8 @@ (:generator 4 (move eax value) (inst mov (make-ea :byte :base object - :disp (- (+ (* vector-data-offset word-bytes) index) - other-pointer-type)) + :disp (- (+ (* vector-data-offset n-word-bytes) index) + other-pointer-lowtag)) al-tn) (move result eax))) @@ -1148,8 +1145,8 @@ (:generator 5 (inst movzx value (make-ea :word :base object :index index :scale 2 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))))) (define-vop (data-vector-ref-c/simple-array-unsigned-byte-16) (:translate data-vector-ref) @@ -1162,8 +1159,8 @@ (:generator 4 (inst movzx value (make-ea :word :base object - :disp (- (+ (* vector-data-offset word-bytes) (* 2 index)) - other-pointer-type))))) + :disp (- (+ (* vector-data-offset n-word-bytes) (* 2 index)) + other-pointer-lowtag))))) (define-vop (data-vector-set/simple-array-unsigned-byte-16) (:translate data-vector-set) @@ -1180,8 +1177,8 @@ (:generator 5 (move eax value) (inst mov (make-ea :word :base object :index index :scale 2 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type)) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag)) ax-tn) (move result eax))) @@ -1201,9 +1198,9 @@ (:generator 4 (move eax value) (inst mov (make-ea :word :base object - :disp (- (+ (* vector-data-offset word-bytes) + :disp (- (+ (* vector-data-offset n-word-bytes) (* 2 index)) - other-pointer-type)) + other-pointer-lowtag)) ax-tn) (move result eax))) @@ -1226,8 +1223,8 @@ (:generator 5 (inst mov al-tn (make-ea :byte :base object :index index :scale 1 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))) (move value al-tn))) (define-vop (data-vector-ref-c/simple-string) @@ -1245,8 +1242,8 @@ (:generator 4 (inst mov al-tn (make-ea :byte :base object - :disp (- (+ (* vector-data-offset word-bytes) index) - other-pointer-type))) + :disp (- (+ (* vector-data-offset n-word-bytes) index) + other-pointer-lowtag))) (move value al-tn))) (define-vop (data-vector-set/simple-string) @@ -1260,8 +1257,8 @@ (:result-types base-char) (:generator 5 (inst mov (make-ea :byte :base object :index index :scale 1 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type)) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag)) value) (move result value))) @@ -1276,8 +1273,8 @@ (:result-types base-char) (:generator 4 (inst mov (make-ea :byte :base object - :disp (- (+ (* vector-data-offset word-bytes) index) - other-pointer-type)) + :disp (- (+ (* vector-data-offset n-word-bytes) index) + other-pointer-lowtag)) value) (move result value))) @@ -1294,8 +1291,8 @@ (:generator 5 (inst movsx value (make-ea :byte :base object :index index :scale 1 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))))) (define-vop (data-vector-ref-c/simple-array-signed-byte-8) (:translate data-vector-ref) @@ -1308,8 +1305,8 @@ (:generator 4 (inst movsx value (make-ea :byte :base object - :disp (- (+ (* vector-data-offset word-bytes) index) - other-pointer-type))))) + :disp (- (+ (* vector-data-offset n-word-bytes) index) + other-pointer-lowtag))))) (define-vop (data-vector-set/simple-array-signed-byte-8) (:translate data-vector-set) @@ -1326,8 +1323,8 @@ (:generator 5 (move eax value) (inst mov (make-ea :byte :base object :index index :scale 1 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type)) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag)) al-tn) (move result eax))) @@ -1347,8 +1344,8 @@ (:generator 4 (move eax value) (inst mov (make-ea :byte :base object - :disp (- (+ (* vector-data-offset word-bytes) index) - other-pointer-type)) + :disp (- (+ (* vector-data-offset n-word-bytes) index) + other-pointer-lowtag)) al-tn) (move result eax))) @@ -1365,8 +1362,8 @@ (:generator 5 (inst movsx value (make-ea :word :base object :index index :scale 2 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type))))) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag))))) (define-vop (data-vector-ref-c/simple-array-signed-byte-16) (:translate data-vector-ref) @@ -1379,9 +1376,9 @@ (:generator 4 (inst movsx value (make-ea :word :base object - :disp (- (+ (* vector-data-offset word-bytes) + :disp (- (+ (* vector-data-offset n-word-bytes) (* 2 index)) - other-pointer-type))))) + other-pointer-lowtag))))) (define-vop (data-vector-set/simple-array-signed-byte-16) (:translate data-vector-set) @@ -1398,8 +1395,8 @@ (:generator 5 (move eax value) (inst mov (make-ea :word :base object :index index :scale 2 - :disp (- (* vector-data-offset word-bytes) - other-pointer-type)) + :disp (- (* vector-data-offset n-word-bytes) + other-pointer-lowtag)) ax-tn) (move result eax))) @@ -1419,9 +1416,9 @@ (move eax value) (inst mov (make-ea :word :base object - :disp (- (+ (* vector-data-offset word-bytes) + :disp (- (+ (* vector-data-offset n-word-bytes) (* 2 index)) - other-pointer-type)) + other-pointer-lowtag)) ax-tn) (move result eax))) @@ -1533,9 +1530,9 @@ ;;; These vops are useful for accessing the bits of a vector ;;; irrespective of what type of vector it is. -(define-full-reffer raw-bits * 0 other-pointer-type (unsigned-reg) +(define-full-reffer raw-bits * 0 other-pointer-lowtag (unsigned-reg) unsigned-num %raw-bits) -(define-full-setter set-raw-bits * 0 other-pointer-type (unsigned-reg) +(define-full-setter set-raw-bits * 0 other-pointer-lowtag (unsigned-reg) unsigned-num %set-raw-bits) ;;;; miscellaneous array VOPs