disassemble: Better annotation of static functions and safepoints.
[sbcl.git] / src / compiler / x86 / array.lisp
index 3d49c01..1b6c8f2 100644 (file)
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 5
-    (let ((error (generate-error-code vop invalid-array-index-error
+    (let ((error (generate-error-code vop 'invalid-array-index-error
                                       array bound index))
           (index (if (sc-is index immediate)
                    (fixnumize (tn-value index))
   (def-full-data-vector-frobs simple-vector * descriptor-reg any-reg)
   (def-full-data-vector-frobs simple-array-unsigned-byte-32 unsigned-num
     unsigned-reg)
-  (def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num any-reg)
-  (def-full-data-vector-frobs simple-array-unsigned-byte-29 positive-fixnum any-reg)
+  (def-full-data-vector-frobs simple-array-fixnum tagged-num any-reg)
+  (def-full-data-vector-frobs simple-array-unsigned-fixnum positive-fixnum any-reg)
   (def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
     signed-reg)
   (def-full-data-vector-frobs simple-array-unsigned-byte-31 unsigned-num
 \f
 ;;; These vops are useful for accessing the bits of a vector
 ;;; irrespective of what type of vector it is.
-(define-full-reffer+offset raw-bits-with-offset * 0 other-pointer-lowtag (unsigned-reg)
-  unsigned-num %raw-bits-with-offset)
-(define-full-setter+offset set-raw-bits-with-offset * 0 other-pointer-lowtag (unsigned-reg)
-  unsigned-num %set-raw-bits-with-offset)
+(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
 ;;;; miscellaneous array VOPs
 
 (define-vop (get-vector-subtype get-header-data))
 (define-vop (set-vector-subtype set-header-data))
+\f
+;;;; ATOMIC-INCF for arrays
+
+(define-vop (array-atomic-incf/word)
+  (:translate %array-atomic-incf/word)
+  (:policy :fast-safe)
+  (:args (array :scs (descriptor-reg))
+         (index :scs (any-reg))
+         (diff :scs (unsigned-reg) :target result))
+  (:arg-types * positive-fixnum unsigned-num)
+  (:results (result :scs (unsigned-reg)))
+  (:result-types unsigned-num)
+  (:generator 4
+    (inst xadd (make-ea :dword :base array
+                        :scale 1 :index index
+                        :disp (- (* vector-data-offset n-word-bytes)
+                                 other-pointer-lowtag))
+          diff :lock)
+    (move result diff)))