X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Falpha%2Farray.lisp;h=ec5265995610f9a99f59a32efa1f35e7f1497e1d;hb=8a8a8922802460741d6f8f6c11d71b1f414cf3a7;hp=38572a36d674f330cd54d00aaa01dfe2551bba36;hpb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;p=sbcl.git diff --git a/src/compiler/alpha/array.lisp b/src/compiler/alpha/array.lisp index 38572a3..ec52659 100644 --- a/src/compiler/alpha/array.lisp +++ b/src/compiler/alpha/array.lisp @@ -31,7 +31,7 @@ (inst addq rank (fixnumize (1- array-dimensions-offset)) header) (inst sll header n-widetag-bits header) (inst bis header type header) - (inst srl header 2 header) + (inst srl header n-fixnum-tag-bits header) (pseudo-atomic () (inst bis alloc-tn other-pointer-lowtag result) (storew header result 0 other-pointer-lowtag) @@ -58,7 +58,7 @@ (loadw temp x 0 other-pointer-lowtag) (inst sra temp n-widetag-bits temp) (inst subq temp (1- array-dimensions-offset) temp) - (inst sll temp 2 res))) + (inst sll temp n-fixnum-tag-bits res))) ;;;; bounds checking routine @@ -128,7 +128,7 @@ temp result) (:generator 20 (inst srl index ,bit-shift temp) - (inst sll temp 2 temp) + (inst sll temp n-fixnum-tag-bits temp) (inst addq object temp lip) (inst ldl result (- (* vector-data-offset n-word-bytes) @@ -140,7 +140,7 @@ ,(1- (integer-length bits)) temp))) (inst srl result temp result) (inst and result ,(1- (ash 1 bits)) result) - (inst sll result 2 value))) + (inst sll result n-fixnum-tag-bits value))) (define-vop (,(symbolicate 'data-vector-ref-c/ type)) (:translate data-vector-ref) (:policy :fast-safe) @@ -184,7 +184,7 @@ :from (:argument 1)) shift) (:generator 25 (inst srl index ,bit-shift temp) - (inst sll temp 2 temp) + (inst sll temp n-fixnum-tag-bits temp) (inst addq object temp lip) (inst ldl old (- (* vector-data-offset n-word-bytes) @@ -276,7 +276,7 @@ bits))) (* extra ,bits)))) - (cond ((< value #x10000) + (cond ((< value #x100) (inst bis old value old)) (t (inst li value temp) @@ -529,41 +529,39 @@ ;;; (define-vop (raw-ref-single data-vector-ref/simple-array-single-float) (:translate %raw-ref-single) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum)) + (:arg-types sb!c::raw-vector positive-fixnum)) ;;; (define-vop (raw-set-single data-vector-set/simple-array-single-float) (:translate %raw-set-single) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum single-float)) + (:arg-types sb!c::raw-vector positive-fixnum single-float)) ;;; (define-vop (raw-ref-double data-vector-ref/simple-array-double-float) (:translate %raw-ref-double) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum)) + (:arg-types sb!c::raw-vector positive-fixnum)) ;;; (define-vop (raw-set-double data-vector-set/simple-array-double-float) (:translate %raw-set-double) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum double-float)) + (:arg-types sb!c::raw-vector positive-fixnum double-float)) (define-vop (raw-ref-complex-single data-vector-ref/simple-array-complex-single-float) (:translate %raw-ref-complex-single) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum)) + (:arg-types sb!c::raw-vector positive-fixnum)) ;;; (define-vop (raw-set-complex-single data-vector-set/simple-array-complex-single-float) (:translate %raw-set-complex-single) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum - complex-single-float)) + (:arg-types sb!c::raw-vector positive-fixnum complex-single-float)) ;;; (define-vop (raw-ref-complex-double data-vector-ref/simple-array-complex-double-float) (:translate %raw-ref-complex-double) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum)) + (:arg-types sb!c::raw-vector positive-fixnum)) ;;; (define-vop (raw-set-complex-double data-vector-set/simple-array-complex-double-float) (:translate %raw-set-complex-double) - (:arg-types simple-array-unsigned-byte-32 positive-fixnum - complex-double-float)) + (:arg-types sb!c::raw-vector positive-fixnum complex-double-float)) ;;; These vops are useful for accessing the bits of a vector irrespective of ;;; what type of vector it is.