+2009-09-10 Doug Evans <dje@sebabeach.org>
+
+ * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
+ (/insn-parse): Don't verify iformat for virtual insns.
+
+ * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
+ non-multi-insns.
+ * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
+ (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
+ * sid.scm (pbb-engine-insns): Ditto.
+ * sim-decode.scm (cgen-decode.c): Ditto.
+
2009-09-09 Doug Evans <dje@sebabeach.org>
* rtl-traverse.scm: Comment tweaks.
(semantics (if (not (null? semantics))
semantics
#f))
- (format (/parse-insn-format (context-append context " format")
- ;; Just pick the first, the base len
- ;; for each should be the same.
- ;; If not this is caught by
- ;; compute-insn-base-mask-length.
- (current-isa-lookup (car isas))
- fmt))
+ (format (/parse-insn-format
+ (context-append context " format")
+ (and (not (atlist-has-attr? atlist-obj 'VIRTUAL))
+ (reader-verify-iformat? CURRENT-READER))
+ ;; Just pick the first, the base len
+ ;; for each should be the same.
+ ;; If not this is caught by
+ ;; compute-insn-base-mask-length.
+ (current-isa-lookup (car isas))
+ fmt))
(comment (parse-comment context comment))
; If there are no semantics, mark this as an alias.
; ??? Not sure this makes sense for multi-insns.
; Given an insn format field from a .cpu file, replace it with a list of
; ifield objects with the values assigned.
-; If ISA is non-#f, it is an <isa> object, and we perform various checks
-; on the format (which require an isa).
+; ISA is an <isa> object or #f.
+; If VERIFY? is non-#f, perform various checks on the format
+; (ISA must be an <isa> object).
;
; An insn format field is a list of ifields that make up the instruction.
; All bits must be specified, including reserved bits
; It's called for each instruction, and is one of the more expensive routines
; in insn parsing.
-(define (/parse-insn-format context isa ifld-list)
+(define (/parse-insn-format context verify? isa ifld-list)
(let* ((parsed-ifld-list (/parse-insn-iformat-iflds context ifld-list)))
;; NOTE: We could sort the fields here, but it introduces differences
;; Is there a benefit to removing this assumption? Note that
;; multi-ifields can be discontiguous, so the sorting isn't perfect.
- (if (and isa
- (reader-verify-iformat? CURRENT-READER))
+ (if verify?
+
(let ((base-len (isa-base-insn-bitsize isa)))
;; Perform some error checking.
(string-list
" " (/gen-model-insn-fn-decl model insn 'before)
" " (/gen-model-insn-fn-decl model insn 'after)))
- (non-multi-insns (real-insns (current-insn-list))))
+ (real-insns (current-insn-list)))
)
)
(string-list
(/gen-model-insn-fn model insn 'before)
(/gen-model-insn-fn model insn 'after)))
- (non-multi-insns (real-insns (current-insn-list)))))
+ (real-insns (current-insn-list))))
(current-model-list)))
)
)
; FIXME: revisit MAX_UNITS
" static const int MAX_UNITS = "
(number->string
- (let ((insn-list (non-multi-insns (real-insns (current-insn-list)))))
+ (let ((insn-list (real-insns (current-insn-list))))
(if (null? insn-list)
1
(apply max