anchor.diff:    (lap:mov64 (:object nil #.mezzano.supervisor::+thread-stack+) :rbx)
     ;; Ordinary return, no need to invalidate anything.
     (lap:leave)
  -  ;; Only matters if the thread is footholded.
     (:gc :frame :multiple-values 0)
  +  ;; Reenable footholds, back on the old stack.
  +  (lap:gs)
  +  (lap:sub64 (:object nil #.mezzano.supervisor::+thread-inhibit-footholds+)
  +             #.(ash 1 sys.int::+n-fixnum-bits+))
  +  ;; FIXME: Need to run pending footholds here, but that requires saving the
  +  ;; multiple values. They'll get run eventually, maybe.
     (lap:leave)
     (:gc :no-frame :layout #*0 :multiple-values 0)
  -  (lap:ret))
  +  (lap:ret)
  +  RUN-FOOTHOLDS-1
  +  (:gc :frame :layout #*1111)
  +  ;; Save the thunk
  +  (lap:sub64 :rsp 16)
  +  (lap:mov64 (:rsp 8) :r9)
  +  (:gc :frame :layout #*1111001)
  +  (lap:mov64 :r13 (:function footholds-helper))
  +  (lap:xor32 :ecx :ecx)
  +  (lap:call (:object :r13 #.sys.int::+fref-entry-point+))
  +  (lap:mov64 :r9 (:rsp 8))
  +  (lap:add64 :rsp 16)
  +  (:gc :frame :layout #*1111)
  +  (lap:jmp CALL-THUNK))
  +
  +(defun footholds-helper ()
  +  (let ((footholds (sys.int::%xchg-object (mezzano.supervisor:current-thread)
  +                                          mezzano.supervisor::+thread-pending-footholds+
  +                                          nil)))
  +    (dolist (fh footholds)
  +      (funcall fh))))
   
   (sys.int::define-lap-function %abort-to-prompt ((prompt values))
     ;; r8 = prompt; r9 = values.
  
positive.code:   (lap:mov64 (:object :rbx #.sys.int::+delimited-continuation-prompt+) 0)
    (lap:mov64 (:object :rbx #.sys.int::+delimited-continuation-stack-pointer+) 0)
    (lap:mov64 (:object :rbx #.sys.int::+delimited-continuation-stack+) 0)
    ;; Now return to the function that originally aborted.
    (lap:leave)
    (:gc :no-frame :layout #*0 :multiple-values 0)
    (lap:ret)
    TOO-MANY-VALUES
    (:gc :frame)
    (lap:mov64 :r13 (:function error))
    (lap:mov64 :r8 (:constant "Resuming continuation ~S with too many values (MULTPLE-VALUES-LIMIT exceeded)"))
    (lap:mov32 :ecx #.(ash 1 sys.int::+n-fixnum-bits+))
  
negative.code:   (lap:mov64 :r9 (:stack 0)) ; r9 = prompt
    (lap:mov64 :r10 (:stack 1)) ; r10 = values
    ;; r8 = new continuation, r9 = prompt, r10 = values.
    ;; Work with footholds inhibitied.
    (lap:gs)
    (lap:add64 (:object nil #.mezzano.supervisor::+thread-inhibit-footholds+)
               #.(ash 1 sys.int::+n-fixnum-bits+))
    ;; Store the entry point...
    (lap:mov64 :r11 (:function %resume-delimited-continuation))
    (lap:mov64 :rax (:object :r11 #.sys.int::+fref-entry-point+))
  