(in-package "SB!VM")
\f
;;;; allocator for the array header
-
(define-vop (make-array-header)
(:policy :fast-safe)
(:translate make-array-header)
(inst bis alloc-tn other-pointer-lowtag result)
(storew header result 0 other-pointer-lowtag)
(inst addq alloc-tn bytes alloc-tn))))
-
-
\f
;;;; additional accessors and setters for the array header
(define-full-reffer %array-dimension *
(inst sll temp n-fixnum-tag-bits res)))
\f
;;;; bounds checking routine
-
(define-vop (check-bound)
(:translate %check-bound)
(:policy :fast-safe)
bits)))
(* extra
,bits))))
- (cond ((< value #x10000)
+ (cond ((< value #x100)
(inst bis old value old))
(t
(inst li value temp)
(def-full-data-vector-frobs simple-vector *
descriptor-reg any-reg null zero)
- (def-partial-data-vector-frobs simple-base-string base-char :byte nil
- base-char-reg)
+ (def-partial-data-vector-frobs simple-base-string character :byte nil
+ character-reg)
+ #!+sb-unicode ; FIXME: what about when a word is 64 bits?
+ (def-full-data-vector-frobs simple-character-string character character-reg)
(def-partial-data-vector-frobs simple-array-unsigned-byte-7 positive-fixnum
:byte nil unsigned-reg signed-reg)
;;;
(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.
(define-full-reffer raw-bits * 0 other-pointer-lowtag (unsigned-reg) unsigned-num
%raw-bits)
(define-full-setter set-raw-bits * 0 other-pointer-lowtag (unsigned-reg)
- unsigned-num %set-raw-bits #+gengc nil)
+ unsigned-num %set-raw-bits)
+(define-full-reffer vector-raw-bits * vector-data-offset other-pointer-lowtag
+ (unsigned-reg) unsigned-num %vector-raw-bits)
+(define-full-setter set-vector-raw-bits * vector-data-offset other-pointer-lowtag
+ (unsigned-reg) unsigned-num %set-vector-raw-bits)
\f
;;;; misc. array VOPs