1 ;;;;------------------------------------------------------------------
3 ;;;; Copyright (C) 20012000, 2003-2004,
4 ;;;; Department of Computer Science, University of Tromso, Norway
6 ;;;; Filename: postload.lisp
8 ;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
9 ;;;; Created at: Mon Jan 31 16:33:23 2000
10 ;;;; Distribution: See the accompanying file COPYING.
12 ;;;; $Id: postload.lisp,v 1.4 2004/02/10 00:03:52 ffjeld Exp $
14 ;;;;------------------------------------------------------------------
18 (defun table-stats (prefix table
)
19 (format t
"~&;; ~A ~D x86 instruction templates loaded.~%"
21 (reduce #'+ (map 'list
#'length
24 (format t
"~&;; ~A Longest lookup list (#x~2,'0X) has ~D elements.~%"
26 (position #0=(reduce #'max
(map 'list
#'length
32 (format t
"~&;; ~A Average lookup list length is ~,1F.~%"
34 (/ (reduce #'+ (map 'list
#'length
38 (let ((*print-base
* 16)
40 (format t
"~&;; ~A There are ~D empty lookup lists (~D%):~%;; ~A~%"
42 #1=(count-if #'null table
)
43 (round (* 100 (/ #1# #x100
)))
45 (dotimes (i #x100
(nreverse r
))
46 (when (null (aref table i
))