anchor.diff:  ;; (defun fixnum-add (object slot delta)
   ;;   (prog1 (%array-like-ref-t object slot)
   ;;     (incf (%array-like-ref-t object slot) delta)))
  -(defbuiltin sys.int::%atomic-fixnum-add-array-like (object slot delta) ()
  -  (load-in-reg :r10 slot t)
  -  (fixnum-check :r10)
  -  (load-in-reg :r9 object t)
  -  (load-in-reg :r8 delta t)
  -  (fixnum-check :r8)
  -  (smash-r8)
  -  (emit
  -   ;; Convert slot number to integers.
  -   `(sys.lap-x86:mov64 :rcx :r10)
  -   `(sys.lap-x86:shr64 :rcx ,sys.int::+n-fixnum-bits+)
  -   ;; Atomic add.
  -   `(sys.lap-x86:lock)
  -   `(sys.lap-x86:xadd64 ,(object-ea :r9 :index '(:rcx 8)) :r8))
  -  (setf *r8-value* (list (gensym))))
  +(defbuiltin sys.int::%atomic-fixnum-add-array-like (object offset delta) ()
  +  (let ((constant-offset (and (constant-type-p offset `(signed-byte ,(- 64 sys.int::+n-fixnum-bits+)))
  +                              (second offset))))
  +    (unless constant-offset
  +      (load-in-reg :r10 offset t)
  +      (fixnum-check :r10)
  +      ;; Convert to unboxed integer.
  +      (emit `(sys.lap-x86:mov64 :rdi :r10)
  +            `(sys.lap-x86:sar64 :rdi ,sys.int::+n-fixnum-bits+)))
  +    (load-in-reg :r9 object t)
  +    (load-in-reg :r8 delta t)
  +    (fixnum-check :r8)
  +    (smash-r8)
  +    ;; Atomic add.
  +    (cond (constant-offset
  +           (emit `(sys.lap-x86:lock)
  +                 `(sys.lap-x86:xadd64 ,(object-ea :r9 :slot constant-offset) :r8)))
  +          (t
  +           (emit `(sys.lap-x86:xadd64 ,(object-ea :r9 :index '(:rdi 8)) :r8))))
  +    (setf *r8-value* (list (gensym)))))
   
   ;; Set the value in SLOT to NEW, and return the old value.
   ;; (defun xchg (object slot new)
   ;;   (prog1 (%array-like-ref-t object slot)
   ;;     (setf (%array-like-ref-t object slot) new)))
   (defbuiltin sys.int::%xchg-array-like (object offset new) ()
  -  (load-in-reg :r10 offset t)
  -  (fixnum-check :r10)
  -  (load-in-reg :r9 object t)
  -  (load-in-reg :r8 new t)
  -  (smash-r8)
  -  (emit
  -   ;; Convert slot number to integers.
  -   `(sys.lap-x86:mov64 :rcx :r10)
  -   `(sys.lap-x86:shr64 :rcx ,sys.int::+n-fixnum-bits+)
  -   ;; Do the swap. xchg has an implicit lock prefix.
  -   `(sys.lap-x86:xchg64 ,(object-ea :r9 :index '(:rcx 8)) :r8))
  -  (setf *r8-value* (list (gensym))))
  +  (let ((constant-offset (and (constant-type-p offset `(signed-byte ,(- 64 sys.int::+n-fixnum-bits+)))
  +                              (second offset))))
  +    (unless constant-offset
  +      (load-in-reg :r10 offset t)
  +      (fixnum-check :r10)
  +      ;; Convert to unboxed integer.
  +      (emit `(sys.lap-x86:mov64 :rdi :r10)
  +            `(sys.lap-x86:sar64 :rdi ,sys.int::+n-fixnum-bits+)))
  +    (load-in-reg :r9 object t)
  +    (load-in-reg :r8 new t)
  +    (smash-r8)
  +    ;; Do the swap. xchg has an implicit lock prefix.
  +    (cond (constant-offset
  +           (emit `(sys.lap-x86:xchg64 ,(object-ea :r9 :slot constant-offset) :r8)))
  +          (t
  +           (emit `(sys.lap-x86:xchg64 ,(object-ea :r9 :index '(:rdi 8)) :r8))))
  +    (setf *r8-value* (list (gensym)))))
   
   ;; If the value in SLOT matches OLD, set it to NEW; otherwise do nothing.
   ;; Returns true as the primary value if the slot was modified, false otherwise.
  
positive.code: (defbuiltin (setf sys.int::%array-like-ref-signed-byte-64) (new-value array offset) ()
    (let ((type-error-label (gensym))
          (bignum-path (gensym "alr-sb64-bignum"))
          (value-extracted (gensym "alr-sb64-value-extracted")))
      (emit-trailer (bignum-path)
        ;; Check for bignumness.
        (emit `(sys.lap-x86:and8 :dl #b1111)
  
negative.code:                `(sys.lap-x86:jge ,type-error-label)
                 '(sys.lap-x86:mov64 :rdi ,(- (ash 1 (1- (* width 8)))))
                 '(sys.lap-x86:cmp64 :rsi :rdi)
                 `(sys.lap-x86:jl ,type-error-label))
           ;; Write
           (cond (constant-offset
                  (emit `(,',write-op ,(list :r9 (+ (- sys.int::+tag-object+) 8 (* constant-offset ,width))) ,',register)))
                 (t
                  (emit '(,write-op ,(object-ea :r9 :index `(:rcx ,width)) ,register))))
           *r8-value*))))
  
  (define-s-b-alref sys.int::%array-like-ref-signed-byte-8  1 sys.lap-x86:movsx8  sys.lap-x86:mov8  :al)
  