- (sb!sys:without-gcing
- (setf (dstate-segment-sap dstate) (funcall (seg-sap-maker segment)))
-
- (let ((chunk
- (sap-ref-dchunk (dstate-segment-sap dstate)
- (dstate-cur-offs dstate)
- (dstate-byte-order dstate))))
- (let ((fun-prefix-p (call-fun-hooks chunk stream dstate)))
- (if (> (dstate-next-offs dstate) (dstate-cur-offs dstate))
- (setf prefix-p fun-prefix-p)
- (let ((inst (find-inst chunk ispace)))
- (cond ((null inst)
- (handle-bogus-instruction stream dstate))
- (t
- (setf (dstate-next-offs dstate)
- (+ (dstate-cur-offs dstate)
- (inst-length inst)))
-
- (let ((prefilter (inst-prefilter inst))
- (control (inst-control inst)))
- (when prefilter
- (funcall prefilter chunk dstate))
-
- (funcall function chunk inst)
-
- (setf prefix-p (null (inst-printer inst)))
-
- (when control
- (funcall control chunk inst stream dstate))))))
- )))))
+ (sb!sys:without-gcing
+ (setf (dstate-segment-sap dstate) (funcall (seg-sap-maker segment)))
+
+ (let ((chunk
+ (sap-ref-dchunk (dstate-segment-sap dstate)
+ (dstate-cur-offs dstate)
+ (dstate-byte-order dstate))))
+ (let ((fun-prefix-p (call-fun-hooks chunk stream dstate)))
+ (if (> (dstate-next-offs dstate) (dstate-cur-offs dstate))
+ (setf prefix-p fun-prefix-p)
+ (let ((inst (find-inst chunk ispace)))
+ (cond ((null inst)
+ (handle-bogus-instruction stream dstate))
+ (t
+ (setf (dstate-inst-properties dstate) nil)
+ (setf (dstate-next-offs dstate)
+ (+ (dstate-cur-offs dstate)
+ (inst-length inst)))
+ (let ((orig-next (dstate-next-offs dstate)))
+ (print-inst (inst-length inst) stream dstate :trailing-space nil)
+ (let ((prefilter (inst-prefilter inst))
+ (control (inst-control inst)))
+ (when prefilter
+ (funcall prefilter chunk dstate))
+
+ (setf prefix-p (null (inst-printer inst)))
+
+ ;; print any instruction bytes recognized by the prefilter which calls read-suffix
+ ;; and updates next-offs
+ (when stream
+ (let ((suffix-len (- (dstate-next-offs dstate) orig-next)))
+ (when (plusp suffix-len)
+ (print-inst suffix-len stream dstate :offset (inst-length inst) :trailing-space nil))
+ (unless prefix-p
+ (dotimes (i (- *disassem-inst-column-width* (* 2 (+ (inst-length inst) suffix-len prefix-len))))
+ (write-char #\space stream))
+ (write-char #\space stream))
+
+ (setf prefix-len (+ (inst-length inst) suffix-len))))
+
+ (funcall function chunk inst)
+
+ (when control
+ (funcall control chunk inst stream dstate))
+ ))))))))))