From 91a071d43c4fdca0ad2fb6ad488453fa1bcc9ed1 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Fri, 12 Apr 2013 19:27:50 +0400 Subject: [PATCH] Disassemble: print the function size in bytes. Print "; Size: 981 bytes" at the beginning of DISASSEMBLE output. --- src/compiler/target-disassem.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compiler/target-disassem.lisp b/src/compiler/target-disassem.lisp index b1f09cc..5473481 100644 --- a/src/compiler/target-disassem.lisp +++ b/src/compiler/target-disassem.lisp @@ -1428,13 +1428,15 @@ (type stream stream) (type disassem-state dstate)) (unless (null segments) + (format t "~&; Size: ~a bytes" + (reduce #'+ segments :key #'seg-length)) (let ((first (car segments)) (last (car (last segments)))) (set-location-printing-range dstate - (seg-virtual-location first) - (- (+ (seg-virtual-location last) - (seg-length last)) - (seg-virtual-location first))) + (seg-virtual-location first) + (- (+ (seg-virtual-location last) + (seg-length last)) + (seg-virtual-location first))) (setf (dstate-output-state dstate) :beginning) (dolist (seg segments) (disassemble-segment seg stream dstate))))) -- 1.7.10.4