X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86%2Farray.lisp;h=1b6c8f23bb7119a147f946443d5d265113f49a3a;hb=0a2d9c98c53cfe7b3874ca96b11dd629a360aa42;hp=22ab26c0db245306698c8c9a0dc8512d781bcb49;hpb=a6b91f356da1b5ae2987f79db9bd137970512959;p=sbcl.git diff --git a/src/compiler/x86/array.lisp b/src/compiler/x86/array.lisp index 22ab26c..1b6c8f2 100644 --- a/src/compiler/x86/array.lisp +++ b/src/compiler/x86/array.lisp @@ -141,8 +141,8 @@ (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 @@ -686,13 +686,32 @@ ;;; 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) ;;;; miscellaneous array VOPs (define-vop (get-vector-subtype get-header-data)) (define-vop (set-vector-subtype set-header-data)) + +;;;; 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)))