0.8.21.42:
[sbcl.git] / src / compiler / ppc / array.lisp
index 2a141f7..a7dece0 100644 (file)
        (:results (result :scs ,scs))
        (:result-types ,element-type)))))
   (def-data-vector-frobs simple-base-string byte-index
-    base-char base-char-reg)
+    character character-reg)
+  #!+sb-unicode
+  (def-data-vector-frobs simple-character-string word-index
+    character character-reg)
   (def-data-vector-frobs simple-vector word-index
     * descriptor-reg any-reg)
-
   (def-data-vector-frobs simple-array-unsigned-byte-7 byte-index
     positive-fixnum unsigned-reg)
   (def-data-vector-frobs simple-array-unsigned-byte-8 byte-index
 ;;;
 (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
   (:result-types unsigned-num)
   (:variant 0 other-pointer-lowtag))
 
+(define-vop (vector-raw-bits word-index-ref)
+  (:note "vector-raw-bits VOP")
+  (:translate %vector-raw-bits)
+  (:results (value :scs (unsigned-reg)))
+  (:result-types unsigned-num)
+  (:variant vector-data-offset other-pointer-lowtag))
 
+(define-vop (set-vector-raw-bits word-index-set)
+  (:note "setf vector-raw-bits VOP")
+  (:translate %set-vector-raw-bits)
+  (:args (object :scs (descriptor-reg))
+        (index :scs (any-reg zero immediate))
+        (value :scs (unsigned-reg)))
+  (:arg-types * positive-fixnum unsigned-num)
+  (:results (result :scs (unsigned-reg)))
+  (:result-types unsigned-num)
+  (:variant vector-data-offset other-pointer-lowtag))
 \f
 ;;;; Misc. Array VOPs.