anchor.diff:  	  `(sys.lap-x86:sar64 :rax 3)
             ;; Read.
             `(sys.lap-x86:mov64 :rax (:rax :rcx))
  -          ;; Check for overflow. Top 3 bits must be all 0 or all 1.
  -          `(sys.lap-x86:mov64 :rdx :rax)
  -          `(sys.lap-x86:sar64 :rdx 61)
  -          `(sys.lap-x86:jz ,ok-label)
  -          `(sys.lap-x86:cmp8 :dl -1)
  -          `(sys.lap-x86:jne ,overflow-error-label)
  +          ;; Check for overflow. Top 4 bits must be all 0.
  +          `(sys.lap-x86:mov64 :rcx :rax)
  +          `(sys.lap-x86:sar64 :rcx 60)
  +          `(sys.lap-x86:jnz ,overflow-error-label)
             ok-label
             ;; Convert to fixnum.
             `(sys.lap-x86:shl64 :rax 3)
  
positive.code:           resume)
      (setf *r8-value* (list (gensym)))))
  
  ;;; TODO: bignums.
  (defbuiltin (setf sys.int::memref-unsigned-byte-64) (new-value base offset) ()
    (let ((type-error-label (gensym)))
      (emit-trailer (type-error-label)
        (raise-type-error :r8 '(unsigned-byte 64)))
      (load-in-reg :rax base t)
      (fixnum-check :rax)
      (load-in-reg :rcx offset t)
      (fixnum-check :rcx)
      (load-in-r8 new-value t)
      (emit `(sys.lap-x86:mov64 :rdx :r8)
  	  `(sys.lap-x86:test64 :rdx #b111)
  	  `(sys.lap-x86:jnz ,type-error-label)
  	  ;; Convert to raw integers, leaving offset correctly scaled (* 8).
  	  `(sys.lap-x86:sar64 :rax 3)
  	  `(sys.lap-x86:sar64 :rdx 3)
  	  ;; Write.
  	  `(sys.lap-x86:mov64 (:rax :rcx) :rdx))
      *r8-value*))
  
negative.code:   (and (quoted-constant-p tag)
         (typep (second tag) type)))
  
  (defmacro define-u-b-memref (name shift mask op register size)
    `(progn
       (defbuiltin ,name (base offset) ()
         (load-in-reg :r9 base t)
         (fixnum-check :r9)
         (emit `(sys.lap-x86:mov64 :rdx :r9))
         (load-in-reg :r9 offset t)
         (fixnum-check :r9)
         (emit `(sys.lap-x86:mov64 :rcx :r9))
         (smash-r8)
         ;; BASE to raw integer.
         (emit '(sys.lap-x86:sar64 :rdx 3))
         ;; Convert OFFSET to a scaled raw integer & read it.
         (emit '(sys.lap-x86:sar64 :rcx ,shift)
               '(,op ,register (:rdx :rcx)))
         ;; Wipe the bits that didn't get loaded.
         ,@(when mask
             `((emit '(sys.lap-x86:and32 :eax ,mask))))
         ;; Convert to fixnum.
         (emit '(sys.lap-x86:lea64 :r8 ((:rax 8))))
         (setf *r8-value* (list (gensym))))
       (defbuiltin (setf ,name) (new-value base offset) ()
         (let ((type-error-label (gensym)))
           (emit-trailer (type-error-label)
             (raise-type-error :r8 '(unsigned-byte ,size)))
           (load-in-reg :r9 base t)
           (fixnum-check :r9)
           (emit `(sys.lap-x86:mov64 :rdx :r9))
           (load-in-reg :r9 offset t)
           (fixnum-check :r9)
           (emit `(sys.lap-x86:mov64 :rcx :r9))
           (load-in-r8 new-value t)
           (emit '(sys.lap-x86:mov64 :rax :r8)
                 '(sys.lap-x86:test64 :rax #b111)
                 `(sys.lap-x86:jnz ,type-error-label)
                 '(sys.lap-x86:mov64 :rsi ,(fixnum-to-raw (ash 1 size)))
                 '(sys.lap-x86:cmp64 :rax :rsi)
                 `(sys.lap-x86:jae ,type-error-label)
                 ;; Convert to raw integers, leaving offset correctly scaled.
                 '(sys.lap-x86:sar64 :rdx 3)
                 '(sys.lap-x86:sar64 :rcx ,shift)
                 '(sys.lap-x86:sar64 :rax 3)
                 ;; Write.
                 '(,op (:rdx :rcx) ,register))
           *r8-value*))))
  
  (define-u-b-memref sys.int::memref-unsigned-byte-8 3 #xFF sys.lap-x86:mov8 :al 8)
  (define-u-b-memref sys.int::memref-unsigned-byte-16 2 #xFFFF sys.lap-x86:mov16 :ax 16)
  (define-u-b-memref sys.int::memref-unsigned-byte-32 1 nil sys.lap-x86:mov32 :eax 32)
  
  (defbuiltin sys.int::memref-unsigned-byte-64 (base offset) ()
    (let ((overflow-error-label (gensym))
  