2010-01-05 Doug Evans * mode.scm () Rename member non-mode-c-type to c-type. All uses updated. (mode:non-mode-c-type): Delete. (mode:c-type): Update. * rtl-c.scm (s-shop): Fix casting of DI mode values. 2010-01-04 Doug Evans * gen-all (all_cgen_cpus): Add sh. 2010-01-02 Doug Evans * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year. 2009-12-17 Doug Evans * mep.opc: Apply patches from opcodes to compile with -Wshadow. mep-asm.c now regenerates correctly again. * gen-all: Add support for building gcc/newlib. Specify --prefix and install all built tools. 2009-12-16 Doug Evans * sim.scm (/op-gen-written-update): Disable operand number is too large warning, for now. 2009-12-11 Nick Clifton * cpu/fr30.opc: Fix shadowed variable warnings. 2009-12-10 Doug Evans * gen-all: Rewrite. Build more ports. Split out building of sid. 2009-11-23 Doug Evans * hardware.scm (hw-pc?): New function. * ifield.scm (ifld-signed?): New function. * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?. * insn.scm (insn-cti-attr?): Renamed from insn-ctl?. (insn-cti?): New function. * rtl.scm (/hw): Create object for pcs. * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs. All callers updated. Watch for sets to the pc. (semantic-attrs): Watch for sets to the pc. * sid.scm ( cxmake-get): Handle raw-reg. * sim.scm ( cxmake-get): Handle raw-reg. ( cxmake-get): Add debugging printf. * utils-gen.scm (/gen-ifld-extract-base): Emit calls to EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits. (/gen-extract-word): Ditto. * utils.scm (gen-c-hex-constant): New function. * utils-sim.scm (/gen-decode-insn-entry): Call it. 2009-11-22 Doug Evans * insn.scm (/parse-insn-format): Watch for duplicate ifields. * read.scm (parse-error-continuable): New function. (define /continuable-error-found?): New variable. (/init-reader!): Initialize it. (/finish-reader!): New function. (cpu-load): Call it. * utils-cgen.scm (obj-list-nub): New function. * mach.scm (): New member large-insn-word?. (/adata-set-derived!): Set it. (adata-large-insn-word?): New function. * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h here. * sim-cpu.scm (cgen-cpu.h): #include it here. (/gen-cpu-defines): Define CGEN_INSN_WORD. (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of CGEN_INSN_INT. * sim-decode.scm (/gen-idesc-decls): Ditto. (/gen-extract-case, /gen-decode-fn): Ditto. * sim-model.scm (/gen-model-insn-fn): Ditto. * sim.scm (gen-argbuf-type): Ditto. * rtl-c.scm (/use-gcc-stmt-expr?): New function. (s-sequence): Call it. 2009-11-21 Doug Evans * rtl-c.scm (s-sequence): Use gcc's statement expressions for non-VOID-mode expressions with multiple statements. * sim.scm (/operand-number-elaboration-written?): New variable. (/op-gen-written-update op): New function. (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it. * read.scm (/cmd-define-rtl-version): Only log rtl version if changed. * operand.scm (op-nub): Delete. * dev-utils.scm: New file. * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid, load-sim, load-stest, load-testsuite): Moved to dev-utils.scm. * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?, /loaded-file-record!, maybe-load): Delete. Load cgen files directly instead of via maybe-load. 2009-11-14 Doug Evans * rtl-traverse.scm (/rtx-canon): Flag an error for non-void expressions used in a void context. * gen-all: Explicitly build binutils, gas, ld, gdb, sid. * cpu/xc16x.cpu: Delete, use copy in ../cpu. * cpu/xc16x.opc: Ditto. 2009-11-12 Doug Evans * rtl-c.scm (s-parallel): Use map-in-order instead of map. * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop, eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of. 2009-11-11 Doug Evans * html.scm (gen-insn-docs): Add logging message. 2009-11-05 Doug Evans * utils-cgen.scm (gen-set-macro2): New function. * sim.scm ( gen-get-macro): Call it. * co-for-gen-all: New file. * testsuite/name-comments-1.test: Update call to current-insn-lookup. * utils.scm (reduce): Delete. * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name. * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl regarding PREFIX attribute handling. * operand.scm (): Add enum to possible types, all uses updated. (hw-index-constant?, hw-index-constant-value): New functions. (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value, hw-index-enum-obj): New functions. (/operand-parse): Handle enum indices. * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?, hw-index-constant-value. * rtl.scm (rtx-constant-value): Fix handling of enums. * rtx-funcs.scm (enum): Ditto. * sid.scm ( cxmake-get): Only ifield indices are currently supported here. 2009-11-02 Doug Evans Specify isa(s) when doing ifield, operand, insn lookups. ACU = all callers updated. * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate. * enum.scm (define-full-insn-enum): Pass isa-name-list to current-ifld-lookup. * html.scm (get-insn-properties): Pass isa-name-list to current-op-lookup. * ifield.scm (/ifld-parse-follows): New arg isas, ACU. * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU. (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto. (/parse-insn-format, syntax-break-out): Ditto. * mach.scm (obj-filter-by-isa): New function. (current-ifld-lookup): New optional arg maybe-isa-name-list. (/ifld-already-defined?, /op-already-defined?): Simplify. (current-op-lookup): New optional arg maybe-isa-name-list. (current-insn-lookup): New arg isa-name-list, ACU. (/insn-already-defined?, /minsn-already-defined?): Simplify. (current-minsn-lookup): New arg isa-name-list, ACU. * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to current-op-lookup. * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU. (gen-syntax-entry): Ditto. * operand.scm (/operand-parse): Pass isa-name-list to current-ifld-lookup. (/derived-parse-encoding): New arg isa-name-list, ACU. (/derived-parse-ifield-assertion): Ditto. (/derived-operand-parse): Pass isa-name-list to current-op-lookup. (/anyof-parse-choice): Ditto. (anyof-satisfies-assertions?): Pass context to rtx-solve. (/anyof-merge-syntax): New arg container, ACU. (operand-builtin!): Add pc to all isas. * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU. (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto. (rtl-c-parsed, rtl-c++-parsed): Ditto. (rtl-c): New arg isa-name-list, ACU. (rtl-c-expr, rtl-c++): Ditto. (closure): New arg isa-name-list, ACU. * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU. (/cstate-isas): New function. (/rtx-canon-symbol-list): New function. (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU. updated. (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST. (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup. (/rtx-canon-rtx-ref, /rtx-canon): Ditto. (rtx-canonicalize): New arg isa-name-list, ACU. (rtx-canonicalize-stmt): Delete. (tstate-make): New arg isas, ACU. (tstate-isas, tstate--set-isas!): New functions. (tstate-env-stack): Renamed from tstate-env, ACU. (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU. (tstate-make-closure): Renamed from tstate-new-env, new arg isa-name-list, ACU. (/rtx-traverse-env): Delete. (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry SUMBOLLIST. (/rtx-traverse): Include conditional flag in dump output. Update isa,envstack for closures. Pass isa list to current-op-lookup. (): New member isas. Rename env to env-stack. ( vmake!): Handle #:isas. #:env renamed to #:env-stack. (): New getter/setter for isas. Rename env getter/setter to env-stack. (estate-make-for-eval): Provide #:isas. (estate-make-closure): Renamed from estate-new-env. New arg isa-name-list, ACU. * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures. (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST. (/rtx-trim-for-doc): Handle closures. * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION, SYMBOLLIST. (rtx-env-var-list): Delete. (rtx-env-make): Handle already-compiled environments. (rtx-var-alist-to-env): New function. (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions. (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU. (rtx-operand-obj): New arg isa-name-list, ACU. (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New functions. * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU. * sem-frags.scm (): Delete member compiled-semantics. (/frag-compute-desired-frags): Minor simplification. (/frag-pick-best): Ditto. * sid-cpu.scm (gen-semantic-code): Require canonical rtl. (/gen-sfrag-code): Update. * sim-cpu.scm (gen-semantic-code): Require canonical rtl. * utils-cgen.scm (sanitize): New arg isa-name-list, ACU. * utils.scm (non-null-intersection?): New function. * gen-all (do_src): Manually run cgen-all for sid. 2009-11-01 Doug Evans * gen-all: New file. * rtl-traverse.scm (/rtx-canon): Issue better error message for invalid rtx function names. 2009-10-28 Doug Evans * cos.scm (object-assign!): New function. * mode.scm (/mode-set-word-params!): Call it. 2009-10-25 Doug Evans Record bitset attributes internally as a list. Record rtx attribute values internally as ((rtx-expr)). * attr.scm (bitset-attr?): Delete, unused. ( parse-value): Rewrite. (/attr-parse): Rewrite bitset default value processing. (/attr-read): Pick out values of scalar attributes to distinguish them from bitset values which are a list. Fix spelling errors for processing of default values. Handle string attributes. (bitset-attr->list): Delete, all callers updated. (/bitset-attr->charmask): Renamed from bitset-attr->charmask. All callers updated. (atlist-source-form): Rewrite. * hardware.scm ( 'get-isas): Update recognition of all isas. (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar) -> (ISA foo bar). * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute values are now lists. * mach.scm (def-isa-attr!): Update, bitset attribute values, including the default, are now lists. (all-isas-attr-value): Result is now a list. * doc/rtl.texi: Clean up pass over attribute docs. Change internal representation of rtx attribute values. * attr.scm (/attr-val-is-rtx?): New function. (attr-value): Call it. (atlist-attr-value-no-default, attr-lookup-default): Ditto. (/attr-parse): Use /attr-val-is-rtx? to detect rtx values. Disallow rtx values for bitset attributes. (/attr-read): Record rtx in default value as ((rtx-expr)). (/attr-eval): Update. 2009-10-24 Doug Evans * gen-all-doc: Add sh.cpu. * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted). * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf. (/gen-sfrag-case): Ditto. * sim-cpu.scm (/gen-sem-case): Ditto. * doc/rtl.texi: Add note that different ifields, operands, insns, and minsns may occur with the same name in different isas. Add note on the canonical form of rtl expressions. 2009-10-23 Doug Evans * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h. * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h. * decode.scm: Tweak various comments. (/opcode-slots): Add FIXME. (/build-decode-table-guts): Add assert. * utils-sim.scm (/gen-set-itype-and-extract): New function. (/gen-bracketed-set-itype-and-extract): New function. (/gen-decode-default-entry): Rewrite. (/table-guts-to-mask, /all-opcode-bits-used?): New functions. (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers updated. Don't unnecessarily emit check for whether all opcode bits have been examined. (/gen-decode-expr-set-itype): Delete. (/gen-decode-expr-entry): Update. (/gen-decode-table-entry): New arg table-guts-thus-far, all callers updated. Keep track of decoder tables used thus far. (/gen-decoder-switch): Ditto. * utils.scm (word-bit-value): New function. 2009-10-14 Doug Evans * ifield.scm (, value): Provide default initial value. (ifield-encode-mode): Delete (ifield-decode-mode): Delete duplicate definition. (, 'make!): Initialize members encode, decode. * opcode.scm (, 'gen-insert): Use ifld-decode-mode instead of ifld-encode-mode. (, 'gen-insert): Ditto. 2009-10-05 Dave Korn * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@, for @foo@_init_idesc_table. 2009-09-30 Doug Evans * doc/intro.texi: Mention SID. * doc/sim.texi: Ditto. * doc/porting.text (Doing a simulator port): Add some text. 2009-09-27 Doug Evans * cos.scm (/class-table): New global. (/class-uid, /class-set-uid!): New functions. (/class-parent-name): Renamed from /class-parents. (/class-make!): Change parents arg to parent-name, all callers updated. Assign uid to class. (/class-lookup-uid): New function. (/class-parent-classes): Rewrite. (/class-mi?): Delete. (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case): Delete. (/class-desc-offset, /class-desc-child, /class-desc-parents): Update. (/class-compute-class-desc, class-desc-dump): Update. (/object-make!): Update. (/object-make-with-values!): Delete arg class-desc, all callers updated. (/object-copy): Delete arg top?, all callers updated. (/object-specialize): Delete. (/object-elements, /object-top-class): Delete. (/object-class-name, /object-class-desc): Update. (/object-class-uid): New function. (/object-elm-get, /object-elm-set!, object?, /class-check-init!, class-make, /class-subclass? /class-lookup-element, Update. (/elm-delta, elm-list): Delete. (/elm-make-method-getter, elm-get, elm-xget): Update. (/elm-make-method-setter, elm-set!, elm-xset!): Update. (elm-make-getter, elm-make-setter): Update. (/method-lookup-next): Update. (send): Don't specialize class passed to method. (send-next): New arg class-name, all callers updated. (/class-parent, /class-parent-via-path, object-parent): Delete. (class-cons-parent!, class-append-parent!): Delete. (object-reset!): Init /class-table. * cos.scm (/object-debug-classes): Delete. (/object-debug-elements, /object-debug-methods): Delete. * cos.scm (/method-lookup): Delete arg virtual?, all callers updated. (method-proc): Delete. (method-make-virtual!, method-make-virtual-forward!): Delete. * ifield.scm ( field-start): Update. ( field-length, pretty-print): Update. ( field-length, field-start, pretty-print): Update. * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl. * sid.scm ( gen-sym-defn): Renamed from gen-sym-decl. ( gen-sym-defn): Ditto. ( gen-defn): Renamed from gen-defn. ( gen-type): Update. ( gen-defn): Renamed from gen-sym-decl, rewrite. (, , gen-type): Update. (, gen-defn): Renamed from gen-sym-decl. ( gen-type): Update. ( gen-defn): Renamed from gen-sym-decl, rewrite. * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl. * sim.scm ( gen-sym-defn): Renamed from gen-sym-decl. ( gen-sym-defn): Ditto. ( gen-defn): Renamed from gen-defn. ( gen-type): Update. ( gen-defn): Renamed from gen-sym-decl, rewrite. (, , gen-type): Update. (, gen-defn): Renamed from gen-sym-decl. ( gen-type): Update. ( gen-defn): Renamed from gen-sym-decl, rewrite. 2009-09-25 Doug Evans * operand.scm (/anyof-merge-setter): Handle set-quiet. * rtl.scm (rtx-single-set?): Handle set-quiet. * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner, rtl-cover-fns?, macro?. All callers updated. (estate-make-for-normal-rtl-c): Delete, have all callers call estate-make-for-rtl-c directly. (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c. (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto. * rtl-c.scm (/par-replace-set-dest-expr-fn): New function, replaces /par-replace-set-dests. (/par-replace-set-src-expr-fn): New function, replaces /par-replace-set-srcs. (s-parallel): Rewrite. * rtl.scm (rtx-pretty-strdump): New function. * rtl-traverse.scm (/rtx-canon-error): Use it. (): New member outer-expr. (estate-error): Include outer expression in error message if present. 2009-09-23 Doug Evans * xc16x.cpu (h-cr): New hardware. (muls): Comment out parts that won't compile, add fixme. (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto. (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto. (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto. Rewrite rtl processing to require it to be "canonicalized" first, and write a full canonicalizer / expression checker. Remove all appearances of DFLT in canonical rtl. * attr.scm (/attr-eval atval owner): Call rtx-canonicalize, then rtx-simplify. * iformat.scm (ifmt-analyze) Use canonical semantics. * insn (): New member canonical-semantics. * mach.scm (): New member multi-insns-instantiated?. (/instantiate-multi-insns!): New function. (/canonicalize-insns!): New function. (arch-analyze-insns!): Canonicalize insn semantics before processing them. * mode.scm (/mode-set-word-params!): New function. (mode-void?): New function. (mode-compatible?): VOID is compatible with VOID. (/mode-word-sizes-defined?): New global. (mode-set-word-modes!): Use/set it. (mode-ensure-word-sizes-defined): Update. (mode-builtin!): New builtin "modes" SYM, INSN, MACH. Redo WI/UWI/AI/IAI handling. (op:new-mode): No longer accept DFLT. ( constructor): Ensure all fields are initialized. ( constructor): Ditto. (/derived-parse-ifield-assertion): Delete arg `args'. All callers updated. * rtl-c.scm (): New member `for-insn?'. (rtl-c): Call rtx-canonicalize instead of rtx-compile. (rtl-c-expr, rtl-c++): Ditto. (/rtl-c-get): Use mode of operand, not containing expression. (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support. (/rtx-use-sem-fn?): Don't check for (insn? owner), check estate-for-insn? instead. (s-unop): Use mode of expression, not first operand. (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto. (s-sequence): Remove DFLT support. (ifield): Use mode of expression, not UINT. (pc): Comment out, unused. (int-attr): New rtx kind. (attr): Deprecate. (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion. * rtl-traverse.scm (/rtx-canon-debug?): New global. (/make-cstate): New function. (/cstate-context, /cstate-outer-expr): New functions. (/rtx-canon-error): New function. (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode, /rtx-get-last-cond-case-rtx): New functions. (/rtx-canon-*): New functions. (/rtx-canner-table, /rtx-operand-canoners): New globals. (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions. (/rtx-option, /rtx-option-list?): Rewrite. (rtx-munge-mode&options): Replaces /rtx-munge-mode&options. Rewritten, all callers updated. (/rtx-canon-expr, /rtx-canon): New functions. (rtx-canonicalize): Move here from rtl-xform.scm and rewrite. (rtx-canonicalize-stmt): New function. (tstate-make): Remove arg `set?'. All callers updated. (tstate-new-set?): Delete. (/rtx-traverse-options, /rtx-traverse-*mode): Delete, moved to /rtx-canon-*. (/rtx-traverse-normal-operand): New function. (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated. (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx, /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals, /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs): Ditto. (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number, /rtx-traverse-symornum, /rtx-traverse-object): Delete. (/rtx-make-traverser-table): Update. (/rtx-traverse-operands): Remove mode processing, now done during canonicalization. (/rtx-traverse-expr): Delete arg `mode', all callers updated. (/rtx-traverse): Ditto. (rtx-init-traverser-tables!): New function. * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function. (rtx-verify-no-dflt-modes): New function. (/rtx-simplify-expr-fn): Update, `arg' mode deleted. (rtx-simplify-insn): Use insn-canonical-semantics. (rtx-canonicalize): Moved to rtl-traverse.scm. (/compile-expr-fn, rtx-compile): Delete. (/rtx-trim-rtx-list): New function. (/rtx-trim-for-doc): Handle set, if. * rtl.scm (): New members result-mode, matchexpr-index. (/rtx-valid-mode-types): Update. (/rtx-valid-matches): Update. (/rtx-find-matchexpr-index): New function. (rtx-lookup): Require rtx-kind to be the rtx name. (def-rtx-node): New arg result-mode, all callers updated. (def-rtx-syntax-node, def-rtx-operand-node): Ditto. (rtx-lazy-sem-mode): Delete. (/rtx-closure-make): New arg `mode', all callers updated. (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto. (rtx-operand-obj): Rewrite. (rtx-make-xop): New functions. (/hw): Renamed from `hw', all callers updated. Use the correct mode instead of DFLT for the index. (rtl-builtin!): Call rtx-init-traversal-tables!. (rtl-finish!): Update. * rtx-funcs.scm (all rtx functions): New parameter: result-mode. Update mode arg-type. (pc): Comment out. (int-attr): New rtx kind. (attr): Deprecate. * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted. (/frag-cost-compute!): Ditto. * semantics.scm (/build-operand!): Delete args op-name, op. New arg op-expr. All callers updated. (/build-mem-operand!): Remove DFLT support. (semantic-compile): Update process-expr!, mode arg deleted. * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c++ calls. (/gen-sem-case, /gen-sfrag-code): Ditto. * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace. (/op-gen-set-trace): New function. If not doing profiling, or using the pbb engine, call /op-gen-set-quiet. * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls. * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c. (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto. * utils.scm (find-first-index): New function. * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'. * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class to COMPARE. * sem-frags.scm (/frag-cost-compute!): Add COMPARE. 2009-09-21 Doug Evans * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table. All callers updated. Add FIXME. (all rtx functions): Rename local estate to *estate*. It's an artificial argument added to the rtx, so make it stand out. * openrisc.cpu (or32 isa): Fix setup-semantics. * rtl.scm (rtx-class-*?): Delete, unused. (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto. * read.scm (/CGEN-RTL-VERSION): Initialize to #f. (init-reader!): Set /CGEN-RTL-VERSION to default. * read.scm (cpu-load): Print load parameters. * dev.scm (load-doc): Set verbose-level to 2. 2009-09-20 Doug Evans * rtl.scm (rtx-strdump): Use write instead of display. 2009-09-17 Doug Evans * utils-cgen.scm (obj-csv-names): New function. * utils-sim.scm (/sfmt-contents): Use it in logging message. 2009-09-12 Doug Evans Clean up pass of mode handling. Make use of mode name vs object more consistent and clear. * hardware.scm (/keyword-read): Default mode to the mode name, not the object. (/hw-parse-indices): Parse mode name and pass mode object to constructor. (/hw-parse-values): Ditto. ( parse!): Pass mode name to /hw-parse-indices and /hw-parse-values. ( parse!): Ditto. ( parse!): Ditto. * mode.scm (/mode-table): New global, replaces mode-list. Modes stored in hashtable instead of list. (/mode-class-table): New global. (mode-list-non-alias-values): Update. (mode:eq?, mode-compatible?, mode:add!): Update. (mode:lookup): Restrict arg to the mode's name. All callers updated. (mode-maybe-lookup): New function. (mode-real-name): Restrict arg to a object. All callers updated. (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto. (mode-find, mode-set-word-modes!): Update (mode-ensure-word-sizes-defined): Update. (/sort-mode-classes!): New function. (mode-builtin!): Update. Sort mode classes here. (mode-finish!): Sort mode classes here too. * rtl-c.scm (/rtl-c-get): Restrict mode arg to a object. All callers updated. (rtl-c-set-quiet): Allow mode to be name of object. (rtl-c-set-trace): Ditto. * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to object. All callers updated. * rtl.scm (rtx-sem-mode): Restrict arg to object. (rtx-lazy-sem-mode): Ditto. ( make!): Assert mode arg is a object. (rtx-env-make): Allow var-list modes to be name or object. * sem-frags.scm (/frag-expr-assq-locals): New function. (/frag-compute-locals!): Call it. (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping. All callers updated. * semantics.scm (/build-mem-operand!): Handle mode aliases. * sim-test.scm (*): Symbols no longer can be passed to string-append. 2009-09-10 Doug Evans * insn.scm (/parse-insn-format): New arg `verify?', all callers updated. Improve error message for missing or too many bits. (/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 * rtl-traverse.scm: Comment tweaks. * rtl-xform.scm: Comment and reformatting tweaks. * doc/rtl.texi: Add text to docs on ifield-assertions. * insn.scm (/insn-parse): Canonicalize the ifield-assertion before saving. Add support for controlling warnings/errors. Add tests for iformat description errors. * dev.scm (cload): New option #:diag. * read.scm (): New member verify-iformat?. (/parse-diagnostic, parse-warning): New functions. (parse-error): Guts moved to /parse-diagnostic. (/set-diagnostic-options!): New function. (cpu-load): New arg diagnostic-options, all callers updated. Recognize -w diagnostic-option-list. * ifield.scm (ifields-base-ifields): Move here from iformat.scm. (ifld-simple-ifields, ifields-simple-ifields): New function. * insn.scm (/parse-insn-format-iflds): New function. (/parse-insn-format): Guts moved to /parse-insn-format-iflds. New arg isa, all callers updated. Do some basic validation of the ifield list if requested. * mach.scm (/sanity-check-insns): Improve error message text. * doc/running.texi: Document -w option. * doc/porting.texi: Document #:trace, #:diag options to cload. * ifield.scm (/multi-ifield-parse): Initialize bitrange. * dev.scm (*): Change default verbosity level to 2. * ifield.scm ( pretty-print): New method. (ifld-pretty-print): New function. ( pretty-print): New method. * ifield.scm ( field-start): Delete word-len arg. All callers updated. (ifld-start): Ditto. ( field-start): Ditto. * operand.scm ( field-start): Ditto. * ifield.scm (ifld-beyond-base?): Remove args base-bitsize, total-bitsize. All callers updated. * insn.scm (): Rename member ifld-values to /insn-value. New member /insn-base-value. (insn-base-value): New function. * mach.scm (/sanity-check-insns): New function. (arch-analyze-insns!): Call it. 2009-09-08 Doug Evans * iformat.scm (ifields-base-ifields): Simplify. (compute-insn-length): Simplify, call ifields-base-ifields. (compute-insn-base-mask): Ditto. * ifield.scm (ifld-known-values): Ditto. (ifld-base-ifields): Ditto. * insn.scm (insn-value): Ditto. * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto. 2009-09-08 DJ Delorie * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a preprocessor macro, not an enum. 2009-09-08 Doug Evans * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing to string-append. (*): Remove trailing ":" from error messages passed to estate-error. 2009-09-07 Doug Evans * types.scm (): Delete. * pmacros.scm (/pmacro-env-make): New argument `loc', all callers updated. (/pmacro-loc-error): New function. * mach.scm (/isa-parse-decode-assist): New function. (/isa-parse): Call it. * decode.scm (/get-subopcode-value): New function. (/opcode-slots): Call it. (/fill-slot!): Add logging message. * cos.scm (/object-error): Convert symbols to strings before passing to string-append. * read.scm (rtl-version-equal?): New function. (rtl-version-at-least?, rtl-version-older?): New functions. * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance. * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for rtl versions >= 0.9. (pmacros-init!): Tweak to prepare for $ for builtin pmacros. 2009-09-03 Doug Evans * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx) is simple. 2009-09-01 DJ Delorie * cpu/mep.opc (parse_signed16_range): Mark as potentially unused. (parse_unsigned16_range): Likewise. (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW isa. 2009-09-01 Doug Evans Pmacro .equals -> .equal? * pmacros.scm (-pmacro-builtin-equal?): Renamed from -pmacro-builtin-equals. All callers updated. (pmacros-init!): Rename .equals to .equal?. * doc/pmacros.texi: Update. * testsuite/pmacros-1.test: Update. * doc/porting.texi: Work around texi2html bug where it doesn't properly escape <> inside double-quotes inside @code. * doc/porting.texi (Doing an opcodes port): Add step to specify the .opc file. 2009-08-29 Doug Evans * hardware.scm (-keyword-parse): Fix `enum-prefix' default for rtl version 0.7. * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences. 2009-08-27 Doug Evans Add do-count rtl function. * rtl-c.scm (s-do-count): New function. (do-count): New rtl handler. * rtl-traverse.scm (-rtx-traverse-iteration): New function. (-rtx-make-traverser-table): Add ITERATION. * rtl.scm (rtx-make-iteration-limit-var): New function. (rtx-env-make-iteration-locals): New function. * rtx-funcs.scm (do-count): New rtl function. * cpu/play.cpu: Add do-count-test insn. * doc/rtl.texi: Add docs on do-count. 2009-08-26 Doug Evans * read.scm (parse-error): Change error message output format to match context-owner-error. * rtl-c.scm (-rtl-c-get): Call estate-error instead of error. (rtl-c-set-quiet, rtl-c-set-trace): Ditto. (s-if, s-cond, -gen-non-vm-case-test): Ditto. (operand): Call estate-error instead of context-error. (local, delay): Ditto. (ref, attr): Call estate-error instead of error. * rtl-traverse.scm (tstate-error): New function. (-rtx-traverse-error): Call tstate-error instead of context-error. (-rtx-traverse-operands, -rtx-traverse): Ditto. (estate-error): New function. * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error instead of error. (e-if): Call estate-error instead of error. * rtx-funcs.scm (error): Call estate-error instead of context-error. (member): Ditto. * utils-cgen.scm (context-error): New arg `intro', all callers updated. Rewrite to call context-owner-error. (context-owner-error): New function. * ifield.scm ( constructor): New arg `location', all callers updated. * insn.scm ( constructor): Ditto. ( constructor): Ditto. * minsn.scm ( constructor): Ditto. * operand.scm ( constructor): Ditto. * utils-cgen.scm (builtin-location): New function. (): Fix default value of member `location'. (source-ident?): New function. * rtl-traverse.scm (estate-new-env): Rename arg state -> estate. (estate-push-env, estate-with-modifiers): Ditto. (estate-deepen): New function. 2009-08-25 Dave Korn * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run routines. 2009-08-25 Doug Evans * doc/pmacros.texi (pmacro default argument values): Add text. 2009-08-23 Doug Evans * hardware.scm (): Rename member print-name -> enum-prefix. Rename member prefix -> name-prefix. ( getters): Update. (-keyword-parse): Update. Default enum-prefix to NAME-. (-keyword-read): Update. Don't compute default value for enum-prefix here. (define-keyword): Update. (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse. * read.scm (cgen-rtl-version): New function. (-supported-rtl-versions): Add (0 8). * desc-cpu.scm (-gen-hw-decl): Remove cruft. * desc.scm ( gen-defn): prefix -> name-prefix. * gas-test.scm ( test-data): prefix -> name-prefix. * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version. Update, print-name -> enum-prefix, make uppercase. Remove unnecessary name-prefix spec. * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto. * cpu/ip2k.cpu (register-names): Ditto. * cpu/m68k.cpu (dr-names, ar-names): Ditto. * cpu/sparc.cpu (gr-names): Ditto. * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto. (grb-names, conditioncode-names, extconditioncode-names): Ditto. (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto. (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto. * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call define-rtl-version. Update, print-name -> enum-prefix, make uppercase, prefix -> name-prefix. * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version. Update, print-name -> enum-prefix, make uppercase. (drc-names, xf-names): Ditto. * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto. * doc/rtl.texi (Keywords): New section. (hardware indices): Update text. (rtl versions): Add 0.8. Add define-rtl-version. * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION. (cgen-rtl-major, cgen-rtl-minor): Similarly renamed. (cgen-lang-fixlevel): Delete. (-supported-rtl-versions): New variable. (-cmd-define-rtl-version): New function. (init-reader!): New command define-rtl-version. (-cgen): Add rtl version to --version output. * doc/rtl.texi: Document rtl version support. * cpu/play.cpu: Add define-rtl-version. 2009-08-22 Doug Evans * Makefile.am (OPTIONS): Define. (desc): Just generate -desc.[ch] files. * Makefile.in: Regenerate. * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's no .opc file. (cgen-desc.c): Similarly. * gen-all-desc: New file. * opcodes.scm (opc-file-provided?): New function. * mach.scm (current-*-add!): Update calls to parse-error. * operand.scm (op:new-mode): Update call to parse-error. * utils-cgen.scm (make-obj-context): New function. * NEWS: Copy over entries from 1.1 branch. 2009-08-20 Doug Evans * gas-test.scm ( test-data): Catch invalid requests, flag a warning and compensate. ( * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to distinguish from 1.1. * configure: Regenerate. * read.scm (-CGEN-VERSION): Update. * doc/version.texi: Update. New builtin .pmacro?. * pmacros.scm (-pmacro-builtin-pmacro?): New function. (pmacros-init!): Add .pmacro?. * doc/pmacros.text: Document .pmacro?. * testsuite/pmacros-1.test: Test .pmacro?. * pmacros.scm (scan-list1): Reorganize tracing so that the tracing of a pmacro begins before its arguments are evaluated, improves readability. * pmacros.scm (.sll, .srl, .sra): Fix thinko. * testsuite/pmacros-1.test: Ditto. Add better tests. * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed in assembler syntax. (Operands): Similarly. 2009-08-18 Doug Evans * ifield.scm (ifld-encode-mode): Add FIXME. * opcodes.scm ( gen-insert): Handle encode parameters with modes. ( gen-extract): Similarly. * read.scm (parse-error): Handle #f for context-location. * utils-cgen.scm (unspecified-location): Fix building of single-location. * doc/rtl.texi: Document how to write hex and boolean values. * gas-test.scm ( test-data): Handle () values. ( test-data): Convert symbols to strings before passing to string-append. ( test-data): Enumerate all cases. Emit correctly sized result for scalars. * operand.scm (hw-index-scalar): Set `name'. (hw-index-anyof, hw-index-derived): Ditto. 2009-08-17 Doug Evans * pmacros.scm (-pmacro-builtin-internal-test): New function. (pmacros-init!): Add .internal-test. * testsuite/test-utils.sh.in (post_process): Tweak FAIL output. * testsuite/testsuite.cpu (internal-verify): New pmacro. * doc/pmacros.text: Document .internal-test. * utils-cgen.scm (parse-name): Handle (add 3) -> add3. (parse-comment): Allow numbers. * doc/porting.texi: Document that names and comments may be lists. * insn.scm (-insn-parse): Fix typo. Rename .eval -> .exec. Add new .eval. * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval. (-pmacro-builtin-eval): New function. (pmacros-init!): Add .exec. * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval. * testsuite/location-1.test: Update. * testsuite/pmacros-1.test: Add test for .eval. 2009-08-16 Doug Evans * doc/porting.texi: Remove support for Guile 1.4. * read.scm (current-reader-location): Return unspecified location if reader hasn't been initialized yet. 2009-08-13 Doug Evans * dev.scm: Document tracing options. * pmacros.scm (pmacro-dump): New function. (check-pmacro): Tweak debugging output. * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug. * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand. Add .let* pmacro builtin. * pmacros.scm (-pmacro-builtin-let*): New function. (pmacros-init!): Add .let*. * doc/pmacros.texi: Document .let*. * testsuite/pmacros-1.test: Test .let*. 2009-08-12 Doug Evans Clean up cpu file parsing, pass context consistently instead of the old "errtxt" argument. NOTE: ACU == "All Callers Updated". * attr.scm (-parse-simple-attribute): Renamed from parse-simple-attribute, ACU. (-attr-parse): Change errtxt argument to context, ACU. (-attr-read): Ditto. (atlist-parse): Ditto. Put context arg first. (attr-parse): Use parse-error instead of context-error. * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU. (-enum-parse-prefix, -enum-parse, -enum-read): Ditto. * hardware.scm (-keyword-parse): Renamed from keyword-parse. `context' arg is now a object. ACU. (-keyword-read): `context' arg is now a object. ACU. (-hw-parse-indices): Change errtxt argument to context, ACU. (-hw-parse-values, -hw-parse-handlers): Ditto. (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto. (-hw-validate-layout, -hw-create-getter-from-layout, -hw-create-setter-from-layout): Ditto. (:parse!, :parse!): Ditto. (:parse!, :parse!): Ditto. (:parse!): Ditto. * ifield.scm (-ifield-parse, ifield-read): Ditto. (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto. (-ifld-parse-encode, -ifld-parse-decode): Ditto. (-multi-ifield-parse, -multi-ifield-read): Ditto. * insn.scm (-insn-parse, -insn-read): Ditto. (parse-syntax): Ditto. Put context arg first. (-parse-insn-format-symbol): Change errtxt argument to context, ACU. (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto. (-parse-insn-format): Ditto. * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto. (-arch-parse-isas): Ditto. (-isa-read): Add context arg, ACU. (-cpu-parse, -cpu-read, -mach-read): Ditto. * minsn.scm (-minsn-parse-expansion): Change errtxt argument to context, ACU. (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto. (minsn-make-alias): Ditto. * mode.scm (-mode-parse): Ditto. (parse-mode-name): Ditto. Put context arg first. * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change errtxt argument to context, ACU. (-unit-parse, -model-parse, -model-read): Ditto. * operand.scm (-operand-parse-getter): Use parse-error instead of context-error. (-operand-parse-setter): Ditto. (-operand-parse): Change errtxt argument to context, ACU. (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto. (-anyof-operand-parse, -anyof-operand-read): Ditto. * read.scm (reader-error): Delete. Use parse-error instead. (parse-error): Change errtxt argument to context, ACU. Split args argument into expr and maybe-help-text. (-reader-process-expanded-1!): Reorganize. * rtl.scm (-subr-read): Change errtxt argument to context, ACU. * types.scm (parse-type): Ditto. * utils-cgen.scm (single-location->simple-string): New function. (): Replace members file,lineno with location. (make-prefix-context): Renamed from context-make-prefix, ACU. (make-current-context): New function. (context-append, context-append-name): New functions. (context-make-reader): Delete. (parse-name): Change errtxt argument to context, ACU. Put context arg first. (parse-comment): Ditto. (parse-number): Change errtxt argument to context, ACU. (arg-list-validate-name, arg-list-check-no-args, arg-list-symbol-arg): Ditto. * read.scm (-cmd-if): Don't assume test is a list. * html.scm (get-insn-properties): Delete errtxt, unused. 2009-08-11 Doug Evans * doc/rtl.texi (hardware types): Add pc. 2009-08-07 Doug Evans Add -t option for tracing things like commands, pmacro expansion. * dev.scm (cload): New arg #:trace. * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing. (pmacro-trace): New arg `loc'. Rewrite pmacro tracing. (pmacro-debug): Call pmacro-trace instead of -pmacro-expand. * read.scm (): New members trace-commands?, trace-pmacros?. (-reader-process-expanded-1!): Trace commands if requested. (-reader-process!): Call pmacro-trace of pmacro tracing requested. (-set-trace-options!): New function. (-init-reader!): New function. (cpu-load): New arg trace-options, all callers updated. Call -init-reader! and -set-trace-options!. (cgen-usage): Improve output formatting. (common-arguments): New option -t. (-cgen): Process -t. * utils-cgen.scm (single-location->string): Renamed from pretty-print-single-location. All callers updated. (location->string): Renamed from pretty-print-location. All callers updated. (source-properties-location->string): New function. * doc/running.texi: Document -t. 2009-08-06 Doug Evans * read.scm (debug-env, debug-var-names, debug-var, debug-tty, debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ... * utils.scm: ... here. 2009-08-05 Doug Evans Track source location better, for better error messages. * pmacros.scm (-pmacro-eval): Delete, unused. (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated. (-pmacro-expand-expr-list, -smacro-apply): Ditto. (scan-list, scan): Ditto. (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if, -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin, -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto. (scan-list1): New function. (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite. * read.scm (): New member `location'. (-reader-lookup-command): Renamed from reader-lookup-command, all callers updated. (reader-error): Rewrite to produce better source location info. (current-reader-location): New function. (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1. All callers updated. Record source location of expression. (reader-process-expanded!): Renamed from reader-process-expanded. All callers updated. (-reader-process!): Renamed from reader-process. New arg `loc'. All callers updated. Record source location of define-pmacro. * utils-cgen.scm (): New class. (single-location): New (pseudo) class. (pretty-print-single-location, pretty-print-location): New functions. (location-top, location-push-single, location-push): New functions. (unspecified-location, current-input-location): New functions. (location-property): New object property. (location-property-set!): New function. (): Renamed from . New member `location'. All uses updated. * testsuite/location-1.test: New testcase. * testsuite/run-tests.sh: Fix fail count handling. * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests to expect cgen to fail. * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently. * read.scm (-cmd-include): Renamed from include. All callers updated. (-cmd-if): Renamed from cmd-if. All callers updated. Use reader-process-expanded! on then/else clauses instead of eval1. 2009-07-22 Doug Evans * modes.scm (TI,OI): New modes. * types.scm (parse-type): Improve error checking. Don't hardwire mode names here. * utils.scm (non-negative-integer?): New function. * pmacros.scm (-pmacro-builtin-find): New predicate. (pmacros-init!): Add .find. * doc/pmacros.tex: Document .find. * testsuite/pmacros-1.test: Test .find. 2009-07-20 Doug Evans * insn.scm (multi-insn-instantiate!): Use logging messages instead of commented out printfs. * rtl.scm (rtl-finish!): Whitespace tweaks. * model.scm (parse-insn-timing): Tweak logging message. * operand.scm: Comment and whitespace tweaks. (op:type): Tweak error message. (op-ifield): Tweak logging message. (-derived-operand-parse, anyof-merge-semantics): Ditto. * read.scm: Whitespace cleanup. * utils.scm: Whitespace cleanup. 2009-07-19 Doug Evans Fix binding of nested pmacro parameters. * pmacros.scm (-pmacro-env-make): New arg prev-env. All callers updated. (-pmacro-bulid-lambda): Ditto. * doc/pmacros.texi: Update. * testsuite/pmacros-1.test: Add testcase. * ifield.scm (-multi-ifield-make-default-insert): Fix shifts calculation. (-multi-ifield-make-default-extract): Ditto. * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define. (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate. * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define. (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate. * doc/rtl.texi: Update. * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1. Rename builtin boolean pmacros, for consistency with rtl. * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and, .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv. * doc/pmacros.texi: Update. * testsuite/pmacros-1.test: Update. 2009-07-17 Doug Evans Use hash tables to record ifields, operands, insns, macro-insns. * attr.scm (attr-builtin!): Tweak some comments. * hardware.scm (hardware-builtin!): Call all-isas-attr-value. * ifield.scm (): Subclass from instead of . (): New constructor. (ifield-builtin!): Add isa attr to f-nil, f-anyof. * insn.scm (): Subclass from instead of . (-sub-insn-make!): Add hack to avoid differences in generated code. (multi-insn-instantiate!): Add total number of multi-insns to logging message. * mach.scm (): Rename members ifld-list, op-list, insn-list, minsn-list to foo-table. New member next-ordinal. Update getters/setters. (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list): New functions. (-get-next-ordinal!, -get-lowest-ordinal): New function. (-make-ident-object-table, -ident-object-table->list, -ident-object-table-add!, -ident-object-table-lookup): New functions. (current-ifld-list, current-ifld-add! current-ifld-lookup, -ifld-already-defined?): Rewrite. (current-op-list, current-op-add! current-op-lookup, -op-already-defined?): Rewrite. (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete. (current-insn-list, current-insn-add! current-insn-lookup, -insn-already-defined?): Rewrite. (current-minsn-list, current-minsn-add! current-minsn-lookup, -minsn-already-defined?): Rewrite. (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions. (MAX-VIRTUAL-INSNS): Define. (arch-analyze-insns!): Add hack to avoid differences in generated code. Update use of arch-insn-list. (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table. (arch-finish!): Delete references to ifld-list, op-list, insn-list, minsn-list. * minsn.scm (): Subclass from instead of . New constructor. * operand.scm (): Subclass from instead of . * sid.scm (-virtual-insn-add!): New function. (-create-virtual-insns!): Call it. (-fill-sim-insn-list!): Rewrite. * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions. (sim-finish!): Move contents to -create-virtual-insns!, and call it. * utils-cgen.scm (): New class. (obj-ordinal, obj-set-ordinal!): New functions. (add-ident-methods!): Delete. * model.scm (parse-insn-timing): Change logging message to level 3. 2009-07-16 Doug Evans * doc/rtl.texi (Enumerated constants): Add example, fix a typo, add a link to define-normal-insn-enum. * doc/porting.texi (Conventions): Add docs on writing integers. * cpu/simplify.inc (*): One line doc strings don't need \n. (df): Invoke define-full-ifield instead of claiming it's an alias. (dno): Define. (dnop): Mark as deprecated. * cpu/play.cpu: Add example of hardware `layout'. * doc/porting.tex: Add docs on simplify.inc. * doc/rtl.texi: Cleanup pass over "Simplification macros", and other things. * ifield.scm: Whitespace/formatting cleanup. * ifield.scm (-multi-ifield-parse): Watch for missing subfields. * read.scm (parse-error): Don't print single entry args as a list. (-reader-process-expanded-1): Convert symbol to string for string-append. * insn.scm (multi-insn-instantiate!): Tweak logging message. 2009-07-15 Doug Evans * cpu/simplify.inc (dno): New pmacro. * doc/porting.texi: Add section on simplify.inc. * doc/rtl.texi (Instruction operands): Mention dno, dnop. 2009-07-15 Doug Evans * gen-all-doc: Generate index.html. 2009-07-13 Doug Evans Extend pmacro language, add testsuite. * Makefile.am (SUBDIRS): Add testsuite. * Makefile.in: Regenerate. * configure.in (AC_OUTPUT): Create testsuite/Makefile, testsuite/test-utils.sh. * configure: Regenerate. * dev.scm (cload): Handle testsuite app. (load-testsuite): New function. * pmacros.scm: (-pmacro-debug?): New global. (-smacro-table): New global. (-smacro-lookup, -smacro-set!): New functions. (-pmacro-make): New argument `syntactic-form?', all callers updated. (-pmacro-syntactic-form?): New function. (-pmacro-expected-number, -pmacro-verify-number): New functions. (-pmacro-expected-integer, -pmacro-verify-integer): New functions. (-pmacro-expected-non-negative-integer): New function. (-pmacro-verify-non-negative-integer): New function. (-pmacro-expand-expr-list): New function. (-pmacro-process-args-1): Renamed from -pmacro-process-args. (-pmacro-process-args): Renamed from -pmacro-invoke. (-pmacro-apply, -smacro-apply): New functions. (-pmacro-expand): Rewrite syntactic form processing. (-pmacro-build-lambda): Reformat. (define-pmacro): Watch for more errors in definition. (pmacro-debug): New function. (pmacro-trace): Set/reset -pmacro-debug?. (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo. (-pmacro-builtin-substring): Fix. Add support for `end' marker. (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let, .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref, .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt, .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand, .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr. (pmacros-init!): Initialize -smacro-table. Rewrite pmacro initialization. * read.scm (reader-process-expanded): Renamed from -reader-process-expanded. All callers updated. Recognize () as a no-op. (cpu-load): Tweak logging messages. * utils.scm (message): Add comment. * cpu/play.cpu: Add some instructions to play with .let. * doc/cgenint.texi: Move some debugging related docs to here from cgen.texi. * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros. * testsuite/Makefile.am: New file. * testsuite/Makefile.in: New file. * testsuite/test-utils.sh.in: New file. * testsuite/run-tests.sh: New file. * testsuite/testsuite.cpu: New file. * testsuite/pmacros-1.test: New file. * decode.scm: Comment and formatting tweaks. (-build-decode-table-guts): Add more data to logging message. 2009-07-12 Doug Evans Delete files that now live in ../cpu. * cpu/iq10.cpu: Delete. * cpu/iq2000.cpu: Delete. * cpu/iq2000.opc: Delete. * cpu/iq2000m.cpu: Delete. * cpu/m32r.cpu: Delete. * cpu/m32r.opc: Delete. 2009-07-09 Doug Evans * utils-sim.scm (-gen-decode-bits): New argument `entire-val'. All callers updated. Work around -ve shifts by referencing the entire value. * utils.scm (message): Handle pairs. 2009-07-08 DJ Delorie * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3, cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1, cpmovtocc_P0S_P1): Mark volatile. Note which registers are written to. 2009-07-07 Doug Evans * cpu/play.cpu (add): Use (ifield enum) for one format element. * cpu/play.opc: New file. Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4). * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum). * doc/rtl.texi (Instructions): Update. * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm (opc-arguments, -OPC): Call set-opc-file-path!. * opcodes.scm (-opc-file-path,opc-file-path): Moved here. (set-opc-file-path!): New function. * dev.scm: Mention set-opc-file-path!. Mention doc options. * opc-ibld.scm (gen-insn-builder): Convert symbols to strings before passing to gen-c-args. 2009-07-06 DJ Delorie * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE. * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make unspecified accesses to control registers. 2009-07-01 DJ Delorie * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make unspecified accesses to control registers. * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants. (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants. 2009-06-27 Doug Evans * gen-all-intrinsics: New file. 2009-06-24 Doug Evans * All *.scm files: Update copyright year. * utils.scm (copyright-fsf, copyright-redhat): Ditto. 2009-06-23 DJ Delorie * intrinsics.scm: Updates to support IVC2. (belongs-to-group?): Check IVC2 slots. (-slots-attribute): New. (targets::attributes): Add SLOTS. (target:add-well-known-intrinsics): Add CPMOV. (md-insn): Add CPTYPE and CRET?. (add-md-insn): Likewise. (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has duplicate insns with different bit patterns. (write-cgen-insn?): Add cret? support. (intrinsics.h): Add vector types. (runtime-op): Add vector support. (intrinsic-protos.h): Let GCC define its types. Add cret? support. * cpu/mep-core.cpu: Add CPTYPE and CRET attributes. * cpu/mep-ivc2.cpu: Update all insns to include type information. (h-cr-ivc2): Default to typeless. (h-ccr-ivc2): Fix register width. (SLOTS): Fix values and default. (ivc2_*): Add control register names. (crop, crqp, crpp, croc, crqc, crpc): Default to typeless. * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short version of BSR when assembling VLIW bundles. Use it in mep-asm.c 2009-06-22 Doug Evans * semantics.scm (insn-build-known-values): Fix typo in comment. 2009-06-21 Doug Evans * rtl-xform.scm (rtx-simplify-insn): New function. * html.scm (gen-insn-docs): Call it. * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto. * iformat.scm (ifmt-analyze): Minor simplification. * semantics.scm (semantic-compile): Change arg sem-code-list to sem-code. (semantic-attrs): Ditto. * iformat.scm (ifmt-analyze): Update. (ifmt-compute!): Update. * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to rtl-xform.scm. (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto. * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto. * semantics.scm (rtx-simplify): Ditto. (rtx-const-equal, rtx-const-list-equal): Ditto, and make local. (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto. (-simplify-expr-fn): Move to rtl-xform.scm. (-solve-expr-fn, rtx-solve): Ditto. * rtl-xform.c: New file. * read.scm: Load it. * rtl-c.scm (delay): Add FIXME, tweak formatting. * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments. (-rtx-traverse, rtx-traverse): Ditto. 2009-06-20 Doug Evans * doc/rtl.texi (Expressions): Enhance docs of shift ops. * configure.in: Update version to 1.1. * configure: Regenerate. * read.scm (-CGEN-VERSION): Update to 1.1.0. 2009-06-20 Masaki Muranaka Doug Evans * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency. (cgen-desc.c): Ditto. * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto. (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto. * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto. * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto. * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto. (cgen-cpuall.h, cgen-ops.c): Ditto. * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto. (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto. (cgen-sem-switch.c): Ditto. * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto. * sim-model.c (cgen-model.c): Ditto. 2009-06-18 Doug Evans * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt. * html.scm (doc-analyze!): Provide default IDOC attribute if missing. * dev.scm (cload): Change #:arch argument to take the path to the .cpu file instead of just the name of the architecture. * read.scm (arch-path): Remove trailing '/'. (cpu-load): Set `arch-path' to directory of .cpu file. (-cgen): Don't set `arch-path' here. (include): Update. * doc/porting.texi: Update. 2009-06-14 Doug Evans * gen-all-doc: Use files in ../cpu where possible. * Makefile.am (ARCHFILE): Fix path. * Makefile.in: Regenerate. * html.scm: Use "pre" instead of "plaintext". * doc/cgenint.texi: Renamed from internals.texi. Several cleanups. * doc/app.texi: Cleanup pass. * doc/cgen.texi: Cleanup pass. * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn. * doc/intro.texi: Cleanup pass. * doc/mdate-sh: New file. * doc/opcodes.texi: Cleanup pass. * doc/pmacros.texi: Cleanup pass. * doc/porting.texi: Cleanup pass. * doc/rtl.texi: Cleanup pass. * doc/running.texi: Cleanup pass. Document more runtime options. * doc/stamp-vti: Update. * doc/version.texi: Update. * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9 (GUILE): Fix definition. * Makefile.in: Regenerate with automake 1.9.6. * aclocal.m4: Regenerate with aclocal 1.9.6. * configure.in (AC_PREREQ): Set to 2.59. (GENINSRC_NEVER): Define. * configure: Regenerate with autoconf 2.59. * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi. (cgen.info,cgen.dvi): Delete. (cgen_TEXINFOS,cgenint_TEXINFOS): Define. (noinst_TEXINFOS): Add cgenint.texi. (DOCFILES): Add missing files. (MAINTAINERCLEANFILES,DISTCLEANFILES): Define. * doc/Makefile.in: Regenerate with automake 1.9.6. * guile.scm: Add "." to %load-path if >= guile version 1.8. * attr.scm: Removing trailing whitespace. * cgen-intrinsics.scm: Ditto. * cgen-sim.scm: Ditto. * cos.scm: Ditto. * enum.scm: Ditto. * guile.scm: Ditto. * sim.scm: Ditto. 2009-05-28 DJ Delorie * cpu/mep.opc (parse_signed16_range): New. (parse_unsigned16_range): New. * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them. 2009-05-26 DJ Delorie * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix accumulator names. (f-ivc2-ccrn-c3hi): New. (f-ivc2-ccrn-c3lo): New. (f-ivc2-ccrn-c3): New. (ivc2c3ccrn): Use it. 2009-05-22 DJ Delorie * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder. (mep_config_map): Regenerate. * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as ivc2-specific names. (simm8p20): New. (cmovc): move to after field definitions, use ivc2-specific register names. (cpmovi_b_P0S_P1): New. 2009-05-19 DJ Delorie * cpu/mep.opc: Regenerate configuration. (parse_cdisp10): Only check CPU flags, not COP flags. (check_configured_mach): Likewise. 2009-05-13 DJ Delorie * intrinsics.scm (insns.md): Add RTL predicates. (intrinsics.h): Remove old C intrinsics. 2009-04-29 DJ Delorie * mep-ivc2.cpu: New. * mep-core.cpu: Regenerated. Add support for deferred register writes. (SLOT): Add IVC2 slot types. (sim-syscall): Rename to something more appropriate. * mep-ext-cop.cpu: Regenerate. * mep.opc: Regenerate. Add "coprocessor supported" define area. (print_slot_insn): New. (mep_examine_ivc2_insns): New. (mep_print_insn_set_ivc2_mode): New. (mep_print_insn): Support IVC2 slotting. 2009-04-20 DJ Delorie * intrinsics.scm (intrinsics-analyze!): Include aliases. (guess-mode): Drop COP* syntax. (need-insn): Add "--syscall--" to the list. (enum-type): Drop COP* syntax. (intrinsics.h): Likewise. (intrinsic-protos.h): Change file header to allow it to be included. 2009-04-17 DJ Delorie * cpu/mep-c5.cpu (f-12s20): Change to signed. (lhucpm1): Limit to C5 mach. (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated. * cpu/mep-core.cpu (extend-cdisp10): New. (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend. 2009-04-08 DJ Delorie * cpu/mep-c5.cpu: New. * cpu/mep-core.cpu: Add C5 support. * cpu/mep.opc: Likewise. 2009-02-18 Pierre Muller * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning about calling memset with a zero length. 2009-02-03 DJ Delorie * cpu/mep-core.cpu: Update to new MeP configuration. * cpu/mep-ext-cop.cpu: Likewise. * cpu/mep.opc: Likewise. 2008-12-23 Frank Ch. Eigler * sim.scm (-op-gen-queued-write): Add needed symbol->string. 2008-06-17 Dave Brolley * cpu/xstormy16.cpu (h-pc): Add a set handler. (h-gr): Likewise. 2007-11-13 Dave Brolley * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm. 2007-11-05 Dave Brolley * intrinsics.scm,cgen-intrinsics.scm: New application which generates code to support intrinsic functions for insns in the mep architecture in gcc. 2007-09-21 Dave Brolley * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) (rn3us): CDATA attribute now LONG. 2007-08-21 Dave Brolley * rtl-c.scm (const): Generate call to MAKEDI for integers larger than 32 bits. 2007-07-05 Nick Clifton * utils.scm (copyright-fsf): Update copyright notice to refer to the GPL version 3. 2007-05-22 Nick Clifton * doc/cgen.texi: Use @copying around the copyright notice. * doc/internals.texi: Likewise. 2007-02-05 Dave Brolley * *mep*: New cpu description for Toshiba Media Processor (MeP). 2007-02-05 Dave Brolley * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK in the generated code for @arch@_cgen_init_asm if it is defined. * Contribute the following changes: 2005-04-05 Richard Sandiford * attr.scm (): New attribute class. (attr-kind): Handle . (parse-simple-attribute): New function. ( 'parse-value): Use parse-simple-attribute. ( 'parse-value): Likewise. ( 'parse-value): Likewise. ( 'parse-value): Likewise. ( 'parse-value): New function. (-attr-parse): Handle . (-attr-read): Likewise. ( 'gen-value-for-defn-raw): New function. ( 'gen-value-for-defn): New function. 2006-11-07 Dave Brolley * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where necessary. 2006-10-18 Dave Brolley * Contribute the following changes: 2006-07-11 Dave Brolley * cpu/sh64-compact.cpu (movual, movual2): New insns. (movcol): New insn. * cpu/sh.cpu (sh4a-nofpu-models): New pmacro. * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the hardware or memory mode which was used. * sid-cpu.scm (hw-need-write-stack?): New function. (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to identify hardware which uses write stacks. (useful-mode-names): Renamed to write-stack-memory-mode-names. Initialized to an empty list. (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use hw-need-write-stack?. * hardware.scm (used-in-delay-rtl?): New member of . (define-getters ): Define used-in-delay-rtl?. (used-in-delay-rtl?): New method of . (hw-used-in-delay-rtl?): New function. 2006-06-20 Dave Brolley * sid.scm (gen-attr-type): Removed. * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5. (SH2a-MACH): Add sh5. (sh2a-nofpu-models): Add units for sh5. (sh2a-fpu-models): Likewise. 2006-06-15 Dave Brolley * cpu/sh-sim.cpu: New file. * cpu/sh-sid.cpu: New file. * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in. (All fields): Remap for (insn-lsb0? #f) (All insns): Add timing specs. * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with 'xattrs' and .splice it in. (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes. (h-frc,h-drc): Add PROFILE attribute. (h-fpccr): Removed. (h-vbr): New hardware. (All fields): Remap for (insn-lsb0? #f) (f-imm20-hi,f-imm20-lo,f-imm20): New fields. (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands. (fpscr): Use h-fpscr. (fsdm,fsdn): Use h-fsd. (dshci): Add xtiming argument and splice it in. (dr,xd): pmacros removed. (All insns): Add timing specs, *-MACH attribibutes, SH4{A}-GROUP attributes. (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns. * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether we're being processed for sim or sid. (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al. (define-isa compact): Add (isa-parallel-insns 2). (define-isa media): Add (isa-parallel-insns 2). Add (default-insn-word-bitsize 32). Change base-insn-bitsize to 32. (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) (SH4al-MACH, SH5-MACH): New pmacros. (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) (sh5-media-fp-units, common-model, common-model-with-fp) (sh3-model, sh3e-model): New pmacros. (define-model sh2): New model. (define-model sh2e): New model. (define-model sh3): New model. (define-model sh3e): New model. (define-model sh2a-nofpu): New model. (define-model sh2a-fpu): New model. (define-model sh4-nofpu): New model. (define-model sh4): New model. (define-model sh4a-nofpu): New model. (define-model sh4a): New model. (define-model sh4al): New model. (define-model sh5-media): New model. (define-model sh5): Add all units. (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) (sh5-media-models, shad-models, fsqrt-models): New pmacros. (h-pc): Add PROFILE attribute. (h-fr): Likewise. (h-tr): Likewise. (h-gr,h-grc): Likewise. (h-cr): Set h-sr in setter. (h-frbit): Get/Set h-fpscr. (h-szbit,h-prbit): Likewise. (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62. Add getter and setter. (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60. Adjust getter and setter. (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48. Adjust getter and setter. (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62. (h-fsd,h-fmov): New hardware. 2006-07-24 Ralk Wildenhues * doc/app.texi, doc/internals.texi, doc/intro.texi, doc/notes.texi, doc/porting.texi, doc/running.texi, doc/sim.texi: Fix some typos. 2006-07-14 Dave Brolley * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the hardware or memory mode which was used. * sid-cpu.scm (hw-need-write-stack?): New function. (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to identify hardware which uses write stacks. (useful-mode-names): Renamed to write-stack-memory-mode-names. Initialized to an empty list. (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use hw-need-write-stack?. * hardware.scm (used-in-delay-rtl?): New member of . (define-getters ): Define used-in-delay-rtl?. (used-in-delay-rtl?): New method of . (hw-used-in-delay-rtl?): New function. 2006-06-20 Dave Brolley * sid.scm (gen-attr-type): Removed. 2006-05-10 Dave Brolley * read.scm (cmd-if): Provide the correct argument to reader-error. Add support for (if (application-is? ) (...) (...)). (-cgen): Add trailing "/" to arch-path. * utils.scm (dirname): Removed. dirname is a primitive function. 2006-05-09 Dave Brolley * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift 'entire_insn' not 'base_insn'. * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing is null. * sim.scm (-gen-arch-model-decls): Likewise. * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set abuf->written if profiling. (-gen-hw-stream-and-destream-fns): Use symbol->string instead of object->string om the mode. (-hw-gen-write-stack-decl): Likewise. * read.scm (include): Use arch-path as file location. (arch-path): Define it with a default setting. (-cgen): Update arch-path when "-a" option is specified. * utils.scm (dirname): New function. 2006-05-05 Steve Ellcey * configure.in: Remove AC_ARG_PROGRAM. * configure: Regenerate with autoconf 2.59. 2006-03-14 Hans-Peter Nilsson * dev.scm (cload) : New case, duplicated from SIMULATOR. 2006-03-03 Shrirang Khisti Anil Paranjape Shilin Shakti * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X CPU description. * cpu/xc16x.opc: New file containing supporting XC16C routines. 2006-02-10 Nick Clifton * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits. 2005-12-28 Nathan Sidwell * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode for concatenation. (-hw-gen-write-stack-decl): Likewise. 2005-12-05 Hans-Peter Nilsson * utils-sim.scm (-gen-decode-insn-entry): Correct last change for non-(adata-integral-insn? CURRENT-ARCH) case. 2005-10-28 Dave Brolley Contribute the following changes: 2005-09-19 Dave Brolley * attr.scm (gen-value-for-defn-raw): New methods. (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call gen-value-for-defn-raw. * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw. 2002-12-13 Dave Brolley * utils-cgen.scm (gen-attr-type): Moved from sid.scm. (-gen-attr-accessors): New function. (gen-obj-attr-defn): Update terminating initializer. (gen-obj-attr-end-defn): New function. * sid.scm (gen-attr-type): Moved to utils-cgen.scm. * sid-cpu.scm (cgen-desc.h): Generate code to include "opcode/cgen-bitset.h" * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa name. * desc.scm ('gen-defn): Update terminating initializer. * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update terminatinig initializer. (gen-hw-decls): Ditto. (gen-operand-decls): Ditto. (gen-insn-decls): Ditto. (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h" (gen-insn-table): Update terminating initializer. (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables, @arch@_cgen_cpu_open, @arch@_cgen_cpu_close. * attr.scm (charmask-bytes): New function. (bitset-attr->charmask): New function. (): Handle isa-attributes specially. Also handle differences for SID-SIMULATOR. (): Handle differences for SID-SIMULATOR. (): Ditto. 2005-10-26 Kazuhiro Inaoka * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size. 2005-10-24 DJ Delorie * operand.scm (-anyof-merge-syntax): Print a more useful error message. 2005-10-19 Nick Clifton * cpu/m32r.opc (parse_slo16): Fix bad application of previous patch. 2005-10-18 Andreas Schwab * cpu/m32r.opc (parse_slo16): Better version of previous patch. 2005-10-14 Kazuhiro Inaoka * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word size. 2005-08-02 Dave Brolley * rtl-c.scm (s-unop): Don't dereference CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code. (s-binop, s-convop, s-cmpop): Likewise. 2005-07-29 Dave Brolley * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written' if with-profile or with-parallel-write. (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel. * operand.scm (op:new-mode): Convert (obj:name op) to a string for string-append. 2005-07-15 Alan Modra * cpu/fr30.opc (print_register_list): Correct format strings. * cpu/ip2k.opc: Likewise. 2005-07-05 Nick Clifton * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter unsigned in order to avoid compile time warnings about sign conflicts. 2005-07-01 Nick Clifton * desc-cpu.scm: Update to ISO C90 function declaration style. * opc-asmdis.scm: Likewise. * opc-ibld.scm: Likewise. * opc-itab.scm: Likewise. * cpu/fr30.opc: Likewise. * cpu/i960.opc: Likewise. * cpu/ip2k.opc: Likewise. * cpu/iq2000.opc: Likewise. * cpu/m32r.opc: Likewise. * cpu/openrisc.opc: Likewise. * cpu/sh.opc: Likewise. * cpu/sparc.opc: Likewise. * cpu/xstormy16.opc: Likewise. 2005-06-15 Dave Brolley * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function. (cgen-cpu.h): Call it. Contributed on behalf of Graydon Hoare 2001-06-05 graydon hoare * utils.scm (foldl): Define. (foldr): Define. (filter): Define. (union): Define. (intersection): Simplify. * sid.scm : Set APPLICATION to SID-SIMULATOR. (-op-gen-delayed-set-maybe-trace): Define. ( 'gen-set-{quiet,trace}): Delegate to op-gen-delayed-set-quiet etc. Note: this is still a little tangled up and needs cleaning. (-with-parallel?): Hardwire with-parallel to #t. ( 'cxmake-get): Replace with lookahead-aware code * sid-decode.scm: Remove per-insn writeback fns. (-gen-idesc-decls): Redefine sem_fn type. * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff with write stack stuff. (cgen-write.cxx): Replace per-insn writebacks with single write stack writeback. Add write stack reset function. (-gen-scache-semantic-fn insn): Replace parexec stuff with write stack stuff. * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed estate attribute set. (delay): Set #:delayed attribute to calculated delay, update maximum delay of cpu, check (delay ...) usage. * operand.scm (): Add delayed slot to . * mach.scm (): Add max-delay slot to . * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR. * doc/rtl.texi (Expressions): Add section on (delay ...). 2005-06-13 Jim Blandy * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols as well as strings. 2005-06-07 Zack Weinberg * doc/porting.texi: Change all mention of md_apply_fix3 and gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix respectively. 2005-05-18 Dave Brolley * utils-sim.scm (-gen-decode-default-entry): New function. (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate code to check that all opcodes bits match. (-gen-decoder-switch): Use -gen-decode-default-entry. 2005-05-16 Jim Blandy * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size fetched by one of our GETIMEM* methods. * utils-gen.scm (-extract-chunk-specs): Always fetch full base-insn-sized chunks. 2005-05-10 Nick Clifton * Update the address and phone number of the FSF organization in the GPL notices in the following files: COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu, cpu/powerpc.cpu, slib/random.scm 2005-05-06 Jim Blandy * pprint.scm, cos-pprint.scm: Add documentation. * pprint.scm (pprint): Don't wipe out elide-table after each call. * pprint.scm, cos-pprint.scm: New files. 2005-04-04 Nick Clifton * opcodes.scm (-gen-parse-address): Initialise value to zero to avoid a compile time warning. 2005-03-18 Nick Clifton * cpu/ip2k.opc (parse_lit8): Change wording of error message to "percent-operand" from "%operand" as the latter confuses xgettext into thinking that it is a C printf formating directive, which prevents proper translation. 2005-02-23 Nick Clifton * opcodes.scm (gen-parse-number): Add a cast to the desired pointer signed'ness in order to prevent compile time warnings. * cpu/ip2k.opc: Fixed compile time warnings about differing signed'ness of pointers passed to functions. * cpu/iq2000.opc: Likewise. * cpu/m32r.opc: Likewise. * cpu/openrisc.opc: Likewise. * cpu/xstormy16.opc: Likewise. 2005-02-22 Alan Modra * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here.. (cgen-desc.h): ..to here, after opcode/cgen.h include. 2005-02-16 Dave Brolley * utils.scm: Update copyright years. * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base. * sid.scm (gen-ifetch): Handle the case where bitsize == 24. * operand.scm (-derived-operand-parse): Move logit message from level 1 to level 2. 2005-02-15 Nick Clifton * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to prevent compile time warning messages. * opc-opinst.scm (-gen-operand-instance-table): Likewise. * utils-gen.scm (attr-int-gen-defn): Likewise. (attr-gen-defn): Likewise. * cpu/ip2k.opc (parse_addr16_p): Remove unused function. (print_dollarhex16): Remove unused function. 2005-02-15 Jim Blandy * guile.scm (cgen-call-with-debugging): Doc fix. Make backtraces work more reliably. * guile.scm: Set up debugging parameters, and enable debugging and source positions while loading. (cgen-call-with-debugging, cgen-debugging-stack-start): New functions. * read.scm: Don't set debugging parameters here. (catch-with-backtrace): Function deleted. (-cgen): Simply note the presence or absence of the -b option. Pass the flag to cgen-call-with-debugging, so debugging is turned off here if the user didn't request it, for faster computation. (cgen): Call cgen-debugging-stack-start here, instead of catch-with-backtrace. * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a trailing -s. (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test): Don't write out the trailing -s here. * Makefile.in: Regenerated. * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load fixup.scm here; let the caller decide which Scheme's customization file to preload. * dev.scm: Load guile.scm, not fixup.scm. * fixup.scm: Deleted; contents have all moved to guile.scm. * README: Doc fix. * guile.scm (debug-write): New function. 2005-02-14 Jim Blandy * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the transformer procedure, not eval. Transformer procedures take one argument. 2005-02-11 Nick Clifton * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument to 'bfd_vma *' in order avoid compile time warning message. 2005-02-09 Jim Blandy * cgen-sim.scm (load-files): Don't load fixup.scm. (See corresponding change in the sim/common directory.) 2005-02-07 Jim Blandy * cgen-opc.scm: Don't load fixup.scm here. (See corresponding changes in the opcodes directory.) * guile.scm: New file, containing Guile-specific definitions and adaptations. This is loaded by the app-specific shell scripts. Initially identical to fixup.scm. * cgen-sid.scm: Don't load fixup.scm here. * cos.scm: Profile elm-xset! when requested, not elm-set!; the latter is a macro. 2005-01-27 Jim Blandy * utils.scm (string/symbol->append): Renamed from 'concat'. * opcodes.scm (gen-switch): Use new name. * insn.scm (-sub-insn-make!): Same. * rtl.scm (rtx-dump): Same. * semantics.scm (semantic-compile): Same. 2005-01-20 Jim Blandy * opcodes.scm (gen-switch): Use concat instead of string-map. * utils.scm (concat): New function. * insn.scm (-sub-insn-make!): Use concat instead of string-map. * rtl.scm (rtx-dump): Same. * semantics.scm (semantic-compile): Same. 2004-12-16 Jim Blandy * utils-cgen.scm (parse-name): Don't assume that string-map can be applied to symbols. Process everything as strings, and then convert to a symbol at the end. * read.scm (debug-repl): Temporarily redirect input and output to /dev/tty while we debug, so we don't interfere with whatever CGEN is reading or writing. * utils.scm (setter-getter-fluid-let, with-input-and-output-to): New functions. 2004-11-15 Michael K. Lechner * cpu/iq2000.cpu: Added quotes around macro arguments so that they will work with newer versions of guile. 2004-10-27 Nick Clifton * cpu/iq2000m.cpu: Import latest version from cpu/ directory. * cpu/iq2000.cpu: Likewise. 2004-07-21 DJ Delorie * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8. 2003-03-14 Frank Ch. Eigler * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args. (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare. 2004-03-30 Kazuhiro Inaoka * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug. 2004-03-22 Dave Brolley * utils.scm (copyright-fsf): Update copyright years. (copyright-red-hat): Ditto. * sid.scm (-op-gen-set-trace): Generate trace code before semantic code. (-op-gen-set-trace-parallel): Ditto. 2004-02-10 Kazuhiro Inaoka * cpu/m32r.opc (my_print_insn): Fixed incorrect output when disassembling codes for 0x*2 addresses. 2004-01-29 Dave Brolley * decode.scm (-opcode-slots): For short insns, generate 'opcode' with zeroes in the extra bit positions and generate 'opcode-mask' with ones in the extra bit positions. 2003-12-15 Kazuhiro Inaoka * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction. 2003-12-04 Alan Modra * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on "short" being 16 bit. (parse_hi16): Likewise. Fix type-punned pointer warnings too, and internationalize error message. (parse_lo16): Likewise. Remove useless code. 2003-12-03 Kazuhiro Inaoka * cpu/m32r.cpu : Add new model m32r2. Add new instructions. Replace occurrances of 'Mitsubishi' with 'Renesas'. Changed PIPE attr of push from O to OS. Care for Little-endian of M32R. * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn): Care for Little-endian of M32R. (parse_slo16): signed extension for value. 2003-10-26 Dave Brolley * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P. (-gen-extract-fn): Call -gen-record-profile-args. 2003-10-21 Dave Brolley * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as a static const int. * decode.scm (-opcode-slots): Correct typo in logit call. 2003-10-09 Jim Blandy * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration for @arch@_cgen_hw_table. GDB needs to be able to find this. * mach.scm (def-isa-attr!): hardware can have ISA attributes, too. 2003-10-06 Dave Brolley * gen-all-doc: Add fr550. 2003-09-11 Doug Evans * Makefile.am (ARCHFILE): New var. (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH). (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto. * Makefile.in: Regenerate. 2003-09-08 Dave Brolley On behalf of Doug Evans Pass in paths to input files, instead of assuming they live in $srcdir/cpu. Plus misc. option processing cleanup. * cgen-doc.scm (doc-arguments): Make options strings not symbols. Add pre-process pass to all options. * cgen-gas.scm (gas-arguments): Ditto. * cgen-sid.scm (sim-arguments): Ditto. * cgen-sim.scm (sim-arguments): Ditto. * cgen-stest.scm (stest-arguments): Ditto. * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC. (-opc-file-path): New global. (opc-file-path): New fn. * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file. All callers updated. (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c, gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c): Replace srcdir arg with opc-file. All callers updated. * read.scm (-opt-spec-update): Delete. (opt-get-first-pass,opt-get-second-pass): New fns. (-cgen): Process application-specific arguments in two passes. 2003-08-29 Dave Brolley * cpu/frv.cpu: Removed. * cpu/frv.opc: Removed. 2003-08-21 Nick Clifton * cpu/frv.cpu (mbtoh): Replace input parameter to u-media-dual-expand and u-media-dual-btoh with output parameter. (cmbtoh): Add profiling hack. 2003-08-19 Michael Snyder * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven 2003-08-07 Michael Meissner * opc-opinst.scm (-gen-operand-instance-table): Initialize all of the elements for the END record of CGEN_OPINST, silencing warnings. 2003-07-15 Doug Evans Add guile 1.6.4 support. - empty list must be quoted - string functions have stricter type checking - eval now takes a second argument - symbol-bound? is deprecated * attr.scm (-attr-parse): Use stringsym-append to build errtxt. (bitset-attr->list): Ensure arg to string-cut is a string. (attr-parse): Ensure args to string-ref and string-drop1 are strings. (,gen-value-for-defn): Fetch string name of self. * cos.scm (-class-list): Must quote empty list. (-class-parent-classes,-class-compute-class-desc): Ditto. (class-make,make,object-reset!): Ditto. (method-make-make!): Call eval1 instead of eval. (method-make-forward!,method-make-virtual-forward!): Ditto. * decode.scm (subdtable-add): Use stringsym-append instead of string-append. (-gen-exprtable-name): Fetch string name of exprtable-entry-insn. (-build-decode-table-entry): Fetch string name of insn. * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa. (-gen-mach-table-defns): Ditto for mach. (gen-ifld-defns): Ditto for ifld. (gen-hw-table-defns): Ditto for hw. (gen-operand-table): Ditto for op. (gen-insn-table-entry): Ditto for insn. * desc.scm (gen-attr-table-defn): Ditto for attr. (,gen-defn): Don't pass symbols to string-append. * enum.scm (parse-enum-vals): Use symbolstr-append instead of symbol-append. (enum-vals-upcase): Use symbol-upcase to build result. (-enum-parse): Use stringsym-append to build errtxt. * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals. (eval1): New function. (symbol-bound?): Provide own version if >= guile 1.6. * hardware.scm (define-keyword): Use string-append instead of symbol-append. * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro, cgen.html,cgen-insn.html): Convert current-arch-name to a string before using. (gen-list-entry): Handle either symbol or string `name' arg. (gen-obj-doc-header): Fetch string name of `o' arg. (define-cpu-intro): Ditto for cpu. (gen-mach-intro): Ditto for mach. (gen-model-intro): Ditto for model. (gen-isa-intro): Ditto for isa. (gen-machine-doc-1): Ditto for isa. (gen-reg-doc-1): Convert mach to string first. (gen-insn-doc-1): Ditto. Convert model/unit names to strings first. (gen-insn-doc-list): Fetch string name of mach. Convert insn name to string first. (gen-insn-categories): Fetch string name of mach. Convert enum-val-name to string first. (gen-insn-docs): Fetch string name of mach. * ifield.scm (ifld-ilk): Result is a string. * iformat.scm (-ifmt-search-key): Convert attr value to string first. Fetch string name of ifld. (-sfmt-search-key): Similarily for ifld and op. * insn.scm (syntax-make): Fetch string name of syntax element. * mach.scm (-cpu-parse): Use stringsym-append to build errtxt. * minsn.scm (minsn-make-alias): Fetch string name of minsn. * mode.scm (mode:c-type): Result is a string. (mode:enum): Fetch string name of mode. (-mode-parse): Use stringsym-append to build errtxt. * model.scm (model:enum): Fetch string name of model. (-model-parse): Use stringsym-append to build errtxt. (parse-insn-timing): Must quote empty list. * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn. (-gen-minsn-opcode-entry): Ditto. * opcodes.scm (,gen-function-name): `what' arg is a symbol, convert to string. (read-cpu.opc): Convert current-arch-name to a string before using. * operand.scm (,gen-pretty-name): Ensure `name' is a string. (): Must quote empty list. (op-sort): Simplify, call alpha-sort-obj-list to do sort. * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name of ifld. * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval. (-pmacro-sym): Must convert symbols to strings before passing to string-append. (-pmacro-str): Ditto. (pmacros-init!): Use eval1 instead of eval. * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list. (keep-isa-atlist?): Ditto. (cmd-if): Use eval1 instead of eval. * rtl-c.scm (,get-name): Fetch string name of self. (-rtl-c-get): Fetch string name of src. (s-unop): Ditto for mode. (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto. (-gen-par-temp-defns,subword): Ditto. (join): Use stringsym-append instead of string-append. * rtl-traverse.scm (rtx-option?): Convert option to string first. (rtx-traverse-debug): Fetch string name of rtx-obj. * rtl.scm (def-rtx-node): Use eval1 instead of eval. (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto. (rtx-pretty-name): Result is a string. (-rtx-hw-name): Use symbolstr-append instead of symbol-append. * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list. * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string before using. (-gen-sfrag-case): Fetch string name of user. * sid-model.scm (unit:enum): Fetch string name of unit. * sid.scm (,cxmake-get): Fetch string name of mode. (,gen-set-quiet): Ditto. (gen-mode-defs): Ditto. (sim-finish!): Convert current-arch-name to a string before using. * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn. (-gen-no-scache-semantic-fn): Ditto. (cgen-defs.h): Fetch string name of isa. (cgen-read.c): Convert current-arch-name to a string before using. (cgen-write.c): Ditto. * sim-model.scm (unit:enum): Fetch string name of unit. (gen-model-fn-decls): Use stringsym-append instead of string-append. (-gen-model-timing-table): Fetch string name of model. (-gen-mach-model-table): Ditto. (-gen-mach-defns): Fetch string name of mach. * sim.scm (gen-reg-access-defn): Fetch string name of hw. (,cxmake-get): Fetch string name of mode. (,gen-set-quiet): Ditto. (gen-mode-defs): Ditto. (sim-finish!): Must quote empty list. * utils-cgen.scm (): Must quote empty list. (obj:str-name): New fn. (parse-comment): Result is a string. (parse-symbol): Result is a symbol. (parse-string): Result is a string. (keyword-list?): Convert arg to string before calling string-ref. (keyword-list->arg-list): Ditto. (gen-attr-name): Convert attr-name to string first. (alpha-sort-obj-list): Use symbolstring,->symbol): New fns. (reduce): Call eval1 instead of eval. * cpu/m32r.cpu (addi): Don't use `#.'. * gen-all-sim: Fix some typos. 2003-07-08 Doug Evans * gen-all-doc: Ensure run from cgen src dir. * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done. * gen-all-sid: Similarily, in ./tmp-sid. * gen-all-sim: Similarily, in ./tmp-sim. 2003-06-20 Doug Evans * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default. 2003-06-19 Doug Evans * mach.scm (-ifld-already-defined?): New proc. (current-ifld-add!): Use it. (-op-already-defined?): New proc. (current-op-add!): Use it. (-insn-already-defined?): New proc. (current-insn-add!): Use it. (-minsn-already-defined?): New proc. (current-minsn-add!): Use it. (obj-isa-list): New proc. (isa-supports?): Use it. 2003-06-10 Doug Evans * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE. * cpu/m32r.cpu (all insns): Ditto. * mach.scm (current-*-add!): Disallow redefinition. Make result "unspecified". * gen-all-doc: Split arm and frv docs up a bit. * cpu/arm.cpu: Add IDOC attribute. * cpu/frv.cpu: Ditto. * cpu/i960.cpu: Ditto. * cpu/openrisc.cpu: Ditto. * cpu/xstormy16.cpu: Ditto. * cpu/m32r.cpu: Ditto. (all insns): Explicitly specify IDOC attribute. * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars. (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS. (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately. * Makefile.in: Regenerate. * attr.scm (:parse-value-def): Implement. (-attr-read): Defer computing default value until we know the type. (attr-has-attr?): Delete, move contents to :has-attr?. (:attr-present?): New method. (atlist-attr-present?,obj-attr-present?): New fns. (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns. (attr-builtin!): New insn attr IDOC. * cgen-doc.scm (doc-arguments): New args -I,-N. * enum.scm (parse-enum-vals): New arg errtxt, all callers updated. Support comment as fourth element of enum value. (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns. * html.scm (gen-html-header): New arg kind, all callers updated. (gen-table-of-contents): New arg insn-file, all callers updated. (gen-list-entry,gen-doc-header): New fn. (get-operands): Delete. (gen-iformat-table): Rewrite. (gen-insn-doc-1): Print constant-folded and trimmed semantics. (gen-insn-doc-list): New args name, comment, insns. All callers updated. (get-insn-properties,guess-insn-idoc-attr!): New fn. (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns. (get-insns-for-category,gen-categories-insn-lists): New fns. (gen-insn-docs): Simplify each insn's semantics first. Print insn tables sorted by IDOC categories. (*insn-html-file-name*): New global. (cgen-insn.html): New fn. (cgen-all): Update. * insn.scm (): Create a setter for the `tmp' member. * semantics.scm (insn-build-known-values): Renamed from -build-known-values. All callers updated. * rtl.scm: Move traveral/evaluation support to ... * rtl-traverse.scm: New file. * read.scm: Maybe-load rtl-traverse.scm. * rtl.scm (-rtx-valid-types): Add SETRTX. * rtx-funcs.scm (nop,parallel): Fix mode. * utils.scm (eqv-lookup-index): New fn. (assq-lookup-index): Renamed from lookup-index. All callers updated. * dev.scm (load-doc): Set APPLICATION. 2003-06-10 Dave Brolley * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx. * sid-decode.scm: Generate #include of config.h into @prefix@-decode.cxx. * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx. 2003-06-07 Doug Evans * gen-all-sid: New file. * gen-all-opcodes: New file. 2003-06-05 Nick Clifton * cpu/frv.cpu (FRintieven): New operand. An even-numbered only version of the FRinti operand. (FRintjeven): Likewise for FRintj. (FRintkeven): Likewise for FRintk. (mdcutssi, media-dual-word-rotate-r-r, mqsaths, media-quad-arith-sat-semantics, media-quad-arith-sat, conditional-media-quad-arith-sat, mdunpackh, media-quad-multiply-semantics, media-quad-multiply, conditional-media-quad-multiply, media-quad-complex-i, media-quad-multiply-acc-semantics, media-quad-multiply-acc, conditional-media-quad-multiply-acc, munpackh, media-quad-multiply-cross-acc-semantics, mdpackh, media-quad-multiply-cross-acc, mbtoh-semantics, media-quad-cross-multiply-cross-acc-semantics, media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics, media-quad-cross-multiply-acc-semantics, cmbtoh, media-quad-cross-multiply-acc, media-quad-complex, mhtob, media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd, cmhtob): Use new operands. * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define. (parse_even_register): New function. 2003-06-04 Doug Evans Better handling of 64 bit and mixed 32/64 bit architectures. * hardware.scm (hw-update-word-modes!): New fn. * mach.scm (define-cpu)): Call mode-set-word-modes!, hw-update-word-modes!. (state-word-bitsize): Replace FIXME with requested check. (arch-analyze-insns!): Call mode-ensure-word-sizes-defined. * mode.scm (mode-find): Ignore INT,UINT. (-mode-word-sizes-kind): New global. (mode-set-word-modes!,mode-set-identical-word-bitsizes!, mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns. (mode-init!): Initialize -mode-word-sizes-kind. Move initialization of mode-list to ... (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something unusable, correct values set later. (mode-finish!): Remove cruft. * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!. * opcodes.scm (opcodes-init!): Ditto. * rtx-funcs.scm (annul): Fix mode of pc. * cpu/ia64.cpu: Remove cruft that sets word modes. * cpu/xstormy16.cpu (define-cpu): Set word-bitsize. 2003-06-03 Nick Clifton * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit immediate value not unsigned. 2003-05-21 J"orn Rennecke * cpu/sh.cpu: Amend comments to refer to SuperH. * cpu/sh64-compact.cpu: Change comment to refer to SuperH. * cpu/sh64-media.cpu: Likewise. (Saturation): Update manual reference. 2003-05-15 Doug Evans * Makefile.am (srcroot): New var. (html): New rule. * Makefile.in: Regenerate. * cgen-doc.scm: New file. * html.scm: New file. * gen-all-doc: New file. * dev.scm (cload): Handle DOC application. (load-doc): New fn. * machs.scm (machs-for-cpu): New fn. * model.scm (models-for-cpu): New fn. * utils.scm (gen-c-copyright): Renamed from gen-copyright. All uses updated. (iota): Rewrite to be identical to pmacro version. All uses updated. * utils-cgen.scm (alpha-sort-obj-list): New fn. * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09. (-gen-decode-bits): Instead put in better fix here. * cpu/i960.cpu (index): Rename to indx. All uses updated. 2003-05-01 DJ Delorie * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned word accesses. (set-alignfix-mem): Likewise. 2003-04-16 Dave Brolley * doc/rtl.texi (Iiming): Correct example to use 'model-name'. * utils.scm (copyright-fsf): Update generate copyright years. (copyright-cygnus): Ditto. * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified operands. (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS here. ('gen-profile-code): New parameter 'when'. ('gen-profile-code): Ditto. ('gen-profile-code): Ditto. ('gen-profile-code): Ditto. Only generate 'referenced' and 'insn_reference' for the 'after' function. * model.scm (unit:enum): Moved to sim-model.scm. * sim-model.scm (unit:enum): Moved from model.scm. * sid-decode.scm (-gen-scache-decls): Generate the 'written' field. * cgen-sid.scm (sim-arguments): Document the generation of model.h. * sid-model.scm (unit:enum): New version for sid. (gen-model-class-name): New function. (gen-model-unit-fn-decl): New function. (gen-model-fn-decls): Call gen-model-unit-fn-decl. (gen-model-unit-fn-name): New parameter 'when'. (-gen-model-insn-fn-name): Ditto. (-gen-model-insn-qualified-fn-name): New function. (-gen-model-insn-fn-decl): New function. (-gen-model-insn-fn-decls): New function. (-gen-model-insn-fn): New parameter 'when'. Call -gen-model-insn-qualified-fn-name. (-gen-model-insn-fns): Generate the constructor for the model. Generate functions for modelling insn before and after execution. (-gen-model-class-decls): New function. (" (gen-model-class-name model) "): New function. (gen-model-classes): New function. (-gen-insn-timing): Generate functions for modelling insn before and after execution. (-gen-insn-unit-timing): Generate class-qualified names. (-gen-model-timing-table): Ditto. (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code not needed (yet) by sid. (cgen-model.h): New function. 2003-04-15 Rohit Kumar Srivastava * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'. * cpu/sh64-compact.cpu: Likewise. * cpu/sh64-media.cpu: Likewise. 2003-03-21 DJ Delorie * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize), which indicates if the sign flag is set from bit 15 or 7. Adjust all callers. (set-psw): New argument ws, propogate it. (set-psw-nowrite): Likewise. (set-mem-psw): Likewise. (set-psw-carry): Likewise. Use temporaries to prevent prematurely overwriting needed inputs. (set-psw-rrotate17): Fix logic. (shrgrgr): Preserve carry for zero-bit shifts. (shrgrimm): Likewise. (shlgrgr): Likewise. (shlgrimm): Likewise. (asrgrgr): Likewise. (asrgrimm): Likewise. (reset): New. 2003-03-12 Frank Ch. Eigler * sid.scm: Set APPLICATION to SID-SIMULATOR. 2002-03-05 DJ Delorie * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent prematurely overwriting needed inputs. (set-psw-sub): Likewise. Fri Feb 21 19:48:19 2003 J"orn Rennecke * cpu/sh64-media.cpu (make-mextr): Fix setting of count. 2003-02-18 DJ Delorie * xstormy16.cpu (set-mem-alignfix-psw): Remove. (movlmemimm): Just mask the address. (movhmemimm): Likewise. (movlmemgr): Likewise. (movhmemgr): Likewise. (set-psw): Always set the psw last. (set-psw-carry): Likewise. (set-psw-add): Likewise. (set-psw-sub): Likewise. * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set of 16 patterns from the set-psw-rotate17 function. (movgrigr, movgripostincgr, movgripredecgr, movgriigr, movgriipostincgr, movgriipredecgr): Set psw correctly. (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr, movfgriipostincgr, movfgriipredecgr): Fix semantics. (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function. 2003-02-11 Dave Brolley * desc-cpu.scm (gen-ifld-defns): Add all ifields to the @arch@_cgen-ifld_table. (gen-maybe-multi-ifld): Use the ifield enumerators to index the @arch@_cgen-ifld_table. 2003-02-03 Frank Ch. Eigler * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++. 2003-01-09 Graydon Hoare * utils-sim.scm (-gen-decoder-switch): Fix edge condition for empty ISAs. 2003-01-07 Graydon Hoare * utils-gen.scm (attr-int-gen-defn): Define. 2002-12-21 Doug Evans * ifield.scm (-ifield-parse): Rewrite computation. (-get-ifld-word-offset,-get-ifld-word-length): New fns. * dev.scm (cload): Update location of .cpu files. 2002-12-19 Doug Evans * utils-sim.scm (gen-profile-sym): New fn. (,sbuf-profile-sym): New method. (,sbuf-profile-elm): Use it. * sim.scm (,gen-record-profile): Use sbuf-profile-sym instead of hardcoding symbol name. (,gen-profile-code): Ditto. (,gen-profile-code): Use gen-profile-sym instead of hardcoding symbol name. * mode.scm (mode-sem-mode): New fn. * operand.scm (op:new-mode): Update. mode-name. (op-natural-mode?) New fn. * rtl.scm (hw): Set hw-name,mode-name. Back out sim*.scm changes of 2001-04-02 Ben Elliston Instead do: * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX as size of IDESC-TABLE-VAR. (@prefix@_init_idesc_table): Ditto. * sim-model.scm (-gen-mach-defns): Ditto. * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max. * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output. * insn.scm (-parse-insn-format-symbol): Improve error message. (-parse-insn-format): Ditto. * gen-all-sim: New script. 2002-12-16 DJ Delorie * cpu/xstormy16.opc (parse_immediate16): Add prototype. 2002-12-16 Andrew MacLeod * cpu/xstormy16.cpu (imm16): Call handler immediate16. * cpu/xstormy16.opc (parse_small_immediate): Return on '@'. (parse_immediate16): Handle immediate16 values, which now include @hi(label) and @lo(label) 2002-12-03 Alan Modra * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens. Add braces and cast for union field. (gen-multi-ifield-nodes): Add braces and cast for union field. (cgen_operand_table): Similarly fix sentinel. (cgen_cpu_close): Constify "insns". Formatting. (cgen-desc.c): Include xregex.h. * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section. Prototype. : Include safe-ctype.h. (ip2k_asm_hash): Use ISSPACE and TOLOWER. (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16, parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3. (parse_fr): Constify "old_strp". Correct type of "tempvalue". Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting. (parse_addr16): Correct type of "value". Formatting. (parse_addr16_p): Likewise. (parse_addr16_cjp): Likewise. (parse_lit8): Likewise. (parse_bit3): Formatting. (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex, print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h, print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and print_decimal. (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting. (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args. (print_dollarhex8): Likewise. (print_dollarhex16): Likewise. (print_dollarhex_addr16h): Likewise. (print_dollarhex_addr16l): Likewise. (print_dollarhex_p): Likewise. (print_dollarhex_cj): Likewise. (print_decimal): Likewise. * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum. 2002-11-30 Hans-Peter Nilsson * doc/rtl.texi (Model variants): Mention current limitations for unit inputs and outputs. (Hardware elements) : Be slightly more verbose. (Instructions) : input/output overrides have a direction operand. 2002-11-25 DJ Delorie * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings. 2002-11-21 Jeff Johnston * cpu/iq10.cpu: New file. * cpu/iq2000.cpu: Likewise. * cpu/iq2000.opc: Likewise. * cpu/iq2000m.cpu: Likewise. 2002-11-19 DJ Delorie * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New. 2002-11-05 Frank Ch. Eigler * dev.scm: Call getenv with a string, not a symbol. 2002-10-08 Doug Evans Hans-Peter Nilsson * types.scm (bitrange-overlap?): Handle lsb0?. 2002-09-07 Frank Ch. Eigler From Robert Cragie : * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions. 2002-07-17 Frank Ch. Eigler Ben Elliston John Healy Jeff Johnston Alan Lehotsky Ubicom Inc. * cpu/ip2k.cpu: New file. * cpu/ip2k.opc: Likewise. 2002-07-01 Hans-Peter Nilsson * utils-gen.scm (-gen-extract-word): Handle lsb0?. 2002-06-25 J"orn Rennecke * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg. * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros. (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise. (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise. (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement. (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices. (-sthi-byte): If there is a single byte to store, store it at proper address. (sthil, sthiq): Fix big-endian behaviour. (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices. (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise. (saturate): Use Dimode to check if saturation operation is required. (usaturate): Likewise. (mpermw): Fix mask. (-maddsl, -maddsub): Compute to-be-saturated value in wider mode. (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise. (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise. (msadubq): Fix subword index in second operand of first subtraction. 2002-06-20 Hans-Peter Nilsson * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics code. 2002-06-18 Dave Brolley * cpu/frv.cpu: New cpu description. * cpu/frv.opc: New cpu support code. 2002-05-21 Dave Brolley * decode.scm (-opcode-slots): Don't consider bits beyond the length of the insn. 2002-05-17 Johan Rydberg * cpu/powerpc.cpu: New file. 2002-05-01 Graydon Hoare * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks. 2002-03-20 Hans-Peter Nilsson * doc/pmacros.texi (Symbol concatenation): Mention that .sym results are expanded recursively. 2002-03-19 Hans-Peter Nilsson * pmacros.scm (-pmacro-expand,scan): If result is a symbol, call scan-symbol on it, to enable recursive macro-expansion. 2002-01-25 Frank Ch. Eigler * sid-cpu.scm (-gen-hardware-types): Generate single hardware union for multiple-isa configurations. * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list. 2002-02-04 Ben Elliston * cpu/sh.cpu, cpu/sh.opc: New files. * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise. 2002-01-29 Hans-Peter Nilsson * doc/rtl.texi: Fix typo: define-attr, not define-attribute. (Enumerated constants): Mention that an ifield must not specify a multi-ifield. (Instruction operands): Ditto for index. (Expressions) : Remove misplaced mention of local variables. : Mention that mode must be specified and non-VOID when the result is used. 2002-01-28 Hans-Peter Nilsson * doc/porting.texi: When referring to *.opc, mention they are in the cpu subdir. Call top-level directory toplevel, not devo. Close string in define-normal-insn example. * doc/pmacros.texi: Fix .substr typo to .substring. Mention that .sym expansions are not further expanded. 2002-01-22 Graydon Hoare * desc-cpu.scm (ifld-number-cache): Add. (ifld-number): Add. (gen-maybe-multi-ifld-of-op): Add. (gen-maybe-multi-ifld): Add. (gen-multi-ifield-nodes): Add. (cgen-desc.c): Add call to gen-multi-ifield-nodes. 2002-01-10 matthew green * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ... (gr-Rb-names): ... to this. (h-Rb): New hardware piece. (h-Rbj): Use gr-Rb-names. (Rb): Use h-Rb. (holdx): New instruction. 2002-01-07 Ben Elliston * utils.scm (package-cygnus-simulators): Rename from this .. (package-red-hat-simulators): .. to this. * opcodes.scm (option-set!): Use package-red-hat-simulators. * sid-cpu.scm (cgen-desc.h): Likewise. (cgen-cpu.h): Likewise. (cgen-defs.h): Likewise. (cgen-write.cxx): Likewise. (cgen-semantics.cxx): Likewise. (cgen-sem-switch.cxx): Likewise. * sid-decode.scm (cgen-decode.h): Likewise. (cgen-decode.cxx): Likewise. * sid-model.scm (cgen-model.cxx): Likewise. * sid.scm (option-set!): Likewise. * sim.scm (option-set!): Likewise. 2002-01-07 Ben Elliston * utils.scm (copyright-fsf): Add 2002. (copyright-cygnus): Rename to copyright-red-hat. (copyright-red-hat): Add 2002. (CURRENT-COPYRIGHT): Update comment. * opcodes.scm (option-set!): Update callers. * sid-model.scm (cgen-model.cxx): Likewise. * sid-cpu.scm: Likewise. * sid-decode.scm: Likewise. * sid.scm (option-set!): Handle "redhat" as an option for "copyright"; use copyright-red-hat. * sim.scm (option-set!): Likewise. 2002-01-03 Dave Brolley * decode.scm (-distinguishing-bit-population): Compute num-insns, the number of insns in the list. Update the population count function to identify and prioritize 3 catgories of useful bits. (-population-top-few): Don't consider bits with a population count of zero. (-build-decode-table-entry): Don't call filter-harmlessly-ambiguous-insns. Filter out non-specialized and identical insns at the next tree level. * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that this function is no longer used. (filter-non-specialized-ambiguous-insns): New function. (filter-identical-ambiguous-insns): New function. (find-identical-insn): New function. (filter-harmlessly-ambiguous-insns): Removed. 2001-11-26 Geoffrey Keating matthew green Frank Ch. Eigler Nick Clifton * cpu/xstormy16.cpu: New file. * cpu/xstormy16.opc: New file. 2001-11-26 Frank Ch. Eigler * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos. 2001-11-14 Dave Brolley * utils-gen.scm (-gen-extract-word): Correct computation of the length of the field being extracted. 2001-10-29 Johan Rydberg * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..), (cos ...) and (sin ..) rtx. 2001-10-13 Nick Clifton * desc-cpu.scm: Do not include ctype.h in generated desc files. They will inherit safe-ctype.h instead. 2001-10-08 Nick Clifton * desc-cpu.scm: Add missing function prototypes (for generated C files). Fix compile time warning messages about unused parameters (for generated C files). * opc-asmdis.scm: The same. * opc-ibld.c: The same. * opc-itab.scm: The same. * cpu/fr30.opc: The same. * cpu/m32r.opc: The same. * cpu/openrisc.opc: The same. 2001-09-17 graydon hoare * insn.scm (syntax-break-out): Correct logic in handling escaped syntax characters. 2001-07-12 Jeff Johnston * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally call @arch@_cgen_build_insn_regex now that regex support is in libiberty. 2001-07-12 Frank Ch. Eigler * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo. (mask-superset?): Look for strict supersets to allow rejection of duplicate insns. 2001-07-11 Frank Ch. Eigler * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE... (cgen-desc.h): Call it. * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as decode-size. * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare entire_insn for extraction, if it's shorter than base-insn-bitsize. 2001-07-11 Frank Ch. Eigler * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the mach->cpu insn-chunk-bitsize. (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new field toward CGEN_CPU_TABLE->insn_chunk_bitsize. * mach.scm (): New field insn-chunk-bitsize. (-cpu-parse, -cpu-read): Parse/initialize it. * doc/rtl.texi (define-cpu): Document it. 2001-07-09 Geoffrey Keating * ifield.scm ( 'field-start): Don't look at word-len. 2001-07-06 Ben Elliston * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu. 2001-07-05 Ben Elliston * README: Update. * read.scm (include): Include files from srcdir/cpu. (-cgen): Likewise for loading .cpu files. * sid.scm (sim-finish!): Read .sim files from srcdir/cpu. * *.cpu: Move all cpu descriptions into cpu subdirectory. * *.opc: Likewise. * simplify.inc: Likewise. 2001-07-04 Ben Elliston * read.scm (include): Log "Including file" message at level 1, rather than outputting it with (display). (cpu-load): Log "Loading cpu description" and "Processing cpu description" messages at levels 1 and 2, respectively, rather than using (display). 2001-06-14 Geoffrey Keating * desc.scm ( 'gen-defn): Add extra zero into CGEN_KEYWORD_ENTRY initializers. * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5. ( 'test-data): Involve both the index and the hardware in testcase generation. ( 'test-data): Generate test data from the underlying object. ( 'test-data): Generate test data by computing bit patterns for the field, then decoding them. ( 'test-data): Allow for new calling convention. ( 'test-data): Likewise. ( 'test-data): Convert index values into keywords. ( 'test-data): Convert index values into integer strings. * gas-test.scm (cgen-build.sh): Escape '.' as well. 2001-06-01 Frank Ch. Eigler * rtl.scm (hw): Encode hw access mode into name, since this is required for multi-mode hw types (memory). 2001-05-11 Ben Elliston * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash when generating allinsn.d from objdump output. Without it, the testsuite will treat $ as the regular expression for end of line. 2001-05-09 Ben Elliston * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open' with `cgen_cpu_open'; documentation had become out of date. * doc/rtl.texi (Instruction operands): Likewise. 2001-05-07 Frank Ch. Eigler * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate various-base-length instruction sets. 2001-04-02 Ben Elliston * sid-cpu.scm (-last-insn): New function. (-gen-sem-switch-engine): Loop through idesc while less than or equal to the last instruction enum, not less than the MAX enum. (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation. * sid-decode.scm (-gen-decode-insn-globals): Define the idesc table's size to be the last instruction enum plus one, not @PREFIX@_INSN_MAX. * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max' instruction onto the instruction list. * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize using the size of the table and its elements. (-gen-decode-insn-globals): Define the idesc table's size to be the last instruction enum plus one, not @PREFIX@_INSN_MAX. * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the last instruction enum plus one, not @CPU@_INSN_MAX. 2001-03-28 Ben Elliston * doc/version.texi (UPDATED, EDITION): Update. * doc/stamp-vti: Likewise. 2001-03-26 Ben Elliston * doc/credits.texi (Credits): Update. * gas-test.scm (,test-data): Prefix keywords by their specified prefix and, if necessary, escape `$' in gas-build.sh to prevent unwanted shell variable expansion. 2001-03-24 Ben Elliston * gas-test.scm (,test-data): Choose pseudo-random data. (,test-data): Likewise. (,test-data): Likewise. (,test-data): Likewise. (-collate-test-set): New function. (build-test-set): Use it. (gen-gas-test): Generate five test cases per instruction. (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file. * read.scm: Load "slib/random" if random is not defined. * slib/random.scm: New file. * utils.scm: Remove comments about the Hobbit compiler. (copyright-cygnus): Add 2001. (package-cygnus-simulators): Replace "Cygnus" with "Red Hat". (package-gnu-simulators): Tidy. 2001-03-23 Ben Elliston * cgen-gas.scm: Inline documentation improvements. 2001-03-21 Ben Elliston * opc-itab.scm (compute-syntax): Emit a parse error if an operand given in a syntax string is undefined. * opc-itab.scm (compute-syntax): Emit a parse error if an operand name is empty or invalid -- eg. "$(rs)" instead of "($rs)". 2001-03-20 Patrick Macdonald * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation for arg_type CGEN_CPU_OPEN_BFDMACH. 2001-03-20 Ben Elliston * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max' instruction onto the instruction list. Define MAX_INSNS to be the value of the last instruction enum plus one. 2001-03-14 Nick Clifton * utils.scm (copyright-fsf): Add 2001. Remove (C). 2001-03-05 Dave Brolley * sim-decode.scm (-gen-extract-case): Generate declaration of "insn" if the number of ifields is greater than zero. 2001-03-01 Frank Ch. Eigler * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!): Emit LIKELY/UNLIKELY branch probability hints. * sid-decode.cpu (-gen-record-args): Ditto. 2001-02-02 Patrick Macdonald * desc-cpu.scm (-gen-hash-defines): Rename CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS. 2001-01-26 Frank Ch. Eigler * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for writeback tracking. (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto. * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field if unnecessary. * sid.scm ( gen-write): Use unsigned long long expression for writeback. (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto. ( gen-profile-code): Ditto. 2001-01-23 Johan Rydberg * doc/rtl.texi (Expressions): Document the (index-of ...) and (regno ...) rtx. 2001-01-08 Frank Ch. Eigler * operand.scm ( pretty-sem-name): New field. ( make): Initialize it from hw-name. (op:set-pretty-sem-name!): New function. ( gen-pretty-name): Default to fetching new field. * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore sem-name setting from -rtx-hw-name. 2001-01-08 Frank Ch. Eigler * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify its subsequent gen-pretty-name. * read.scm: Increase thread working stack limit and backtrace depth limits. 2001-01-08 Frank Ch. Eigler * doc/rtl.texi: Deprecate and depreciate the decode-assist construct. 2001-01-06 Johan Rydberg * openrisc.cpu (or32): Setup semantics for h-delay-insn to current insn plus 4. (h-delay-insn): New hardware register. (l-jal): Uses h-delay-insn instead of pc when setting link register. (l-jalr): Likewise. (l-bal): Likewise. * openrisc.opc (parse_hi16): Sign extend value. (parse_lo16): Likewise. 2001-01-06 Ben Elliston * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@ instead of @cpu@ and @CPU@ to generically prefix symbol names. * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise. (-gen-semantic-fn-table): Likewise. (-gen-scache-semantic-fn): Likewise. (-gen-no-scache-semantic-fn): Likewise. (cgen-read.c): Likewise. (cgen-sem-switch.c): Likewise. * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this is a filename prefix. * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al. (-gen-decode-insn-globals): Likewise. (-gen-idesc-decls): Likewise. (cgen-decode.h): Likewise. (cgen-decode.c): Likewise. * sim.scm (gen-cpu-insn-enum-decl): Likewise. (gen-cpu-insn-enum): Likewise. (sim-finish!): Likewise. 2001-01-05 Johan Rydberg * openrisc.cpu: New file. * openrisc.opc: Likewise. 2000-12-12 Ben Elliston * doc/rtl.texi (Expressions): Document the (delay ..) rtx. 2000-12-07 Ben Elliston * sim-decode.scm (-gen-extract-case): Do not emit a definition for "insn" when there are zero ifields to extract. 2000-12-04 Frank Ch. Eigler * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be used by simple/non-scache simulators. * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro regardless of with-scache?. (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto. 2000-12-03 Ben Elliston * desc-cpu.scm (cgen-desc.h): Clarify generated filenames. (cgen-desc.c): Likewise. 2000-12-01 Greg McGary * desc.scm (,gen-defn): Prepend prefix to keyword names. 2000-12-01 Ben Elliston * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract definitions if run without with-multipla-isa?. (cgen-defs.h): New function. Emit an ISA-specific defs file. * cgen-sim.scm (sim-arguments): Accept -G option to generate defs. 2000-11-24 Ben Elliston * sim-cpu.scm (-gen-hardware-struct): New function. (-gen-hardware-types): If with-multiple-isa is specified, emit all hardware elements wich have share one or more ISAs with the ISAs being kept. * sim.scm (-with-multiple-isa?): New symbol. (with-multiple-isa?): New function. (option-init!): Initialise -with-multiple-isa?. (option-set!): Handle with-multiple-isa option. 2000-11-21 Ben Elliston * utils.scm (copyright-fsf): Add the year 2000. 2000-11-20 Frank Ch. Eigler * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove unneeded "\n\n" from F() macro definition. 2000-11-15 Greg McGary * utils-cgen.scm (gen-define-with-symcat): New function. * desc-cpu.scm (gen-ifld-defns): Use it. (gen-hw-table-defns): Use it. (-gen-hash-defines): Use it. (gen-operand-table): Use it. (gen-insn-table): Use it. Remove spurious `#undef MNEM'. * opc-itab.scm (-gen-ifmt-table): Use it. (-gen-insn-opcode-table): Use it. (-gen-macro-insn-table): Use it. * opc-opinst.scm (-gen-operand-instance-tables): Use it. * sim-cpu.scm (cgen-semantics.c): Use it. (cgen-sem-switch.c): Use it. 2000-11-10 Frank Ch. Eigler * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal request to emit calls to insn extractors as functions rather than branches to inline blocks. (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto. (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto. * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches to extractor clauses. 2000-11-10 Frank Ch. Eigler * decode.scm (-distinguishing-bit-population): Significantly improve popularity heuristic. Renamed from (-mask-bit-population): Gone. (-population-above-threshold): Sort new bit numbers in order of popularity. (-population-top-few): Allow up to three more bits to be selected than requested. Correct selection order to prefer better bits. Correct bug in fewer-than-requested case. Keep threshold as floating-point. (decode-best-get-bits): Pass also the insn-values. * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a future optimization. * utils.scm (message): Format nested lists better. 2000-11-09 Doug Evans * dev.scm: Add srcdir to %load-path. * rtx-funcs.scm (subword): Mode of argument can be different than mode of result, so don't use OP0 to specify argument's mode. 2000-11-02 Ben Elliston * doc/porting.texi (Building a GAS test suite): Document my change to gas-build.sh. 2000-11-01 Ben Elliston * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases. 2000-10-31 Ben Elliston * gas-test.scm (cgen-build.sh): Allow the generated script to run with no command line arguments if the gas build directory can be determined. 2000-10-26 Doug Evans * insn.scm (-parse-insn-format-symbol): Fix spelling error, op-ifld -> op-ifield. 2000-10-23 Frank Ch. Eigler * thumb.scm (cc-tests): Add (ISA thumb) attribute. 2000-10-13 matthew green * utils-cgen.scm (get-ifetch): Move from here ... * sim.scm (get-ifetch): ... to here. * sid.scm (get-ifetch): Copy and port to c++. 2000-10-06 Dave Brolley * utils-gen.scm (-gen-ifld-extract-base): Compute start position as ifld-start + ifld-word-offset. (gen-ifld-extract): Check adata-integral-insn? before checking whether the field is beyond the base number of bits. (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?. (gen-extract-ifields): Ditto. * gas-test.scm (gentest): Generate backslashes before '[' and ']' characters in the regular expression. 2000-10-02 Frank Ch. Eigler * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a preprocessor constant. 2000-09-21 Frank Ch. Eigler * slib/logical.scm: New file from slib. Provides robust bitwise logical operations for large integers. * read.scm: maybe-load it. 2000-09-15 Frank Ch. Eigler * enum.scm (define-full-insn-enum): Filter with keep-isa predicate. * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert single-isa predicate, but support keep-isa filtering. 2000-09-08 Frank Ch. Eigler * rtl-c.scm (s-sequence): Handle nested c-calls in both statement-expression and comma-expression contexts. (s-c-call, s-c-raw-call): Add warning comment about bad assumption. 2000-09-08 Frank Ch. Eigler * decode.scm (-population-top-few): Signal error gracefully if decoding is about to become ambiguous. 2000-09-06 Frank Ch. Eigler * doc/rtl.texi (decode-assist): Describe this field as optional. 2000-09-06 Frank Ch. Eigler * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield with decode proc. 2000-09-05 Dave Brolley * sim.scm (sim-finish!): Honour the definition of FAST_P when calling @cpu@_pbb_begin. Use 0 if FAST_P is not defined. 2000-08-29 Dave Brolley * utils-gen.scm (gen-ifld-extract): Pass total-len if adata-integral-insn is true for this architecture. 2000-08-24 Frank Ch. Eigler * hardware.scm ( get-index-mode): Define method. * operand.scm ( gen-pretty-name): Tolerate no op:sem-name. * rtl-c.scm (-c-rtl-get): Improve an error message. * sim.scm (-op-gen-set-trace): Support lvalues. 2000-08-22 Frank Ch. Eigler * Makefile.in (DIST_COMMON): Regenerated. * ifield.scm ( needed-iflds): New method. * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for sfmts built from s. * operand.scm (-derived-parse-encoding): Give a fixed type symbol 'derived-ifield, not an unparseable string. * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case. (-sfmt-contents): Add tracing. From Doug Evans : * sim.scm ( cxmake-get): Result is a , not a string of C code. 2000-08-20 Doug Evans * rtl-c.scm (rtl-c-expr-with-estate): New fn. (rtl-c-expr-parsed,rtl-c-expr): New fns. (-rtl-c-get): Rename from rtl-c-get. (rtl-c-get): New fn for getter logging. 2000-07-28 Ben Elliston * NEWS: Update. 2000-07-25 Ben Elliston * doc/credits.texi (Credits): Add Frank Eigler. 2000-07-24 Dave Brolley * opc-itab.scm (gen-insn-opcode-table): Initialize the first element fully. * desc.scm (gen-attr-table-defn): Initialize all elements fully. (): Initialize all elements fully. * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element fully. (-gen-mach-table-defns): Ditto. (-gen-ifld-defns): Ditto. (-gen-operand-table): Ditto. (-gen-insn-table): Ditto. (-gen-cpu-open): Nothing to do for the mach table. 2000-07-13 Ben Elliston * doc/version.texi (UPDATED): Update. 2000-07-05 Ben Elliston * configure.in (AC_PATH_PROG): Remove. * configure: Regenerate. * Makefile.am (GUILE): Locate guile dynamically. * Makefile.in: Regenerate. * doc/Makefile.in: Likewise. 2000-07-03 Ben Elliston * desc-cpu.scm (cgen-desc.c): Include "libiberty.h". * opc-itab.scm (cgen-opc.c): Likewise. 2000-06-28 Frank Ch. Eigler * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for guile 1.4 compatibility. (rtx-env-dump): Comment out buggy display calls. 2000-06-15 matthew green * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC. 2000-06-14 Frank Ch. Eigler * Makefile.in: Regenerated. * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields. (gen-ifld-defns): Ditto. * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto. * rtl.c (rtl-finish!): Ditto. * opc-itab.scm (-gen-ifield-decls): Ditto. * opcodes.scm (gen-switch): Exclude derived operands. * operand.scm (op-iflds-used): Expand derived operands. (hw-index-derived): New dummy function to create dummy object. (-derived-operand-parse): Fix mode arg passed to constructor. Set object's hw-name and index fields. (-anyof-merge-subchoices): Set instance object's index also. (-anyof-name): New helper function. (anyof-merge-semantics): Correct replacement of operand names in anyof instance. (op-ifield): Tolerate derived-operands and their funny indices better. * ifield.scm (ifld-known-values): Expand derived ifields. (non-multi-ifields, non-derived-ifields): New utility functions. (ifld-decode-mode): Tolerate objects with unbound decode field. * iformat.scm (compute-insn-length): Expand derived ifields. (compute-insn-base-mask): Ditto. * insn.scm (insn-base-ifields): Remove. (): Add iflds-values entry to cache ifld-base-ifields values. (insn-value): Call ifld-base-ifields and ifld-constant? instead. * mach.scm (arch-analyze-insns!): Exclude multi-insns. * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto. (-frag-test-data): Ditto. * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto. (-gen-sem-switch-engine); Ditto. * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto. * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto. (-gen-record-args): Tolerate unbound op-ifield. * sid.scm ( cxmake-get): New sketch implementation. (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns): Exclude multi-insns. * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto. * utils-sim.scm (op-extract?): Handle derived operands. * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump. * semantics.scm (-build-operand!): Handle 'DFLT case during parsing. * hardware.scm (hardware-for-mode): New function. * insn.scm (filter-harmlessly-ambiguous-insns): New function for cleaning up decode tables. (mask-superset?): Little helper function for above. * decode.scm (-build-decode-table-entry): Call it. (-opcode-slots): Add some more tracing. * arm.cpu: Disable decode-splits construct due to implementation conflict with `filter-harmlessly-ambiguous-insns' * decode.scm (-population-top-few): New function for better decode bit generation. Includes minor helper functions. (decode-get-best-bits): Call it instead. (OLDdecode-get-best-bits): Renamed previous version of above. 2000-06-13 Ben Elliston * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH for the Guile library directory. * configure: Regenerate. * Makefile.in, doc/Makefile.in: Regenerate. * Makefile.in, doc/Makefile.in: Regenerate. * configure.in: Remove unnecessary tests. Move to version 1.0. * acconfig.h, config.in: Remove. * configure, aclocal.m4: Regenerate. * doc/stamp-vti, doc/version.texi: Likewise. * AUTHORS: New file. 2000-06-07 Ben Elliston * fixup.scm (symbol-bound?): Reduce debugging output. 2000-06-02 matthew green * insn.scm (insn-base-ifields): Returns all the instruction fields for a given instruction, replacing derived fields with their subfields. (insn-value): Use `insn-base-ifields' to find all constant values. (multi-insn-instantiate!): Comment some debug messages. 2000-06-01 Ben Elliston * doc/rtl.texi (Expressions): Document a hazard with the choice of symbol names used in a (c-call ..) rtx. * sim-test.scm (build-test-set): Return (()) for an instruction with no operands, so it too is included in the generated test set. 2000-05-31 Ben Elliston * Makefile.am (gas-test): Ensure $(ISA) is not empty. (sim-test): Likewise. * Makefile.in: Regenerate. 2000-05-30 Frank Ch. Eigler * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated stack traceback, in an order that resembles gdb's `bt'. 2000-05-24 Frank Ch. Eigler * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again. * opc-itab.scm (-gen-ifmt-table-1): Ditto. * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out multi insns. * ifield.scm (multi-ifield): Define workable field-mask and field-value virtual functions. (ifld-base-ifields): New routine to replace ifmt-expanded-ifields. * iformat.scm (ifmt-expanded-ifields): Gone. (ifields-base-ifields): New function. Call ifld-base-ifields for real work. (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new ifmt entries. * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated code. 2000-05-23 Frank Ch. Eigler * sid.scm (with-any-profile?): New function clone. 2000-05-19 Frank Ch. Eigler * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim. 2000-05-18 Frank Ch. Eigler * ifield.scm (-multi-ifield-parse): Add encode/decode args. (-multi-ifield-read): Parse them. (define-full-multi-ifield): Pass #f/#f as defaults for them. * opcodes.scm (multi-ifield gen-insert): Add encode hook. (multi-ifield gen-extract): Add decode hook. * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim. * insn.scm (syntax-break-out): More correctly handle \-escaped syntax characters. (syntax-make-elements): Ditto. * opc-itab.scm (compute-syntax): Ditto. 2000-05-17 Ben Elliston * gas-test.scm (cgen-build.sh): Log the correct script filename. 2000-05-15 Frank Ch. Eigler * gas-test.scm (build-test-set): Return (()) for an instruction with no operands, so it too is included in the generated test set. 2000-05-15 Frank Ch. Eigler * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for IFMT_OPERANDS and SYNTAX_BYTES. 2000-05-15 Frank Ch. Eigler * sim.scm (with-any-profile?): New function. * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?' to decide whether or not to include profiling counters. 2000-05-10 Frank Ch. Eigler Fuller derived-operand support for opcodes. * insn.scm (non-multi-insns): New filter to oppose `multi-insns'. * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES. Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS. (gen-operand-table): Omit derived- and anyof- operands from table. (gen-insn-table): Omit multi-insns from table. * iformat.scm (ifmt-expanded-fields): New function to expand subfields of derived-ifields. (ifmt-compute!): Ignore remaining multi-insns. * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore multi-insns. * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields. (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns. * opcodes.scm (derived-operand): Define abort()ing gen-insert, gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions. (gen-switch): Omit anyof-operands. * operand.scm (-anyof-syntax): New function. (-anyof-merge-syntax): Call it. * utils.scm (collect): New idiomatic function. 2000-05-10 Ben Elliston * m68k.cpu: New file (work in progress). 2000-05-05 Frank Ch. Eigler * Makefile.am (all-local): New target. Create stamp-cgen. * Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. 2000-04-26 Frank Ch. Eigler * operand.scm (-operand-g/setter-syntax): Correct off-by-one error. (-operand-parse-setter): Ditto. * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even for CACHE-ADDR operands. * sid-decode.scm (-gen-record-args): Remove newly duplicated extract trace entries. Widen byte-wide values for printing. * sid.scm (-op-gen-set-trace): Enhance result trace with op indices. Widen byte-wide values for printing. Hexify memory addresses. 2000-04-23 matthew green * m32r.cpu: Fix a typo. Fri Apr 21 22:18:48 2000 Jim Wilson * ia64.cpu (define-model): Change merced to Itanium. (f-qp): Change quilifying to qualifying. (movbr_ph, movbr_pvec): Delete. (I-I21): Delete uses of movbr_ph and movbr_pvec. 2000-04-07 Ben Elliston * doc/porting.texi (Building a simulator test suite): Clarify where generated test cases are placed. 2000-04-07 Ben Elliston * Makefile.am (gas-test): Remove dependency on `cgen'. (sim-test): Ditto. * Makefile.in: Regenerate. 2000-04-04 Frank Ch. Eigler * hardware.scm ( parse): Allow user to set type for pc register. * mode.scm (mode-finish!): Add placeholder code for mach-dependent type reconfiguration. * utils-sim.scm (-sfmt-contents): Add profile-counters only if with-profile?. 2000-03-30 Ben Elliston * doc/rtl.texi (Enumerated constants): Add concept index entries. 2000-03-24 Ben Elliston * Makefile.am (stamp-cgen): Reinstate target. * Makefile.in: Regenerate. 2000-03-22 Ben Elliston * slib/ppfile.scm: Remove; unused. * slib/defmacex.scm: Likewise. 2000-03-21 Ben Elliston * doc/internals.texi (Source file overview): Document. * Makefile.am (GUILEDIR): Remove. (CGEN): Ditto. Callers use $(GUILE) instead. (GUILEFLAGS): Ditto. (CGENFILES): Ditto. (APPDESCFILES): Ditto. (OPCODESFILES): Ditto. (SIMFILES): Ditto. (pkgdata_SCRIPTS): Ditto. (stamp-cgen): Remove target. * Makefile.in: Regenerate. * configure.in: Remove header and library tests. * configure: Regenerate. * config.in: Likewise. 2000-03-20 Ben Elliston * read.scm: Cease loading "hob-sup.scm". * utils.scm: Inherit the fastcall family of procedures (for now). * hob-sup.scm: Remove. 2000-03-20 Ben Elliston * configure.in (AC_OUTPUT): Do not emit .gdbinit. * configure: Regenerate. * gdbinit.in: Remove. 2000-03-17 Ben Elliston * Makefile.am (CGEN): Use guile, not cgen. (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove. (bin_PROGRAMS, cgen_SOURCES): Likewise. (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES. (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove. (HOB_OBJS): Likewise. (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise. (CGENOBJS): Likewise. (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise. (hobbit, hobbit.o, hobbit.c): Remove targets. (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise. (CLEANFILES): Update. * acconfig.h (WITH_HOBBIT): Remove. * configure.in: Do not test for 3 arg scm_make_vector. Remove option --with-cgen-hobbit. * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove. * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise. * hobbit.c, hobbit.h, hobbit.scm: Likewise. * hobscmif.h, hobslib.scm, scmhob.h: Likewise. * Makefile.in: Regenerate. * config.in: Likewise. * aclocal.m4: Likewise. * configure: Likewise. * README (Hobbit support): Remove. * doc/internals.texi (Conventions): Do not mention Hobbit. * doc/porting.texi (Supported Guile versions): Likewise. 2000-03-16 Frank Ch. Eigler * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling & callback convention to new sid sidutil::basic_cpu code. (-gen-sfrag-engine-fn): Ditto. * sid.scm (-create-virtual-insns!): Ditto. (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb mode. (cxmake-skip): Implement properly for pbb mode. 2000-03-03 Ben Elliston * doc/internals.texi: New file. 2000-02-29 Ben Elliston * doc/rtl.texi (Derived operands): Remove unnecessary footnote. * doc/porting.texi: Formatting tweaks. 2000-02-25 Nick Clifton * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p field. Thu Feb 24 14:09:01 2000 Doug Evans * operand.scm (,make!): Initialize mode-name, not mode. 2000-02-23 Andrew Haley * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden) instruction. 2000-02-24 Ben Elliston * doc/rtl.texi (Derived operands): Add some cindex entries. 2000-02-23 Ben Elliston * ia32.cpu (dndo): Move general purpose macro from here .. * simplify.inc (dndo): .. to here. 2000-02-18 Frank Ch. Eigler * arm.cpu (h-tbit): Add c-call setter function. (h-mbits): Ditto. 2000-02-17 Frank Ch. Eigler * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal. (-frag-cost-compute!): Ditto. * utils.scm (copyright-cygnus): Add Y2K. * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument. 2000-01-25 Nick Clifton * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise flags field of the CGEN_CPU_TABLE structure. Sun Dec 12 14:20:36 1999 Doug Evans * operand.scm (): Renamed from . All references updated. Tue Nov 30 11:06:22 1999 Doug Evans * ia32.cpu: Rewrite addressing mode support. * ifield.scm (): New member `follows'. (ifld-known-values): New proc. (): New method set-word-offset!. (ifld-set-word-offset!): New proc. (ifld-new-word-offset): New proc. (): New method next-word. (): New method next-word. (ifld-next-word): New proc. (ifld-precedes?): New proc. (-ifield-parse): New args word-offset,word-length,follows. All callers updated. Handle CISC-style vs RISC-style ifields. (-ifield-read): Recognize word-offset,word-length,follows specs. (-ifld-parse-follows): New proc. (-multi-ifield-make-default-insert): New proc. (-multi-ifield-make-default-extract): New proc. (-multi-ifield-parse): Provide default values for insert,extract handlers if not specified. (): New class. (derived-ifield?): New predicate. (ifld-derived-operand?): New predicate. (f-anyof): New global. (ifld-anyof?,ifld-anyof-operand?): New predicates. (f-derived,ifld-derived?): Delete. (ifield-builtin!): Delete init of f-derived. Init f-anyof. * insn.scm (-sub-insn-ifields): New proc. (-sub-insn-make!): New proc. (multi-insn-instantiate!): Provide initial implementation. (-insn-parse): If insn contains "anyof" operands, create a object instead of a plain . (-parse-insn-format-symbol): Rewrite derived operand handling. Add anyof operand handling. (-parse-insn-format-ifield-spec): Rewrite. (-parse-insn-format-operand-spec): Delete. (-parse-insn-format-list): Delete support for `(operand value)'. (anyof-operand-format?): Replaces derived-operand-format?. * operand.scm (-operand-parse-getter): Improve error messages. (-operand-parse-setter): Ditto. (): New members args,syntax,base-ifield,encoding, ifield-assertion. (): Change baseclass from to . Delete member values. New members base-ifield,choices. (anyof-operand?): New predicate. (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs. (-derived-operand-parse): Rewrite. (-derived-operand-read): Rewrite. (-anyof-parse-choice): New proc. (-anyof-operand-parse): Rewrite. (-anyof-operand-read,define-anyof-operand): New procs. (): Rewrite. (-anyof-initial-known): New proc. (anyof-satisfies-assertions?): New proc. (-anyof-merge-syntax,-anyof-merge-encoding): New procs. (-anyof-merge-getter,-anyof-merge-setter): New procs. (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs. (-anyof-merge-subchoices,-anyof-all-subchoices): New procs. (-anyof-value-from-derived): New proc. (-anyof-all-choices-1,anyof-all-choices): New procs. (operand-init!): Create define-anyof-operand reader command. * insn (syntax-break-out): Take syntax as argument instead of insn. All callers updated. (syntax-make): Move here, from ???. * types.scm (): Rename accessors from bitrange:foo to bitrange-foo. All uses updated. (bitrange-next-word): New proc. * semantics.scm (-solve-expr-fn,rtx-solve): New procs. * rtl.scm (rtx-canonicalize): Provide initial implementation. (rtx-make-const,rtx-make-enum): New procs. (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated. (rtx-mem-addr,rtx-mem-sel): New procs. (rtx-change-address): New proc. (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc. (rtx-make-set,rtx-single-set?): New procs. (rtx-combine): New proc. * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated. (rtx-traverse-with-locals): Ditto. (-rtx-traverse,-rtx-traverse-*): Ditto. * rtl.scm (define-subr): New proc. (rtl-init!): Create reader command `define-subr'. * cos.c (_object_mi_p): Ensure argument is an object. (indent): New function. (_object_print_elms): Add pretty-printing support. (_object_print): Ditto. * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7. (*floats-s->c-fun-table*): Ditto. * hobbit.c,hobbit.h: Rebuild. * hob-sup.c (fastcall7): New proc. * hob-sup.h (fastcall7): Declare. * hob-sup.scm (fastcall7): New macro. * mach.scm (): New member subr-list. (current-subr-list,current-subr-add!,current-subr-lookup): New procs. (arch-finish!): Reverse recorded subr list. * read.scm (debug-env): New global. (debug-var-names,debug-var,debug-repl-env): New procs. (debug-repl): Rewrite. New arg `env-list'. All callers updated. (debug-quit): Renamed from `continue'. * simplify.inc (dsmf): New pmacro. * utils.scm (plus-scan): New proc. (split-bits): Rewrite. (split-value): New proc. 1999-10-13 Doug Evans * doc/Makefile.am (DOCFILES): Add notes.texi. * doc/Makefile.in: Rebuild. 1999-10-11 Doug Evans * ifield.scm (ifld-derived?): New proc. (f-derived): New global. (ifield-builtin!): Create ifield f-derived. (): New class. (multi-insn?): New predicate. (multi-insn-instantiate!): New proc. (-insn-parse): Create objects for insns with derived ifields. (-parse-insn-format-symbol): Handle derived ifields. (-parse-insn-format-ifield-spec): New proc. (-parse-insn-format-operand-spec): New proc. (-parse-insn-format-list): Simplify. (-parse-insn-format): No longer allow (ifield-object value) spec. (derived-operand-format?): New proc. (insn-alias?): New proc. (non-alias-insns): Rewrite. (insn-real?): Renamed from real-insn?, all callers updated. (virutal-insns): Rewrite. (multi-insns): New proc. * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present. * operand.scm (op-ifield): Renamed from op:ifield, all callers updated. Return #f if operand doesn't have an index or if index is not an ifield. (hw-index-anyof): New proc. (-operand-parse): Allow integer indices. (): New class. (derived-operand?): New predicate. (): New class. (): New class. (-anyof-parse-value,-anyof-operand-parse): New procs. (-derived-operand-parse,-derived-operand-read): New procs. (define-derived-operand,define-full-derived-operand): New procs. (operand-init!): New reader command define-derived-operand. * utils.scm (list-take): Handle negative amount. (element?): Rewrite. 1999-10-10 Doug Evans * dev.scm: quick-utils.scm renamed to ~/.cgenrc. 1999-10-04 Richard Henderson * ia64.cpu: Checkpoint. 1999-09-29 Doug Evans * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid. * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on default-insn-bitsize. Pass vpc to sim_engine_invalid_insn. Wed Sep 29 14:39:39 1999 Dave Brolley * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use PC returned by sim_engine_invalid_insn. 1999-09-28 Doug Evans * ia32.cpu: New file. 1999-09-25 Doug Evans * utils.scm (bit-set?): Fix off by one error. * rtl-c.scm (s-sequence): Fix non-void-mode result output. * rtl.scm (hw): Check for valid hardware element before trying to get its mode. * arm.cpu (arm7f cpu): Renamed from arm. All users updated. * arm7.cpu (bx): Fix name of target address operand in assembler spec. (*): arm_compute_operand2_foo renamed to compute_operand2_foo. * thumb.cpu (*): arm_compute_operand2_foo renamed to compute_operand2_foo. * cgen-sid.scm (sim_arguments): Add support for building defs.h. * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier. Call delayed_branch/branch methods instead of assigning to `vpc'. (,cxmake-skip): Call skip method. (-gen-hw-selector): Call rtl-c++ instead of rtl-c. (,cxmake-skip): Ditto. (-create-virtual-insns!): Ditto. (op:read): Call estate-make-for-normal-c++ instead of estate-...-c. (op:write): Ditto. (op:record-profile): Specify #:output-language "c++". * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to @arch@_insn_attr. (cgen-desc.h): Use @arch@ namespace instead of @cpu@. Define enums here. (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c. (gen-semantic-code): Ditto. (-gen-sem-case,-gen-sfrag-code): Ditto. (-gen-hardware-types): Delete class @cpu@_cpu_base. (cgen-cpu.h): File is now #included by main cpu class, rather than subclassing. (cgen-defs.h): New proc. (-gen-scache-semantic-fn): Change result type to sem_status. New local `status'. Call done_cti_insn/done_insn method at end. (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h, cgen-ops.h. (cgen-sem-switch.cxx): Ditto. * sid-decode.scm (-gen-idesc-decls): Update return type of @prefix@_sem_fn. (cgen-decode.h): Add using namespace @arch@. (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h. * rtl-c.scm (): New member output-language. (estate-output-language-c?,estate-output-language-c++?): New procs. (,vmake!): Handle #:output-language. (estate-make-for-normal-rtl-c++): New proc. (rtl-c++-parsed,rtl-c++): New proc. (s-c-call): Invoke cpu class method if c++. (join): Use s-c-raw-call. * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD. (nop): Rewrite. * rtl-c.scm (delay): Mark the sequence as #:delay'd. * rtl.scm (): New member `modifiers'. (,vmake!): Handle #:modifiers. (estate-with-modifiers): New proc. * rtl.scm (rtx-side-effects?): New proc. (rtx-canonical-bool): Don't change expr if it has side effects. * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects better. 1999-09-23 Doug Evans * sim.scm (gen-scache-type): Fix typo in last patch. Tue Sep 21 17:12:55 1999 Dave Brolley * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support. 1999-09-05 Doug Evans * sid.scm (,cxmake-skip): New method. (,cxmake-skip): New method. * decode.scm (decode-build-table): Delete args startbit,index-list. All callers updated. * utils-sim.scm (gen-decoder): Delete args startbit,index-list. All callers updated. * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit to decode-get-best-bits. * sid-decode.scm (-gen-decode-fn): Ditto. * hardware.scm (hw-bits): New proc. (-hw-parse): New arg layout. All callers updated. (define-full-hardware): New arg layout. All callers updated. (-hw-validate-layout): New proc. (-hw-create-[gs]etter-from-layout): New procs. (,parse!): Handle layout spec. * types.scm (type-bits): New proc. * sem-frags.scm (-frag-cost-compute!): Fix calculation of UNARY, BINARY, TRINARY rtxs. * attr.scm (,parse-value): Allow strings. * enum.scm (parse-enum-vals): Use reverse! instead of reverse. Support '- as "unused spot" indicator. 1999-09-03 Doug Evans * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo. 1999-09-02 Doug Evans * rtx-funcs.scm (subword): Fix mode spec of `value'. * rtl.scm (-rtx-traverse-operands): Fix debugging message construction. (tstate-make): New arg `depth'. All callers updated. (tstate-depth,tstate-set-depth!): New procs. (tstate-incr-depth!,tstate-decr-depth!): New procs. (-rtx-traverse-operands): Indent debugging output by traversal depth. (-rtx-traverse): Ditto. Keep track of traversal depth. 1999-09-01 Doug Evans * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm. * sid-decode.scm (-gen-decoder+supporting cast): Ditto. * utils-sim.scm: Decoder generator support moved here. (-decode-equiv-entries?,-decode-sort-entries): New procs. (-gen-decoder-switch): Sort entries for more fall-throughs. * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen. * Makefile.in: Rebuild. * sim-test.scm (build-sim-testcase): Add logging message. * dev.scm (cload): Recognize SIM-TEST application. (load-stest): Set APPLICATION to SIM-TEST. * desc-cpu.scm (-gen-hash-defines): Add \n to output. * ifield.scm (-ifield-parse): Allow bit numbers up to 127. * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128. * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits. * insn.scm (syntax-break-out): Handle ${foo}. Sun Aug 29 11:11:15 1999 Doug Evans * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete. (bin_PROGRAMS): Define. (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/. (cgen-hob.c): Prepend $(srcdir)/ here. (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define. (libcpu_a_SOURCES): Delete. (cgen_DEPENDENCIES,cgen_LDADD): Rewrite. (CGEN_HOB_OBJ,CGENOBJS): New variables. * configure.in (LIBS): Replace -Wl,-rpath with -R. Add AC_CHECK_LIB(guile,main). * Makefile.in: Rebuild. * doc/Makefile.in: Rebuild. * aclocal.m4: Rebuild. * config.in: Rebuild. * configure: Rebuild. 1999-08-28 Doug Evans Rename rtx functions from name: to name, accept optional leading modifier and mode. VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode. * attr.scm (-attr-eval): Update. * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name. (,mode-ok?): Disallow VOID. (,mode-ok?): Disallow VOID. (,mode-ok?): Disallow VOID. * mode.scm (mode-name?): New proc. (VOID): Renamed from VM. (DFLT): Renamed from DM. (mode-builtin!): Update. * opcodes.scm (,gen-insert): Update. (,gen-extract): Update. (,gen-insert,gen-extract): Update. * operand.scm (op:mode): Update. (,make!): Update. (op:new-mode): Update. (-operand-read): Update. * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE, NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE. (def-rtx-dual-mode,define-rtx-dual-mode): Delete. (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated. (rtx-make): Call -rtx-munge-mode&options. (rtx accessors): Rewrite. (rtx-pretty-name): Update. (-rtx-traverse-*): Update. (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs. (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs. (-rtx-make-traverse-table): Update. (-rtx-traverse-operands): Update. (-rtx-option?,-rtx-option-list?): New procs. (-rtx-munge-mode&options): New proc. (-rtx-traverse-expr): Call -rtx-munge-mode&options. (-rtx-traverse): Update. (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update. (rtx-compile-time-constant?): Update. (rtx-true?,rtx-false?,rtx-true,rtx-false): Update. (rtx-value): Update. (hw,reg,mem): Renamed from foo:. Update. All callers updated. * rtx-funcs.scm (*): Update. * rtl-c.scm (rtl-c-get): Update. (rtl-c-set-quiet,rtl-c-set-trace): Update. (s-c-call,s-c-raw-call): Update. (s-boolifop,s-convop,s-if,s-cond): Update. (s-case-vm,-gen-non-vm-case-test,s-case): Update. (-par-replace-set-dests,-par-replace-set-srcs): Update. (s-parallel,s-sequence): Update. (rtl-c-build-table): Update. * sem-frags.scm (-frag-hash-compute!): Update. (-frag-cost-compute!): Improperly handle unary,binary,trinary ops for temporary bug compatibility with previous version. (-frag-expr-locals,-frag-expr-stmts): Update. (-frag-compute-desired-frags,-frag-pick-best): Update. * semantics.scm (-simplify-expr-fn): Update. (rtx-simplify): Update. (-rtx-ref-type): Update. Account for modifiers. (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update. (-build-ifield-operand!): Update. (-build-known-values): Update. (semantic-compile): Update. (-gen-reg-access-defns): Update. (gen-semantic-code,-gen-sem-case): Update. (-gen-sfrag-code,-gen-sfrag-case): Update. * sim-cpu (gen-semantic-code): Update. * sim.scm (,gen-write,cxmake-skip): Update. (,gen-write,gen-set-macro,cxmake-get-raw): Update. (-hw-cxmake-get): Update. (,cxmake-get,gen-set-quiet,gen-write): Update. (,cxmake-get): Update. (,gen-type,gen-read,cxmake-get): Update. (,gen-set-quiet,gen-set-trace): Update. (,cxmake-get): Update. (sim-finish!): Update. * utils-gen.scm (-gen-ifld-extract-base): Update. (-gen-ifld-extract-beyond): Update. (gen-multi-ifld-extract): Update. * sid-decode.scm (-decode-expr-ifield-values-used): Update. * sid.scm (,gen-write): Update. (-gen-decode-insn-globals): Update. (-hw-cxmake-get): Update. (,cxmake-get-raw): Update. (,cxmake-get,gen-set-quiet,gen-write): Update. (,cxmake-get): Update. (,gen-type,gen-read,cxmake-get): Update. (,gen-set-quiet,gen-set-trace): Update. (,cxmake-get): Update. (-create-virtual-insns!): Update. (-decode-split-build-assertion): Update. * *.cpu: Update. * simplify.inc: Update. 1999-08-20 Doug Evans * sim.scm (-op-gen-queued-write): Fix memory address calculation. Prefix queue function name with sim_ instead of @cpu@_. * sim.scm (-with-parallel-only?): New global. (option-init!): Initialize it. (option-set!): Set it. (with-parallel-only?): New proc. * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel and writeback markers if with-parallel-only. (-gen-idesc-init-fn): Update. * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if with-generic-write. Wed Aug 18 15:04:30 1999 Doug Evans * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns with the invalid insn handler. * utils.scm (list-maybe-ref): New proc. * mach.scm (-isa-parse): Signal error if isa wasn't specified in define-arch. (-mach-parse): Signal error if mach wasn't specified in define-arch. * i960.cpu (test*-*): Delete `expr' arg. (test-op,branch-op): Update. 1999-08-09 Doug Evans * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs. (gen-reg-access-decl): Replace `name' arg with `hw'. All callers updated. (gen-reg-access-defn): Ditto. (-gen-hw-addr): Rewrite. (-op-gen-queued-write): Rewrite. * sim-cpu.scm (-gen-cpu-reg-access-decls): (-gen-scache-semantic-fn): Handle with-generic-write. (-gen-no-scache-semantic-fn): Ditto. 1999-08-08 Doug Evans * utils-gen.scm (gen-define-ifmt-ifields): Tweak output. * sim.scm (-with-generic-write?): New global. (option-init!): Initialize it. (option-set!): Set it. (with-generic-write?): New proc. (-gen-hw-addr): New proc. (-op-gen-queued-write): New proc. (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?. * sim-cpu.scm (-gen-hardware-types): Output code with parallel support turned off. (-gen-sem-switch): Preserve existing with-parallel? value. (-gen-sem-parallel-switch): Ditto. (-gen-write-case): Add /indent support. (cgen-write.c): Rewrite. * utils.scm (-current-print-state): New global. (make-print-state): New proc. (pstate-indent,pstate-set-indent!): New procs. (pstate-cmd?,pstate-cmd-do): New procs. (/indent): New global. (/indent-set,/indent-add): New procs. (string-write): Set -current-print-state. (-string-write): New arg pstate, all callers updated. Handle print-state commands. (-string-list-flatten): New proc. (string-list->string): Use it. * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm. (-gen-sem-fn-table-entry): New proc. (-gen-semantic-fn-table): New proc. (-gen-scache-semantic-fn): Make fn static. (-gen-no-scache-semantic-fn): Ditto. (cgen-semantics.c): Define macro SEM_FN_NAME. * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX, FAST,FULL. Update @cpu@_insn_sem contents. (-gen-semf-fn-name): Delete. (-gen-sem-fn-decls): Delete. (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table, @cpu@_semf_init_idesc_table. (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic handlers here. (cgen-decode.h): Print sfmt enum. * sid-decode.scm (-gen-semf-fn-name): Delete. * utils-gen.scm (gen-sfmt-enum-decl): New proc. * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo. (ifmt-compute!): Ditto. * sim-decode.scm (-gen-decoder-switch): Ditto. * sid-decode.scm (-gen-decode-expr-entry): Ditto. (-gen-decoder-switch): Ditto. * insn.scm (insn-virtual?): New proc. * enum.scm (gen-enum-decl): Speed up, build string as list and then convert to string. * mach.scm (): attr-list is now a pair of lists. (current-attr-list): Rewrite. (current-attr-add!,current-attr-lookup): Rewrite. * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!. 1999-08-06 Richard Henderson * ia64.cpu: Initial checkpoint. 1999-08-06 Doug Evans * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg. (pmacros-init!): Update .apply help string. 1999-08-03 Doug Evans * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE. (,cxmake-skip): New method. (,cxmake-skip): New method. (-gen-argbuf-fields-union): Add branch_target to `chain' member. (gen-argbuf-type): New member `skip_count'. (sim-finish!): Update calls to @cpu@_pbb_cti_chain. * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns. * utils-sim.scm: New file. * dev.scm (load-sim): Load it. (load-sid): Load it. * cgen-sid.scm: Load it. * cgen-sim.scm: Load it. * iformat.scm (): New member sbuf, not initialized by default make. * rtx-funcs.scm (skip): Rewrite. * rtl-c.scm (skip): Rewrite. * m32r.cpu (sc,snc): Update `skip' usage. * mode.scm (mode-real-mode): New proc. * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt. Distinguish fragments by the they use. * sim.scm (gen-profile-index-type): Delete. (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm. (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead. (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm. (operand argbuf support): Move to utils-sim.scm and sim-decode.scm. (-gen-argbuf-elm): Rewrite. (-gen-argbuf-hw-elm): Delete. (-gen-argbuf-fields-union): Generate structs for each sbuf instead of each sfmt. (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals. (sim-init!): Initialize them. (sim-analyze-insns!): Set them. (current-sbuf-list): New proc. * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns. * sim-model.scm (-gen-model-insn-fn): Ditto. * sim-decode.scm (-gen-extract-decls): Delete. (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs. (,gen-extract,gen-trace-extract): Move here from sim.scm. (,gen-extract,gen-trace-extract): Move here from sid.scm. ( * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count' up to avoid g++ 'goto crosses initialization' warning. (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG. (-gen-sfrag-case): Update use of NEXT_FRAG. 1999-07-22 Doug Evans * cos.c (cos_init): Protect _make_x_symbol from garbage collection. * read.scm: Load sem-frags.scm. * sem-frags.scm (*): Lots rewritten. * sid.scm (-with-sem-frags?): New global (with-sem-frags?): New proc. (option-init!): Initialize -with-sem-frags?. (option-set!): Recognize with-sem-frags. (sim-init!): Call sim-sfrag-init! if with-sem-frags. * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version if asked to. (-gen-sfrag-engine-decls): New proc. (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs. (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs. (-gen-sfrag-engine): New proc. (-gen-sem-case): Emit setup-semantics if specified. (-gen-sem-switch-engine): Update init/use of computed goto label. * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values from local vars. (-gen-idesc-decls): Replace sem_address with cgoto. (-gen-scache-decls): Rewrite definition of `execute' member. * arm.cpu (arm isa): Enable decode-splits. * arm7.cpu (multiply insns): Rename result to mul-result. Rename decode-specialize to decode-split. * decode.scm (*): Update. * insn.scm (*): Update. * mach.scm (*): Update. * sid.scm (*): Update. 1999-07-19 Doug Evans Record objects as a smob. * cos.c (scm_tc16_object): New static global. (cos_init): Initialize it. (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros. (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update. (_object_tag): Delete. (_object_make_smob): New function. (_object_make_x,_object_make_with_values_x): Rewrite. (_object_elements,_object_class_desc): Rewrite. (_object_copy,object_p): Rewrite. (_object_specialize): Rewrite. (_object_print_elms,_object_print): New functions. (object_smob): New static global. (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number. * cos.c (_make_x_symbol): New static global. (object_make): Use it. (cos_init): Initialize it. 1999-07-15 Doug Evans * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var? instead to determine whether to use FLD macro. (): New member ifield-var?. (,vmake!): Recognize #:ifield-var?. * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f. (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto. * rtl.scm (rtx-sequence-assq-locals): New proc. * cos.scm (-object-error): Don't crash on non-objects. * Makefile.am (CLEANFILES): Add hobbit. * Makefile.in: Rebuild. * rtl-c.scm (s-c-call): Delete unnecessary code. 1999-07-14 Doug Evans * rtl-c.scm (ifield): Always reference value via `FLD'. * cos.c (elm_bound_p): Return problem SCM boolean values. * utils-cgen.scm (display-argv): New proc. * cgen-opc.scm (cgen): Call it. * cgen-sim.scm (cgen): Ditto. * cgen-gas.scm (cgen): Ditto. * cgen-stest.scm (cgen): Ditto. * cgen-sid.scm (cgen): Ditto. 1999-07-05 Doug Evans * opc-asmdis.scm (-gen-parse-switch): New local var `junk'. * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL. (-gen-extract-switch): Initialize result to 1. * opcodes.scm (gen-ifield-default-type): New proc. (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers updated. (,gen-insert): Handle non-ifield indices. (,gen-extract): Ditto. (,gen-parse): Ditto. (,gen-print): Ditto. (,gen-parse): Ditto. (,gen-print): Ditto. (,gen-fget): Ditto. (,gen-fset): Ditto. * sim.scm (-gen-hw-index-raw): Handle scalar indices. (-gen-hw-index): Ditto. * sid.scm (-gen-hw-index-raw): Handle scalar indices. (-gen-hw-index): Ditto. * sem-frags.scm: New file. * attr.scm (attr-parse): Add better checking of input. * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get. All uses updated. (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated. * ifield.scm (ifld-nil?): New proc. * operand.scm (): New members getter,setter. (,make!): New args getter,setter. All uses updated. (op:getter,op:setter): New procs. (,field-start): Return 0 for non-ifield indices. (,field-length): Return 0 for non-ifield indices. (-operand-parse-getter,-operand-parse-setter): New procs. (-operand-parse): New args getter,setter. All callers updated. Always use hw-index-scalar for scalar operands. (-operand-read): Handle getter,setter. (define-full-operand): New args getter,setter. All uses updated. * semantics.scm (-build-ifield-operand!): Update. (-build-index-of-operand!): Update. * sim.scm (,cxmake-get): If operand has getter, use it. * simplify.inc (define-normal-operand): Update. * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns. * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector. (s-binop,s-cmpop,s-convop): Ditto. (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns. * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2. (fcc-tests): New insn-enum. (fcc-value): Rename from fcc-type. * sparcfpu.cpu: New file. All fp support moved here. * rtl.scm (): New member class. (rtx-class-*?): New procs. (def-rtx-node): New arg class. All callers updated. (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto. * rtx-funcs.scm (*): Specify class. * utils-cgen.scm (context-make-reader): New proc. * utils.scm (assert-fail-msg): New variable. (assert): Use it. (list-drop,list-tail-drop): New procs. 1999-06-22 Doug Evans * desc-cpu.scm (-gen-hash-defines): Restore generation of CGEN_MIN_INSN_SIZE deleted on March 22. * ifield.scm (,needed-iflds): New method. (,needed-iflds): New method. (ifld-needed-iflds): New proc. (multi-ifield?): New proc. * iformat.scm (): Delete member ifmt. New members length,iflds. (-sfmt-search-key): Include insn length in key. (-sfmt-order-iflds,-sfmt-used-iflds): New procs. (): Delete members ifmt-key,sfmt-key. New member used-iflds. (-ifmt-lookup-ifmt!): Compute key here. (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt. All callers updated. (ifmt-build): Delete arg desc. New args search-key,iflds. All callers updated. (sfmt-build): Delete args desc,ifmt. New args search-key,cti?, in-ops,out-ops,sorted-used-iflds. All callers updated. * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call to ifmt-build. * operand.scm (op-iflds-used): New proc. * utils-gen.scm (gen-ifld-type): Move here from sim.scm and sim-cpu.scm. And from sid.scm,sid-cpu.scm as well. (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto. (-gen-extract-word,-gen-ifld-extract-beyond): Ditto. (gen-ifld-extract,gen-multi-ifld-extract): Ditto. (gen-extracted-ifld-value): Ditto. (-extract-chunk-specs): Ditto. (gen-define-ifields,gen-define-ifmt-ifields): Ditto. (-extract-chunk,-gen-extract-beyond-var-list): Ditto. (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto. (-extract-insert-subfields): New function. * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract. (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar. * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to gen-define-ifields with gen-define-ifmt-ifields. Ditto for gen-extract-foo. (-gen-no-scache-semantic-fn): Ditto. (-gen-sem-case): Ditto. (-gen-read-case): Update calls to gen-define-ifields, gen-extract-ifields. * sim-decode.scm (-gen-record-args): Update. (-gen-sfmt-argvars-assigns): Update. (-gen-extract-case): Update. * sim-model.scm (-gen-model-insn-fn): Replace calls to gen-define-ifields with gen-define-ifmt-ifields. Ditto for gen-extract-foo. * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type. (gen-record-argbuf-ifld): Rename from gen-ifld-extract. (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar. * sid-decode.scm (-gen-decode-expr-entry): Update calls to gen-define-ifields, gen-extract-ifields. (-gen-record-args): Update. (gen-sfmt-argvars-assigns): Update. (-gen-extract-case): Replace calls to gen-define-ifmt-ifields with gen-define-ifields. Ditto for gen-extract-foo. (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract procs rather than method calls. 1999-06-18 Doug Evans * sid.scm (-create-virtual-insns!): New local `context', pass it to insn-read. * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form, (operand name) not (operand object), (local name) not (local object). (rtx-traverse-with-locals): New proc. (-compile-expr-fn): New proc. (rtx-compile): Rewrite. * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg. (rtl-c-set-quiet): Don't accept operand/local names for dest arg. (rtl-c-set-trace): Ditto. (operand define-fn): Recognize operand name argument. (local define-fn): Recognize sequence temp name argument. * rtx-funcs.scm (operand): Argument is operand name, not object, so call current-op-lookup. (local): Similarily, so call rtx-temp-lookup. * rtl.scm (rtx-field?): Use rtx-name instead of car. (rtx-operand?): Ditto. (rtx-pretty-name): Ditto. (rtx-local-obj): Flag symbol argument as an error. (rtx-local-name): New proc. (rtx-sequence-locals,rtx-sequence-exprs): New procs. * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types. * read.scm (debug-repl): Renamed from -debug-repl. All callers updated. * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than (and: QI rd #xff). * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6. (*floats-s->c-fun-table*): Ditto. * hobbit.c,hobbit.h: Rebuild. * rtl.scm (-rtx-traverse-expr): Use fastcall6. * semantics.scm (rtx-simplify): Use /fastcall-make. * iformat.scm (-sfmt-search-key): Don't include memory modes. * insn.scm (): Delete members condition, compiled-condition. (,make!): Update ( getters,setters): Update. (-insn-parse,insn-read,define-full-insn): Update. * minsn.scm (minsn-make-alias): Update. * iformat.scm (ifmt-analyze): Delete insn-condition reference. (ifmt-compute!): Ditto. * sim.scm (sim-finish!): Update. * simplify.inc: (define-normal-insn): Update. * sid-cpu.scm (gen-semantic-code): Update. * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!. (-ifmt-lookup-sfmt!): Use insn-set-sfmt!. (ifmt-compute!): Ditto. 1999-06-16 Doug Evans * minsn.scm (minsn-compute-iflds): Print better error message for missing ifields. 1999-06-12 Doug Evans * rtl.scm (tstate->estate): Don't copy over expr-fn. * Makefile.am (HOBFLAGS): New variable. (cgen-hob.c): Use it. (hobbit.c): Use it. (libcpu_a_SOURCES): Add hob-sup.c. (hob-sup.o): New rule. * Makefile.in: Rebuild. * cgen.c: #include hob-sup.h. (cgen_init_c): Call hobbit_init_support. * hobbit.scm (*fastcall-make*,*c-symbol*): New variables. (*special-scm->c-functions*): Add them. (display-c-expression): Handle *c-symbol*. (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5. (*floats-s->c-fun-table*): Ditto. (normalize): Recognize /fastcall-make. (normalize-fastcall-make): New proc. * hobbit.c,hobbit.h: Rebuild. * hob-sup.scm: New file. * hob-sup.c: New file. * hob-sup.h: New file. * read.scm: Load hob-sup.scm. * rtl.scm (-rtx-name-list): New variable. (rtx-name-list): New proc. (rtx-lookup): Try symbol first. (def-rtx-node): Add name to -rtx-name-list. (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto. (-rtx-traverse-anymode): New proc. (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs. (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs. (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs. (-rtx-traverse-{symornum,object}): New procs. (-rtx-make-traverse-table): Rewrite. (-rtx-traverse-operands): Rewrite arg-types handling. Handle #f result of traverser. (-rtx-traverse): Renamed from -rtx-traverse-normal. Move debug handling here. (-rtx-traverse-debug): Delete. (rtl-finish!): Change -rtx-traverse-table into list of handlers for each rtx. * semantics.scm (semantic-compile:process-expr!): Fix call to -rtx-traverse. * utils.scm (map1-improper): New proc. 1999-06-08 Doug Evans * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET. (h-mbits): Ditto. * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/. (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/. (,cxmake-get): Tweak. (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET. 1999-06-07 Doug Evans * thumb.cpu (dnti): Delete timing spec. (all insn): Update. * arm.cpu (arm isa): New fields condition, setup-semantics. (thumb isa): New field setup-semantics. (h-gr): Add attribute CACHE-ADDR. * arm7.cpu (dnai): Delete condition. (eval-cond): Delete. * mach.scm (): New member setup-semantics. (-isa-parse-setup-semantics): New proc. (-isa-parse): New arg setup-semantics. (-isa-read): Recognize setup-semantics. * sid-cpu.scm (gen-extract-fields): Split into two: gen-extract-ifields, gen-extract-ifmt-ifields. (-gen-scache-semantic-fn): Delete `taken_p'. Delete tracing begin/end messages (done by caller now). (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete tracing begin/end messages (done by x-before,x-after virtual insns). (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at end so don't have to look it up again next time. * sid-decode.scm (-decode-expr-ifield-values): New proc. (-decode-expr-ifield-tracking-key): New proc. (-decode-expr-ifield-tracking): New proc. (-decode-expr-ifield-values-used): New proc. (-decode-expr-ifield-mark-used!): New proc. (-gen-decode-expr-set-itype): New proc. (-gen-decode-expr-entry): Rewrite. (-gen-decode-table-entry): New proc. (-gen-decoder-switch): Use it. (-gen-virtual-insn-finder): New proc. (-gen-argbuf-elm): Move here from sid.scm. (-gen-argbuf-hw-elm): Ditto. (-gen-argbuf-fields-union): Add entries for chain,before insns. (-gen-scache-decls): Add `cond' member to @prefix@_scache for conditional-execution isas. (-gen-decode-fn): Record conditional-exec ifield. * sid.scm (-current-pbb-engine?): New global. (current-pbb-engine?,set-current-pbb-engine?!): New procs. (,gen-ifld-extract): New arg `indent'. (,gen-ifld-extract): Ditto. (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'. (-op-gen-set-trace): Don't print tracing messages for pbb engine. (-gen-arch-model-decls): Only scan real insns. (scache-engine-insns,pbb-engine-insns): New procs. (-create-virtual-insns!): New proc. (sim-finish!): Call it. (-decode-specialize-insn?): New proc. (-decode-specialize-build-assertion): New proc. (-decode-specialize-insn-1): New proc. (-decode-specialize-insn): New proc. (-fill-sim-insn-list!): New proc. (sim-analyze!): Create copies of insns to be specialized. * utils-cgen.scm (obj-set-name!): New proc. * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile. * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile, semantic-attrs. (ifmt-compute!): Delete arg `arch'. Result is list of iformats, sformats. * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!. * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM. Avoid infinite loop when rtx-eval-with-estate leaves expr alone. (attr): Rewrite test for insn owner. (member): New rtx function. * rtl.scm (rtx-* accessors): Define as cxr directly rather than as separate function. (rtx-ifield?,rtx-ifield-name): New procs. (rtx-operand-obj): Rewrite. (rtx-operand-name): New proc. (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs. (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs. (tstate-make): New args owner, known. All callers updated. (tstate-known-lookup): New proc. (rtx-traverse): New arg owner. All callers updated. (rtx-make-bool): New proc. (rtl-find-ifields): Rewrite. (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ... * semantics.scm: ... here. (rtx-const-equal,rtx-const-list-equal): New procs. (-build-known-values): New proc. (semantic-compile): New arg `insn'. Call rtx-simplify. (semantic-attrs): Ditto. * rtx-funcs.scm (member,number-list): New rtx functions. * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name. Rewrite. Delete arg `all-attrs'. All callers updated. (attr-remove-meta-attrs): Delete leading '-' in name. All callers updated. * utils-cgen.scm (gen-bool-attrs): Remove meta attrs. * decode.scm (subdtable-add): Handle `expr' entries. (exprtable-entry-make): Use vector. Record ifields refered to by expr. (exprtable-entry-*): Update. (exprtable-entry-iflds): New proc. (exprentry-cost): New proc. (exprtable-sort,-gen-exprtable-name): New procs. (exprtable-make): New arg `name'. All callers updated. use vector. (exprtable-*): Update. (-build-decode-table-entry): Don't issue collision warning if all are specialized insns. Sort exprtable entries before building table. * read.scm (-reader-process-expanded-1): Move pretty printing of input to logging level 4. * utils.scm (string-list->string): New proc. * insn.scm (): Define setters for ifield-assertion, condition, semantics. (insn-read): Delete leading '-' in name. All callers updated. (real-insn?): New proc. (real-insns): Rewrite. (insn-has-ifield?): New proc. (insn-builtin!): Create insn attribute SPECIALIZED. * mach.scm (): Delete member app-data. (current-raw-insn-list): New proc. (insn-list-car,insn-list-splice!): New procs. (): New class. (-isa-parse-decode-specialize): New proc. (-isa-parse-decode-specializes): New proc. (): New members `condition', `decode-specializes'. (-isa-parse-condition): New proc. (-isa-parse): New args condition, decode-specializes. (-isa-read): Recognize condition, decode-specializes. (-isa-add-decode-specialize!): New proc. (modify-isa): New proc. (isa-conditional-exec?,state-conditional-exec?): New procs. (arch-init!): New reader command `modify-isa'. * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs. (mode-signed,mode-unsigned?): New procs. Thu Jun 3 16:00:40 1999 Doug Evans * types.scm (): New method get-shape. * hardware.scm (): Forward get-shape,get-num-elms onto type. (hw-shape,hw-num-elms): New procs. * sim.scm (,gen-profile-index-type): Use "unsigned short" if there's more than 255 registers. * sid.scm (,gen-profile-index-type): Ditto. * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified with get/set specs. 1999-05-21 Doug Evans * cgen-sid.scm (sim-arguments): Add -X. * sid-cpu.scm (-gen-hardware-types): Comment out scache vars. (-gen-all-semantic-fns): Don't include PBB support virtual insns. (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting. Simplify by supporting pbb engine only. (-gen-sem-switch-init): New proc. (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn. (cgen-sem-switch.cxx): New proc. * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch? with with-pbb?. Support dual scache/pbb engines. (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?. Support dual scache/pbb engines. (cgen-decode.h): Generate semantic fn decls if with-scache?. * sid.scm (*) with-pbb? replaces with-sem-switch?. (sim-finish!): Create pbb support virtual insns if with-pbb?. 1999-05-10 Ben Elliston * arm7.cpu: Remove coprocessor related fields, operands and insn definitions for now. Take the undefined instruction trap instead. (ldmda-wb): New instruction. (ldmib-wb): Likewise. (ldmdb-wb): Likewise. (stmdb-wb): Likewise. (stmib-wb): Likewise. (stmda-wb): Likewise. 1999-05-08 Doug Evans * sid.scm (,cxmake-get): Call GETMEM method, not function. (,gen-set-quiet): Call SETMEM method, not function. * utils-cgen.scm (keyword-list->arg-list): Fix call to substring, hobbit can't handle optional third arg. 1999-05-07 Doug Evans * arm.cpu (h-tbit): Delete set spec. (h-mbits): Don't call arm_mbits_set in set spec. * arm.sim: New file. * hardware.scm (modify-hardware): New proc. (hardware-init!): Add modify-hardware command. * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified. (-hw-gen-set-quiet): Ditto. (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin hardware attribute. Load $arch.sim file if present. * utils-cgen.scm (keyword-list?): New proc. (keyword-list->arg-list,arg-list-validate-name): New procs. (arg-list-check-no-args,arg-list-symbol-arg): New procs. * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler. * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to @cpu@_cpu_cgen. * attr.scm (obj-prepend-atlist!): New proc. * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary. * sid.scm (,profilable?): Use op:type. * sim.scm (,profilable?): Use op:type. 1999-05-04 Doug Evans * utils.scm (find-index,find): Be more stack friendly. * arm7.cpu (arith-imm-op): Compute pc before setting cpsr. (bic-imm): Ditto. 1999-05-01 Doug Evans * arm.cpu (h-gr-usr): New hardware element. (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements. (arm-mode): New keyword. (h-mbits): Add set spec. (h-spsr): Implement get/set specs. * read.scm: Load slib/pp.scm, slib/genwrite.scm. (-reader-process-expanded-1): Pretty print logging output. * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'. (cgen-cpu.h): Print enums before hardware elements. (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h. * sid-decode.scm (cgen-decode.cxx): Ditto. * sid-model.scm (cgen-model.cxx): Ditto. * utils-cgen.scm (context-error): Accept variable number of trailing args. * rtx-funcs.scm (error:): New rtx function. * rtl-c.scm (s-case-vm): New proc. (-gen-non-vm-case-get,s-case-non-vm): New procs. (s-case): Simplify, handle non-VM result. (error:): New rtx function. 1999-04-30 Doug Evans * arm.cpu (h-pc): Add set spec to zero bottom bits. (test-hi,test-ls): Fix cbit handling. (shift-type,h-operand2-shifttype): Move here ... * arm7.cpu: ... from here. (set-cond,set-cond-maybe,dnix): Delete, unused. (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ... * arm.cpu: ... to here. * thumb.cpu (cmp,alu-cmp): Use set-sub-flags. (alu-cmn): Use set-add-flags. (alu-tst): Use set-zn-flags. (alu-cmp): Use set-sub-flags. (lsl,lsr,asr): Set condition codes. (add,addi,sub,subi,mov,addi8,subi8): Ditto. (alu-op): Split into three: alu-logical-op,alu-arith-op, alu-shift-op. (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn. All callers updated. (sub-sp): Rename from add-sp-neg. (f-lbwl-offset): Delete. (f-lbwl-hi,f-lbwl-lo): New ifields. (lbwl-hi,lbwl-lo): Update. (bl-hi): Add 4 to pc. (push-reg,pop-reg): Simplify. (push,push-lr): Push registers in correct order. (pop,pop-pc): Pop registers in correct order. (save-reg-inc,load-reg-inc): Simplify. (ldmia): Save registers in correct order. 1999-04-30 Ben Elliston * arm7.cpu (f-op-hdt): Remove; unused. (f-ror-imm8-value,f-ror-imm-rotate): New fields. (f-ror-imm8): New multi-ifield. (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All callers updated. (f-uimm12): New field. (ror-imm8): New operand. (uimm12): Likewise. (hdt-offset8): Reinstate operand. (offset4-hi,offset4-lo): Remove. (set-cond): Remove macro; unused. (set-cond-maybe): Likewise. (load-word/byte): Use uimm12 operand for a true 12-bit immediate. (store-word/byte): Likewise. (load-halfword): Use hdt-offset8 multifield operand instead of two 4-bit operands that are explicitly combined by semantic code. (do-halfword-store): Bug fix. Set address when not preindexing. (store-halfword): Also use hdt-offset8 operand. (arith-op): Avoid clobbering source registers when one of them is the destination register. (arith-imm-op): Likewise. (tst-imm): Use ror-imm8 operand. Handle special case of rot 0. (teq-imm): Likewise. (ldm-p): Rename to ldmdb. (stm-pw): Rename to stmdb-wb. (multi-action): New macro; test reg-list bits and execute a semantic fn if the bit is set. (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns. (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns. (all insns): Use dnai entries for simplicity rather than dni. (*): Use short-form of (const ..). 1999-04-29 Doug Evans * rtl.scm (): Rename member type to style. Rename member eval to evaluator. (rtx-foo accessors): Rename from rtx:foo. All callers updated. (tstate-make): Delete arg op-fn. All callers updated. (tstate-op-fn,tstate-set-op-fn!): Delete. (rtx-traverse): Delete op-fn arg. All callers updated. * semantics.scm (-simplify-for-compilation-process-expr): New proc, split out of -simplify-for-compilation. * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables. (cgen_DEPENDENCIES): Add stamp-cgen. (stamp-cgen): New rule. * Makefile.in: Rebuild. * rtl-c.scm (enum:): Define emitter for. * rtl.scm (rtx-constant?): Rename from rtx-const? and check for enums as well. (rtx-constant-value,rtx-enum-value): New procs. (-rtx-traverse-normal): Expand enum-value to (enum enum-value). (rtx-compile-time-constant?): Return #t for enums. (rtx-true?,rtx-false?): Handle enums. (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of building result by hand. (rtx-simplify-eq-attr-insn): Ditto. * rtx-funcs.scm (enum:,enum): New rtx functions. * mach.scm (): New members insns-analyzed?, semantics-analyzed?, aliases-analyzed?. (arch-analyze-insns!): New proc. * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead of calling ifmt-compute! directly. * sid.scm (-sim-insns-analyzed?): Delete. (sim-analyze!): Call arch-analyze-insns! instead of calling ifmt-compute! directly. * sim.scm (-sim-insns-analyzed?): Delete. (sim-analyze!): Call arch-analyze-insns! instead of calling ifmt-compute! directly. * utils.scm (string-take-with-filler): New proc. (string-take): Use it. * pgmr-tools.scm: New file. * read.scm: Load it. * insn.scm (pretty-print-insn-format): Move to pgmr.scm. * insn.scm (insn-base-mask): Renamed from insn:mask. All callers updated. (insn-base-mask-length): Renamed from insn:mask-length. All callers updated. (insn-foo): Renamed from insn:foo. All callers updated. * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated. * iformat.scm (compute-insn-base-mask-length): Renamed from compute-insn-mask-length. All callers updated. (compute-insn-base-mask): Renamed from compute-insn-mask. All callers updated. * enum.scm (-enum-parse-prefix): New proc. (,make!): Don't parse enum values here. (-enum-parse): Do it here. Call -enum-parse-prefix. (define-full-insn-enum): Ditto. (enum-vals-upcase): New proc. * hardware.scm (define-keyword): Make enum prefix uppercase. * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros. * ifield.scm (,field-mask): Allow container to be #f. (,field-extract): New method. (,field-extract): New method. (ifld-extract): New proc. * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert. (ifld-extract-fn-name): Renamed from ifld-extract. * ifield.scm (ifld-new-value): Renamed from ifield-make. All callers updated. * ifield.scm (ifld-lsb0?): New proc. (sort-ifield-list): New arg up?. All callers updated. * iformat.scm (compute-insn-mask): Get lsb0? flag from argument, rather than global state. 1999-04-27 Doug Evans * insn.scm (pretty-print-insn-format): New proc. * Makefile.in: Rebuild. * aclocal.m4: Rebuild * configure: Rebuild. Mon Apr 26 10:30:18 1999 Doug Evans * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2. * configure: Rebuild. * aclocal.m4: Rebuild. * Makefile.in: Rebuild. * doc/Makefile.in: Rebuild. * doc/version.texi: Rebuild. 1999-04-25 Doug Evans * utils.scm (bits->bools): New proc. 1999-04-23 Doug Evans * sid.scm (,gen-ifld-extract-decl): Fix call to subfield's gen-ifld-extract-decl method. 1999-04-23 Ben Elliston * arm7.cpu (ldrsh-pu): Remove. (do-halfword-load): New pmacro. (load-halfword): Likewise. (do-halfword-store): Likewise. (store-halfword): Likewise. (strh-*): New instructions. (ldrsb-*): Likewise. (ldrh-*): Likewise. (ldrsh-*): Likewise. 1999-04-22 Doug Evans * ifield.scm (ifld-constant?): Delete special handling of RESERVED fields. * arm7.cpu (do-word/byte-store): Fix typo. 1999-04-22 Ben Elliston * arm7.cpu (do-word/byte-load): Handle cases where the destination register is the program counter (R15). * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros. (str-*): Implement using store-word-byte. Remove older versions. (bic): Use the `inv' rtx for obtaining bitwise complements. (bic-imm): Likewise. (mvn): Likewise. (mvn-imm): Likewise. (store-indev-reg): Remove crufty pmacro. (load-indiv-reg): Likewise. (ldm-p): Reverse the order of register processing for decrement. (stm-p): Likewise. (stbi): Remove; handled by the str-* insns. 1999-04-21 Doug Evans * thumb.cpu (cmp): Fix carry bit computation. (alu-cmp): Ditto. 1999-04-20 Doug Evans * arm.cpu (h-tbit): Specify set spec. (h-cpsr): Ditto. * arm7.cpu (bx): Don't call C routine, just set h-tbit. (set-sub-flags): Interpret "carry bit" as a borrow. (all sub/cmp insns): Carry bit is actually a borrow bit. * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit. (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use .pmacro instead. (hireg-add,hireg-cmp,hireg-move): Ditto. * read.scm (-CGEN-VERSION): Change version to 0.7.2. (-CGEN-LANG-VERSION): Ditto. 1999-04-18 Doug Evans * pmacros.scm (-pmacro-make): New arg `default-values', all callers updated. (-pmacro-default-values): New proc. (-pmacro-process-keyworded-args): New proc. (-pmacro-process-args): New proc. (-pmacro-invoke): Process arguments before expanding macro. (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs. (define-pmacro): Handle default values specified in arg list. * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs. (rtx-boolif-op-arg[01]): New procs. (rtx-true,rtx-false,rtx-canonical-bool): New procs. (rtx-simplify): Handle not,orif,andif. * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif. * utils.scm (alist-copy): New proc. * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros. (ldr*): Rewrite. (swi): Explicitly set pc. * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode. 1999-04-17 Ben Elliston * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method correctly adjusts the program counter now. * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'. (f-signed?): Rename from `f-hdt-signed?'. (f-offset4-hi): Rename from `h-hdt-off4-ms'. (f-offset4-lo): Rename from `h-hdt-off4-ls'. (f-hdt-offset8): Use new field names. (ldr): Use `imm12' field, not `offset12', since we do our own address arithmetic. (str, str-*): Likewise. (ldu-*): Remove most; better not implemented than broken. (ldrh*): Likewise. (ldrsh-pu): New insn. (stri): Likewise. (stri-p): Likewise. (stbi): Likewise. (ldm-p): Likewise; replace (load-indiv-reg) version. 1999-04-15 Doug Evans * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs. * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*. (*): Explicitly specify mode in c-call. (logical-op): Recognize sets of h-gr[15] as sets of pc. (arith-op): Ditto. (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto. (arith-imm-op): New pmacro. (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it. * thumb.cpu (bx-rs,bx-hs): Rewrite. 1999-04-14 Doug Evans * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error. * rtl.scm (rtl-find-ifields): Implement. * utils-gen.scm: New file. * read.scm: Load it. * desc.scm: Move generic attribute code to utils-gen.scm. * Makefile.am (CGEN_HOB_INPUT_FILES): Add it. * Makefile.in: Rebuild. * arm7.cpu (R15-OFFSET): New attribute. (dnai): New pmacro. (logical-op): Delete arg `result?'. All callers updated. Use dnai. Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12 for reg-shift version. (arith-op): Ditto. (data processing insns): Reorganize. Use dnai. * attr.scm (attr-kind): New proc. (attr-list-enum-list): Rewrite. (-attr-sort): Split result into two lists, bools and non-bools. (current-attr-list-for): Update. * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file. * sid-cpu.scm (-gen-attr-decls): New proc. (-gen-insn-attr-decls): New proc. (cgen-desc.h): New proc. (cgen-cpu.h): Put everything in @cpu@ namespace. (gen-parallel-exec-type): Change prefix of parexec struct from @cpu@ to @prefix@. (-gen-trace-record-type): Ditto for trace_record struct. (-gen-write-case): Update. (-gen-scache-semantic-fn): Change function prefix from @cpu@ to @prefix@. Update scache struct references. (-gen-sem-case): Update scache struct references. (-gen-sem-switch-fn): Update idesc struct reference. Update insn_type enum reference. (cgen-write.cxx): Update scache,argbuf references. (cgen-semantics.cxx): Simplify namespace choice (always @cpu@). * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data from @cpu@ to @prefix@. (-gen-decode-insn-entry): Use gen-cpu-insn-enum. (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID from @CPU@ to @PREFIX@. (-gen-decoder-switch): Change prefix of INSN_X_INVALID from @CPU@ to @PREFIX@. (-gen-decode-insn-globals): Generate insn attributes. (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@. (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for semantic fn typedef. (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu). Change prefix of scache struct from @cpu@ to @prefix@. Change prefix of semantic fn typedef from @cpu@ to @prefix@. Change prefix of idesc struct from @cpu@ to @prefix@. Change prefix of insn_type enum from @cpu@ to @prefix@. (-gen-argbuf-fields-union): Change prefix of sem_fields union from @cpu@ to @prefix@. (-gen-scache-decls): Change prefix of scache struct from @cpu@ to @prefix@. Update idesc struct name. Update decode,execute methods. (-gen-extract-case): Update to type name changes. (-gen-decode-fn): Ditto. (cgen-decode.h): Put everything in @cpu@ namespace (except semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@. (cgen-decode.cxx): Add using namespace @cpu@. * sid-model.scm (-gen-hw-profile-decls): Change prefix of model_mark_get/set from @cpu@ to @prefix@. (gen-model-unit-fn-name): Change function prefix from @cpu@ to @prefix@. (gen-model-fn-decls): Update idesc struct name. Change prefix of model_insn_before/after from @cpu@ to @prefix@. (-gen-model-insn-fn): Update scache/idesc/argbuf struct names. Update insn_word type name. (-gen-model-timing-table): Update INSN_TIMING struct name. (-gen-model-init-fn): Update MODEL_DATA struct name. (-gen-mach-defns): Update name of init_idesc_table fn. (cgen-model.cxx): Add using namespace @cpu@. * sid.scm (gen-cpu-class): Delete. (gen-attr-type): New proc. (gen-obj-attr-sid-defn): New proc. (,gen-profile-code): Update name of model_mark_get/set fn. (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from @CPU@ to @PREFIX@. (gen-cpu-insn-enum): Update name of insn enum. * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx. (bx-hs): Ditto. (swi): Rename @cpu@_swi to @prefix@_swi. * decode.scm (-build-decode-table-entry): Remove heuristic for distinguishing insns, and use insn ifield-assertion specs. * desc-cpu.scm (gen-A-attr-mask): Simplify. (gen-ifld-defns): Boolean attributes begin at number 0 now. (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto. * opc-itab.scm (-gen-macro-insn-table): Ditto. * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix, all callers updated. (gen-attr-name): New proc (gen-attr-mask): Use it. Boolean attributes start at 0 now. (gen-obj-attr-defn): Delete num_nonbools count. * iformat.scm (ifmt-analyze): Handle insn-condition. (ifmt-compute!): Ditto. * insn.scm (): Specify default value for condition, post-cond-trap,compiled-condition,compiled-semantics. (,make!): New arg condition. (): Add getters for condition,compiled-condition. (-insn-parse): New arg condition, all callers updated. (-insn-read): Recognize condition spec. (define-full-insn): New arg condition. * minsn.scm (minsn-make-alias): Update call to (make ...). * semantics.scm (semantic-compile): Change arg sem-code to sem-code-list. (semantic-attrs): Ditto. * sim.scm (sim-finish!): Update calls to define-full-insn. * simplify.inc (define-normal-insn): Update call to define-full-insn. * sid-cpu.scm (gen-semantic-code): Handle insn-condition. * sid.scm (sim-finish!): Update call to define-full-insn. Tue Apr 13 17:04:34 1999 Doug Evans * Makefile.am (sim-cpu): Allow specification of ISA. * Makefile.in: Rebuild. Sun Apr 11 00:37:56 1999 Jim Wilson * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts. 1999-04-10 Doug Evans * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code. * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly. * attr.scm (atlist?): New proc. (-attr-eval): Rewrite. (attr-parse): New proc. (atlist-parse): Use it. * decode.scm (exprtable-entry-make): New proc. (exprtable-entry-insn,exprtable-entry-expr): New procs. (exprtable-make,exprtable-insns): New procs. * hardware.scm (hw-mode-ok?): Delete argument `set?'. All uses updated. (hardware-builtin!): Make h-memory a vector. * iformat.scm (ifmt-ifields): Renamed from ifmt-fields. All callers updated. (ifmt-analyze): Use csem-* accessors on result of semantic-compile. * insn.scm (). Rename ifld-assertions to ifield-assertion. All uses updated. (-insn-parse): Set semantics to #f if not specified. (define-insn,define-full-insn): Take out code that ignores ALIAS's if simulator. (-parse-insn-format): Recognize `=' iformat spec. * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's. (isa-max-insn-bitsize): Ditto. * opcodes.scm (,gen-insert): Call rtl-c instead of rtl-c-with-alist. (,gen-extract): Ditto. (,gen-insert,gen-extract): Ditto. * sid-cpu.scm (-gen-reg-access-defns): Ditto. (gen-define-ifmt-ifields): New proc. (gen-semantic-code): Rewrite. * sid-decode.scm (-gen-decode-expr-entry): New proc. (-gen-decoder-switch): Handle expression tables. (-gen-extract-case): Call gen-define-ifmt-ifields instead of gen-define-fields. * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields instead of gen-define-fields. * sid.scm (,gen-ifld-extract-decl): New arg `indent', all callers updated. (,gen-ifld-extract): Ditto. (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new rtl evaluation code. (op:read): Build an to pass to gen-read. (op:write): Build an to pass to gen-write. (op:record-profile): Build an to pass to gen-record-profile. * sim-cpu.scm (gen-semantic-code): Rewrite. * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist. (-gen-ifld-extract-beyond): Ditto. (,gen-ifld-extract): Ditto. (,gen-get-macro,gen-set-macro): Ditto. (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new rtl evaluation code. (op:read): Build an to pass to gen-read. (op:write): Build an to pass to gen-write. (op:record-profile): Build an to pass to gen-record-profile. * operand.scm (): Give `selector' default value of #f. Give `num' default value of -1. Give `cond?' default value of #f. (op:new-mode): Delete arg `set?', all uses updated. * read.scm (reader-error): Handle #f return from port-filename. (-init-parse-cpu!): Call rtl-c-init!. (reader-install-builtin!): Call rtl-builtin!. * rtl-c.scm: New file. * semantics.scm: New file. * read.scm: Load them. * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved to semantics.scm. (): Delete members syntax?,macro,c,expr. New members type,eval,num. (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated. (-rtx-num-text,-rtx-max-num): New globals. (def-rtx-operand-node,define-rtx-operand-node): New procs. (-rtx-macro-lookup): New proc. (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name. (rtx-env-stack-empty?,rtx-env-stack-head): New procs. (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs. (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs. (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs. (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name, rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj, rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else, rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs. (rtx-pretty-name): New proc. (-rtx-traverser-table,-rtx-make-traverse-table): New procs. (rtx-traverse-*): Rewrite rtx traversing. (rtx-eval-*): Rewrite rtx evaluation. (rtx-compile): New proc. (rtx-simplify): New proc. (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs. * rtx-funcs.scm: C generation moved to rtl-c.scm. (ifield,index-of): Rewrite. (name): Renamed from `operand:'. (operand,xop,local): New rtx's. (current-insn): Rewrite. * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm. (cgen-hob.h): Remove rule for. (cgen-hob.o): Depend on cgen-hob.c only. * Makefile.in: Rebuild. * utils-cgen.scm (vmake): New proc. (): New class. (context-make-prefix,context-error): New procs. Fri Apr 9 19:26:28 1999 Jim Wilson * i960.cpu: Add some ??? comments. (xnor, ornot): New instructions. (*): Delete obsolete COND-CTI and UNCOND-CTI attributes. 1999-04-08 Doug Evans * cos.scm (-object-error): Print better error message. * pmacros.scm (-pmacro-env-make): Renamed from -env-make. (-pmacro-env-ref): Renamed from -env-ref. 1999-03-31 Doug Evans * hardware.scm (,parse!): Allow get/set specs. (h-pc): Delete. (hardware-builtin!): Delete h-pc builtin. * arm.cpu (h-pc): Define. (h-gr): Delete get,set specs. Make array of 16 regs again. * arm7.cpu (set-logical-cc-maybe): Delete. (set-zn-flags,set-add-flags,set-sub-flags): New macros. (data processing insns): Rewrite. * m32r.cpu (h-pc): Define. * fr30.cpu (h-pc): Define. * i960.cpu (h-pc): Define. * sparc.cpu (h-pc): Define. * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS. (s-parallel): Replace do {...} while (0) with {...}. (s-sequence): Ditto. * sid-cpu.scm (gen-parallel-exec-type): Make type of `written' consistent. (-gen-write-case,-gen-sem-case): Ditto. (-gen-sem-case): Only specify `written' if profiling or parallel-write-back. (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in. (-gen-sem-switch-fn): New proc. (cgen-semantics.cxx): Emit either semantic fns or semantic switch based on with-sem-switch option. * sid-decode.scm (-gen-decode-insn-globals): Only define idesc_table_initialized_p if with-sem-switch. Record semantic fn addresses in idesc_table if !with-sem-switch. (-gen-sem-fn-decls): Rewrite. (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute' member based on with-sem-switch. Only define `idesc_table_initialized_p' member if with-sem-switch. (cgen-decode.h): If !with-sem-switch, declare semantic fns. * sid.scm (-with-sem-switch?): New variable. (option-init!): Initialize it. (option-set!): Set it. (with-sem-switch?): New proc. (-op-gen-set-trace): Only emit `written' reference if profiling. (sim-finish!): Use h_pc_set to set pc. 1999-03-30 Doug Evans * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags. All callers updated. (arith-carry-cc-binop): New arg set-flags. All callers updated. * sid.scm (gen-argbuf-type): Delete. (-gen-argbuf-fields-union): Move to ... * sid-decode.scm: ... here. * read.scm (-reader-process-expanded-1): New proc. (-reader-process-expanded): Call it to catch nested begin's. (reader-process): Move `begin' handling to -reader-process-expanded. * insn.scm (-insn-read): Fix name of `format' spec. * pmacros.scm (.pmacro): New builtin. (scan-symbol): If procedure macro, return macro rather than its symbol. (check-macro): Don't do lookup, instead check if (car expr) is macro object. (scan-list): Handle .pmacro. (scan): No longer re-examine text for another macro invocation. (-pmacro-build-lambda): New proc. (define-pmacro): Rewrite. If defining one pmacro to be an alias of another, fetch the other's value (rather than doing it during expansion). 1999-03-27 Doug Evans * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm. * Makefile.in: Rebuild. * decode.scm (decode-get-best-bits): Use memq instead of element?. (-fill-slot!): Simplify. (-build-slots): Simplify. * dev.scm (load-sid): Don't load sid-arch.scm. * sid-decode.scm: Replace computed goto decoder/extractor with plain switch's. * sim-decode.scm: Replace computed goto decoder/extractor with plain switch's. 1999-03-26 Doug Evans * sim-decode.scm: Clean up pass. Move decoder computation into ... * decode.scm: ... here. New file. * sid-decode.scm: Use decoder computation code in decode.scm. * read.scm: Load decode.scm. * arm.cpu (arm710 model): Add u-exec function unit. (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs. Add get/set specs to redirect reg 15 to h-pc. (h-*): Indicate for both ARM and THUMB isas. (cbit,nbit,vbit,zbit): Ditto. (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements. (h-cpsr): Make virtual. Add get/set specs. (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw. (h-spsr): New virtual reg. * arm7.cpu (shift-type): New explicitly defined keyword. (h-operand2-shifttype): Use it. (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2. All callers updated. Don't set cbit. (logical-op): Add rm to ifield list. Change case to case:. Use shift-type enum as case choices. Set cbit. (and,orr,eor,add-imm): Uncomment out. (undefined): Temporarily comment out. * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/. (lda-pc,lda-sp): Ditto. (ldr-pc): Rename from ldr. (cbranch): Mark insns as being thumb insns. * attr.scm (,parse-value): Recognize strings. * cgen-sid.scm: Don't load sid-arch.scm. (sim-arguments): Delete unused entries. * sid-arch.scm: Delete. * insn.scm (,iflds): Renamed from flds. All uses updated. (,ifld-assertions): New member. (,make!): New arg ifld-assertions, all callers updated. ( accessors): Change insn:foo to insn-foo. All callers updated. (insn:fields): Delete. (-insn-parse): New arg ifld-assertions. All callers updated. (-insn-read,define-insn): New procs. (define-full-insn): New arg ifld-assertions. All callers updated. (insn-init!): New comment define-insn. * model.scm (-model-parse): Ensure at least one unit specified. * rtl.scm (-rtx-traverse-operands): Recognize environments. (,get-name): New method. (-rtx-make-current-closure,s-closure): New proc. (hw:): Wrap rtx indices in a closure. (-gen-case-prefix): New proc. (s-case): Simplify. * rtx-funcs.scm (case:): Fix call to s-case. (closure): New rtx func. * hardware.scm (): New member isas-cache. (,get-isas): New method. (hardware-builtin): Indicate for all isas. * ifield.scm (-ifield-parse): Only keep if isa+mach are kept. * mach.scm (current-arch-mach-name-list): Return list of names. (current-isa-mach-name-list): Ditto. (define-arch): Install builtin objects here. * read.scm (keep-atlist?): Only keep if both mach and isa are being kept. (keep-mach-atlist?): New proc. (keep-isa-multiple?,current-keep-isa-name-list): New proc. (reader-install-builtin!): Renamed from -install-builtin!. * sid-cpu.scm (-gen-reg-access-defns): Renamed from -gen-cpu-reg-access-defns. Rewrite. (gen-reg-access-defn): Delete. (-gen-hardware-struct): New proc. (-gen-hardware-types): Simplify. Add multiple-isa support. (gen-semantic-fn,-gen-all-semantics): Delete. (-gen-read-args,-gen-read-case,-gen-read-switch): Delete. (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete. (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c. Call sem-analyze-insns!. (cgen-semantics.cxx): Add multiple-isa support. * sid-decode.c (-gen-idesc-decls): Add multiple-isa support. (-gen-scache-decls,-gen-decode-fn): Ditto. (cgen-decode.h): Call sem-analyze-insns!. * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c. * sid.scm (-with-multiple-isa?): New variable. (option-init!): Initialize it. (option-set!): Set it. (with-multiple-isa?): New proc. (gen-cpu-ref): New arg isas. All callers updated. (gen-cpu-class): New proc. (*-get-macro,*-set-macro): Delete. (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs. (-hw-gen-fun-get): Call gen-reg-get-fun-name. (-hw-gen-fun-set): Call gen-reg-set-fun-name. (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs. (-sim-insns-analyzed): New global variable. (sim-init!): Reset it. (sim-analyze-insns!): New proc. (sim-analyze!): Don't do instruction analysis here. (sim-finish!): Specify isa of x-invalid insn. * sim.scm (sim-finish!): Specify isa of added x-* virtual insns. 1999-03-22 Doug Evans * thumb.cpu (cpu,mach,model): Delete. (dntf): New pmacro. Use it for all field definitions. (dntop): New pmacro. Use it for all operand definitions. (asr): Correct field list. (add,addi,sub,subi,add-sp,add-sp-neg): Ditto. * utils-cgen.scm (define-getters): New macro to simplify writing class accessors. (define-setters): Ditto. (sanitize): Recognize isa elements. * sid-cpu.scm (*): Replace cpu:parallel-exec? call with state-parallel-exec?. * sid-model.scm (*): Ditto. * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with state-decode-assist. * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!. (-gen-decode-switch): Rewrite to not generate deeply nested lists. * sim-decode.scm (-gen-decode-switch): Ditto. * sim-arch.scm (-regs-for-access-fns): Delete. (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete. (-gen-arch-reg-access-defns): Delete. * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns, cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec? with state-parallel=exec?. (cgen-*): Call sim-analyze-insns! here. * sim-decode.scm (cgen-*): Ditto. * sim-model.scm (cgen-*): Ditto. * sim.scm (-sim-insns-analyzed): New global variable. (sim-init!): Reset it. (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've already done the analysis. * sim-model.scm (-gen-mach-defns): Add mach attribute number to MACH struct. * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary. (arm arch): Update isa spec. (arm,thumb isas): Define. (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas. (arm7tdmi mach): Add isa spec. * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary `const' on word number. * fr30.cpu (fr30 arch): Update isa spec. (fr30 isa): Define. (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist, moved to isa spec. * i960.cpu (i960 arch): Update isa spec. (i960 isa): Define. (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist, liw-insns,parallel-insns moved to isas spec. * m32r.cpu (m32r arch): Update isas spec. (m32r isa): Define. (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist, liw-insns,parallel-insns moved to isa spec. * sparc.cpu (sparc arch): Update isas spec. (sparc isa): Define. * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize, decode-assist moved to isa spec. * sparc64.cpu (sparc64 cpu): Ditto. * sparccom.cpu (trap insns): Correct mode of result of c-call:. * desc-cpu.scm (-gen-isa-table-defns): New proc. (-gen-mach-table-defns): Output mach table. (-gen-hash-defines): Delete insn size macros, except for CGEN_MAX_INSN_SIZE. (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args. (cgen-desc.h): Define MAX_ISAS. (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns. * mach.scm (): Rename arch-data to data. New member isa-list. (arch-* accessors): Renamed from arch:*. All callers updated. (current-arch-isa-name-list): New proc. (-arch-parse-isas): Renamed from -arch-parse-isa. (def-isa-attr!): Rewrite. (