"%ARRAY-DISPLACED-FROM"
"%ARRAY-DISPLACEMENT" "%ARRAY-FILL-POINTER"
"%ARRAY-FILL-POINTER-P" "%ARRAY-RANK"
- #!+(or)
+ #!+(or x86-64)
"%ARRAY-ATOMIC-INCF/WORD"
"%ASSOC"
"%ASSOC-EQ"
(aref
(when (cddr args)
(invalid-place))
- #!+(or)
+ #!+(or x86-64)
(with-unique-names (array)
`(let ((,array (the (simple-array sb!ext:word (*)) ,(car args))))
(%array-atomic-incf/word
`(the sb!vm:signed-word ,diff))
(atomic-decf
`(- (the sb!vm:signed-word ,diff))))))))
- #!-(or)
+ #!-(or x86-64)
(with-unique-names (array index old-value)
(let ((incremented-value
(ecase name
(expand-atomic-frob 'atomic-decf place diff))
;; Interpreter stubs for ATOMIC-INCF.
-#!+(or)
+#!+(or x86-64)
(defun %array-atomic-incf/word (array index diff)
(declare (type (simple-array word (*)) array)
(fixnum index)
#!+(or x86 x86-64 ppc)
(defknown %raw-instance-atomic-incf/word (instance index sb!vm:word) sb!vm:word
(unsafe always-translatable))
-#!+(or)
+#!+(or x86-64)
(defknown %array-atomic-incf/word (t index sb!vm:word) sb!vm:word
(unsafe always-translatable))
(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 :qword :base array
+ :scale 1 :index index
+ :disp (- (* vector-data-offset n-word-bytes)
+ other-pointer-lowtag))
+ diff :lock)
+ (move result diff)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.43.30"
+"1.0.43.31"