OSDN Git Service

misc. whitespace and comment cleanup
authordevans <devans>
Tue, 8 Jul 2003 16:19:35 +0000 (16:19 +0000)
committerdevans <devans>
Tue, 8 Jul 2003 16:19:35 +0000 (16:19 +0000)
cgen/decode.scm
cgen/html.scm
cgen/insn.scm
cgen/sid-decode.scm
cgen/sim-decode.scm

index 57c87d4..f189472 100644 (file)
        ))
 )
 
-
 ; Compute population counts for each bit.  Return it as a vector indexed by bit number.
 ; Rather than computing raw popularity, attempt to compute "disinguishing value" or
 ; inverse-entropy for each bit.  The idea is that the larger the number for any particular
 ; bit slot, the more instructions it can be used to distinguish.  Raw mask popularity
 ; is not enough -- popular masks may include useless "reserved" fields whose values
 ; don't change, and thus are useless in distinguishing.
+
 (define (-distinguishing-bit-population masks mask-lens values lsb0?)
   (let* ((max-length (apply max mask-lens))
         (0-population (make-vector max-length 0))
          (vector->list 0-population) (vector->list 1-population))))
 )
 
-
 ; Return a list (0 ... limit-1)
+
 (define (-range limit)
   (let loop ((i 0)
             (indices (list)))
 )
 
 ; Return a list (base ... base+size-1)
+
 (define (-range2 base size)
   (let loop ((i base)
             (indices (list)))
     (if (= i (+ base size)) (reverse indices) (loop (+ i 1) (cons i indices))))
 )
 
+; Return a copy of given vector, with all entries with given indices set
+; to `value'
 
-; Return a copy of given vector, with all entries with given indices set to `value'
 (define (-vector-copy-set-all vector indices value)
   (let ((new-vector (make-vector (vector-length vector))))
     (for-each (lambda (index)
     new-vector)
 )
 
-
-; Return a list of indices whose counts in the given vector exceed the given threshold.
+; Return a list of indices whose counts in the given vector exceed the given
+; threshold.
 ; Sort them in decreasing order of populatority.
+
 (define (-population-above-threshold population threshold)
   (let* ((unsorted
          (find (lambda (index) (if (vector-ref population index) 
     sorted)
 )
 
-
 ; Return the top few most popular indices in the population vector,
 ; ignoring any that are already used (marked by #f).  Don't exceed
 ; `size' unless the clustering is just too good to pass up.
+
 (define (-population-top-few population size)
   (let loop ((old-picks (list))
             (remaining-population population)
                (* 0.75 count-threshold))))))
 )
 
-
-
 ; Given list of insns, return list of bit numbers of constant bits in opcode
 ; that they all share (or mostly share), up to MAX elements.
 ; ALREADY-USED is a list of bitnums we can't use.
     sorted-indices)
 )
 
-
 (define (OLDdecode-get-best-bits insn-list already-used startbit max decode-bitsize lsb0?)
   (let ((masks (map insn-base-mask insn-list))
        ; ??? We assume mask lengths are repeatedly used for insns longer
index 58335e1..8fb1833 100644 (file)
@@ -24,8 +24,6 @@
 ;   including generic cgen documentation here
 ; - function units, timing, etc.
 ; - instruction framing
-; - ARM docs mix arm/thumb, should be separate,
-;   first try to split using keep-isa
 
 ; Global state variables.
 
index f3ec793..6cb606a 100644 (file)
   (find (lambda (insn) (not (multi-insn? insn))) insn-list)
 )
 
-
 ; Filter out instructions whose ifield patterns are strict supersets of
 ; another, keeping the less general cousin.  Used to resolve ambiguity
 ; when there are no more bits to consider.
index b07c272..d1d3280 100644 (file)
@@ -617,9 +617,6 @@ static void
 ; build the first decode table.  If nil, we compute 8 bits of it (FIXME)
 ; ourselves.
 ; LSB0? is non-#f if bit number 0 is the least significant bit.
-; FIXME: Need to be perfect for every subtable, or allow target more control.
-; Leave for later (and don't give target more control until oodles of effort
-; have been spent trying to be perfect! ... or close enough).
 
 (define (-gen-decode-fn insn-list initial-bitnums lsb0?)
   (assert (with-scache?))
@@ -635,7 +632,8 @@ static void
     ; 0 is passed for the start bit (it is independent of lsb0?)
     (if (null? initial-bitnums)
        (set! initial-bitnums
-             (if (= 0 (length insn-list)) (list 0) ; dummy value
+             (if (= 0 (length insn-list))
+                 (list 0) ; dummy value
                  (decode-get-best-bits insn-list nil
                                        0 ; startbit
                                        8 ; max
index 8759f6d..a4e620a 100644 (file)
@@ -466,9 +466,6 @@ void
 ; build the first decode table.  If nil, we compute 8 bits of it (FIXME)
 ; ourselves.
 ; LSB0? is non-#f if bit number 0 is the least significant bit.
-; FIXME: Need to be perfect for every subtable, or allow target more control.
-; Leave for later (and don't give target more control until oodles of effort
-; have been spent trying to be perfect! ... or close enough).
 
 (define (-gen-decode-fn insn-list initial-bitnums lsb0?)