OSDN Git Service

Specify isa(s) when doing ifield, operand, insn lookups.
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2009-11-02  Doug Evans  <dje@sebabeach.org>
2
3         Specify isa(s) when doing ifield, operand, insn lookups.
4         ACU = all callers updated.
5         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
6         * enum.scm (define-full-insn-enum): Pass isa-name-list to
7         current-ifld-lookup.
8         * html.scm (get-insn-properties): Pass isa-name-list to
9         current-op-lookup.
10         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
11         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
12         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
13         (/parse-insn-format, syntax-break-out): Ditto.
14         * mach.scm (obj-filter-by-isa): New function.
15         (current-ifld-lookup): New optional arg maybe-isa-name-list.
16         (/ifld-already-defined?, /op-already-defined?): Simplify.
17         (current-op-lookup): New optional arg maybe-isa-name-list.
18         (current-insn-lookup): New arg isa-name-list, ACU.
19         (/insn-already-defined?, /minsn-already-defined?): Simplify.
20         (current-minsn-lookup): New arg isa-name-list, ACU.
21         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
22         current-op-lookup.
23         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
24         (gen-syntax-entry): Ditto.
25         * operand.scm (/operand-parse): Pass isa-name-list to
26         current-ifld-lookup.
27         (/derived-parse-encoding): New arg isa-name-list, ACU.
28         (/derived-parse-ifield-assertion): Ditto.
29         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
30         (/anyof-parse-choice): Ditto.
31         (anyof-satisfies-assertions?): Pass context to rtx-solve.
32         (/anyof-merge-syntax): New arg container, ACU.
33         (operand-builtin!): Add pc to all isas.
34         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
35         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
36         (rtl-c-parsed, rtl-c++-parsed): Ditto.
37         (rtl-c): New arg isa-name-list, ACU.
38         (rtl-c-expr, rtl-c++): Ditto.
39         (closure): New arg isa-name-list, ACU.
40         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
41         (/cstate-isas): New function.
42         (/rtx-canon-symbol-list): New function.
43         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
44         updated.
45         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
46         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
47         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
48         (rtx-canonicalize): New arg isa-name-list, ACU.
49         (rtx-canonicalize-stmt): Delete.
50         (tstate-make): New arg isas, ACU.
51         (tstate-isas, tstate--set-isas!): New functions.
52         (tstate-env-stack): Renamed from tstate-env, ACU.
53         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
54         (tstate-make-closure): Renamed from tstate-new-env, new arg
55         isa-name-list, ACU.
56         (/rtx-traverse-env): Delete.
57         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
58         SUMBOLLIST.
59         (/rtx-traverse): Include conditional flag in dump output.
60         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
61         (<eval-state>): New member isas.  Rename env to env-stack.
62         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
63         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
64         to env-stack.
65         (estate-make-for-eval): Provide #:isas.
66         (estate-make-closure): Renamed from estate-new-env.  New arg
67         isa-name-list, ACU.
68         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
69         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
70         (/rtx-trim-for-doc): Handle closures.
71         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
72         SYMBOLLIST.
73         (rtx-env-var-list): Delete.
74         (rtx-env-make): Handle already-compiled environments.
75         (rtx-var-alist-to-env): New function.
76         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
77         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
78         (rtx-operand-obj): New arg isa-name-list, ACU.
79         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
80         functions.
81         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
82         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
83         (/frag-compute-desired-frags): Minor simplification.
84         (/frag-pick-best): Ditto.
85         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
86         (/gen-sfrag-code): Update.
87         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
88         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
89         * utils.scm (non-null-intersection?): New function.
90
91         * gen-all (do_src): Manually run cgen-all for sid.
92
93 2009-11-01  Doug Evans  <dje@sebabeach.org>
94
95         * gen-all: New file.
96
97         * rtl-traverse.scm (/rtx-canon): Issue better error message for
98         invalid rtx function names.
99
100 2009-10-28  Doug Evans  <dje@sebabeach.org>
101
102         * cos.scm (object-assign!): New function.
103         * mode.scm (/mode-set-word-params!): Call it.
104
105 2009-10-25  Doug Evans  <dje@sebabeach.org>
106
107         Record bitset attributes internally as a list.
108         Record rtx attribute values internally as ((rtx-expr)).
109         * attr.scm (bitset-attr?): Delete, unused.
110         (<bitset-attribute> parse-value): Rewrite.
111         (/attr-parse): Rewrite bitset default value processing.
112         (/attr-read): Pick out values of scalar attributes to distinguish
113         them from bitset values which are a list.
114         Fix spelling errors for processing of default values.
115         Handle string attributes.
116         (bitset-attr->list): Delete, all callers updated.
117         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
118         All callers updated.
119         (atlist-source-form): Rewrite.
120         * hardware.scm (<hardware-base> 'get-isas): Update recognition
121         of all isas.
122         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
123         -> (ISA foo bar).
124         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
125         values are now lists.
126         * mach.scm (def-isa-attr!): Update, bitset attribute values,
127         including the default, are now lists.
128         (all-isas-attr-value): Result is now a list.
129         * doc/rtl.texi: Clean up pass over attribute docs.
130
131         Change internal representation of rtx attribute values.
132         * attr.scm (/attr-val-is-rtx?): New function.
133         (attr-value): Call it.
134         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
135         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
136         Disallow rtx values for bitset attributes.
137         (/attr-read): Record rtx in default value as ((rtx-expr)).
138         (/attr-eval): Update.
139
140 2009-10-24  Doug Evans  <dje@sebabeach.org>
141
142         * gen-all-doc: Add sh.cpu.
143         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
144         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
145
146         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
147         (/gen-sfrag-case): Ditto.
148         * sim-cpu.scm (/gen-sem-case): Ditto.
149
150         * doc/rtl.texi: Add note that different ifields, operands, insns,
151         and minsns may occur with the same name in different isas.
152         Add note on the canonical form of rtl expressions.
153
154 2009-10-23  Doug Evans  <dje@sebabeach.org>
155
156         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
157         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
158
159         * decode.scm: Tweak various comments.
160         (/opcode-slots): Add FIXME.
161         (/build-decode-table-guts): Add assert.
162         * utils-sim.scm (/gen-set-itype-and-extract): New function.
163         (/gen-bracketed-set-itype-and-extract): New function.
164         (/gen-decode-default-entry): Rewrite.
165         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
166         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
167         updated.  Don't unnecessarily emit check for whether all opcode bits
168         have been examined.
169         (/gen-decode-expr-set-itype): Delete.
170         (/gen-decode-expr-entry): Update.
171         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
172         updated.  Keep track of decoder tables used thus far.
173         (/gen-decoder-switch): Ditto.
174         * utils.scm (word-bit-value): New function.
175
176 2009-10-14  Doug Evans  <dje@sebabeach.org>
177
178         * ifield.scm (<ifield>, value): Provide default initial value.
179         (ifield-encode-mode): Delete
180         (ifield-decode-mode): Delete duplicate definition.
181         (<derived-ifield>, 'make!): Initialize members encode, decode.
182         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
183         ifld-encode-mode.
184         (<multi-ifield>, 'gen-insert): Ditto.
185         
186 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
187
188         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
189         for @foo@_init_idesc_table.
190
191 2009-09-30  Doug Evans  <dje@sebabeach.org>
192
193         * doc/intro.texi: Mention SID.
194         * doc/sim.texi: Ditto.
195         * doc/porting.text (Doing a simulator port): Add some text.
196
197 2009-09-27  Doug Evans  <dje@sebabeach.org>
198
199         * cos.scm (/class-table): New global.
200         (/class-uid, /class-set-uid!): New functions.
201         (/class-parent-name): Renamed from /class-parents.
202         (/class-make!): Change parents arg to parent-name, all callers updated.
203         Assign uid to class.
204         (/class-lookup-uid): New function.
205         (/class-parent-classes): Rewrite.
206         (/class-mi?): Delete.
207         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
208         Delete.
209         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
210         (/class-compute-class-desc, class-desc-dump): Update.
211         (/object-make!): Update.
212         (/object-make-with-values!): Delete arg class-desc, all callers
213         updated.
214         (/object-copy): Delete arg top?, all callers updated.
215         (/object-specialize): Delete.
216         (/object-elements, /object-top-class): Delete.
217         (/object-class-name, /object-class-desc): Update.
218         (/object-class-uid): New function.
219         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
220         class-make, /class-subclass? /class-lookup-element,
221         Update.
222         (/elm-delta, elm-list): Delete.
223         (/elm-make-method-getter, elm-get, elm-xget): Update.
224         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
225         (elm-make-getter, elm-make-setter): Update.
226         (/method-lookup-next): Update.
227         (send): Don't specialize class passed to method.
228         (send-next): New arg class-name, all callers updated.
229         (/class-parent, /class-parent-via-path, object-parent): Delete.
230         (class-cons-parent!, class-append-parent!): Delete.
231         (object-reset!): Init /class-table.
232
233         * cos.scm (/object-debug-classes): Delete.
234         (/object-debug-elements, /object-debug-methods): Delete.
235
236         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
237         (method-proc): Delete.
238         (method-make-virtual!, method-make-virtual-forward!): Delete.
239         * ifield.scm (<ifield> field-start): Update.
240         (<ifield> field-length, pretty-print): Update.
241         (<multi-ifield> field-length, field-start, pretty-print): Update.
242         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
243         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
244         (<array> gen-sym-defn): Ditto.
245         (<hardware-base> gen-defn): Renamed from gen-defn.
246         (<hw-register> gen-type): Update.
247         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
248         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
249         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
250         (<hw-immediate> gen-type): Update.
251         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
252         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
253         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
254         (<array> gen-sym-defn): Ditto.
255         (<hardware-base> gen-defn): Renamed from gen-defn.
256         (<hw-register> gen-type): Update.
257         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
258         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
259         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
260         (<hw-immediate> gen-type): Update.
261         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
262
263 2009-09-25  Doug Evans  <dje@sebabeach.org>
264
265         * operand.scm (/anyof-merge-setter): Handle set-quiet.
266         * rtl.scm (rtx-single-set?): Handle set-quiet.
267
268         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
269         rtl-cover-fns?, macro?.  All callers updated.
270         (estate-make-for-normal-rtl-c): Delete, have all callers call
271         estate-make-for-rtl-c directly.
272         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
273         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
274
275         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
276         replaces /par-replace-set-dests.
277         (/par-replace-set-src-expr-fn): New function, replaces
278         /par-replace-set-srcs.
279         (s-parallel): Rewrite.
280
281         * rtl.scm (rtx-pretty-strdump): New function.
282         * rtl-traverse.scm (/rtx-canon-error): Use it.
283         (<eval-state>): New member outer-expr.
284         (estate-error): Include outer expression in error message if present.
285
286 2009-09-23  Doug Evans  <dje@sebabeach.org>
287
288         * xc16x.cpu (h-cr): New hardware.
289         (muls): Comment out parts that won't compile, add fixme.
290         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
291         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
292         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
293
294         Rewrite rtl processing to require it to be "canonicalized" first,
295         and write a full canonicalizer / expression checker.
296         Remove all appearances of DFLT in canonical rtl.
297         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
298         then rtx-simplify.
299         * iformat.scm (ifmt-analyze) Use canonical semantics.
300         * insn (<insn>): New member canonical-semantics.
301         * mach.scm (<arch>): New member multi-insns-instantiated?.
302         (/instantiate-multi-insns!): New function.
303         (/canonicalize-insns!): New function.
304         (arch-analyze-insns!): Canonicalize insn semantics before processing
305         them.
306         * mode.scm (/mode-set-word-params!): New function.
307         (mode-void?): New function.
308         (mode-compatible?): VOID is compatible with VOID.
309         (/mode-word-sizes-defined?): New global.
310         (mode-set-word-modes!): Use/set it.
311         (mode-ensure-word-sizes-defined): Update.
312         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
313         Redo WI/UWI/AI/IAI handling.
314         (op:new-mode): No longer accept DFLT.
315         (<derived-operand> constructor): Ensure all fields are initialized.
316         (<anyof-operand> constructor): Ditto.
317         (/derived-parse-ifield-assertion): Delete arg `args'.
318         All callers updated.
319         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
320         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
321         (rtl-c-expr, rtl-c++): Ditto.
322         (/rtl-c-get): Use mode of operand, not containing expression.
323         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
324         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
325         estate-for-insn? instead.
326         (s-unop): Use mode of expression, not first operand.
327         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
328         (s-sequence): Remove DFLT support.
329         (ifield): Use mode of expression, not UINT.
330         (pc): Comment out, unused.
331         (int-attr): New rtx kind.
332         (attr): Deprecate.
333         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
334         * rtl-traverse.scm (/rtx-canon-debug?): New global.
335         (/make-cstate): New function.
336         (/cstate-context, /cstate-outer-expr): New functions.
337         (/rtx-canon-error): New function.
338         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
339         /rtx-get-last-cond-case-rtx): New functions.
340         (/rtx-canon-*): New functions.
341         (/rtx-canner-table, /rtx-operand-canoners): New globals.
342         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
343         (/rtx-option, /rtx-option-list?): Rewrite.
344         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
345         Rewritten, all callers updated.
346         (/rtx-canon-expr, /rtx-canon): New functions.
347         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
348         (rtx-canonicalize-stmt): New function.
349         (tstate-make): Remove arg `set?'.  All callers updated.
350         (tstate-new-set?): Delete.
351         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
352         moved to /rtx-canon-*.
353         (/rtx-traverse-normal-operand): New function.
354         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
355         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
356         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
357         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
358         Ditto.
359         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
360         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
361         (/rtx-make-traverser-table): Update.
362         (/rtx-traverse-operands): Remove mode processing, now done during
363         canonicalization.
364         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
365         (/rtx-traverse): Ditto.
366         (rtx-init-traverser-tables!): New function.
367         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
368         (rtx-verify-no-dflt-modes): New function.
369         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
370         (rtx-simplify-insn): Use insn-canonical-semantics.
371         (rtx-canonicalize): Moved to rtl-traverse.scm.
372         (/compile-expr-fn, rtx-compile): Delete.
373         (/rtx-trim-rtx-list): New function.
374         (/rtx-trim-for-doc): Handle set, if.
375         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
376         (/rtx-valid-mode-types): Update.
377         (/rtx-valid-matches): Update.
378         (/rtx-find-matchexpr-index): New function.
379         (rtx-lookup): Require rtx-kind to be the rtx name.
380         (def-rtx-node): New arg result-mode, all callers updated.
381         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
382         (rtx-lazy-sem-mode): Delete.
383         (/rtx-closure-make): New arg `mode', all callers updated.
384         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
385         (rtx-operand-obj): Rewrite.
386         (rtx-make-xop): New functions.
387         (/hw): Renamed from `hw', all callers updated.
388         Use the correct mode instead of DFLT for the index.
389         (rtl-builtin!): Call rtx-init-traversal-tables!.
390         (rtl-finish!): Update.
391         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
392         Update mode arg-type.
393         (pc): Comment out.
394         (int-attr): New rtx kind.
395         (attr): Deprecate.
396         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
397         (/frag-cost-compute!): Ditto.
398         * semantics.scm (/build-operand!): Delete args op-name, op.
399         New arg op-expr.  All callers updated.
400         (/build-mem-operand!): Remove DFLT support.
401         (semantic-compile): Update process-expr!, mode arg deleted.
402         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
403         rtl-c++ calls.
404         (/gen-sem-case, /gen-sfrag-code): Ditto.
405         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
406         (/op-gen-set-trace): New function.  If not doing profiling, or using
407         the pbb engine, call /op-gen-set-quiet.
408         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
409         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
410         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
411         * utils.scm (find-first-index): New function.
412         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
413
414         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
415         to COMPARE.
416         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
417
418 2009-09-21  Doug Evans  <dje@sebabeach.org>
419
420         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
421         All callers updated.  Add FIXME.
422         (all rtx functions): Rename local estate to *estate*.  It's an
423         artificial argument added to the rtx, so make it stand out.
424
425         * openrisc.cpu (or32 isa): Fix setup-semantics.
426
427         * rtl.scm (rtx-class-*?): Delete, unused.
428         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
429
430         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
431         (init-reader!): Set /CGEN-RTL-VERSION to default.
432
433         * read.scm (cpu-load): Print load parameters.
434
435         * dev.scm (load-doc): Set verbose-level to 2.
436
437 2009-09-20  Doug Evans  <dje@sebabeach.org>
438
439         * rtl.scm (rtx-strdump): Use write instead of display.
440
441 2009-09-17  Doug Evans  <dje@sebabeach.org>
442
443         * utils-cgen.scm (obj-csv-names): New function.
444         * utils-sim.scm (/sfmt-contents): Use it in logging message.
445
446 2009-09-12  Doug Evans  <dje@sebabeach.org>
447
448         Clean up pass of mode handling.
449         Make use of mode name vs <mode> object more consistent and clear.
450         * hardware.scm (/keyword-read): Default mode to the mode name,
451         not the <mode> object.
452         (/hw-parse-indices): Parse mode name and pass mode object to
453         <hw-asm> constructor.
454         (/hw-parse-values): Ditto.
455         (<hw-register> parse!): Pass mode name to /hw-parse-indices
456         and /hw-parse-values.
457         (<hw-memory> parse!): Ditto.
458         (<hw-address> parse!): Ditto.
459         * mode.scm (/mode-table): New global, replaces mode-list.
460         Modes stored in hashtable instead of list.
461         (/mode-class-table): New global.
462         (mode-list-non-alias-values): Update.
463         (mode:eq?, mode-compatible?, mode:add!): Update.
464         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
465         (mode-maybe-lookup): New function.
466         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
467         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
468         (mode-find, mode-set-word-modes!): Update
469         (mode-ensure-word-sizes-defined): Update.
470         (/sort-mode-classes!): New function.
471         (mode-builtin!): Update.  Sort mode classes here.
472         (mode-finish!): Sort mode classes here too.
473         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
474         All callers updated.
475         (rtl-c-set-quiet): Allow mode to be name of object.
476         (rtl-c-set-trace): Ditto.
477         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
478         <mode> object.  All callers updated.
479         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
480         (rtx-lazy-sem-mode): Ditto.
481         (<rtx-temp> make!): Assert mode arg is a <mode> object.
482         (rtx-env-make): Allow var-list modes to be name or object.
483         * sem-frags.scm (/frag-expr-assq-locals): New function.
484         (/frag-compute-locals!): Call it.
485         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
486         All callers updated.
487         * semantics.scm (/build-mem-operand!): Handle mode aliases.
488
489         * sim-test.scm (*): Symbols no longer can be passed to string-append.
490
491 2009-09-10  Doug Evans  <dje@sebabeach.org>
492
493         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
494         Improve error message for missing or too many bits.
495         (/insn-parse): Don't verify iformat for virtual insns.
496         
497         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
498         non-multi-insns.
499         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
500         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
501         * sid.scm (pbb-engine-insns): Ditto.
502         * sim-decode.scm (cgen-decode.c): Ditto.
503
504 2009-09-09  Doug Evans  <dje@sebabeach.org>
505
506         * rtl-traverse.scm: Comment tweaks.
507         * rtl-xform.scm: Comment and reformatting tweaks.
508         * doc/rtl.texi: Add text to docs on ifield-assertions.
509
510         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
511         saving.
512
513         Add support for controlling warnings/errors.
514         Add tests for iformat description errors.
515         * dev.scm (cload): New option #:diag.
516         * read.scm (<reader>): New member verify-iformat?.
517         (/parse-diagnostic, parse-warning): New functions.
518         (parse-error): Guts moved to /parse-diagnostic.
519         (/set-diagnostic-options!): New function.
520         (cpu-load): New arg diagnostic-options, all callers updated.
521         Recognize -w diagnostic-option-list.
522         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
523         (ifld-simple-ifields, ifields-simple-ifields): New function.
524         * insn.scm (/parse-insn-format-iflds): New function.
525         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
526         New arg isa, all callers updated.  Do some basic validation of the
527         ifield list if requested.
528         * mach.scm (/sanity-check-insns): Improve error message text.
529         * doc/running.texi: Document -w option.
530         * doc/porting.texi: Document #:trace, #:diag options to cload.
531
532         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
533
534         * dev.scm (*): Change default verbosity level to 2.
535
536         * ifield.scm (<ifield> pretty-print): New method.
537         (ifld-pretty-print): New function.
538         (<multi-ifield> pretty-print): New method.
539
540         * ifield.scm (<ifield> field-start): Delete word-len arg.
541         All callers updated.
542         (ifld-start): Ditto.
543         (<multi-ifield> field-start): Ditto.
544         * operand.scm (<hw-index> field-start): Ditto.
545
546         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
547         total-bitsize.  All callers updated.
548         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
549         New member /insn-base-value.
550         (insn-base-value): New function.
551         * mach.scm (/sanity-check-insns): New function.
552         (arch-analyze-insns!): Call it.
553
554 2009-09-08  Doug Evans  <dje@sebabeach.org>
555
556         * iformat.scm (ifields-base-ifields): Simplify.
557         (compute-insn-length): Simplify, call ifields-base-ifields.
558         (compute-insn-base-mask): Ditto.
559         * ifield.scm (ifld-known-values): Ditto.
560         (ifld-base-ifields): Ditto.
561         * insn.scm (insn-value): Ditto.
562         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
563
564 2009-09-08  DJ Delorie  <dj@redhat.com>
565
566         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
567         preprocessor macro, not an enum.
568
569 2009-09-08  Doug Evans  <dje@sebabeach.org>
570
571         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
572         to string-append.
573         (*): Remove trailing ":" from error messages passed to estate-error.
574
575 2009-09-07  Doug Evans  <dje@sebabeach.org>
576
577         * types.scm (<struct>): Delete.
578
579         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
580         updated.
581         (/pmacro-loc-error): New function.
582
583         * mach.scm (/isa-parse-decode-assist): New function.
584         (/isa-parse): Call it.
585
586         * decode.scm (/get-subopcode-value): New function.
587         (/opcode-slots): Call it.
588         (/fill-slot!): Add logging message.
589
590         * cos.scm (/object-error): Convert symbols to strings before passing
591         to string-append.
592
593         * read.scm (rtl-version-equal?): New function.
594         (rtl-version-at-least?, rtl-version-older?): New functions.
595
596         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
597         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
598         rtl versions >= 0.9.
599         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
600
601 2009-09-03  Doug Evans  <dje@sebabeach.org>
602
603         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
604         is simple.
605
606 2009-09-01  DJ Delorie  <dj@redhat.com>
607
608         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
609         (parse_unsigned16_range): Likewise.
610         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
611         isa.
612
613 2009-09-01  Doug Evans  <dje@sebabeach.org>
614
615         Pmacro .equals -> .equal?
616         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
617         -pmacro-builtin-equals.  All callers updated.
618         (pmacros-init!): Rename .equals to .equal?.
619         * doc/pmacros.texi: Update.
620         * testsuite/pmacros-1.test: Update.
621
622         * doc/porting.texi: Work around texi2html bug where it doesn't
623         properly escape <> inside double-quotes inside @code.
624
625         * doc/porting.texi (Doing an opcodes port): Add step to specify
626         the .opc file.
627
628 2009-08-29  Doug Evans  <dje@sebabeach.org>
629
630         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
631         rtl version 0.7.
632         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
633
634 2009-08-27  Doug Evans  <dje@sebabeach.org>
635
636         Add do-count rtl function.
637         * rtl-c.scm (s-do-count): New function.
638         (do-count): New rtl handler.
639         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
640         (-rtx-make-traverser-table): Add ITERATION.
641         * rtl.scm (rtx-make-iteration-limit-var): New function.
642         (rtx-env-make-iteration-locals): New function.
643         * rtx-funcs.scm (do-count): New rtl function.
644         * cpu/play.cpu: Add do-count-test insn.
645         * doc/rtl.texi: Add docs on do-count.
646
647 2009-08-26  Doug Evans  <dje@sebabeach.org>
648
649         * read.scm (parse-error): Change error message output format
650         to match context-owner-error.
651         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
652         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
653         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
654         (operand): Call estate-error instead of context-error.
655         (local, delay): Ditto.
656         (ref, attr): Call estate-error instead of error.
657         * rtl-traverse.scm (tstate-error): New function.
658         (-rtx-traverse-error): Call tstate-error instead of context-error.
659         (-rtx-traverse-operands, -rtx-traverse): Ditto.
660         (estate-error): New function.
661         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
662         instead of error.
663         (e-if): Call estate-error instead of error.
664         * rtx-funcs.scm (error): Call estate-error instead of context-error.
665         (member): Ditto.
666         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
667         Rewrite to call context-owner-error.
668         (context-owner-error): New function.
669
670         * ifield.scm (<ifield> constructor): New arg `location',
671         all callers updated.
672         * insn.scm (<insn> constructor): Ditto.
673         (<multi-insn> constructor): Ditto.
674         * minsn.scm (<macro-insn> constructor): Ditto.
675         * operand.scm (<operand> constructor): Ditto.
676         * utils-cgen.scm (builtin-location): New function.
677         (<source-ident>): Fix default value of member `location'.
678         (source-ident?): New function.
679
680         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
681         (estate-push-env, estate-with-modifiers): Ditto.
682         (estate-deepen): New function.
683
684 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
685
686         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
687         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
688         routines.
689
690 2009-08-25  Doug Evans  <dje@sebabeach.org>
691
692         * doc/pmacros.texi (pmacro default argument values): Add text.
693
694 2009-08-23  Doug Evans  <dje@sebabeach.org>
695
696         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
697         Rename member prefix -> name-prefix.
698         (<keyword> getters): Update.
699         (-keyword-parse): Update.  Default enum-prefix to NAME-.
700         (-keyword-read): Update.  Don't compute default value for
701         enum-prefix here.
702         (define-keyword): Update.
703         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
704         * read.scm (cgen-rtl-version): New function.
705         (-supported-rtl-versions): Add (0 8).
706         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
707         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
708         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
709         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
710         Update, print-name -> enum-prefix, make uppercase.
711         Remove unnecessary name-prefix spec.
712         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
713         * cpu/ip2k.cpu (register-names): Ditto.
714         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
715         * cpu/sparc.cpu (gr-names): Ditto.
716         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
717         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
718         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
719         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
720         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
721         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
722         prefix -> name-prefix.
723         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
724         Update, print-name -> enum-prefix, make uppercase.
725         (drc-names, xf-names): Ditto.
726         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
727         * doc/rtl.texi (Keywords): New section.
728         (hardware indices): Update text.
729         (rtl versions): Add 0.8.
730
731         Add define-rtl-version.
732         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
733         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
734         (cgen-lang-fixlevel): Delete.
735         (-supported-rtl-versions): New variable.
736         (-cmd-define-rtl-version): New function.
737         (init-reader!): New command define-rtl-version.
738         (-cgen): Add rtl version to --version output.
739         * doc/rtl.texi: Document rtl version support.
740         * cpu/play.cpu: Add define-rtl-version.
741
742 2009-08-22  Doug Evans  <dje@sebabeach.org>
743
744         * Makefile.am (OPTIONS): Define.
745         (desc): Just generate <arch>-desc.[ch] files.
746         * Makefile.in: Regenerate.
747         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
748         no .opc file.
749         (cgen-desc.c): Similarly.
750         * gen-all-desc: New file.
751         * opcodes.scm (opc-file-provided?): New function.
752
753         * mach.scm (current-*-add!): Update calls to parse-error.
754         * operand.scm (op:new-mode): Update call to parse-error.
755         * utils-cgen.scm (make-obj-context): New function.
756
757         * NEWS: Copy over entries from 1.1 branch.
758
759 2009-08-20  Doug Evans  <dje@sebabeach.org>
760
761         * gas-test.scm (<keyword> test-data): Catch invalid requests,
762         flag a warning and compensate.
763         (<hw-address test-data): Tweak for readability.
764         (<hw-iaddress test-data): Ditto.
765         (cgen-build.sh): Convert symbols to strings before passing to
766         string-append.
767         (cgen-allinsn.exp): Ditto.
768
769         * doc/pmacros.texi (.splice): Add more text.
770
771 2009-08-19  Doug Evans  <dje@sebabeach.org>
772
773         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
774         distinguish from 1.1.
775         * configure: Regenerate.
776         * read.scm (-CGEN-VERSION): Update.
777         * doc/version.texi: Update.
778
779         New builtin .pmacro?.
780         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
781         (pmacros-init!): Add .pmacro?.
782         * doc/pmacros.text: Document .pmacro?.
783         * testsuite/pmacros-1.test: Test .pmacro?.
784
785         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
786         of a pmacro begins before its arguments are evaluated, improves
787         readability.
788
789         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
790         * testsuite/pmacros-1.test: Ditto.  Add better tests.
791
792         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
793         in assembler syntax.
794         (Operands): Similarly.
795
796 2009-08-18  Doug Evans  <dje@sebabeach.org>
797
798         * ifield.scm (ifld-encode-mode): Add FIXME.
799         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
800         modes.
801         (<ifield> gen-extract): Similarly.
802
803         * read.scm (parse-error): Handle #f for context-location.
804         * utils-cgen.scm (unspecified-location): Fix building of
805         single-location.
806
807         * doc/rtl.texi: Document how to write hex and boolean values.
808
809         * gas-test.scm (<hw-asm> test-data): Handle () values.
810         (<keyword> test-data): Convert symbols to strings before passing
811         to string-append.
812         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
813         result for scalars.
814
815         * operand.scm (hw-index-scalar): Set `name'.
816         (hw-index-anyof, hw-index-derived): Ditto.
817
818 2009-08-17  Doug Evans  <dje@sebabeach.org>
819
820         * pmacros.scm (-pmacro-builtin-internal-test): New function.
821         (pmacros-init!): Add .internal-test.
822         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
823         * testsuite/testsuite.cpu (internal-verify): New pmacro.
824         * doc/pmacros.text: Document .internal-test.
825
826         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
827         (parse-comment): Allow numbers.
828         * doc/porting.texi: Document that names and comments may be lists.
829
830         * insn.scm (-insn-parse): Fix typo.
831
832         Rename .eval -> .exec.  Add new .eval.
833         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
834         (-pmacro-builtin-eval): New function.
835         (pmacros-init!): Add .exec.
836         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
837         * testsuite/location-1.test: Update.
838         * testsuite/pmacros-1.test: Add test for .eval.
839
840 2009-08-16  Doug Evans  <dje@sebabeach.org>
841
842         * doc/porting.texi: Remove support for Guile 1.4.
843
844         * read.scm (current-reader-location): Return unspecified location
845         if reader hasn't been initialized yet.
846
847 2009-08-13  Doug Evans  <dje@sebabeach.org>
848
849         * dev.scm: Document tracing options.
850
851         * pmacros.scm (pmacro-dump): New function.
852         (check-pmacro): Tweak debugging output.
853         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
854         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
855
856         Add .let* pmacro builtin.
857         * pmacros.scm (-pmacro-builtin-let*): New function.
858         (pmacros-init!): Add .let*.
859         * doc/pmacros.texi: Document .let*.
860         * testsuite/pmacros-1.test: Test .let*.
861
862 2009-08-12  Doug Evans  <dje@sebabeach.org>
863
864         Clean up cpu file parsing, pass context consistently instead of the
865         old "errtxt" argument.
866         NOTE: ACU == "All Callers Updated".
867         * attr.scm (-parse-simple-attribute): Renamed from
868         parse-simple-attribute, ACU.
869         (-attr-parse): Change errtxt argument to context, ACU.
870         (-attr-read): Ditto.
871         (atlist-parse): Ditto.  Put context arg first.
872         (attr-parse): Use parse-error instead of context-error.
873         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
874         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
875         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
876         `context' arg is now a <context> object.  ACU.
877         (-keyword-read): `context' arg is now a <context> object.  ACU.
878         (-hw-parse-indices): Change errtxt argument to context, ACU.
879         (-hw-parse-values, -hw-parse-handlers): Ditto.
880         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
881         (-hw-validate-layout, -hw-create-getter-from-layout,
882         -hw-create-setter-from-layout): Ditto.
883         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
884         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
885         (<hw-address>:parse!): Ditto.
886         * ifield.scm (-ifield-parse, ifield-read): Ditto.
887         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
888         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
889         (-multi-ifield-parse, -multi-ifield-read): Ditto.
890         * insn.scm (-insn-parse, -insn-read): Ditto.
891         (parse-syntax): Ditto.  Put context arg first.
892         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
893         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
894         (-parse-insn-format): Ditto.
895         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
896         (-arch-parse-isas): Ditto.
897         (-isa-read): Add context arg, ACU.
898         (-cpu-parse, -cpu-read, -mach-read): Ditto.
899         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
900         context, ACU.
901         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
902         (minsn-make-alias): Ditto.
903         * mode.scm (-mode-parse): Ditto.
904         (parse-mode-name): Ditto.  Put context arg first.
905         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
906         errtxt argument to context, ACU.
907         (-unit-parse, -model-parse, -model-read): Ditto.
908         * operand.scm (-operand-parse-getter): Use parse-error instead of
909         context-error.
910         (-operand-parse-setter): Ditto.
911         (-operand-parse): Change errtxt argument to context, ACU.
912         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
913         (-anyof-operand-parse, -anyof-operand-read): Ditto.
914         * read.scm (reader-error): Delete.  Use parse-error instead.
915         (parse-error): Change errtxt argument to context, ACU.  Split args
916         argument into expr and maybe-help-text.
917         (-reader-process-expanded-1!): Reorganize.
918         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
919         * types.scm (parse-type): Ditto.
920         * utils-cgen.scm (single-location->simple-string): New function.
921         (<context>): Replace members file,lineno with location.
922         (make-prefix-context): Renamed from context-make-prefix, ACU.
923         (make-current-context): New function.
924         (context-append, context-append-name): New functions.
925         (context-make-reader): Delete.
926         (parse-name): Change errtxt argument to context, ACU.
927         Put context arg first.
928         (parse-comment): Ditto.
929         (parse-number): Change errtxt argument to context, ACU.
930         (arg-list-validate-name, arg-list-check-no-args,
931         arg-list-symbol-arg): Ditto.
932
933         * read.scm (-cmd-if): Don't assume test is a list.
934
935         * html.scm (get-insn-properties): Delete errtxt, unused.
936
937 2009-08-11  Doug Evans  <dje@sebabeach.org>
938
939         * doc/rtl.texi (hardware types): Add pc.
940
941 2009-08-07  Doug Evans  <dje@sebabeach.org>
942
943         Add -t option for tracing things like commands, pmacro expansion.
944         * dev.scm (cload): New arg #:trace.
945         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
946         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
947         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
948         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
949         (-reader-process-expanded-1!): Trace commands if requested.
950         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
951         (-set-trace-options!): New function.
952         (-init-reader!): New function.
953         (cpu-load): New arg trace-options, all callers updated.
954         Call -init-reader! and -set-trace-options!.
955         (cgen-usage): Improve output formatting.
956         (common-arguments): New option -t.
957         (-cgen): Process -t.
958         * utils-cgen.scm (single-location->string): Renamed from
959         pretty-print-single-location.  All callers updated.
960         (location->string): Renamed from pretty-print-location.
961         All callers updated.
962         (source-properties-location->string): New function.
963         * doc/running.texi: Document -t.
964
965 2009-08-06  Doug Evans  <dje@sebabeach.org>
966
967         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
968         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
969         * utils.scm: ... here.
970
971 2009-08-05  Doug Evans  <dje@sebabeach.org>
972
973         Track source location better, for better error messages.
974         * pmacros.scm (-pmacro-eval): Delete, unused.
975         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
976         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
977         (scan-list, scan): Ditto.
978         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
979         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
980         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
981         (scan-list1): New function.
982         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
983         * read.scm (<reader>): New member `location'.
984         (-reader-lookup-command): Renamed from reader-lookup-command,
985         all callers updated.
986         (reader-error): Rewrite to produce better source location info.
987         (current-reader-location): New function.
988         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
989         All callers updated.  Record source location of expression.
990         (reader-process-expanded!): Renamed from reader-process-expanded.
991         All callers updated.
992         (-reader-process!): Renamed from reader-process.  New arg `loc'.
993         All callers updated.  Record source location of define-pmacro.
994         * utils-cgen.scm (<location>): New class.
995         (single-location): New (pseudo) class.
996         (pretty-print-single-location, pretty-print-location): New functions.
997         (location-top, location-push-single, location-push): New functions.
998         (unspecified-location, current-input-location): New functions.
999         (location-property): New object property.
1000         (location-property-set!): New function.
1001         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1002         All uses updated.
1003         * testsuite/location-1.test: New testcase.
1004         * testsuite/run-tests.sh: Fix fail count handling.
1005         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1006         to expect cgen to fail.
1007
1008         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1009
1010         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1011         (-cmd-if): Renamed from cmd-if.  All callers updated.
1012         Use reader-process-expanded! on then/else clauses instead of eval1.
1013
1014 2009-07-22  Doug Evans  <dje@sebabeach.org>
1015
1016         * modes.scm (TI,OI): New modes.
1017         * types.scm (parse-type): Improve error checking.  Don't hardwire
1018         mode names here.
1019         * utils.scm (non-negative-integer?): New function.
1020
1021         * pmacros.scm (-pmacro-builtin-find): New predicate.
1022         (pmacros-init!): Add .find.
1023         * doc/pmacros.tex: Document .find.
1024         * testsuite/pmacros-1.test: Test .find.
1025
1026 2009-07-20  Doug Evans  <dje@sebabeach.org>
1027
1028         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1029         commented out printfs.
1030         * rtl.scm (rtl-finish!): Whitespace tweaks.
1031         * model.scm (parse-insn-timing): Tweak logging message.
1032         * operand.scm: Comment and whitespace tweaks.
1033         (op:type): Tweak error message.
1034         (op-ifield): Tweak logging message.
1035         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1036         * read.scm: Whitespace cleanup.
1037         * utils.scm: Whitespace cleanup.
1038
1039 2009-07-19  Doug Evans  <dje@sebabeach.org>
1040
1041         Fix binding of nested pmacro parameters.
1042         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1043         All callers updated.
1044         (-pmacro-bulid-lambda): Ditto.
1045         * doc/pmacros.texi: Update.
1046         * testsuite/pmacros-1.test: Add testcase.
1047
1048         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1049         calculation.
1050         (-multi-ifield-make-default-extract): Ditto.
1051
1052         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1053         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1054         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1055         Define.
1056         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1057         * doc/rtl.texi: Update.
1058
1059         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1060
1061         Rename builtin boolean pmacros, for consistency with rtl.
1062         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1063         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1064         * doc/pmacros.texi: Update.
1065         * testsuite/pmacros-1.test: Update.
1066
1067 2009-07-17  Doug Evans  <dje@sebabeach.org>
1068
1069         Use hash tables to record ifields, operands, insns, macro-insns.
1070         * attr.scm (attr-builtin!): Tweak some comments.
1071         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1072         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1073         <ident>.
1074         (<multi-ifield>): New constructor.
1075         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1076         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1077         <ident>.
1078         (-sub-insn-make!): Add hack to avoid differences in generated code.
1079         (multi-insn-instantiate!): Add total number of multi-insns to
1080         logging message.
1081         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1082         minsn-list to foo-table.  New member next-ordinal.
1083         Update getters/setters.
1084         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1085         New functions.
1086         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1087         (-make-ident-object-table, -ident-object-table->list,
1088         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1089         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1090         -ifld-already-defined?): Rewrite.
1091         (current-op-list, current-op-add! current-op-lookup,
1092         -op-already-defined?): Rewrite.
1093         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1094         (current-insn-list, current-insn-add! current-insn-lookup,
1095         -insn-already-defined?): Rewrite.
1096         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1097         -minsn-already-defined?): Rewrite.
1098         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1099         (MAX-VIRTUAL-INSNS): Define.
1100         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1101         Update use of arch-insn-list.
1102         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1103         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1104         minsn-list.
1105         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1106         <ident>.  New constructor.
1107         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1108         <ident>.
1109         * sid.scm (-virtual-insn-add!): New function.
1110         (-create-virtual-insns!): Call it.
1111         (-fill-sim-insn-list!): Rewrite.
1112         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1113         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1114         * utils-cgen.scm (<ordered-ident>): New class.
1115         (obj-ordinal, obj-set-ordinal!): New functions.
1116         (add-ident-methods!): Delete.
1117
1118         * model.scm (parse-insn-timing): Change logging message to level 3.
1119
1120 2009-07-16  Doug Evans  <dje@sebabeach.org>
1121
1122         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1123         add a link to define-normal-insn-enum.
1124
1125         * doc/porting.texi (Conventions): Add docs on writing integers.
1126
1127         * cpu/simplify.inc (*): One line doc strings don't need \n.
1128         (df): Invoke define-full-ifield instead of claiming it's an alias.
1129         (dno): Define.
1130         (dnop): Mark as deprecated.
1131
1132         * cpu/play.cpu: Add example of hardware `layout'.
1133         * doc/porting.tex: Add docs on simplify.inc.
1134         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1135         and other things.
1136
1137         * ifield.scm: Whitespace/formatting cleanup.
1138
1139         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1140
1141         * read.scm (parse-error): Don't print single entry args as a list.
1142         (-reader-process-expanded-1): Convert symbol to string for
1143         string-append.
1144
1145         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1146
1147 2009-07-15  Doug Evans  <dje@sebabeach.org>
1148
1149         * cpu/simplify.inc (dno): New pmacro.
1150         * doc/porting.texi: Add section on simplify.inc.
1151         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1152
1153 2009-07-15  Doug Evans  <devans@sourceware.org>
1154
1155         * gen-all-doc: Generate index.html.
1156
1157 2009-07-13  Doug Evans  <dje@sebabeach.org>
1158
1159         Extend pmacro language, add testsuite.
1160         * Makefile.am (SUBDIRS): Add testsuite.
1161         * Makefile.in: Regenerate.
1162         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1163         testsuite/test-utils.sh.
1164         * configure: Regenerate.
1165         * dev.scm (cload): Handle testsuite app.
1166         (load-testsuite): New function.
1167         * pmacros.scm: (-pmacro-debug?): New global.
1168         (-smacro-table): New global.
1169         (-smacro-lookup, -smacro-set!): New functions.
1170         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1171         (-pmacro-syntactic-form?): New function.
1172         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1173         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1174         (-pmacro-expected-non-negative-integer): New function.
1175         (-pmacro-verify-non-negative-integer): New function.
1176         (-pmacro-expand-expr-list): New function.
1177         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1178         (-pmacro-process-args): Renamed from -pmacro-invoke.
1179         (-pmacro-apply, -smacro-apply): New functions.
1180         (-pmacro-expand): Rewrite syntactic form processing.
1181         (-pmacro-build-lambda): Reformat.
1182         (define-pmacro): Watch for more errors in definition.
1183         (pmacro-debug): New function.
1184         (pmacro-trace): Set/reset -pmacro-debug?.
1185         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1186         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1187         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1188         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1189         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1190         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1191         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1192         (pmacros-init!): Initialize -smacro-table.
1193         Rewrite pmacro initialization.
1194         * read.scm (reader-process-expanded): Renamed from
1195         -reader-process-expanded.  All callers updated.
1196         Recognize () as a no-op.
1197         (cpu-load): Tweak logging messages.
1198         * utils.scm (message): Add comment.
1199         * cpu/play.cpu: Add some instructions to play with .let.
1200         * doc/cgenint.texi: Move some debugging related docs to here from
1201         cgen.texi.
1202         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1203         * testsuite/Makefile.am: New file.
1204         * testsuite/Makefile.in: New file.
1205         * testsuite/test-utils.sh.in: New file.
1206         * testsuite/run-tests.sh: New file.
1207         * testsuite/testsuite.cpu: New file.
1208         * testsuite/pmacros-1.test: New file.
1209
1210         * decode.scm: Comment and formatting tweaks.
1211         (-build-decode-table-guts): Add more data to logging message.
1212
1213 2009-07-12  Doug Evans  <dje@sebabeach.org>
1214
1215         Delete files that now live in ../cpu.
1216         * cpu/iq10.cpu: Delete.
1217         * cpu/iq2000.cpu: Delete.
1218         * cpu/iq2000.opc: Delete.
1219         * cpu/iq2000m.cpu: Delete.
1220         * cpu/m32r.cpu: Delete.
1221         * cpu/m32r.opc: Delete.
1222
1223 2009-07-09  Doug Evans  <dje@sebabeach.org>
1224
1225         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1226         All callers updated.  Work around -ve shifts by referencing the
1227         entire value.
1228
1229         * utils.scm (message): Handle pairs.
1230
1231 2009-07-08  DJ Delorie  <dj@redhat.com>
1232
1233         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1234         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1235         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1236         written to.
1237
1238 2009-07-07  Doug Evans  <dje@sebabeach.org>
1239
1240         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1241         * cpu/play.opc: New file.
1242
1243         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1244         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1245         * doc/rtl.texi (Instructions): Update.
1246
1247         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1248         (opc-arguments, -OPC): Call set-opc-file-path!.
1249         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1250         (set-opc-file-path!): New function.
1251         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1252
1253         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1254         before passing to gen-c-args.
1255
1256 2009-07-06  DJ Delorie  <dj@redhat.com>
1257
1258         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1259         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1260         unspecified accesses to control registers.
1261
1262 2009-07-01  DJ Delorie  <dj@redhat.com>
1263
1264         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1265         unspecified accesses to control registers.
1266
1267         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1268         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1269
1270 2009-06-27  Doug Evans  <dje@sebabeach.org>
1271
1272         * gen-all-intrinsics: New file.
1273
1274 2009-06-24  Doug Evans  <dje@sebabeach.org>
1275
1276         * All *.scm files: Update copyright year.
1277         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1278
1279 2009-06-23  DJ Delorie  <dj@redhat.com>
1280
1281         * intrinsics.scm: Updates to support IVC2.
1282         (belongs-to-group?): Check IVC2 slots.
1283         (-slots-attribute): New.
1284         (targets::attributes): Add SLOTS.
1285         (target:add-well-known-intrinsics): Add CPMOV.
1286         (md-insn): Add CPTYPE and CRET?.
1287         (add-md-insn): Likewise.
1288         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1289         duplicate insns with different bit patterns.
1290         (write-cgen-insn?): Add cret? support.
1291         (intrinsics.h): Add vector types.
1292         (runtime-op): Add vector support.
1293         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1294
1295         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1296         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1297         (h-cr-ivc2): Default to typeless.
1298         (h-ccr-ivc2): Fix register width.
1299         (SLOTS): Fix values and default.
1300         (ivc2_*): Add control register names.
1301         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1302
1303         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1304         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1305
1306 2009-06-22  Doug Evans  <dje@sebabeach.org>
1307
1308         * semantics.scm (insn-build-known-values): Fix typo in comment.
1309
1310 2009-06-21  Doug Evans  <dje@sebabeach.org>
1311
1312         * rtl-xform.scm (rtx-simplify-insn): New function.
1313         * html.scm (gen-insn-docs): Call it.
1314         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1315         * iformat.scm (ifmt-analyze): Minor simplification.
1316
1317         * semantics.scm (semantic-compile): Change arg sem-code-list to
1318         sem-code.
1319         (semantic-attrs): Ditto.
1320         * iformat.scm (ifmt-analyze): Update.
1321         (ifmt-compute!): Update.
1322         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1323         rtl-xform.scm.
1324         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1325         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1326         * semantics.scm (rtx-simplify): Ditto.
1327         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1328         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1329         (-simplify-expr-fn): Move to rtl-xform.scm.
1330         (-solve-expr-fn, rtx-solve): Ditto.
1331         * rtl-xform.c: New file.
1332         * read.scm: Load it.
1333
1334         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1335         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1336         (-rtx-traverse, rtx-traverse): Ditto.
1337
1338 2009-06-20  Doug Evans  <dje@sebabeach.org>
1339
1340         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1341
1342         * configure.in: Update version to 1.1.
1343         * configure: Regenerate.
1344         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1345
1346 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1347             Doug Evans  <dje@sebabeach.org>
1348
1349         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1350         (cgen-desc.c): Ditto.
1351         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1352         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1353         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1354         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1355         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1356         (cgen-cpuall.h, cgen-ops.c): Ditto.
1357         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1358         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1359         (cgen-sem-switch.c): Ditto.
1360         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1361         * sim-model.c (cgen-model.c): Ditto.
1362
1363 2009-06-18  Doug Evans  <dje@sebabeach.org>
1364
1365         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1366
1367         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1368
1369         * dev.scm (cload): Change #:arch argument to take the path to the
1370         .cpu file instead of just the name of the architecture.
1371         * read.scm (arch-path): Remove trailing '/'.
1372         (cpu-load): Set `arch-path' to directory of .cpu file.
1373         (-cgen): Don't set `arch-path' here.
1374         (include): Update.
1375         * doc/porting.texi: Update.
1376
1377 2009-06-14  Doug Evans  <dje@sebabeach.org>
1378
1379         * gen-all-doc: Use files in ../cpu where possible.
1380
1381         * Makefile.am (ARCHFILE): Fix path.
1382         * Makefile.in: Regenerate.
1383         * html.scm: Use "pre" instead of "plaintext".
1384
1385         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1386         * doc/app.texi: Cleanup pass.
1387         * doc/cgen.texi: Cleanup pass.
1388         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1389         * doc/intro.texi: Cleanup pass.
1390         * doc/mdate-sh: New file.
1391         * doc/opcodes.texi: Cleanup pass.
1392         * doc/pmacros.texi: Cleanup pass.
1393         * doc/porting.texi: Cleanup pass.
1394         * doc/rtl.texi: Cleanup pass.
1395         * doc/running.texi: Cleanup pass.  Document more runtime options.
1396         * doc/stamp-vti: Update.
1397         * doc/version.texi: Update.
1398
1399         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1400         (GUILE): Fix definition.
1401         * Makefile.in: Regenerate with automake 1.9.6.
1402         * aclocal.m4: Regenerate with aclocal 1.9.6.
1403         * configure.in (AC_PREREQ): Set to 2.59.
1404         (GENINSRC_NEVER): Define.
1405         * configure: Regenerate with autoconf 2.59.
1406         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1407         (cgen.info,cgen.dvi): Delete.
1408         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1409         (noinst_TEXINFOS): Add cgenint.texi.
1410         (DOCFILES): Add missing files.
1411         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1412         * doc/Makefile.in: Regenerate with automake 1.9.6.
1413
1414         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1415
1416         * attr.scm: Removing trailing whitespace.
1417         * cgen-intrinsics.scm: Ditto.
1418         * cgen-sim.scm: Ditto.
1419         * cos.scm: Ditto.
1420         * enum.scm: Ditto.
1421         * guile.scm: Ditto.
1422         * sim.scm: Ditto.
1423
1424 2009-05-28  DJ Delorie  <dj@redhat.com>
1425
1426         * cpu/mep.opc (parse_signed16_range): New.
1427         (parse_unsigned16_range): New.
1428         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1429
1430 2009-05-26  DJ Delorie  <dj@redhat.com>
1431
1432         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1433         accumulator names.
1434         (f-ivc2-ccrn-c3hi): New.
1435         (f-ivc2-ccrn-c3lo): New.
1436         (f-ivc2-ccrn-c3): New.
1437         (ivc2c3ccrn): Use it.
1438
1439 2009-05-22  DJ Delorie  <dj@redhat.com>
1440
1441         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1442         (mep_config_map): Regenerate.
1443
1444         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1445         ivc2-specific names.
1446         (simm8p20): New.
1447         (cmovc): move to after field definitions, use ivc2-specific
1448         register names.
1449         (cpmovi_b_P0S_P1): New.
1450         
1451 2009-05-19  DJ Delorie  <dj@redhat.com>
1452
1453         * cpu/mep.opc: Regenerate configuration.
1454         (parse_cdisp10): Only check CPU flags, not COP flags.
1455         (check_configured_mach): Likewise.
1456
1457 2009-05-13  DJ Delorie  <dj@redhat.com>
1458
1459         * intrinsics.scm (insns.md): Add RTL predicates.
1460         (intrinsics.h): Remove old C intrinsics.
1461
1462 2009-04-29  DJ Delorie  <dj@redhat.com>
1463
1464         * mep-ivc2.cpu: New.
1465         * mep-core.cpu: Regenerated.  Add support for deferred register
1466         writes.
1467         (SLOT): Add IVC2 slot types.
1468         (sim-syscall): Rename to something more appropriate.
1469         * mep-ext-cop.cpu: Regenerate.
1470         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1471         (print_slot_insn): New.
1472         (mep_examine_ivc2_insns): New.
1473         (mep_print_insn_set_ivc2_mode): New.
1474         (mep_print_insn): Support IVC2 slotting.
1475         
1476 2009-04-20  DJ Delorie  <dj@redhat.com>
1477
1478         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1479         (guess-mode): Drop COP* syntax.
1480         (need-insn): Add "--syscall--" to the list.
1481         (enum-type): Drop COP* syntax.
1482         (intrinsics.h): Likewise.
1483         (intrinsic-protos.h): Change file header to allow it to be
1484         included.
1485
1486 2009-04-17  DJ Delorie  <dj@redhat.com>
1487
1488         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1489         (lhucpm1): Limit to C5 mach.
1490         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1491         * cpu/mep-core.cpu (extend-cdisp10): New.
1492         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1493         
1494 2009-04-08  DJ Delorie  <dj@redhat.com>
1495
1496         * cpu/mep-c5.cpu: New.
1497         * cpu/mep-core.cpu: Add C5 support.
1498         * cpu/mep.opc: Likewise.
1499
1500 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1501
1502         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1503         about calling memset with a zero length.
1504
1505 2009-02-03  DJ Delorie  <dj@redhat.com>
1506
1507         * cpu/mep-core.cpu: Update to new MeP configuration.
1508         * cpu/mep-ext-cop.cpu: Likewise.
1509         * cpu/mep.opc: Likewise.
1510
1511 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1512
1513         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1514
1515 2008-06-17  Dave Brolley  <brolley@redhat.com>
1516
1517         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1518         (h-gr): Likewise.
1519
1520 2007-11-13  Dave Brolley  <brolley@redhat.com>
1521
1522         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1523
1524 2007-11-05  Dave Brolley  <brolley@redhat.com>
1525
1526         * intrinsics.scm,cgen-intrinsics.scm: New application which
1527         generates code to support intrinsic functions for insns in the
1528         mep architecture in gcc.
1529
1530 2007-09-21  Dave Brolley  <brolley@redhat.com>
1531
1532         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1533         (rn3us): CDATA attribute now LONG.
1534         
1535 2007-08-21  Dave Brolley  <brolley@redhat.com>
1536
1537         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1538         than 32 bits.
1539
1540 2007-07-05  Nick Clifton  <nickc@redhat.com>
1541
1542         * utils.scm (copyright-fsf): Update copyright notice to refer to
1543         the GPL version 3.
1544
1545 2007-05-22  Nick Clifton  <nickc@redhat.com>
1546
1547         * doc/cgen.texi: Use @copying around the copyright notice.
1548         * doc/internals.texi: Likewise.
1549
1550 2007-02-05  Dave Brolley  <brolley@redhat.com>
1551
1552         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1553
1554 2007-02-05  Dave Brolley  <brolley@redhat.com>
1555
1556         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1557         in the generated code for @arch@_cgen_init_asm if it is defined.
1558
1559         * Contribute the following changes:
1560         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1561
1562         * attr.scm (<string-attribute>): New attribute class.
1563         (attr-kind): Handle <string-attribute>.
1564         (parse-simple-attribute): New function.
1565         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1566         (<bitset-attribute> 'parse-value): Likewise.
1567         (<boolean-attribute> 'parse-value): Likewise.
1568         (<enum-attribute> 'parse-value): Likewise.
1569         (<string-attribute> 'parse-value): New function.
1570         (-attr-parse): Handle <string-attribute>.
1571         (-attr-read): Likewise.
1572         (<string-attribute> 'gen-value-for-defn-raw): New function.
1573         (<string-attribute> 'gen-value-for-defn): New function.
1574
1575 2006-11-07  Dave Brolley  <brolley@redhat.com>
1576
1577         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1578         necessary.
1579
1580 2006-10-18  Dave Brolley  <brolley@redhat.com>
1581
1582         * Contribute the following changes:
1583
1584         2006-07-11  Dave Brolley  <brolley@redhat.com>
1585
1586         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1587         (movcol): New insn.
1588         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1589         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1590         hardware or memory mode which was used.
1591         * sid-cpu.scm (hw-need-write-stack?): New function.
1592         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1593         identify hardware which uses write stacks.
1594         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1595         Initialized to an empty list.
1596         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1597         hw-need-write-stack?.
1598         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1599         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1600         (used-in-delay-rtl?): New method of <hardware-base>.
1601         (hw-used-in-delay-rtl?): New function.
1602
1603         2006-06-20  Dave Brolley  <brolley@redhat.com>
1604
1605         * sid.scm (gen-attr-type): Removed.
1606         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1607         (SH2a-MACH): Add sh5.
1608         (sh2a-nofpu-models): Add units for sh5.
1609         (sh2a-fpu-models): Likewise.
1610
1611         2006-06-15  Dave Brolley  <brolley@redhat.com>
1612
1613         * cpu/sh-sim.cpu: New file.
1614         * cpu/sh-sid.cpu: New file.
1615         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1616         (All fields): Remap for (insn-lsb0? #f)
1617         (All insns): Add timing specs.
1618         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1619         'xattrs' and .splice it in.
1620         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1621         (h-frc,h-drc): Add PROFILE attribute.
1622         (h-fpccr): Removed.
1623         (h-vbr): New hardware.
1624         (All fields): Remap for (insn-lsb0? #f)
1625         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1626         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1627         (fpscr): Use h-fpscr.
1628         (fsdm,fsdn): Use h-fsd.
1629         (dshci): Add xtiming argument and splice it in.
1630         (dr,xd): pmacros removed.
1631         (All insns): Add timing specs, *-MACH attribibutes,
1632         SH4{A}-GROUP attributes.
1633         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1634         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1635         we're being processed for sim or sid.
1636         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1637         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1638         (define-isa compact): Add (isa-parallel-insns 2).
1639         (define-isa media): Add (isa-parallel-insns 2). Add
1640         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1641         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1642         sh4a, sh4al
1643         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1644         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1645         (SH4al-MACH, SH5-MACH): New pmacros.
1646         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1647         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1648         (sh5-media-fp-units, common-model, common-model-with-fp) 
1649         (sh3-model, sh3e-model): New pmacros.
1650         (define-model sh2): New model.
1651         (define-model sh2e): New model.
1652         (define-model sh3): New model.
1653         (define-model sh3e): New model.
1654         (define-model sh2a-nofpu): New model.
1655         (define-model sh2a-fpu): New model.
1656         (define-model sh4-nofpu): New model.
1657         (define-model sh4): New model.
1658         (define-model sh4a-nofpu): New model.
1659         (define-model sh4a): New model.
1660         (define-model sh4al): New model.
1661         (define-model sh5-media): New model.
1662         (define-model sh5): Add all units.
1663         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1664         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1665         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1666         (h-pc): Add PROFILE attribute.
1667         (h-fr): Likewise.
1668         (h-tr): Likewise.
1669         (h-gr,h-grc): Likewise.
1670         (h-cr): Set h-sr in setter.
1671         (h-frbit): Get/Set h-fpscr.
1672         (h-szbit,h-prbit): Likewise.
1673         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1674         Add getter and setter.
1675         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1676         Adjust getter and setter.
1677         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1678         Adjust getter and setter.
1679         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1680         (h-fsd,h-fmov): New hardware.
1681
1682 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1683
1684         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1685         doc/notes.texi, doc/porting.texi, doc/running.texi,
1686         doc/sim.texi: Fix some typos.
1687
1688 2006-07-14  Dave Brolley  <brolley@redhat.com>
1689
1690         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1691         hardware or memory mode which was used.
1692         * sid-cpu.scm (hw-need-write-stack?): New function.
1693         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1694         identify hardware which uses write stacks.
1695         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1696         Initialized to an empty list.
1697         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1698         hw-need-write-stack?.
1699         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1700         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1701         (used-in-delay-rtl?): New method of <hardware-base>.
1702         (hw-used-in-delay-rtl?): New function.
1703
1704 2006-06-20  Dave Brolley  <brolley@redhat.com>
1705
1706         * sid.scm (gen-attr-type): Removed.
1707
1708 2006-05-10  Dave Brolley  <brolley@redhat.com>
1709
1710         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1711         support for (if (application-is? <appname>) (...) (...)).
1712         (-cgen): Add trailing "/" to arch-path.
1713         * utils.scm (dirname): Removed. dirname is a primitive function.
1714
1715 2006-05-09  Dave Brolley  <brolley@redhat.com>
1716
1717         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1718         'entire_insn' not 'base_insn'.
1719         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1720         is null.
1721         * sim.scm (-gen-arch-model-decls): Likewise.
1722         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1723         abuf->written if profiling.
1724         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1725         object->string om the mode.
1726         (-hw-gen-write-stack-decl): Likewise.
1727         * read.scm (include): Use arch-path as file location.
1728         (arch-path): Define it with a default setting.
1729         (-cgen): Update arch-path when "-a" option is specified.
1730         * utils.scm (dirname): New function.
1731
1732 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1733
1734         * configure.in: Remove AC_ARG_PROGRAM.
1735         * configure: Regenerate with autoconf 2.59.
1736
1737 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1738
1739         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1740         SIMULATOR.
1741
1742 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1743
1744         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1745         or an error message otherwise.
1746         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1747         Fix up comments to correctly describe the functions.
1748
1749 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1750             Anil Paranjape   <anilp1@kpitcummins.com>
1751             Shilin Shakti    <shilins@kpitcummins.com>
1752
1753         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1754         CPU description.
1755         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1756
1757 2006-02-10  Nick Clifton  <nickc@redhat.com>
1758
1759         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1760
1761 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1762
1763         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1764         for concatenation.
1765         (-hw-gen-write-stack-decl): Likewise.
1766
1767 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1768
1769         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1770         non-(adata-integral-insn? CURRENT-ARCH) case.
1771
1772 2005-10-28  Dave Brolley  <brolley@redhat.com>
1773
1774         Contribute the following changes:
1775         2005-09-19  Dave Brolley  <brolley@redhat.com>
1776
1777         * attr.scm (gen-value-for-defn-raw): New methods.
1778         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1779         gen-value-for-defn-raw.
1780         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1781
1782         2002-12-13  Dave Brolley  <brolley@redhat.com>
1783
1784         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1785         (-gen-attr-accessors): New function.
1786         (gen-obj-attr-defn): Update terminating initializer.
1787         (gen-obj-attr-end-defn): New function.
1788         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1789         * sid-cpu.scm (cgen-desc.h): Generate code to include
1790         "opcode/cgen-bitset.h"
1791         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1792         name.
1793         * desc.scm ('gen-defn): Update terminating initializer.
1794         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1795         terminatinig initializer.
1796         (gen-hw-decls): Ditto.
1797         (gen-operand-decls): Ditto.
1798         (gen-insn-decls): Ditto.
1799         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1800         (gen-insn-table): Update terminating initializer.
1801         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1802         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1803         * attr.scm (charmask-bytes): New function.
1804         (bitset-attr->charmask): New function.
1805         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1806         differences for SID-SIMULATOR.
1807         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1808         (<enum-attribute>): Ditto.
1809
1810 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1811
1812         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1813
1814 2005-10-24  DJ Delorie  <dj@redhat.com>
1815
1816         * operand.scm (-anyof-merge-syntax): Print a more useful error
1817         message.
1818
1819 2005-10-19  Nick Clifton  <nickc@redhat.com>
1820
1821         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1822         patch.
1823
1824 2005-10-18  Andreas Schwab  <schwab@suse.de>
1825
1826         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1827
1828 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1829
1830         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1831         size.
1832
1833 2005-08-02  Dave Brolley  <brolley@redhat.com>
1834
1835         * rtl-c.scm (s-unop): Don't dereference
1836         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1837         (s-binop, s-convop, s-cmpop): Likewise.
1838
1839 2005-07-29  Dave Brolley  <brolley@redhat.com>
1840
1841         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1842         if with-profile or with-parallel-write.
1843         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1844         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1845         string-append.
1846
1847 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1848
1849         * cpu/fr30.opc (print_register_list): Correct format strings.
1850         * cpu/ip2k.opc: Likewise.
1851
1852 2005-07-05  Nick Clifton  <nickc@redhat.com>
1853
1854         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1855         unsigned in order to avoid compile time warnings about sign
1856         conflicts.
1857
1858 2005-07-01  Nick Clifton  <nickc@redhat.com>
1859
1860         * desc-cpu.scm: Update to ISO C90 function declaration style.
1861         * opc-asmdis.scm: Likewise.
1862         * opc-ibld.scm: Likewise.
1863         * opc-itab.scm: Likewise.
1864         * cpu/fr30.opc: Likewise.
1865         * cpu/i960.opc: Likewise.
1866         * cpu/ip2k.opc: Likewise.
1867         * cpu/iq2000.opc: Likewise.
1868         * cpu/m32r.opc: Likewise.
1869         * cpu/openrisc.opc: Likewise.
1870         * cpu/sh.opc: Likewise.
1871         * cpu/sparc.opc: Likewise.
1872         * cpu/xstormy16.opc: Likewise.
1873
1874 2005-06-15  Dave Brolley  <brolley@redhat.com>
1875
1876         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1877         (cgen-cpu.h): Call it.
1878
1879         Contributed on behalf of Graydon Hoare
1880         2001-06-05  graydon hoare  <graydon@redhat.com>
1881
1882         * utils.scm (foldl): Define.
1883         (foldr): Define.
1884         (filter): Define.
1885         (union): Define.
1886         (intersection): Simplify.
1887         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1888         (-op-gen-delayed-set-maybe-trace): Define.
1889         (<operand> 'gen-set-{quiet,trace}): Delegate to
1890         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1891         up and needs cleaning.
1892         (-with-parallel?): Hardwire with-parallel to #t.
1893         (<operand> 'cxmake-get): Replace with lookahead-aware code
1894         * sid-decode.scm: Remove per-insn writeback fns.
1895         (-gen-idesc-decls): Redefine sem_fn type.
1896         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1897         with write stack stuff.
1898         (cgen-write.cxx): Replace per-insn writebacks with single write
1899         stack writeback. Add write stack reset function.
1900         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1901         stack stuff.
1902         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1903         estate attribute set.
1904         (delay): Set #:delayed attribute to calculated delay, update
1905         maximum delay of cpu, check (delay ...) usage.
1906         * operand.scm (<operand>): Add delayed slot to <operand>.
1907         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1908         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1909         * doc/rtl.texi (Expressions): Add section on (delay ...).
1910
1911 2005-06-13  Jim Blandy  <jimb@redhat.com>
1912
1913         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1914         as well as strings.
1915
1916 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1917
1918         * doc/porting.texi: Change all mention of md_apply_fix3 and
1919         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1920         respectively.
1921
1922 2005-05-18  Dave Brolley  <brolley@redhat.com>
1923
1924         * utils-sim.scm (-gen-decode-default-entry): New function.
1925         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1926         code to check that all opcodes bits match.
1927         (-gen-decoder-switch): Use -gen-decode-default-entry.
1928
1929 2005-05-16  Jim Blandy  <jimb@redhat.com>
1930
1931         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1932         fetched by one of our GETIMEM* methods.
1933         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1934         base-insn-sized chunks.
1935
1936 2005-05-10  Nick Clifton  <nickc@redhat.com>
1937
1938         * Update the address and phone number of the FSF organization in
1939         the GPL notices in the following files:
1940         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1941         cpu/powerpc.cpu, slib/random.scm
1942
1943 2005-05-06  Jim Blandy  <jimb@redhat.com>
1944
1945         * pprint.scm, cos-pprint.scm: Add documentation.
1946
1947         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1948
1949         * pprint.scm, cos-pprint.scm: New files.
1950
1951 2005-04-04  Nick Clifton  <nickc@redhat.com>
1952
1953         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1954         avoid a compile time warning.
1955
1956 2005-03-18  Nick Clifton  <nickc@redhat.com>
1957
1958         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1959         "percent-operand" from "%operand" as the latter confuses xgettext
1960         into thinking that it is a C printf formating directive, which
1961         prevents proper translation.
1962
1963 2005-02-23  Nick Clifton  <nickc@redhat.com>
1964
1965         * opcodes.scm (gen-parse-number): Add a cast to the desired
1966         pointer signed'ness in order to prevent compile time warnings.
1967         * cpu/ip2k.opc: Fixed compile time warnings about differing
1968         signed'ness of pointers passed to functions.
1969         * cpu/iq2000.opc: Likewise.
1970         * cpu/m32r.opc: Likewise.
1971         * cpu/openrisc.opc: Likewise.
1972         * cpu/xstormy16.opc: Likewise.
1973
1974 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1975
1976         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1977         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1978
1979 2005-02-16  Dave Brolley  <brolley@redhat.com>
1980
1981         * utils.scm: Update copyright years.
1982         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1983         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1984         * operand.scm (-derived-operand-parse): Move logit message from level 1
1985         to level 2.
1986
1987 2005-02-15  Nick Clifton  <nickc@redhat.com>
1988
1989         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1990         prevent compile time warning messages.
1991         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1992         * utils-gen.scm (attr-int-gen-defn): Likewise.
1993         (attr-gen-defn): Likewise.
1994         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1995         (print_dollarhex16): Remove unused function.
1996
1997 2005-02-15  Jim Blandy  <jimb@redhat.com>
1998
1999         * guile.scm (cgen-call-with-debugging): Doc fix.
2000
2001         Make backtraces work more reliably.
2002         * guile.scm: Set up debugging parameters, and enable debugging and
2003         source positions while loading.
2004         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2005         functions.
2006         * read.scm: Don't set debugging parameters here.
2007         (catch-with-backtrace): Function deleted.
2008         (-cgen): Simply note the presence or absence of the -b option.
2009         Pass the flag to cgen-call-with-debugging, so debugging is turned
2010         off here if the user didn't request it, for faster computation.
2011         (cgen): Call cgen-debugging-stack-start here, instead of
2012         catch-with-backtrace.
2013
2014         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2015         trailing -s.
2016         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2017         Don't write out the trailing -s here.
2018         * Makefile.in: Regenerated.
2019         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2020         fixup.scm here; let the caller decide which Scheme's customization
2021         file to preload.
2022         * dev.scm: Load guile.scm, not fixup.scm.
2023         * fixup.scm: Deleted; contents have all moved to guile.scm.
2024         * README: Doc fix.
2025
2026         * guile.scm (debug-write): New function.
2027
2028 2005-02-14  Jim Blandy  <jimb@redhat.com>
2029
2030         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2031         transformer procedure, not eval.  Transformer procedures take one
2032         argument.
2033
2034 2005-02-11  Nick Clifton  <nickc@redhat.com>
2035
2036         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2037         to 'bfd_vma *' in order avoid compile time warning message.
2038
2039 2005-02-09  Jim Blandy  <jimb@redhat.com>
2040
2041         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2042         corresponding change in the sim/common directory.)
2043
2044 2005-02-07  Jim Blandy  <jimb@redhat.com>
2045
2046         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2047         changes in the opcodes directory.)
2048
2049         * guile.scm: New file, containing Guile-specific definitions and
2050         adaptations.  This is loaded by the app-specific shell scripts.
2051         Initially identical to fixup.scm.
2052         * cgen-sid.scm: Don't load fixup.scm here.
2053
2054         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2055         latter is a macro.
2056
2057 2005-01-27  Jim Blandy  <jimb@redhat.com>
2058
2059         * utils.scm (string/symbol->append): Renamed from 'concat'.
2060         * opcodes.scm (gen-switch): Use new name.
2061         * insn.scm (-sub-insn-make!): Same.
2062         * rtl.scm (rtx-dump): Same.
2063         * semantics.scm (semantic-compile): Same.
2064
2065 2005-01-20  Jim Blandy  <jimb@redhat.com>
2066
2067         * opcodes.scm (gen-switch): Use concat instead of string-map.
2068
2069         * utils.scm (concat): New function.
2070         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2071         * rtl.scm (rtx-dump): Same.
2072         * semantics.scm (semantic-compile): Same.
2073
2074 2004-12-16  Jim Blandy  <jimb@redhat.com>
2075
2076         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2077         applied to symbols.  Process everything as strings, and then
2078         convert to a symbol at the end.
2079
2080         * read.scm (debug-repl): Temporarily redirect input and output to
2081         /dev/tty while we debug, so we don't interfere with whatever CGEN
2082         is reading or writing.
2083         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2084         New functions.
2085
2086 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2087
2088         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2089         will work with newer versions of guile.
2090
2091 2004-10-27  Nick Clifton  <nickc@redhat.com>
2092
2093         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2094         * cpu/iq2000.cpu: Likewise.
2095
2096 2004-07-21  DJ Delorie  <dj@redhat.com>
2097
2098         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2099
2100 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2101
2102         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2103         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2104
2105 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2106
2107         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2108
2109 2004-03-22  Dave Brolley  <brolley@redhat.com>
2110
2111         * utils.scm (copyright-fsf): Update copyright years.
2112         (copyright-red-hat): Ditto.
2113         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2114         code.
2115         (-op-gen-set-trace-parallel): Ditto.
2116
2117 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2118
2119         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2120         disassembling codes for 0x*2 addresses.
2121
2122 2004-01-29  Dave Brolley  <brolley@redhat.com>
2123
2124         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2125         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2126         in the extra bit positions.
2127
2128 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2129
2130         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2131
2132 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2133
2134         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2135         "short" being 16 bit.
2136         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2137         internationalize error message.
2138         (parse_lo16): Likewise.  Remove useless code.
2139
2140 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2141
2142         * cpu/m32r.cpu : Add new model m32r2.
2143         Add new instructions.
2144         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2145         Changed PIPE attr of push from O to OS.
2146         Care for Little-endian of M32R.
2147         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2148         Care for Little-endian of M32R.
2149         (parse_slo16): signed extension for value.
2150
2151 2003-10-26  Dave Brolley  <brolley@redhat.com>
2152
2153         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2154         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2155         (-gen-extract-fn): Call -gen-record-profile-args.
2156
2157 2003-10-21  Dave Brolley  <brolley@redhat.com>
2158
2159         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2160         a static const int.
2161         * decode.scm (-opcode-slots): Correct typo in logit call.
2162
2163 2003-10-09  Jim Blandy  <jimb@redhat.com>
2164
2165         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2166         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2167
2168         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2169
2170 2003-10-06  Dave Brolley  <brolley@redhat.com>
2171
2172         * gen-all-doc: Add fr550.
2173
2174 2003-09-11  Doug Evans  <dje@sebabeach.org>
2175
2176         * Makefile.am (ARCHFILE): New var.
2177         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2178         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2179         * Makefile.in: Regenerate.
2180
2181 2003-09-08  Dave Brolley  <brolley@redhat.com>
2182
2183         On behalf of Doug Evans <dje@sebabeach.org>
2184         Pass in paths to input files, instead of assuming they live in
2185         $srcdir/cpu.  Plus misc. option processing cleanup.
2186         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2187         Add pre-process pass to all options.
2188         * cgen-gas.scm (gas-arguments): Ditto.
2189         * cgen-sid.scm (sim-arguments): Ditto.
2190         * cgen-sim.scm (sim-arguments): Ditto.
2191         * cgen-stest.scm (stest-arguments): Ditto.
2192         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2193         (-opc-file-path): New global.
2194         (opc-file-path): New fn.
2195         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2196         All callers updated.
2197         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2198         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2199         Replace srcdir arg with opc-file.  All callers updated.
2200         * read.scm (-opt-spec-update): Delete.
2201         (opt-get-first-pass,opt-get-second-pass): New fns.
2202         (-cgen): Process application-specific arguments in two passes.
2203
2204 2003-08-29  Dave Brolley  <brolley@redhat.com>
2205
2206         * cpu/frv.cpu: Removed.
2207         * cpu/frv.opc: Removed.
2208
2209 2003-08-21  Nick Clifton  <nickc@redhat.com>
2210
2211         * cpu/frv.cpu (mbtoh): Replace input parameter to
2212         u-media-dual-expand and u-media-dual-btoh with output parameter.
2213         (cmbtoh): Add profiling hack.
2214
2215 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2216
2217         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2218
2219 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2220
2221         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2222         the elements for the END record of CGEN_OPINST, silencing warnings.
2223
2224 2003-07-15  Doug Evans  <dje@sebabeach.org>
2225
2226         Add guile 1.6.4 support.
2227         - empty list must be quoted
2228         - string functions have stricter type checking
2229         - eval now takes a second argument
2230         - symbol-bound? is deprecated
2231         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2232         (bitset-attr->list): Ensure arg to string-cut is a string.
2233         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2234         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2235         * cos.scm (-class-list): Must quote empty list.
2236         (-class-parent-classes,-class-compute-class-desc): Ditto.
2237         (class-make,make,object-reset!): Ditto.
2238         (method-make-make!): Call eval1 instead of eval.
2239         (method-make-forward!,method-make-virtual-forward!): Ditto.
2240         * decode.scm (subdtable-add): Use stringsym-append instead of
2241         string-append.
2242         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2243         (-build-decode-table-entry): Fetch string name of insn.
2244         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2245         (-gen-mach-table-defns): Ditto for mach.
2246         (gen-ifld-defns): Ditto for ifld.
2247         (gen-hw-table-defns): Ditto for hw.
2248         (gen-operand-table): Ditto for op.
2249         (gen-insn-table-entry): Ditto for insn.
2250         * desc.scm (gen-attr-table-defn): Ditto for attr.
2251         (<keyword>,gen-defn): Don't pass symbols to string-append.
2252         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2253         symbol-append.
2254         (enum-vals-upcase): Use symbol-upcase to build result.
2255         (-enum-parse): Use stringsym-append to build errtxt.
2256         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2257         (eval1): New function.
2258         (symbol-bound?): Provide own version if >= guile 1.6.
2259         * hardware.scm (define-keyword): Use string-append instead of
2260         symbol-append.
2261         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2262         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2263         before using.
2264         (gen-list-entry): Handle either symbol or string `name' arg.
2265         (gen-obj-doc-header): Fetch string name of `o' arg.
2266         (define-cpu-intro): Ditto for cpu.
2267         (gen-mach-intro): Ditto for mach.
2268         (gen-model-intro): Ditto for model.
2269         (gen-isa-intro): Ditto for isa.
2270         (gen-machine-doc-1): Ditto for isa.
2271         (gen-reg-doc-1): Convert mach to string first.
2272         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2273         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2274         to string first.
2275         (gen-insn-categories): Fetch string name of mach.  Convert
2276         enum-val-name to string first.
2277         (gen-insn-docs): Fetch string name of mach.
2278         * ifield.scm (ifld-ilk): Result is a string.
2279         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2280         Fetch string name of ifld.
2281         (-sfmt-search-key): Similarily for ifld and op.
2282         * insn.scm (syntax-make): Fetch string name of syntax element.
2283         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2284         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2285         * mode.scm (mode:c-type): Result is a string.
2286         (mode:enum): Fetch string name of mode.
2287         (-mode-parse): Use stringsym-append to build errtxt.
2288         * model.scm (model:enum): Fetch string name of model.
2289         (-model-parse): Use stringsym-append to build errtxt.
2290         (parse-insn-timing): Must quote empty list.
2291         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2292         (-gen-minsn-opcode-entry): Ditto.
2293         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2294         convert to string.
2295         (read-cpu.opc): Convert current-arch-name to a string before using.
2296         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2297         (<derived-operand>): Must quote empty list.
2298         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2299         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2300         of ifld.
2301         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2302         (-pmacro-sym): Must convert symbols to strings before passing to
2303         string-append.
2304         (-pmacro-str): Ditto.
2305         (pmacros-init!): Use eval1 instead of eval.
2306         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2307         (keep-isa-atlist?): Ditto.
2308         (cmd-if): Use eval1 instead of eval.
2309         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2310         (-rtl-c-get): Fetch string name of src.
2311         (s-unop): Ditto for mode.
2312         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2313         (-gen-par-temp-defns,subword): Ditto.
2314         (join): Use stringsym-append instead of string-append.
2315         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2316         (rtx-traverse-debug): Fetch string name of rtx-obj.
2317         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2318         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2319         (rtx-pretty-name): Result is a string.
2320         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2321         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2322         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2323         before using.
2324         (-gen-sfrag-case): Fetch string name of user.
2325         * sid-model.scm (unit:enum): Fetch string name of unit.
2326         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2327         (<hw-memory>,gen-set-quiet): Ditto.
2328         (gen-mode-defs): Ditto.
2329         (sim-finish!): Convert current-arch-name to a string before using.
2330         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2331         (-gen-no-scache-semantic-fn): Ditto.
2332         (cgen-defs.h): Fetch string name of isa.
2333         (cgen-read.c): Convert current-arch-name to a string before using.
2334         (cgen-write.c): Ditto.
2335         * sim-model.scm (unit:enum): Fetch string name of unit.
2336         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2337         (-gen-model-timing-table): Fetch string name of model.
2338         (-gen-mach-model-table): Ditto.
2339         (-gen-mach-defns): Fetch string name of mach.
2340         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2341         (<hw-memory>,cxmake-get): Fetch string name of mode.
2342         (<hw-memory>,gen-set-quiet): Ditto.
2343         (gen-mode-defs): Ditto.
2344         (sim-finish!): Must quote empty list.
2345         * utils-cgen.scm (<ident>): Must quote empty list.
2346         (obj:str-name): New fn.
2347         (parse-comment): Result is a string.
2348         (parse-symbol): Result is a symbol.
2349         (parse-string): Result is a string.
2350         (keyword-list?): Convert arg to string before calling string-ref.
2351         (keyword-list->arg-list): Ditto.
2352         (gen-attr-name): Convert attr-name to string first.
2353         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2354         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2355         (gen-define-ifmt-ifields): Ditto for fld.
2356         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2357         map-over-string.
2358         (gen-file-name): Ditto.
2359         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2360         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2361         (reduce): Call eval1 instead of eval.
2362         * cpu/m32r.cpu (addi): Don't use `#.'.
2363
2364         * gen-all-sim: Fix some typos.
2365
2366 2003-07-08  Doug Evans  <dje@sebabeach.org>
2367
2368         * gen-all-doc: Ensure run from cgen src dir.
2369         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2370         * gen-all-sid: Similarily, in ./tmp-sid.
2371         * gen-all-sim: Similarily, in ./tmp-sim.
2372
2373 2003-06-20  Doug Evans  <dje@sebabeach.org>
2374
2375         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2376
2377 2003-06-19  Doug Evans  <dje@sebabeach.org>
2378
2379         * mach.scm (-ifld-already-defined?): New proc.
2380         (current-ifld-add!): Use it.
2381         (-op-already-defined?): New proc.
2382         (current-op-add!): Use it.
2383         (-insn-already-defined?): New proc.
2384         (current-insn-add!): Use it.
2385         (-minsn-already-defined?): New proc.
2386         (current-minsn-add!): Use it.
2387         (obj-isa-list): New proc.
2388         (isa-supports?): Use it.
2389
2390 2003-06-10  Doug Evans  <dje@sebabeach.org>
2391
2392         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2393         * cpu/m32r.cpu (all insns): Ditto.
2394
2395         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2396         "unspecified".
2397
2398         * gen-all-doc: Split arm and frv docs up a bit.
2399
2400         * cpu/arm.cpu: Add IDOC attribute.
2401         * cpu/frv.cpu: Ditto.
2402         * cpu/i960.cpu: Ditto.
2403         * cpu/openrisc.cpu: Ditto.
2404         * cpu/xstormy16.cpu: Ditto.
2405         * cpu/m32r.cpu: Ditto.
2406         (all insns): Explicitly specify IDOC attribute.
2407
2408         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2409         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2410         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2411         * Makefile.in: Regenerate.
2412         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2413         (-attr-read): Defer computing default value until we know the type.
2414         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2415         (<attr-list>:attr-present?): New method.
2416         (atlist-attr-present?,obj-attr-present?): New fns.
2417         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2418         (attr-builtin!): New insn attr IDOC.
2419         * cgen-doc.scm (doc-arguments): New args -I,-N.
2420         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2421         Support comment as fourth element of enum value.
2422         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2423         * html.scm (gen-html-header): New arg kind, all callers updated.
2424         (gen-table-of-contents): New arg insn-file, all callers updated.
2425         (gen-list-entry,gen-doc-header): New fn.
2426         (get-operands): Delete.
2427         (gen-iformat-table): Rewrite.
2428         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2429         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2430         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2431         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2432         (get-insns-for-category,gen-categories-insn-lists): New fns.
2433         (gen-insn-docs): Simplify each insn's semantics first.
2434         Print insn tables sorted by IDOC categories.
2435         (*insn-html-file-name*): New global.
2436         (cgen-insn.html): New fn.
2437         (cgen-all): Update.
2438         * insn.scm (<insn>): Create a setter for the `tmp' member.
2439         * semantics.scm (insn-build-known-values): Renamed from
2440         -build-known-values.  All callers updated.
2441
2442         * rtl.scm: Move traveral/evaluation support to ...
2443         * rtl-traverse.scm: New file.
2444         * read.scm: Maybe-load rtl-traverse.scm.
2445
2446         * rtl.scm (-rtx-valid-types): Add SETRTX.
2447
2448         * rtx-funcs.scm (nop,parallel): Fix mode.
2449
2450         * utils.scm (eqv-lookup-index): New fn.
2451         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2452
2453         * dev.scm (load-doc): Set APPLICATION.
2454
2455 2003-06-10  Dave Brolley  <brolley@redhat.com>
2456
2457         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2458         * sid-decode.scm: Generate #include of config.h into
2459         @prefix@-decode.cxx.
2460         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2461
2462 2003-06-07  Doug Evans  <dje@sebabeach.org>
2463
2464         * gen-all-sid: New file.
2465         * gen-all-opcodes: New file.
2466
2467 2003-06-05  Nick Clifton  <nickc@redhat.com>
2468
2469         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2470         version of the FRinti operand.
2471         (FRintjeven): Likewise for FRintj.
2472         (FRintkeven): Likewise for FRintk.
2473         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2474         media-quad-arith-sat-semantics, media-quad-arith-sat,
2475         conditional-media-quad-arith-sat, mdunpackh,
2476         media-quad-multiply-semantics, media-quad-multiply,
2477         conditional-media-quad-multiply, media-quad-complex-i,
2478         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2479         conditional-media-quad-multiply-acc, munpackh,
2480         media-quad-multiply-cross-acc-semantics, mdpackh,
2481         media-quad-multiply-cross-acc, mbtoh-semantics,
2482         media-quad-cross-multiply-cross-acc-semantics,
2483         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2484         media-quad-cross-multiply-acc-semantics, cmbtoh,
2485         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2486         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2487         cmhtob): Use new operands.
2488         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2489         (parse_even_register): New function.
2490
2491 2003-06-04  Doug Evans  <dje@sebabeach.org>
2492
2493         Better handling of 64 bit and mixed 32/64 bit architectures.
2494         * hardware.scm (hw-update-word-modes!): New fn.
2495         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2496         hw-update-word-modes!.
2497         (state-word-bitsize): Replace FIXME with requested check.
2498         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2499         * mode.scm (mode-find): Ignore INT,UINT.
2500         (-mode-word-sizes-kind): New global.
2501         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2502         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2503         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2504         of mode-list to ...
2505         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2506         unusable, correct values set later.
2507         (mode-finish!): Remove cruft.
2508         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2509         * opcodes.scm (opcodes-init!): Ditto.
2510         * rtx-funcs.scm (annul): Fix mode of pc.
2511         * cpu/ia64.cpu: Remove cruft that sets word modes.
2512         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2513
2514 2003-06-03  Nick Clifton  <nickc@redhat.com>
2515
2516         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2517         immediate value not unsigned.
2518
2519 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2520
2521         * cpu/sh.cpu: Amend comments to refer to SuperH.
2522         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2523         * cpu/sh64-media.cpu: Likewise.
2524         (Saturation): Update manual reference.
2525
2526 2003-05-15  Doug Evans  <dje@sebabeach.org>
2527
2528         * Makefile.am (srcroot): New var.
2529         (html): New rule.
2530         * Makefile.in: Regenerate.
2531         * cgen-doc.scm: New file.
2532         * html.scm: New file.
2533         * gen-all-doc: New file.
2534         * dev.scm (cload): Handle DOC application.
2535         (load-doc): New fn.
2536         * machs.scm (machs-for-cpu): New fn.
2537         * model.scm (models-for-cpu): New fn.
2538         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2539         All uses updated.
2540         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2541         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2542
2543         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2544         (-gen-decode-bits): Instead put in better fix here.
2545
2546         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2547
2548 2003-05-01  DJ Delorie  <dj@redhat.com>
2549
2550         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2551         word accesses.
2552         (set-alignfix-mem): Likewise.
2553
2554 2003-04-16  Dave Brolley  <brolley@redhat.com>
2555
2556         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2557         * utils.scm (copyright-fsf): Update generate copyright years.
2558         (copyright-cygnus): Ditto.
2559         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2560         operands.
2561         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2562         here.
2563         (<operand>'gen-profile-code): New parameter 'when'.
2564         (<iunit>'gen-profile-code): Ditto.
2565         (<insn>'gen-profile-code): Ditto.
2566         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2567         'insn_reference' for the 'after' function.
2568         * model.scm (unit:enum): Moved to sim-model.scm.
2569         * sim-model.scm (unit:enum): Moved from model.scm.
2570         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2571         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2572         * sid-model.scm (unit:enum): New version for sid.
2573         (gen-model-class-name): New function.
2574         (gen-model-unit-fn-decl): New function.
2575         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2576         (gen-model-unit-fn-name): New parameter 'when'.
2577         (-gen-model-insn-fn-name): Ditto.
2578         (-gen-model-insn-qualified-fn-name): New function.
2579         (-gen-model-insn-fn-decl): New function.
2580         (-gen-model-insn-fn-decls): New function.
2581         (-gen-model-insn-fn): New parameter 'when'. Call
2582         -gen-model-insn-qualified-fn-name.
2583         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2584         functions for modelling insn before and after execution.
2585         (-gen-model-class-decls): New function.
2586         (" (gen-model-class-name model) "): New function.
2587         (gen-model-classes): New function.
2588         (-gen-insn-timing): Generate functions for modelling insn before and after
2589         execution.
2590         (-gen-insn-unit-timing): Generate class-qualified names.
2591         (-gen-model-timing-table): Ditto.
2592         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2593         not needed (yet) by sid.
2594         (cgen-model.h): New function.
2595
2596 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2597
2598         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2599         * cpu/sh64-compact.cpu: Likewise.
2600         * cpu/sh64-media.cpu: Likewise.
2601
2602 2003-03-21  DJ Delorie  <dj@redhat.com>
2603
2604         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2605         which indicates if the sign flag is set from bit 15 or 7.
2606         Adjust all callers.
2607         (set-psw): New argument ws, propogate it.
2608         (set-psw-nowrite): Likewise.
2609         (set-mem-psw): Likewise.
2610         (set-psw-carry): Likewise.  Use temporaries to prevent
2611         prematurely overwriting needed inputs.
2612         (set-psw-rrotate17): Fix logic.
2613         (shrgrgr): Preserve carry for zero-bit shifts.
2614         (shrgrimm): Likewise.
2615         (shlgrgr): Likewise.
2616         (shlgrimm): Likewise.
2617         (asrgrgr): Likewise.
2618         (asrgrimm): Likewise.
2619         (reset): New.
2620
2621 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2622
2623         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2624
2625 2002-03-05  DJ Delorie  <dj@redhat.com>
2626
2627         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2628         prematurely overwriting needed inputs.
2629         (set-psw-sub): Likewise.
2630
2631 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2632
2633         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2634
2635 2003-02-18  DJ Delorie  <dj@redhat.com>
2636
2637         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2638         (movlmemimm): Just mask the address.
2639         (movhmemimm): Likewise.
2640         (movlmemgr): Likewise.
2641         (movhmemgr): Likewise.
2642         (set-psw): Always set the psw last.
2643         (set-psw-carry): Likewise.
2644         (set-psw-add): Likewise.
2645         (set-psw-sub): Likewise.
2646
2647         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2648         of 16 patterns from the set-psw-rotate17 function.
2649         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2650         movgriipostincgr, movgriipredecgr): Set psw correctly.
2651         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2652         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2653         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2654
2655 2003-02-11  Dave Brolley  <brolley@redhat.com>
2656
2657         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2658         @arch@_cgen-ifld_table.
2659         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2660         @arch@_cgen-ifld_table.
2661
2662 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2663
2664         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2665
2666 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2667
2668         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2669         empty ISAs.
2670
2671 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2672
2673         * utils-gen.scm (attr-int-gen-defn): Define.
2674
2675 2002-12-21  Doug Evans  <dje@sebabeach.org>
2676
2677         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2678         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2679
2680         * dev.scm (cload): Update location of .cpu files.
2681
2682 2002-12-19  Doug Evans  <dje@sebabeach.org>
2683
2684         * utils-sim.scm (gen-profile-sym): New fn.
2685         (<operand>,sbuf-profile-sym): New method.
2686         (<operand>,sbuf-profile-elm): Use it.
2687         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2688         of hardcoding symbol name.
2689         (<operand>,gen-profile-code): Ditto.
2690         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2691         symbol name.
2692
2693         * mode.scm (mode-sem-mode): New fn.
2694         * operand.scm (op:new-mode): Update. mode-name.
2695         (op-natural-mode?) New fn.
2696         * rtl.scm (hw): Set hw-name,mode-name.
2697
2698         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2699         Instead do:
2700         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2701         as size of IDESC-TABLE-VAR.
2702         (@prefix@_init_idesc_table): Ditto.
2703         * sim-model.scm (-gen-mach-defns): Ditto.
2704         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2705
2706         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2707
2708         * insn.scm (-parse-insn-format-symbol): Improve error message.
2709         (-parse-insn-format): Ditto.
2710
2711         * gen-all-sim: New script.
2712
2713 2002-12-16  DJ Delorie  <dj@delorie.com>
2714
2715         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2716
2717 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2718
2719         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2720         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2721         (parse_immediate16): Handle immediate16 values, which now include
2722         @hi(label) and @lo(label)
2723
2724 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2725
2726         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2727         Add braces and cast for union field.
2728         (gen-multi-ifield-nodes): Add braces and cast for union field.
2729         (cgen_operand_table): Similarly fix sentinel.
2730         (cgen_cpu_close): Constify "insns".  Formatting.
2731         (cgen-desc.c): Include xregex.h.
2732         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2733         Prototype.
2734         <opc.c>: Include safe-ctype.h.
2735         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2736         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2737         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2738         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2739         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2740         (parse_addr16): Correct type of "value".  Formatting.
2741         (parse_addr16_p): Likewise.
2742         (parse_addr16_cjp): Likewise.
2743         (parse_lit8): Likewise.
2744         (parse_bit3): Formatting.
2745         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2746         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2747         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2748         print_decimal.
2749         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2750         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2751         (print_dollarhex8): Likewise.
2752         (print_dollarhex16): Likewise.
2753         (print_dollarhex_addr16h): Likewise.
2754         (print_dollarhex_addr16l): Likewise.
2755         (print_dollarhex_p): Likewise.
2756         (print_dollarhex_cj): Likewise.
2757         (print_decimal): Likewise.
2758         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2759
2760 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2761
2762         * doc/rtl.texi (Model variants): Mention current limitations for
2763         unit inputs and outputs.
2764         (Hardware elements) <attribute PROFILE>: Be slightly more
2765         verbose.
2766         (Instructions) <timing>: input/output overrides have a direction
2767         operand.
2768
2769 2002-11-25  DJ Delorie  <dj@redhat.com>
2770
2771         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2772
2773 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2774
2775         * cpu/iq10.cpu: New file.
2776         * cpu/iq2000.cpu: Likewise.
2777         * cpu/iq2000.opc: Likewise.
2778         * cpu/iq2000m.cpu: Likewise.
2779
2780 2002-11-19  DJ Delorie  <dj@redhat.com>
2781
2782         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2783
2784 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2785
2786         * dev.scm: Call getenv with a string, not a symbol.
2787
2788 2002-10-08  Doug Evans  <dje@transmeta.com>
2789             Hans-Peter Nilsson  <hp@axis.com>
2790
2791         * types.scm (bitrange-overlap?): Handle lsb0?.
2792
2793 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2794
2795         From Robert Cragie <rcc@jennic.com>:
2796         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2797
2798 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2799             Ben Elliston  <bje@redhat.com>
2800             John Healy  <jhealy@redhat.com>
2801             Jeff Johnston  <jjohnstn@redhat.com>
2802             Alan Lehotsky  <alehotsky@redhat.com>
2803             Ubicom Inc. <SupportDesk@ubicom.com>
2804
2805         * cpu/ip2k.cpu: New file.
2806         * cpu/ip2k.opc: Likewise.
2807
2808 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2809
2810         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2811
2812 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2813
2814         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2815         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2816         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2817         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2818         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2819         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2820         (-sthi-byte): If there is a single byte to store, store it at
2821         proper address.
2822         (sthil, sthiq): Fix big-endian behaviour.
2823         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2824         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2825         (saturate): Use Dimode to check if saturation operation is required.
2826         (usaturate): Likewise.
2827         (mpermw): Fix mask.
2828         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2829         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2830         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2831         (msadubq): Fix subword index in second operand of first subtraction.
2832
2833 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2834
2835         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2836         code.
2837
2838 2002-06-18  Dave Brolley  <brolley@redhat.com>
2839
2840         * cpu/frv.cpu: New cpu description.
2841         * cpu/frv.opc: New cpu support code.
2842
2843 2002-05-21  Dave Brolley  <brolley@redhat.com>
2844
2845         * decode.scm (-opcode-slots): Don't consider bits beyond the
2846         length of the insn.
2847
2848 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2849
2850         * cpu/powerpc.cpu: New file.
2851
2852 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2853
2854         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2855
2856 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2857
2858         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2859         results are expanded recursively.
2860
2861 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2862
2863         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2864         call scan-symbol on it, to enable recursive macro-expansion.
2865
2866 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2867
2868         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2869         for multiple-isa configurations.
2870         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2871
2872 2002-02-04  Ben Elliston  <bje@redhat.com>
2873
2874         * cpu/sh.cpu, cpu/sh.opc: New files.
2875         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2876
2877 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2878
2879         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2880         (Enumerated constants): Mention that an ifield must not specify a
2881         multi-ifield.
2882         (Instruction operands): Ditto for index.
2883         (Expressions) <parallel>: Remove misplaced mention of local
2884         variables.
2885         <if>: Mention that mode must be specified and non-VOID when the
2886         result is used.
2887
2888 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2889
2890         * doc/porting.texi: When referring to *.opc, mention they are in
2891         the cpu subdir.  Call top-level directory toplevel, not devo.
2892         Close string in define-normal-insn example.
2893
2894         * doc/pmacros.texi: Fix .substr typo to .substring.
2895         Mention that .sym expansions are not further expanded.
2896
2897 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2898
2899         * desc-cpu.scm (ifld-number-cache): Add.
2900         (ifld-number): Add.
2901         (gen-maybe-multi-ifld-of-op): Add.
2902         (gen-maybe-multi-ifld): Add.
2903         (gen-multi-ifield-nodes): Add.
2904         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2905
2906 2002-01-10  matthew green  <mrg@redhat.com>
2907
2908         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2909         (gr-Rb-names): ... to this.
2910         (h-Rb): New hardware piece.
2911         (h-Rbj): Use gr-Rb-names.
2912         (Rb): Use h-Rb.
2913         (holdx): New instruction.
2914
2915 2002-01-07  Ben Elliston  <bje@redhat.com>
2916
2917         * utils.scm (package-cygnus-simulators): Rename from this ..
2918         (package-red-hat-simulators): .. to this.
2919         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2920         * sid-cpu.scm (cgen-desc.h): Likewise.
2921         (cgen-cpu.h): Likewise.
2922         (cgen-defs.h): Likewise.
2923         (cgen-write.cxx): Likewise.
2924         (cgen-semantics.cxx): Likewise.
2925         (cgen-sem-switch.cxx): Likewise.
2926         * sid-decode.scm (cgen-decode.h): Likewise.
2927         (cgen-decode.cxx): Likewise.
2928         * sid-model.scm (cgen-model.cxx): Likewise.
2929         * sid.scm (option-set!): Likewise.
2930         * sim.scm (option-set!): Likewise.
2931
2932 2002-01-07  Ben Elliston  <bje@redhat.com>
2933
2934         * utils.scm (copyright-fsf): Add 2002.
2935         (copyright-cygnus): Rename to copyright-red-hat.
2936         (copyright-red-hat): Add 2002.
2937         (CURRENT-COPYRIGHT): Update comment.
2938         * opcodes.scm (option-set!): Update callers.
2939         * sid-model.scm (cgen-model.cxx): Likewise.
2940         * sid-cpu.scm: Likewise.
2941         * sid-decode.scm: Likewise.
2942         * sid.scm (option-set!): Handle "redhat" as an option for
2943         "copyright"; use copyright-red-hat.
2944         * sim.scm (option-set!): Likewise.
2945
2946 2002-01-03  Dave Brolley  <brolley@redhat.com>
2947
2948         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2949         number of insns in the list.  Update the population count function to
2950         identify and prioritize 3 catgories of useful bits.
2951         (-population-top-few): Don't consider bits with a population count of
2952         zero.
2953         (-build-decode-table-entry): Don't call
2954         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2955         identical insns at the next tree level.
2956         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2957         this function is no longer used.
2958         (filter-non-specialized-ambiguous-insns): New function.
2959         (filter-identical-ambiguous-insns): New function.
2960         (find-identical-insn): New function.
2961         (filter-harmlessly-ambiguous-insns): Removed.
2962
2963 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2964             matthew green  <mrg@redhat.com>
2965             Frank Ch. Eigler  <fche@redhat.com>
2966             Nick Clifton  <nickc@cambridge.redhat.com>
2967
2968         * cpu/xstormy16.cpu: New file.
2969         * cpu/xstormy16.opc: New file.
2970
2971 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2972
2973         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2974
2975 2001-11-14  Dave Brolley  <brolley@redhat.com>
2976
2977         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2978         of the field being extracted.
2979
2980 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2981
2982         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2983         (cos ...) and (sin ..) rtx.
2984
2985 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2986
2987         * desc-cpu.scm: Do not include ctype.h in generated desc
2988         files.  They will inherit safe-ctype.h instead.
2989
2990 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2991
2992         * desc-cpu.scm: Add missing function prototypes (for generated
2993         C files).  Fix compile time warning messages about unused
2994         parameters (for generated C files).
2995         * opc-asmdis.scm: The same.
2996         * opc-ibld.c: The same.
2997         * opc-itab.scm: The same.
2998         * cpu/fr30.opc: The same.
2999         * cpu/m32r.opc: The same.
3000         * cpu/openrisc.opc: The same.
3001
3002 2001-09-17  graydon hoare  <graydon@redhat.com>
3003
3004         * insn.scm (syntax-break-out): Correct logic in handling escaped
3005         syntax characters.
3006
3007 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3008
3009         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3010         call @arch@_cgen_build_insn_regex now that regex support is in
3011         libiberty.
3012
3013 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3014
3015         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3016         (mask-superset?): Look for strict supersets to allow rejection of
3017         duplicate insns.
3018
3019 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3020
3021         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3022         (cgen-desc.h): Call it.
3023         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3024         decode-size.
3025         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3026         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3027
3028 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3029
3030         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3031         mach->cpu insn-chunk-bitsize.
3032         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3033         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3034         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3035         (-cpu-parse, -cpu-read): Parse/initialize it.
3036         * doc/rtl.texi (define-cpu): Document it.
3037
3038 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3039
3040         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3041
3042 2001-07-06  Ben Elliston  <bje@redhat.com>
3043
3044         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3045
3046 2001-07-05  Ben Elliston  <bje@redhat.com>
3047
3048         * README: Update.
3049
3050         * read.scm (include): Include files from srcdir/cpu.
3051         (-cgen): Likewise for loading .cpu files.
3052         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3053         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3054         * *.opc: Likewise.
3055         * simplify.inc: Likewise.
3056
3057 2001-07-04  Ben Elliston  <bje@redhat.com>
3058
3059         * read.scm (include): Log "Including file" message at level 1,
3060         rather than outputting it with (display).
3061         (cpu-load): Log "Loading cpu description" and "Processing cpu
3062         description" messages at levels 1 and 2, respectively, rather than
3063         using (display).
3064
3065 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3066
3067         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3068         CGEN_KEYWORD_ENTRY initializers.
3069
3070         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3071         (<operand> 'test-data): Involve both the index and the hardware
3072         in testcase generation.
3073         (<hw-indx> 'test-data): Generate test data from the underlying
3074         object.
3075         (<ifield> 'test-data): Generate test data by computing bit
3076         patterns for the field, then decoding them.
3077         (<hw-address> 'test-data): Allow for new calling convention.
3078         (<hw-iaddress> 'test-data): Likewise.
3079         (<keyword> 'test-data): Convert index values into keywords.
3080         (<hw-asm> 'test-data): Convert index values into integer strings.
3081
3082         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3083
3084 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3085
3086         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3087         is required for multi-mode hw types (memory).
3088
3089 2001-05-11  Ben Elliston  <bje@redhat.com>
3090
3091         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3092         when generating allinsn.d from objdump output. Without it, the
3093         testsuite will treat $ as the regular expression for end of line.
3094
3095 2001-05-09  Ben Elliston  <bje@redhat.com>
3096
3097         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3098         with `cgen_cpu_open'; documentation had become out of date.
3099         * doc/rtl.texi (Instruction operands): Likewise.
3100
3101 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3102
3103         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3104         various-base-length instruction sets.
3105
3106 2001-04-02  Ben Elliston  <bje@redhat.com>
3107
3108         * sid-cpu.scm (-last-insn): New function.
3109         (-gen-sem-switch-engine): Loop through idesc while less than or
3110         equal to the last instruction enum, not less than the MAX enum.
3111         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3112         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3113         table's size to be the last instruction enum plus one, not
3114         @PREFIX@_INSN_MAX.
3115         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3116         instruction onto the instruction list.
3117
3118         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3119         using the size of the table and its elements.
3120         (-gen-decode-insn-globals): Define the idesc table's size to be
3121         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3122         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3123         last instruction enum plus one, not @CPU@_INSN_MAX.
3124
3125 2001-03-28  Ben Elliston  <bje@redhat.com>
3126
3127         * doc/version.texi (UPDATED, EDITION): Update.
3128         * doc/stamp-vti: Likewise.
3129
3130 2001-03-26  Ben Elliston  <bje@redhat.com>
3131
3132         * doc/credits.texi (Credits): Update.
3133
3134         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3135         specified prefix and, if necessary, escape `$' in gas-build.sh to
3136         prevent unwanted shell variable expansion.
3137
3138 2001-03-24  Ben Elliston  <bje@redhat.com>
3139
3140         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3141         (<keyword>,test-data): Likewise.
3142         (<hw-address>,test-data): Likewise.
3143         (<hw-iaddress>,test-data): Likewise.
3144         (-collate-test-set): New function.
3145         (build-test-set): Use it.
3146         (gen-gas-test): Generate five test cases per instruction.
3147         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3148
3149         * read.scm: Load "slib/random" if random is not defined.
3150         * slib/random.scm: New file.
3151
3152         * utils.scm: Remove comments about the Hobbit compiler.
3153         (copyright-cygnus): Add 2001.
3154         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3155         (package-gnu-simulators): Tidy.
3156
3157 2001-03-23  Ben Elliston  <bje@redhat.com>
3158
3159         * cgen-gas.scm: Inline documentation improvements.
3160
3161 2001-03-21  Ben Elliston  <bje@redhat.com>
3162
3163         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3164         given in a syntax string is undefined.
3165
3166         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3167         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3168
3169 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3170
3171         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3172         for arg_type CGEN_CPU_OPEN_BFDMACH.
3173
3174 2001-03-20  Ben Elliston  <bje@redhat.com>
3175
3176         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3177         instruction onto the instruction list. Define MAX_INSNS to be the
3178         value of the last instruction enum plus one.
3179
3180 2001-03-14  Nick Clifton  <nickc@redhat.com>
3181
3182         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3183
3184 2001-03-05  Dave Brolley  <brolley@redhat.com>
3185
3186         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3187         if the number of ifields is greater than zero.
3188
3189 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3190
3191         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3192         Emit LIKELY/UNLIKELY branch probability hints.
3193         * sid-decode.cpu (-gen-record-args): Ditto.
3194
3195 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3196
3197         * desc-cpu.scm (-gen-hash-defines): Rename
3198         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3199
3200 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3201
3202         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3203         writeback tracking.
3204         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3205         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3206         if unnecessary.
3207         * sid.scm (<operand> gen-write): Use unsigned long long expression
3208         for writeback.
3209         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3210         (<unit> gen-profile-code): Ditto.
3211
3212 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3213
3214         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3215         (regno ...) rtx.
3216
3217 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3218
3219         * operand.scm (<operand> pretty-sem-name): New field.
3220         (<operand> make): Initialize it from hw-name.
3221         (op:set-pretty-sem-name!): New function.
3222         (<operand> gen-pretty-name): Default to fetching new field.
3223         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3224         sem-name setting from -rtx-hw-name.
3225
3226 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3227
3228         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3229         its subsequent gen-pretty-name.
3230
3231         * read.scm: Increase thread working stack limit and backtrace
3232         depth limits.
3233
3234 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3235
3236         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3237
3238 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3239
3240         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3241         current insn plus 4.
3242         (h-delay-insn): New hardware register.
3243         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3244         (l-jalr): Likewise.
3245         (l-bal): Likewise.
3246
3247         * openrisc.opc (parse_hi16): Sign extend value.
3248         (parse_lo16): Likewise.
3249
3250 2001-01-06  Ben Elliston  <bje@redhat.com>
3251
3252         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3253         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3254         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3255         (-gen-semantic-fn-table): Likewise.
3256         (-gen-scache-semantic-fn): Likewise.
3257         (-gen-no-scache-semantic-fn): Likewise.
3258         (cgen-read.c): Likewise.
3259         (cgen-sem-switch.c): Likewise.
3260         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3261         is a filename prefix.
3262         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3263         (-gen-decode-insn-globals): Likewise.
3264         (-gen-idesc-decls): Likewise.
3265         (cgen-decode.h): Likewise.
3266         (cgen-decode.c): Likewise.
3267         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3268         (gen-cpu-insn-enum): Likewise.
3269         (sim-finish!): Likewise.
3270
3271 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3272
3273         * openrisc.cpu: New file.
3274         * openrisc.opc: Likewise.
3275
3276 2000-12-12  Ben Elliston  <bje@redhat.com>
3277
3278         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3279
3280 2000-12-07  Ben Elliston  <bje@redhat.com>
3281
3282         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3283         "insn" when there are zero ifields to extract.
3284
3285 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3286
3287         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3288         used by simple/non-scache simulators.
3289         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3290         regardless of with-scache?.
3291         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3292
3293 2000-12-03  Ben Elliston  <bje@redhat.com>
3294
3295         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3296         (cgen-desc.c): Likewise.
3297
3298 2000-12-01  Greg McGary  <greg@mcgary.org>
3299
3300         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3301
3302 2000-12-01  Ben Elliston  <bje@redhat.com>
3303
3304         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3305         definitions if run without with-multipla-isa?.
3306         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3307         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3308
3309 2000-11-24  Ben Elliston  <bje@redhat.com>
3310
3311         * sim-cpu.scm (-gen-hardware-struct): New function.
3312         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3313         hardware elements wich have share one or more ISAs with the ISAs
3314         being kept.
3315
3316         * sim.scm (-with-multiple-isa?): New symbol.
3317         (with-multiple-isa?): New function.
3318         (option-init!): Initialise -with-multiple-isa?.
3319         (option-set!): Handle with-multiple-isa option.
3320
3321 2000-11-21  Ben Elliston  <bje@redhat.com>
3322
3323         * utils.scm (copyright-fsf): Add the year 2000.
3324
3325 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3326
3327         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3328         unneeded "\n\n" from F() macro definition.
3329
3330 2000-11-15  Greg McGary  <greg@mcgary.org>
3331
3332         * utils-cgen.scm (gen-define-with-symcat): New function.
3333         * desc-cpu.scm (gen-ifld-defns): Use it.
3334         (gen-hw-table-defns): Use it.
3335         (-gen-hash-defines): Use it.
3336         (gen-operand-table): Use it.
3337         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3338         * opc-itab.scm (-gen-ifmt-table): Use it.
3339         (-gen-insn-opcode-table): Use it.
3340         (-gen-macro-insn-table): Use it.
3341         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3342         * sim-cpu.scm (cgen-semantics.c): Use it.
3343         (cgen-sem-switch.c): Use it.
3344
3345 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3346
3347         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3348         request to emit calls to insn extractors as functions rather than
3349         branches to inline blocks.
3350         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3351         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3352
3353         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3354         to extractor clauses.
3355
3356 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3357
3358         * decode.scm (-distinguishing-bit-population): Significantly
3359         improve popularity heuristic.  Renamed from
3360         (-mask-bit-population): Gone.
3361         (-population-above-threshold): Sort new bit numbers in order of
3362         popularity.
3363         (-population-top-few): Allow up to three more bits to be selected
3364         than requested.  Correct selection order to prefer better bits.
3365         Correct bug in fewer-than-requested case.  Keep threshold as
3366         floating-point.
3367         (decode-best-get-bits): Pass also the insn-values.
3368
3369         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3370         future optimization.
3371
3372         * utils.scm (message): Format nested lists better.
3373
3374 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3375
3376         * dev.scm: Add srcdir to %load-path.
3377
3378         * rtx-funcs.scm (subword): Mode of argument can be different
3379         than mode of result, so don't use OP0 to specify argument's mode.
3380
3381 2000-11-02  Ben Elliston  <bje@redhat.com>
3382
3383         * doc/porting.texi (Building a GAS test suite): Document my change
3384         to gas-build.sh.
3385
3386 2000-11-01  Ben Elliston  <bje@redhat.com>
3387
3388         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3389
3390 2000-10-31  Ben Elliston  <bje@redhat.com>
3391
3392         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3393         with no command line arguments if the gas build directory can be
3394         determined.
3395
3396 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3397
3398         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3399         op-ifld -> op-ifield.
3400
3401 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3402
3403         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3404
3405 2000-10-13  matthew green  <mrg@cygnus.com>
3406
3407         * utils-cgen.scm (get-ifetch): Move from here ...
3408         * sim.scm (get-ifetch): ... to here.
3409         * sid.scm (get-ifetch): Copy and port to c++.
3410
3411 2000-10-06  Dave Brolley  <brolley@redhat.com>
3412
3413         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3414         ifld-start + ifld-word-offset.
3415         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3416         the field is beyond the base number of bits.
3417         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3418         (gen-extract-ifields): Ditto.
3419         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3420         characters in the regular expression.
3421
3422 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3423
3424         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3425         preprocessor constant.
3426
3427 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3428
3429         * slib/logical.scm: New file from slib.  Provides robust bitwise
3430         logical operations for large integers.
3431         * read.scm: maybe-load it.
3432
3433 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3434
3435         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3436         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3437         single-isa predicate, but support keep-isa filtering.
3438
3439 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3440
3441         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3442         statement-expression and comma-expression contexts.
3443         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3444
3445 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3446
3447         * decode.scm (-population-top-few): Signal error gracefully if
3448         decoding is about to become ambiguous.
3449
3450 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3451
3452         * doc/rtl.texi (decode-assist): Describe this field as optional.
3453
3454 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3455
3456         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3457         with decode proc.
3458
3459 2000-09-05  Dave Brolley  <brolley@redhat.com>
3460
3461         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3462         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3463
3464 2000-08-29  Dave Brolley  <brolley@redhat.com>
3465
3466         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3467         adata-integral-insn is true for this architecture.
3468
3469 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3470
3471         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3472         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3473         * rtl-c.scm (-c-rtl-get): Improve an error message.
3474         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3475
3476 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3477
3478         * Makefile.in (DIST_COMMON): Regenerated.
3479         * ifield.scm (<derived-ifield> needed-iflds): New method.
3480         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3481         sfmts built from <derived-ifield>s.
3482         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3483         type symbol 'derived-ifield, not an unparseable string.
3484         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3485         (-sfmt-contents): Add tracing.
3486
3487         From Doug Evans <dje@transmeta.com>:
3488         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3489         C code.
3490
3491 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3492
3493         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3494         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3495         (-rtl-c-get): Rename from rtl-c-get.
3496         (rtl-c-get): New fn for getter logging.
3497
3498 2000-07-28  Ben Elliston  <bje@redhat.com>
3499
3500         * NEWS: Update.
3501
3502 2000-07-25  Ben Elliston  <bje@redhat.com>
3503
3504         * doc/credits.texi (Credits): Add Frank Eigler.
3505
3506 2000-07-24  Dave Brolley  <brolley@redhat.com>
3507
3508         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3509         fully.
3510         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3511         (<keyword>): Initialize all elements fully.
3512         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3513         fully.
3514         (-gen-mach-table-defns): Ditto.
3515         (-gen-ifld-defns): Ditto.
3516         (-gen-operand-table): Ditto.
3517         (-gen-insn-table): Ditto.
3518         (-gen-cpu-open): Nothing to do for the mach table.
3519
3520 2000-07-13  Ben Elliston  <bje@redhat.com>
3521
3522         * doc/version.texi (UPDATED): Update.
3523
3524 2000-07-05  Ben Elliston  <bje@redhat.com>
3525
3526         * configure.in (AC_PATH_PROG): Remove.
3527         * configure: Regenerate.
3528         * Makefile.am (GUILE): Locate guile dynamically.
3529         * Makefile.in: Regenerate.
3530         * doc/Makefile.in: Likewise.
3531
3532 2000-07-03  Ben Elliston  <bje@redhat.com>
3533
3534         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3535         * opc-itab.scm (cgen-opc.c): Likewise.
3536
3537 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3538
3539         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3540         guile 1.4 compatibility.
3541         (rtx-env-dump): Comment out buggy display calls.
3542
3543 2000-06-15  matthew green  <mrg@redhat.com>
3544
3545         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3546
3547 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3548
3549         * Makefile.in: Regenerated.
3550
3551         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3552         (gen-ifld-defns): Ditto.
3553         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3554         * rtl.c (rtl-finish!): Ditto.
3555         * opc-itab.scm (-gen-ifield-decls): Ditto.
3556         * opcodes.scm (gen-switch): Exclude derived operands.
3557         * operand.scm (op-iflds-used): Expand derived operands.
3558         (hw-index-derived): New dummy function to create dummy object.
3559         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3560         constructor.  Set object's hw-name and index fields.
3561         (-anyof-merge-subchoices): Set instance object's index also.
3562         (-anyof-name): New helper function.
3563         (anyof-merge-semantics): Correct replacement of operand names in
3564         anyof instance.
3565         (op-ifield): Tolerate derived-operands and their funny indices better.
3566         * ifield.scm (ifld-known-values): Expand derived ifields.
3567         (non-multi-ifields, non-derived-ifields): New utility functions.
3568         (ifld-decode-mode): Tolerate objects with unbound decode field.
3569         * iformat.scm (compute-insn-length): Expand derived ifields.
3570         (compute-insn-base-mask): Ditto.
3571         * insn.scm (insn-base-ifields): Remove.
3572         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3573         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3574         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3575         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3576         (-frag-test-data): Ditto.
3577         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3578         (-gen-sem-switch-engine); Ditto.
3579         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3580         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3581         (-gen-record-args): Tolerate unbound op-ifield.
3582         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3583         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3584         Exclude multi-insns.
3585         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3586         * utils-sim.scm (op-extract?): Handle derived operands.
3587
3588         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3589         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3590         * hardware.scm (hardware-for-mode): New function.
3591
3592         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3593         cleaning up decode tables.
3594         (mask-superset?): Little helper function for above.
3595         * decode.scm (-build-decode-table-entry): Call it.
3596         (-opcode-slots): Add some more tracing.
3597         * arm.cpu: Disable decode-splits construct due to implementation
3598         conflict with `filter-harmlessly-ambiguous-insns'
3599
3600         * decode.scm (-population-top-few): New function for better decode
3601         bit generation.  Includes minor helper functions.
3602         (decode-get-best-bits): Call it instead.
3603         (OLDdecode-get-best-bits): Renamed previous version of above.
3604
3605
3606 2000-06-13  Ben Elliston  <bje@redhat.com>
3607
3608         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3609         for the Guile library directory.
3610         * configure: Regenerate.
3611         * Makefile.in, doc/Makefile.in: Regenerate.
3612
3613         * Makefile.in, doc/Makefile.in: Regenerate.
3614         * configure.in: Remove unnecessary tests. Move to version 1.0.
3615         * acconfig.h, config.in: Remove.
3616         * configure, aclocal.m4: Regenerate.
3617         * doc/stamp-vti, doc/version.texi: Likewise.
3618         * AUTHORS: New file.
3619
3620 2000-06-07 Ben Elliston  <bje@redhat.com>
3621
3622         * fixup.scm (symbol-bound?): Reduce debugging output.
3623
3624 2000-06-02  matthew green  <mrg@redhat.com>
3625
3626         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3627         a given instruction, replacing derived fields with their subfields.
3628         (insn-value): Use `insn-base-ifields' to find all constant values.
3629         (multi-insn-instantiate!): Comment some debug messages.
3630
3631 2000-06-01  Ben Elliston  <bje@redhat.com>
3632
3633         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3634         symbol names used in a (c-call ..) rtx.
3635
3636         * sim-test.scm (build-test-set): Return (()) for an instruction
3637         with no operands, so it too is included in the generated test set.
3638
3639 2000-05-31  Ben Elliston  <bje@redhat.com>
3640
3641         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3642         (sim-test): Likewise.
3643         * Makefile.in: Regenerate.
3644
3645 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3646
3647         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3648         stack traceback, in an order that resembles gdb's `bt'.
3649
3650 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3651
3652         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3653         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3654         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3655         multi insns.
3656         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3657         virtual functions.
3658         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3659         * iformat.scm (ifmt-expanded-ifields): Gone.
3660         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3661         work.
3662         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3663         ifmt entries.
3664
3665         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3666         code.
3667
3668 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3669
3670         * sid.scm (with-any-profile?): New function clone.
3671
3672 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3673
3674         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3675
3676 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3677
3678         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3679         (-multi-ifield-read): Parse them.
3680         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3681         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3682         (multi-ifield gen-extract): Add decode hook.
3683         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3684
3685         * insn.scm (syntax-break-out): More correctly handle \-escaped
3686         syntax characters.
3687         (syntax-make-elements): Ditto.
3688         * opc-itab.scm (compute-syntax): Ditto.
3689
3690 2000-05-17  Ben Elliston  <bje@redhat.com>
3691
3692         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3693
3694 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3695
3696         * gas-test.scm (build-test-set): Return (()) for an instruction
3697         with no operands, so it too is included in the generated test set.
3698
3699 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3700
3701         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3702         IFMT_OPERANDS and SYNTAX_BYTES.
3703
3704 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3705
3706         * sim.scm (with-any-profile?): New function.
3707         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3708         to decide whether or not to include profiling counters.
3709
3710 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3711
3712         Fuller derived-operand support for opcodes.
3713         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3714         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3715         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3716         (gen-operand-table): Omit derived- and anyof- operands from table.
3717         (gen-insn-table): Omit multi-insns from table.
3718         * iformat.scm (ifmt-expanded-fields): New function to expand
3719         subfields of derived-ifields.
3720         (ifmt-compute!): Ignore remaining multi-insns.
3721         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3722         multi-insns.
3723         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3724         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3725         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3726         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3727         (gen-switch): Omit anyof-operands.
3728         * operand.scm (-anyof-syntax): New function.
3729         (-anyof-merge-syntax): Call it.
3730         * utils.scm (collect): New idiomatic function.
3731
3732 2000-05-10  Ben Elliston  <bje@redhat.com>
3733
3734         * m68k.cpu: New file (work in progress).
3735
3736 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3737
3738         * Makefile.am (all-local): New target.  Create stamp-cgen.
3739         * Makefile.in: Regenerated.
3740         * doc/Makefile.in: Regenerated.
3741
3742 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3743
3744         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3745         (-operand-parse-setter): Ditto.
3746         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3747         for CACHE-ADDR operands.
3748         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3749         trace entries.  Widen byte-wide values for printing.
3750         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3751         Widen byte-wide values for printing.  Hexify memory addresses.
3752
3753 2000-04-23  matthew green  <mrg@redhat.com>
3754
3755         * m32r.cpu: Fix a typo.
3756
3757 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3758
3759         * ia64.cpu (define-model): Change merced to Itanium.
3760         (f-qp): Change quilifying to qualifying.
3761         (movbr_ph, movbr_pvec): Delete.
3762         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3763
3764 2000-04-07  Ben Elliston  <bje@redhat.com>
3765
3766         * doc/porting.texi (Building a simulator test suite): Clarify
3767         where generated test cases are placed.
3768
3769 2000-04-07  Ben Elliston  <bje@redhat.com>
3770
3771         * Makefile.am (gas-test): Remove dependency on `cgen'.
3772         (sim-test): Ditto.
3773         * Makefile.in: Regenerate.
3774
3775 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3776
3777         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3778         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3779         type reconfiguration.
3780         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3781         with-profile?.
3782
3783 2000-03-30  Ben Elliston  <bje@redhat.com>
3784
3785         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3786
3787 2000-03-24  Ben Elliston  <bje@redhat.com>
3788
3789         * Makefile.am (stamp-cgen): Reinstate target.
3790         * Makefile.in: Regenerate.
3791
3792 2000-03-22  Ben Elliston  <bje@redhat.com>
3793
3794         * slib/ppfile.scm: Remove; unused.
3795         * slib/defmacex.scm: Likewise.
3796
3797 2000-03-21  Ben Elliston  <bje@redhat.com>
3798
3799         * doc/internals.texi (Source file overview): Document.
3800
3801         * Makefile.am (GUILEDIR): Remove.
3802         (CGEN): Ditto. Callers use $(GUILE) instead.
3803         (GUILEFLAGS): Ditto.
3804         (CGENFILES): Ditto.
3805         (APPDESCFILES): Ditto.
3806         (OPCODESFILES): Ditto.
3807         (SIMFILES): Ditto.
3808         (pkgdata_SCRIPTS): Ditto.
3809         (stamp-cgen): Remove target.
3810         * Makefile.in: Regenerate.
3811
3812         * configure.in: Remove header and library tests.
3813         * configure: Regenerate.
3814         * config.in: Likewise.
3815
3816 2000-03-20  Ben Elliston  <bje@redhat.com>
3817
3818         * read.scm: Cease loading "hob-sup.scm".
3819         * utils.scm: Inherit the fastcall family of procedures (for now).
3820         * hob-sup.scm: Remove.
3821
3822 2000-03-20  Ben Elliston  <bje@redhat.com>
3823
3824         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3825         * configure: Regenerate.
3826         * gdbinit.in: Remove.
3827
3828 2000-03-17  Ben Elliston  <bje@redhat.com>
3829
3830         * Makefile.am (CGEN): Use guile, not cgen.
3831         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3832         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3833         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3834         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3835         (HOB_OBJS): Likewise.
3836         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3837         (CGENOBJS): Likewise.
3838         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3839         (hobbit, hobbit.o, hobbit.c): Remove targets.
3840         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3841         (CLEANFILES): Update.
3842         * acconfig.h (WITH_HOBBIT): Remove.
3843         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3844         option --with-cgen-hobbit.
3845         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3846         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3847         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3848         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3849         * Makefile.in: Regenerate.
3850         * config.in: Likewise.
3851         * aclocal.m4: Likewise.
3852         * configure: Likewise.
3853         * README (Hobbit support): Remove.
3854         * doc/internals.texi (Conventions): Do not mention Hobbit.
3855         * doc/porting.texi (Supported Guile versions): Likewise.
3856
3857 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3858
3859         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3860         callback convention to new sid sidutil::basic_cpu code.
3861         (-gen-sfrag-engine-fn): Ditto.
3862         * sid.scm (-create-virtual-insns!): Ditto.
3863         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3864         mode.
3865         (cxmake-skip): Implement properly for pbb mode.
3866
3867 2000-03-03  Ben Elliston  <bje@redhat.com>
3868
3869         * doc/internals.texi: New file.
3870
3871 2000-02-29  Ben Elliston  <bje@redhat.com>
3872
3873         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3874         * doc/porting.texi: Formatting tweaks.
3875
3876 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3877
3878         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3879         field.
3880
3881 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3882
3883         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3884         mode.
3885
3886 2000-02-23  Andrew Haley  <aph@cygnus.com>
3887
3888         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3889         instruction.
3890
3891 2000-02-24  Ben Elliston  <bje@redhat.com>
3892
3893         * doc/rtl.texi (Derived operands): Add some cindex entries.
3894
3895 2000-02-23  Ben Elliston  <bje@redhat.com>
3896
3897         * ia32.cpu (dndo): Move general purpose macro from here ..
3898         * simplify.inc (dndo): .. to here.
3899
3900 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3901
3902         * arm.cpu (h-tbit): Add c-call setter function.
3903         (h-mbits): Ditto.
3904
3905 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3906
3907         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3908         (-frag-cost-compute!): Ditto.
3909         * utils.scm (copyright-cygnus): Add Y2K.
3910         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3911
3912 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3913
3914         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3915         flags field of the CGEN_CPU_TABLE structure.
3916
3917 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3918
3919         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3920         All references updated.
3921
3922 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3923
3924         * ia32.cpu: Rewrite addressing mode support.
3925
3926         * ifield.scm (<ifield>): New member `follows'.
3927         (ifld-known-values): New proc.
3928         (<ifield>): New method set-word-offset!.
3929         (ifld-set-word-offset!): New proc.
3930         (ifld-new-word-offset): New proc.
3931         (<ifield>): New method next-word.
3932         (<multi-ifield>): New method next-word.
3933         (ifld-next-word): New proc.
3934         (ifld-precedes?): New proc.
3935         (-ifield-parse): New args word-offset,word-length,follows.
3936         All callers updated.  Handle CISC-style vs RISC-style ifields.
3937         (-ifield-read): Recognize word-offset,word-length,follows specs.
3938         (-ifld-parse-follows): New proc.
3939         (-multi-ifield-make-default-insert): New proc.
3940         (-multi-ifield-make-default-extract): New proc.
3941         (-multi-ifield-parse): Provide default values for insert,extract
3942         handlers if not specified.
3943         (<derived-ifield>): New class.
3944         (derived-ifield?): New predicate.
3945         (ifld-derived-operand?): New predicate.
3946         (f-anyof): New global.
3947         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3948         (f-derived,ifld-derived?): Delete.
3949         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3950         * insn.scm (-sub-insn-ifields): New proc.
3951         (-sub-insn-make!): New proc.
3952         (multi-insn-instantiate!): Provide initial implementation.
3953         (-insn-parse): If insn contains "anyof" operands, create a
3954         <multi-insn> object instead of a plain <insn>.
3955         (-parse-insn-format-symbol): Rewrite derived operand handling.
3956         Add anyof operand handling.
3957         (-parse-insn-format-ifield-spec): Rewrite.
3958         (-parse-insn-format-operand-spec): Delete.
3959         (-parse-insn-format-list): Delete support for `(operand value)'.
3960         (anyof-operand-format?): Replaces derived-operand-format?.
3961         * operand.scm (-operand-parse-getter): Improve error messages.
3962         (-operand-parse-setter): Ditto.
3963         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3964         ifield-assertion.
3965         (<anyof-operand>): Change baseclass from <derived-operand> to
3966         <operand>.  Delete member values.  New members base-ifield,choices.
3967         (anyof-operand?): New predicate.
3968         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3969         (-derived-operand-parse): Rewrite.
3970         (-derived-operand-read): Rewrite.
3971         (-anyof-parse-choice): New proc.
3972         (-anyof-operand-parse): Rewrite.
3973         (-anyof-operand-read,define-anyof-operand): New procs.
3974         (<anyof-value>): Rewrite.
3975         (-anyof-initial-known): New proc.
3976         (anyof-satisfies-assertions?): New proc.
3977         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3978         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3979         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3980         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3981         (-anyof-value-from-derived): New proc.
3982         (-anyof-all-choices-1,anyof-all-choices): New procs.
3983         (operand-init!): Create define-anyof-operand reader command.
3984
3985         * insn (syntax-break-out): Take syntax as argument instead of insn.
3986         All callers updated.
3987         (syntax-make): Move here, from ???.
3988
3989         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3990         bitrange-foo. All uses updated.
3991         (bitrange-next-word): New proc.
3992
3993         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3994
3995         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3996         (rtx-make-const,rtx-make-enum): New procs.
3997         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3998         (rtx-mem-addr,rtx-mem-sel): New procs.
3999         (rtx-change-address): New proc.
4000         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4001         (rtx-make-set,rtx-single-set?): New procs.
4002         (rtx-combine): New proc.
4003
4004         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4005         (rtx-traverse-with-locals): Ditto.
4006         (-rtx-traverse,-rtx-traverse-*): Ditto.
4007
4008         * rtl.scm (define-subr): New proc.
4009         (rtl-init!): Create reader command `define-subr'.
4010
4011         * cos.c (_object_mi_p): Ensure argument is an object.
4012         (indent): New function.
4013         (_object_print_elms): Add pretty-printing support.
4014         (_object_print): Ditto.
4015
4016         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4017         (*floats-s->c-fun-table*): Ditto.
4018         * hobbit.c,hobbit.h: Rebuild.
4019         * hob-sup.c (fastcall7): New proc.
4020         * hob-sup.h (fastcall7): Declare.
4021         * hob-sup.scm (fastcall7): New macro.
4022
4023         * mach.scm (<arch>): New member subr-list.
4024         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4025         (arch-finish!): Reverse recorded subr list.
4026
4027         * read.scm (debug-env): New global.
4028         (debug-var-names,debug-var,debug-repl-env): New procs.
4029         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4030         (debug-quit): Renamed from `continue'.
4031
4032         * simplify.inc (dsmf): New pmacro.
4033
4034         * utils.scm (plus-scan): New proc.
4035         (split-bits): Rewrite.
4036         (split-value): New proc.
4037
4038 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4039
4040         * doc/Makefile.am (DOCFILES): Add notes.texi.
4041         * doc/Makefile.in: Rebuild.
4042
4043 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4044
4045         * ifield.scm (ifld-derived?): New proc.
4046         (f-derived): New global.
4047         (ifield-builtin!): Create ifield f-derived.
4048         (<multi-insn>): New class.
4049         (multi-insn?): New predicate.
4050         (multi-insn-instantiate!): New proc.
4051         (-insn-parse): Create <multi-insn> objects for insns with derived
4052         ifields.
4053         (-parse-insn-format-symbol): Handle derived ifields.
4054         (-parse-insn-format-ifield-spec): New proc.
4055         (-parse-insn-format-operand-spec): New proc.
4056         (-parse-insn-format-list): Simplify.
4057         (-parse-insn-format): No longer allow (ifield-object value) spec.
4058         (derived-operand-format?): New proc.
4059         (insn-alias?): New proc.
4060         (non-alias-insns): Rewrite.
4061         (insn-real?): Renamed from real-insn?, all callers updated.
4062         (virutal-insns): Rewrite.
4063         (multi-insns): New proc.
4064         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4065         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4066         Return #f if operand doesn't have an index or if index is not an
4067         ifield.
4068         (hw-index-anyof): New proc.
4069         (-operand-parse): Allow integer indices.
4070         (<derived-operand>): New class.
4071         (derived-operand?): New predicate.
4072         (<anyof-operand>): New class.
4073         (<anyof-value>): New class.
4074         (-anyof-parse-value,-anyof-operand-parse): New procs.
4075         (-derived-operand-parse,-derived-operand-read): New procs.
4076         (define-derived-operand,define-full-derived-operand): New procs.
4077         (operand-init!): New reader command define-derived-operand.
4078
4079         * utils.scm (list-take): Handle negative amount.
4080         (element?): Rewrite.
4081
4082 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4083
4084         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4085
4086 1999-10-04  Richard Henderson  <rth@cygnus.com>
4087
4088         * ia64.cpu: Checkpoint.
4089
4090 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4091
4092         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4093
4094         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4095         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4096
4097 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4098
4099         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4100         PC returned by sim_engine_invalid_insn.
4101
4102 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4103
4104         * ia32.cpu: New file.
4105
4106 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4107
4108         * utils.scm (bit-set?): Fix off by one error.
4109
4110         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4111
4112         * rtl.scm (hw): Check for valid hardware element before trying to
4113         get its mode.
4114
4115         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4116         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4117         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4118         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4119         compute_operand2_foo.
4120
4121         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4122         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4123         Call delayed_branch/branch methods instead of assigning to `vpc'.
4124         (<hw-pc>,cxmake-skip): Call skip method.
4125         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4126         (<pc>,cxmake-skip): Ditto.
4127         (-create-virtual-insns!): Ditto.
4128         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4129         (op:write): Ditto.
4130         (op:record-profile): Specify #:output-language "c++".
4131         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4132         @arch@_insn_attr.
4133         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4134         Define enums here.
4135         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4136         (gen-semantic-code): Ditto.
4137         (-gen-sem-case,-gen-sfrag-code): Ditto.
4138         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4139         (cgen-cpu.h): File is now #included by main cpu class, rather than
4140         subclassing.
4141         (cgen-defs.h): New proc.
4142         (-gen-scache-semantic-fn): Change result type to sem_status.
4143         New local `status'.  Call done_cti_insn/done_insn method at end.
4144         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4145         cgen-ops.h.
4146         (cgen-sem-switch.cxx): Ditto.
4147         * sid-decode.scm (-gen-idesc-decls): Update return type of
4148         @prefix@_sem_fn.
4149         (cgen-decode.h): Add using namespace @arch@.
4150         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4151
4152         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4153         (estate-output-language-c?,estate-output-language-c++?): New procs.
4154         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4155         (estate-make-for-normal-rtl-c++): New proc.
4156         (rtl-c++-parsed,rtl-c++): New proc.
4157         (s-c-call): Invoke cpu class method if c++.
4158         (join): Use s-c-raw-call.
4159
4160         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4161         (nop): Rewrite.
4162
4163         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4164         * rtl.scm (<eval-state>): New member `modifiers'.
4165         (<eval-state>,vmake!): Handle #:modifiers.
4166         (estate-with-modifiers): New proc.
4167
4168         * rtl.scm (rtx-side-effects?): New proc.
4169         (rtx-canonical-bool): Don't change expr if it has side effects.
4170         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4171         better.
4172
4173 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4174
4175         * sim.scm (gen-scache-type): Fix typo in last patch.
4176
4177 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4178
4179         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4180
4181 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4182
4183         * sid.scm (<hw-pc>,cxmake-skip): New method.
4184         (<pc>,cxmake-skip): New method.
4185
4186         * decode.scm (decode-build-table): Delete args startbit,index-list.
4187         All callers updated.
4188         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4189         All callers updated.
4190         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4191         to decode-get-best-bits.
4192         * sid-decode.scm (-gen-decode-fn): Ditto.
4193
4194         * hardware.scm (hw-bits): New proc.
4195         (-hw-parse): New arg layout.  All callers updated.
4196         (define-full-hardware): New arg layout.  All callers updated.
4197         (-hw-validate-layout): New proc.
4198         (-hw-create-[gs]etter-from-layout): New procs.
4199         (<hw-register>,parse!): Handle layout spec.
4200         * types.scm (type-bits): New proc.
4201
4202         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4203         UNARY, BINARY, TRINARY rtxs.
4204
4205         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4206         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4207         Support '- as "unused spot" indicator.
4208
4209 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4210
4211         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4212
4213 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4214
4215         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4216
4217         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4218         construction.
4219         (tstate-make): New arg `depth'.  All callers updated.
4220         (tstate-depth,tstate-set-depth!): New procs.
4221         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4222         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4223         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4224
4225 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4226
4227         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4228         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4229         * utils-sim.scm: Decoder generator support moved here.
4230         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4231         (-gen-decoder-switch): Sort entries for more fall-throughs.
4232
4233         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4234         * Makefile.in: Rebuild.
4235         * sim-test.scm (build-sim-testcase): Add logging message.
4236         * dev.scm (cload): Recognize SIM-TEST application.
4237         (load-stest): Set APPLICATION to SIM-TEST.
4238
4239         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4240
4241         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4242         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4243         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4244
4245         * insn.scm (syntax-break-out): Handle ${foo}.
4246
4247 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4248
4249         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4250         (bin_PROGRAMS): Define.
4251         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4252         (cgen-hob.c): Prepend $(srcdir)/ here.
4253         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4254         (libcpu_a_SOURCES): Delete.
4255         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4256         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4257         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4258         Add AC_CHECK_LIB(guile,main).
4259         * Makefile.in: Rebuild.
4260         * doc/Makefile.in: Rebuild.
4261         * aclocal.m4: Rebuild.
4262         * config.in: Rebuild.
4263         * configure: Rebuild.
4264
4265 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4266
4267         Rename rtx functions from name: to name, accept optional leading
4268         modifier and mode.
4269         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4270         * attr.scm (-attr-eval): Update.
4271         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4272         (<hw-register>,mode-ok?): Disallow VOID.
4273         (<hw-immediate>,mode-ok?): Disallow VOID.
4274         (<hw-address>,mode-ok?): Disallow VOID.
4275         * mode.scm (mode-name?): New proc.
4276         (VOID): Renamed from VM.
4277         (DFLT): Renamed from DM.
4278         (mode-builtin!): Update.
4279         * opcodes.scm (<ifield>,gen-insert): Update.
4280         (<ifield>,gen-extract): Update.
4281         (<multi-ifield>,gen-insert,gen-extract): Update.
4282         * operand.scm (op:mode): Update.
4283         (<pc>,make!): Update.
4284         (op:new-mode): Update.
4285         (-operand-read): Update.
4286         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4287         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4288         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4289         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4290         (rtx-make): Call -rtx-munge-mode&options.
4291         (rtx accessors): Rewrite.
4292         (rtx-pretty-name): Update.
4293         (-rtx-traverse-*): Update.
4294         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4295         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4296         (-rtx-make-traverse-table): Update.
4297         (-rtx-traverse-operands): Update.
4298         (-rtx-option?,-rtx-option-list?): New procs.
4299         (-rtx-munge-mode&options): New proc.
4300         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4301         (-rtx-traverse): Update.
4302         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4303         (rtx-compile-time-constant?): Update.
4304         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4305         (rtx-value): Update.
4306         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4307         * rtx-funcs.scm (*): Update.
4308         * rtl-c.scm (rtl-c-get): Update.
4309         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4310         (s-c-call,s-c-raw-call): Update.
4311         (s-boolifop,s-convop,s-if,s-cond): Update.
4312         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4313         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4314         (s-parallel,s-sequence): Update.
4315         (rtl-c-build-table): Update.
4316         * sem-frags.scm (-frag-hash-compute!): Update.
4317         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4318         for temporary bug compatibility with previous version.
4319         (-frag-expr-locals,-frag-expr-stmts): Update.
4320         (-frag-compute-desired-frags,-frag-pick-best): Update.
4321         * semantics.scm (-simplify-expr-fn): Update.
4322         (rtx-simplify): Update.
4323         (-rtx-ref-type): Update.  Account for modifiers.
4324         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4325         (-build-ifield-operand!): Update.
4326         (-build-known-values): Update.
4327         (semantic-compile): Update.
4328         (-gen-reg-access-defns): Update.
4329         (gen-semantic-code,-gen-sem-case): Update.
4330         (-gen-sfrag-code,-gen-sfrag-case): Update.
4331         * sim-cpu (gen-semantic-code): Update.
4332         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4333         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4334         (-hw-cxmake-get): Update.
4335         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4336         (<hw-index>,cxmake-get): Update.
4337         (<operand>,gen-type,gen-read,cxmake-get): Update.
4338         (<operand>,gen-set-quiet,gen-set-trace): Update.
4339         (<pc>,cxmake-get): Update.
4340         (sim-finish!): Update.
4341         * utils-gen.scm (-gen-ifld-extract-base): Update.
4342         (-gen-ifld-extract-beyond): Update.
4343         (gen-multi-ifld-extract): Update.
4344         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4345         * sid.scm (<hw-pc>,gen-write): Update.
4346         (-gen-decode-insn-globals): Update.
4347         (-hw-cxmake-get): Update.
4348         (<hw-register>,cxmake-get-raw): Update.
4349         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4350         (<hw-index>,cxmake-get): Update.
4351         (<operand>,gen-type,gen-read,cxmake-get): Update.
4352         (<operand>,gen-set-quiet,gen-set-trace): Update.
4353         (<pc>,cxmake-get): Update.
4354         (-create-virtual-insns!): Update.
4355         (-decode-split-build-assertion): Update.
4356         * *.cpu: Update.
4357         * simplify.inc: Update.
4358
4359 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4360
4361         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4362         Prefix queue function name with sim_ instead of @cpu@_.
4363
4364         * sim.scm (-with-parallel-only?): New global.
4365         (option-init!): Initialize it.
4366         (option-set!): Set it.
4367         (with-parallel-only?): New proc.
4368         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4369         and writeback markers if with-parallel-only.
4370         (-gen-idesc-init-fn): Update.
4371         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4372         with-generic-write.
4373
4374 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4375
4376         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4377         with the invalid insn handler.
4378
4379         * utils.scm (list-maybe-ref): New proc.
4380
4381         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4382         define-arch.
4383         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4384
4385         * i960.cpu (test*-*): Delete `expr' arg.
4386         (test-op,branch-op): Update.
4387
4388 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4389
4390         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4391         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4392         updated.
4393         (gen-reg-access-defn): Ditto.
4394         (-gen-hw-addr): Rewrite.
4395         (-op-gen-queued-write): Rewrite.
4396         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4397         (-gen-scache-semantic-fn): Handle with-generic-write.
4398         (-gen-no-scache-semantic-fn): Ditto.
4399
4400 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4401
4402         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4403
4404         * sim.scm (-with-generic-write?): New global.
4405         (option-init!): Initialize it.
4406         (option-set!): Set it.
4407         (with-generic-write?): New proc.
4408         (-gen-hw-addr): New proc.
4409         (-op-gen-queued-write): New proc.
4410         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4411
4412         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4413         turned off.
4414         (-gen-sem-switch): Preserve existing with-parallel? value.
4415         (-gen-sem-parallel-switch): Ditto.
4416         (-gen-write-case): Add /indent support.
4417         (cgen-write.c): Rewrite.
4418
4419         * utils.scm (-current-print-state): New global.
4420         (make-print-state): New proc.
4421         (pstate-indent,pstate-set-indent!): New procs.
4422         (pstate-cmd?,pstate-cmd-do): New procs.
4423         (/indent): New global.
4424         (/indent-set,/indent-add): New procs.
4425         (string-write): Set -current-print-state.
4426         (-string-write): New arg pstate, all callers updated.
4427         Handle print-state commands.
4428         (-string-list-flatten): New proc.
4429         (string-list->string): Use it.
4430
4431         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4432         (-gen-sem-fn-table-entry): New proc.
4433         (-gen-semantic-fn-table): New proc.
4434         (-gen-scache-semantic-fn): Make fn static.
4435         (-gen-no-scache-semantic-fn): Ditto.
4436         (cgen-semantics.c): Define macro SEM_FN_NAME.
4437         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4438         FAST,FULL.  Update @cpu@_insn_sem contents.
4439         (-gen-semf-fn-name): Delete.
4440         (-gen-sem-fn-decls): Delete.
4441         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4442         @cpu@_semf_init_idesc_table.
4443         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4444         handlers here.
4445         (cgen-decode.h): Print sfmt enum.
4446         * sid-decode.scm (-gen-semf-fn-name): Delete.
4447         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4448
4449         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4450         (ifmt-compute!): Ditto.
4451         * sim-decode.scm (-gen-decoder-switch): Ditto.
4452         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4453         (-gen-decoder-switch): Ditto.
4454
4455         * insn.scm (insn-virtual?): New proc.
4456
4457         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4458         convert to string.
4459         * mach.scm (<arch>): attr-list is now a pair of lists.
4460         (current-attr-list): Rewrite.
4461         (current-attr-add!,current-attr-lookup): Rewrite.
4462         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4463
4464 1999-08-06  Richard Henderson  <rth@cygnus.com>
4465
4466         * ia64.cpu: Initial checkpoint.
4467
4468 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4469
4470         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4471         (pmacros-init!): Update .apply help string.
4472
4473 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4474
4475         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4476         (<hw-pc>,cxmake-skip): New method.
4477         (<pc>,cxmake-skip): New method.
4478         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4479         (gen-argbuf-type): New member `skip_count'.
4480         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4481         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4482
4483         * utils-sim.scm: New file.
4484         * dev.scm (load-sim): Load it.
4485         (load-sid): Load it.
4486         * cgen-sid.scm: Load it.
4487         * cgen-sim.scm: Load it.
4488         * iformat.scm (<sformat>): New member sbuf, not initialized by
4489         default make.
4490         * rtx-funcs.scm (skip): Rewrite.
4491         * rtl-c.scm (skip): Rewrite.
4492         * m32r.cpu (sc,snc): Update `skip' usage.
4493         * mode.scm (mode-real-mode): New proc.
4494         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4495         Distinguish fragments by the <sformat-abuf> they use.
4496         * sim.scm (gen-profile-index-type): Delete.
4497         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4498         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4499         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4500         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4501         (-gen-argbuf-elm): Rewrite.
4502         (-gen-argbuf-hw-elm): Delete.
4503         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4504         of each sfmt.
4505         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4506         (sim-init!): Initialize them.
4507         (sim-analyze-insns!): Set them.
4508         (current-sbuf-list): New proc.
4509         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4510         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4511         * sim-model.scm (-gen-model-insn-fn): Ditto.
4512         * sim-decode.scm (-gen-extract-decls): Delete.
4513         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4514         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4515         sim.scm.
4516         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4517         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4518         (-gen-op-extract,-gen-op-trace-extract): New procs.
4519         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4520         gen-sfmt-argvars-foo and rewrite.
4521         (-gen-record-args): Rewrite.
4522         (-gen-extract-case): Tweak.
4523         * sid.scm (gen-profile-index-type): Delete.
4524         (ifield argbuf support): Move to utils-sim.scm.
4525         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4526         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4527         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4528         (-sim-sformat-argbuf-list): New global.
4529         (sim-init!): Initialize it.
4530         (sim-analyze-insns!): Set it.
4531         (current-sbuf-list): New proc.
4532         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4533         (-gen-argbuf-hw-elm): Delete.
4534         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4535         of each sfmt.
4536         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4537         (-gen-extract-decls): Delete.
4538         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4539         sid.scm.
4540         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4541         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4542         (-gen-op-extract,-gen-op-trace-extract): New procs.
4543         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4544         gen-sfmt-argvars-foo and rewrite.
4545         (-gen-record-args): Rewrite.
4546         (-gen-extract-case): Tweak.
4547
4548         * cgen-gh.c (gh_putc,gh_puts): New functions.
4549         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4550         * cos.c (_object_print_elms,_object_print): Use them.
4551         * hob-sup.c (fastcall_print): Use them.
4552         * configure.in: Check for scm_gen_puts, scm_puts.
4553         * config.in: Rebuild.
4554         * configure: Rebuild.
4555         * aclocal.m4: Rebuild.
4556         * Makefile.in: Rebuild.
4557
4558         * dev.scm (load-opc): Use load instead of maybe-load.
4559         (load-gtest,load-sim,load-stest): Ditto.
4560         (load-sid): Ditto.
4561
4562 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4563
4564         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4565         up to avoid g++ 'goto crosses initialization' warning.
4566         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4567         (-gen-sfrag-case): Update use of NEXT_FRAG.
4568
4569 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4570
4571         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4572
4573         * read.scm: Load sem-frags.scm.
4574         * sem-frags.scm (*): Lots rewritten.
4575         * sid.scm (-with-sem-frags?): New global
4576         (with-sem-frags?): New proc.
4577         (option-init!): Initialize -with-sem-frags?.
4578         (option-set!): Recognize with-sem-frags.
4579         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4580         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4581         if asked to.
4582         (-gen-sfrag-engine-decls): New proc.
4583         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4584         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4585         (-gen-sfrag-engine): New proc.
4586         (-gen-sem-case): Emit setup-semantics if specified.
4587         (-gen-sem-switch-engine): Update init/use of computed goto label.
4588         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4589         from local vars.
4590         (-gen-idesc-decls): Replace sem_address with cgoto.
4591         (-gen-scache-decls): Rewrite definition of `execute' member.
4592         * arm.cpu (arm isa): Enable decode-splits.
4593         * arm7.cpu (multiply insns): Rename result to mul-result.
4594
4595         Rename decode-specialize to decode-split.
4596         * decode.scm (*): Update.
4597         * insn.scm (*): Update.
4598         * mach.scm (*): Update.
4599         * sid.scm (*): Update.
4600
4601 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4602
4603         Record objects as a smob.
4604         * cos.c (scm_tc16_object): New static global.
4605         (cos_init): Initialize it.
4606         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4607         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4608         (_object_tag): Delete.
4609         (_object_make_smob): New function.
4610         (_object_make_x,_object_make_with_values_x): Rewrite.
4611         (_object_elements,_object_class_desc): Rewrite.
4612         (_object_copy,object_p): Rewrite.
4613         (_object_specialize): Rewrite.
4614         (_object_print_elms,_object_print): New functions.
4615         (object_smob): New static global.
4616         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4617
4618         * cos.c (_make_x_symbol): New static global.
4619         (object_make): Use it.
4620         (cos_init): Initialize it.
4621
4622 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4623
4624         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4625         instead to determine whether to use FLD macro.
4626         (<rtl-c-eval-state>): New member ifield-var?.
4627         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4628         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4629         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4630
4631         * rtl.scm (rtx-sequence-assq-locals): New proc.
4632
4633         * cos.scm (-object-error): Don't crash on non-objects.
4634
4635         * Makefile.am (CLEANFILES): Add hobbit.
4636         * Makefile.in: Rebuild.
4637
4638         * rtl-c.scm (s-c-call): Delete unnecessary code.
4639
4640 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4641
4642         * rtl-c.scm (ifield): Always reference value via `FLD'.
4643
4644         * cos.c (elm_bound_p): Return problem SCM boolean values.
4645
4646         * utils-cgen.scm (display-argv): New proc.
4647         * cgen-opc.scm (cgen): Call it.
4648         * cgen-sim.scm (cgen): Ditto.
4649         * cgen-gas.scm (cgen): Ditto.
4650         * cgen-stest.scm (cgen): Ditto.
4651         * cgen-sid.scm (cgen): Ditto.
4652
4653 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4654
4655         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4656         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4657         (-gen-extract-switch): Initialize result to 1.
4658         * opcodes.scm (gen-ifield-default-type): New proc.
4659         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4660         updated.
4661         (<hw-index>,gen-insert): Handle non-ifield indices.
4662         (<hw-index>,gen-extract): Ditto.
4663         (<hw-asm>,gen-parse): Ditto.
4664         (<hw-asm>,gen-print): Ditto.
4665         (<keyword>,gen-parse): Ditto.
4666         (<keyword>,gen-print): Ditto.
4667         (<operand>,gen-fget): Ditto.
4668         (<operand>,gen-fset): Ditto.
4669
4670         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4671         (-gen-hw-index): Ditto.
4672         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4673         (-gen-hw-index): Ditto.
4674
4675         * sem-frags.scm: New file.
4676
4677         * attr.scm (attr-parse): Add better checking of input.
4678
4679         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4680         All uses updated.
4681         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4682
4683         * ifield.scm (ifld-nil?): New proc.
4684
4685         * operand.scm (<operand>): New members getter,setter.
4686         (<operand>,make!): New args getter,setter.  All uses updated.
4687         (op:getter,op:setter): New procs.
4688         (<hw-index>,field-start): Return 0 for non-ifield indices.
4689         (<hw-index>,field-length): Return 0 for non-ifield indices.
4690         (-operand-parse-getter,-operand-parse-setter): New procs.
4691         (-operand-parse): New args getter,setter.  All callers updated.
4692         Always use hw-index-scalar for scalar operands.
4693         (-operand-read): Handle getter,setter.
4694         (define-full-operand): New args getter,setter.  All uses updated.
4695         * semantics.scm (-build-ifield-operand!): Update.
4696         (-build-index-of-operand!): Update.
4697         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4698         * simplify.inc (define-normal-operand): Update.
4699
4700         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4701         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4702         (s-binop,s-cmpop,s-convop): Ditto.
4703         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4704         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4705         (fcc-tests): New insn-enum.
4706         (fcc-value): Rename from fcc-type.
4707         * sparcfpu.cpu: New file.  All fp support moved here.
4708
4709         * rtl.scm (<rtx-func>): New member class.
4710         (rtx-class-*?): New procs.
4711         (def-rtx-node): New arg class.  All callers updated.
4712         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4713         * rtx-funcs.scm (*): Specify class.
4714
4715         * utils-cgen.scm (context-make-reader): New proc.
4716
4717         * utils.scm (assert-fail-msg): New variable.
4718         (assert): Use it.
4719         (list-drop,list-tail-drop): New procs.
4720
4721 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4722
4723         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4724         CGEN_MIN_INSN_SIZE deleted on March 22.
4725
4726         * ifield.scm (<ifield>,needed-iflds): New method.
4727         (<multi-ifield>,needed-iflds): New method.
4728         (ifld-needed-iflds): New proc.
4729         (multi-ifield?): New proc.
4730         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4731         (-sfmt-search-key): Include insn length in key.
4732         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4733         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4734         (-ifmt-lookup-ifmt!): Compute key here.
4735         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4736         All callers updated.
4737         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4738         All callers updated.
4739         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4740         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4741         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4742         to ifmt-build.
4743         * operand.scm (op-iflds-used): New proc.
4744         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4745         and sim-cpu.scm.
4746         And from sid.scm,sid-cpu.scm as well.
4747         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4748         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4749         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4750         (gen-extracted-ifld-value): Ditto.
4751         (-extract-chunk-specs): Ditto.
4752         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4753         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4754         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4755         (-extract-insert-subfields): New function.
4756         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4757         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4758         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4759         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4760         gen-extract-foo.
4761         (-gen-no-scache-semantic-fn): Ditto.
4762         (-gen-sem-case): Ditto.
4763         (-gen-read-case): Update calls to gen-define-ifields,
4764         gen-extract-ifields.
4765         * sim-decode.scm (-gen-record-args): Update.
4766         (-gen-sfmt-argvars-assigns): Update.
4767         (-gen-extract-case): Update.
4768         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4769         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4770         gen-extract-foo.
4771         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4772         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4773         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4774         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4775         gen-define-ifields, gen-extract-ifields.
4776         (-gen-record-args): Update.
4777         (gen-sfmt-argvars-assigns): Update.
4778         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4779         with gen-define-ifields.  Ditto for gen-extract-foo.
4780         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4781         procs rather than method calls.
4782
4783 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4784
4785         * sid.scm (-create-virtual-insns!): New local `context', pass it
4786         to insn-read.
4787
4788         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4789         (operand name) not (operand object), (local name) not (local object).
4790         (rtx-traverse-with-locals): New proc.
4791         (-compile-expr-fn): New proc.
4792         (rtx-compile): Rewrite.
4793         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4794         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4795         (rtl-c-set-trace): Ditto.
4796         (operand define-fn): Recognize operand name argument.
4797         (local define-fn): Recognize sequence temp name argument.
4798         * rtx-funcs.scm (operand): Argument is operand name, not object,
4799         so call current-op-lookup.
4800         (local): Similarily, so call rtx-temp-lookup.
4801
4802         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4803         (rtx-operand?): Ditto.
4804         (rtx-pretty-name): Ditto.
4805         (rtx-local-obj): Flag symbol argument as an error.
4806         (rtx-local-name): New proc.
4807         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4808
4809         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4810
4811         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4812         updated.
4813
4814         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4815         (and: QI rd #xff).
4816
4817         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4818         (*floats-s->c-fun-table*): Ditto.
4819         * hobbit.c,hobbit.h: Rebuild.
4820         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4821         * semantics.scm (rtx-simplify): Use /fastcall-make.
4822
4823         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4824
4825         * insn.scm (<insn>): Delete members condition, compiled-condition.
4826         (<insn>,make!): Update
4827         (<insn> getters,setters): Update.
4828         (-insn-parse,insn-read,define-full-insn): Update.
4829         * minsn.scm (minsn-make-alias): Update.
4830         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4831         (ifmt-compute!): Ditto.
4832         * sim.scm (sim-finish!): Update.
4833         * simplify.inc: (define-normal-insn): Update.
4834         * sid-cpu.scm (gen-semantic-code): Update.
4835
4836         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4837         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4838         (ifmt-compute!): Ditto.
4839
4840 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4841
4842         * minsn.scm (minsn-compute-iflds): Print better error message for
4843         missing ifields.
4844
4845 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4846
4847         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4848
4849         * Makefile.am (HOBFLAGS): New variable.
4850         (cgen-hob.c): Use it.
4851         (hobbit.c): Use it.
4852         (libcpu_a_SOURCES): Add hob-sup.c.
4853         (hob-sup.o): New rule.
4854         * Makefile.in: Rebuild.
4855         * cgen.c: #include hob-sup.h.
4856         (cgen_init_c): Call hobbit_init_support.
4857         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4858         (*special-scm->c-functions*): Add them.
4859         (display-c-expression): Handle *c-symbol*.
4860         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4861         (*floats-s->c-fun-table*): Ditto.
4862         (normalize): Recognize /fastcall-make.
4863         (normalize-fastcall-make): New proc.
4864         * hobbit.c,hobbit.h: Rebuild.
4865         * hob-sup.scm: New file.
4866         * hob-sup.c: New file.
4867         * hob-sup.h: New file.
4868         * read.scm: Load hob-sup.scm.
4869         * rtl.scm (-rtx-name-list): New variable.
4870         (rtx-name-list): New proc.
4871         (rtx-lookup): Try symbol first.
4872         (def-rtx-node): Add name to -rtx-name-list.
4873         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4874         (-rtx-traverse-anymode): New proc.
4875         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4876         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4877         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4878         (-rtx-traverse-{symornum,object}): New procs.
4879         (-rtx-make-traverse-table): Rewrite.
4880         (-rtx-traverse-operands): Rewrite arg-types handling.
4881         Handle #f result of traverser.
4882         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4883         Move debug handling here.
4884         (-rtx-traverse-debug): Delete.
4885         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4886         for each rtx.
4887         * semantics.scm (semantic-compile:process-expr!): Fix call to
4888         -rtx-traverse.
4889         * utils.scm (map1-improper): New proc.
4890
4891 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4892
4893         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4894         (h-mbits): Ditto.
4895         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4896         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4897         (<operand>,cxmake-get): Tweak.
4898         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4899
4900 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4901
4902         * thumb.cpu (dnti): Delete timing spec.
4903         (all insn): Update.
4904
4905         * arm.cpu (arm isa): New fields condition, setup-semantics.
4906         (thumb isa): New field setup-semantics.
4907         (h-gr): Add attribute CACHE-ADDR.
4908         * arm7.cpu (dnai): Delete condition.
4909         (eval-cond): Delete.
4910
4911         * mach.scm (<isa>): New member setup-semantics.
4912         (-isa-parse-setup-semantics): New proc.
4913         (-isa-parse): New arg setup-semantics.
4914         (-isa-read): Recognize setup-semantics.
4915
4916         * sid-cpu.scm (gen-extract-fields): Split into two:
4917         gen-extract-ifields, gen-extract-ifmt-ifields.
4918         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4919         tracing begin/end messages (done by caller now).
4920         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4921         tracing begin/end messages (done by x-before,x-after virtual insns).
4922         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4923         end so don't have to look it up again next time.
4924         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4925         (-decode-expr-ifield-tracking-key): New proc.
4926         (-decode-expr-ifield-tracking): New proc.
4927         (-decode-expr-ifield-values-used): New proc.
4928         (-decode-expr-ifield-mark-used!): New proc.
4929         (-gen-decode-expr-set-itype): New proc.
4930         (-gen-decode-expr-entry): Rewrite.
4931         (-gen-decode-table-entry): New proc.
4932         (-gen-decoder-switch): Use it.
4933         (-gen-virtual-insn-finder): New proc.
4934         (-gen-argbuf-elm): Move here from sid.scm.
4935         (-gen-argbuf-hw-elm): Ditto.
4936         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4937         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4938         conditional-execution isas.
4939         (-gen-decode-fn): Record conditional-exec ifield.
4940         * sid.scm (-current-pbb-engine?): New global.
4941         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4942         (<ifield>,gen-ifld-extract): New arg `indent'.
4943         (<multi-ifield>,gen-ifld-extract): Ditto.
4944         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4945         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4946         (-gen-arch-model-decls): Only scan real insns.
4947         (scache-engine-insns,pbb-engine-insns): New procs.
4948         (-create-virtual-insns!): New proc.
4949         (sim-finish!): Call it.
4950         (-decode-specialize-insn?): New proc.
4951         (-decode-specialize-build-assertion): New proc.
4952         (-decode-specialize-insn-1): New proc.
4953         (-decode-specialize-insn): New proc.
4954         (-fill-sim-insn-list!): New proc.
4955         (sim-analyze!): Create copies of insns to be specialized.
4956         * utils-cgen.scm (obj-set-name!): New proc.
4957
4958         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4959         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4960         semantic-attrs.
4961         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4962         sformats.
4963         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4964         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4965         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4966         (attr): Rewrite test for insn owner.
4967         (member): New rtx function.
4968         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4969         as separate function.
4970         (rtx-ifield?,rtx-ifield-name): New procs.
4971         (rtx-operand-obj): Rewrite.
4972         (rtx-operand-name): New proc.
4973         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4974         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4975         (tstate-make): New args owner, known.  All callers updated.
4976         (tstate-known-lookup): New proc.
4977         (rtx-traverse): New arg owner.  All callers updated.
4978         (rtx-make-bool): New proc.
4979         (rtl-find-ifields): Rewrite.
4980         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4981         * semantics.scm: ... here.
4982         (rtx-const-equal,rtx-const-list-equal): New procs.
4983         (-build-known-values): New proc.
4984         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4985         (semantic-attrs): Ditto.
4986         * rtx-funcs.scm (member,number-list): New rtx functions.
4987
4988         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4989         Rewrite.  Delete arg `all-attrs'. All callers updated.
4990         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4991         updated.
4992         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4993
4994         * decode.scm (subdtable-add): Handle `expr' entries.
4995         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4996         (exprtable-entry-*): Update.
4997         (exprtable-entry-iflds): New proc.
4998         (exprentry-cost): New proc.
4999         (exprtable-sort,-gen-exprtable-name): New procs.
5000         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5001         (exprtable-*): Update.
5002         (-build-decode-table-entry): Don't issue collision warning if all are
5003         specialized insns.  Sort exprtable entries before building table.
5004
5005         * read.scm (-reader-process-expanded-1): Move pretty printing of
5006         input to logging level 4.
5007
5008         * utils.scm (string-list->string): New proc.
5009
5010         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5011         semantics.
5012         (insn-read): Delete leading '-' in name.  All callers updated.
5013         (real-insn?): New proc.
5014         (real-insns): Rewrite.
5015         (insn-has-ifield?): New proc.
5016         (insn-builtin!): Create insn attribute SPECIALIZED.
5017
5018         * mach.scm (<arch>): Delete member app-data.
5019         (current-raw-insn-list): New proc.
5020         (insn-list-car,insn-list-splice!): New procs.
5021         (<decode-specialize>): New class.
5022         (-isa-parse-decode-specialize): New proc.
5023         (-isa-parse-decode-specializes): New proc.
5024         (<isa>): New members `condition', `decode-specializes'.
5025         (-isa-parse-condition): New proc.
5026         (-isa-parse): New args condition, decode-specializes.
5027         (-isa-read): Recognize condition, decode-specializes.
5028         (-isa-add-decode-specialize!): New proc.
5029         (modify-isa): New proc.
5030         (isa-conditional-exec?,state-conditional-exec?): New procs.
5031         (arch-init!): New reader command `modify-isa'.
5032
5033         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5034         (mode-signed,mode-unsigned?): New procs.
5035
5036 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5037
5038         * types.scm (<array>): New method get-shape.
5039         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5040         onto type.
5041         (hw-shape,hw-num-elms): New procs.
5042         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5043         if there's more than 255 registers.
5044         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5045
5046         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5047         with get/set specs.
5048
5049 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5050
5051         * cgen-sid.scm (sim-arguments): Add -X.
5052         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5053         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5054         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5055         Simplify by supporting pbb engine only.
5056         (-gen-sem-switch-init): New proc.
5057         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5058         (cgen-sem-switch.cxx): New proc.
5059         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5060         with with-pbb?.  Support dual scache/pbb engines.
5061         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5062         Support dual scache/pbb engines.
5063         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5064         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5065         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5066
5067 1999-05-10  Ben Elliston  <bje@cygnus.com>
5068
5069         * arm7.cpu: Remove coprocessor related fields, operands and insn
5070         definitions for now. Take the undefined instruction trap instead.
5071         (ldmda-wb): New instruction.
5072         (ldmib-wb): Likewise.
5073         (ldmdb-wb): Likewise.
5074         (stmdb-wb): Likewise.
5075         (stmib-wb): Likewise.
5076         (stmda-wb): Likewise.
5077
5078 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5079
5080         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5081         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5082
5083         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5084         hobbit can't handle optional third arg.
5085
5086 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5087
5088         * arm.cpu (h-tbit): Delete set spec.
5089         (h-mbits): Don't call arm_mbits_set in set spec.
5090         * arm.sim: New file.
5091         * hardware.scm (modify-hardware): New proc.
5092         (hardware-init!): Add modify-hardware command.
5093         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5094         (-hw-gen-set-quiet): Ditto.
5095         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5096         hardware attribute.  Load $arch.sim file if present.
5097         * utils-cgen.scm (keyword-list?): New proc.
5098         (keyword-list->arg-list,arg-list-validate-name): New procs.
5099         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5100
5101         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5102
5103         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5104         @cpu@_cpu_cgen.
5105
5106         * attr.scm (obj-prepend-atlist!): New proc.
5107
5108         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5109
5110         * sid.scm (<operand>,profilable?): Use op:type.
5111         * sim.scm (<operand>,profilable?): Use op:type.
5112
5113 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5114
5115         * utils.scm (find-index,find): Be more stack friendly.
5116
5117         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5118         (bic-imm): Ditto.
5119
5120 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5121
5122         * arm.cpu (h-gr-usr): New hardware element.
5123         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5124         (arm-mode): New keyword.
5125         (h-mbits): Add set spec.
5126         (h-spsr): Implement get/set specs.
5127
5128         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5129         (-reader-process-expanded-1): Pretty print logging output.
5130
5131         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5132         (cgen-cpu.h): Print enums before hardware elements.
5133         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5134         * sid-decode.scm (cgen-decode.cxx): Ditto.
5135         * sid-model.scm (cgen-model.cxx): Ditto.
5136
5137         * utils-cgen.scm (context-error): Accept variable number of
5138         trailing args.
5139
5140         * rtx-funcs.scm (error:): New rtx function.
5141         * rtl-c.scm (s-case-vm): New proc.
5142         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5143         (s-case): Simplify, handle non-VM result.
5144         (error:): New rtx function.
5145
5146 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5147
5148         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5149         (test-hi,test-ls): Fix cbit handling.
5150         (shift-type,h-operand2-shifttype): Move here ...
5151         * arm7.cpu: ... from here.
5152         (set-cond,set-cond-maybe,dnix): Delete, unused.
5153         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5154         * arm.cpu: ... to here.
5155         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5156         (alu-cmn): Use set-add-flags.
5157         (alu-tst): Use set-zn-flags.
5158         (alu-cmp): Use set-sub-flags.
5159         (lsl,lsr,asr): Set condition codes.
5160         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5161         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5162         alu-shift-op.
5163         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5164         All callers updated.
5165         (sub-sp): Rename from add-sp-neg.
5166         (f-lbwl-offset): Delete.
5167         (f-lbwl-hi,f-lbwl-lo): New ifields.
5168         (lbwl-hi,lbwl-lo): Update.
5169         (bl-hi): Add 4 to pc.
5170         (push-reg,pop-reg): Simplify.
5171         (push,push-lr): Push registers in correct order.
5172         (pop,pop-pc): Pop registers in correct order.
5173         (save-reg-inc,load-reg-inc): Simplify.
5174         (ldmia): Save registers in correct order.
5175
5176 1999-04-30  Ben Elliston  <bje@cygnus.com>
5177
5178         * arm7.cpu (f-op-hdt): Remove; unused.
5179         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5180         (f-ror-imm8): New multi-ifield.
5181         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5182         callers updated.
5183         (f-uimm12): New field.
5184         (ror-imm8): New operand.
5185         (uimm12): Likewise.
5186         (hdt-offset8): Reinstate operand.
5187         (offset4-hi,offset4-lo): Remove.
5188         (set-cond): Remove macro; unused.
5189         (set-cond-maybe): Likewise.
5190         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5191         (store-word/byte): Likewise.
5192         (load-halfword): Use hdt-offset8 multifield operand instead of two
5193         4-bit operands that are explicitly combined by semantic code.
5194         (do-halfword-store): Bug fix. Set address when not preindexing.
5195         (store-halfword): Also use hdt-offset8 operand.
5196         (arith-op): Avoid clobbering source registers when one of them is
5197         the destination register.
5198         (arith-imm-op): Likewise.
5199         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5200         (teq-imm): Likewise.
5201         (ldm-p): Rename to ldmdb.
5202         (stm-pw): Rename to stmdb-wb.
5203         (multi-action): New macro; test reg-list bits and execute a
5204         semantic fn if the bit is set.
5205         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5206         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5207         (all insns): Use dnai entries for simplicity rather than dni.
5208         (*): Use short-form of (const ..).
5209
5210 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5211
5212         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5213         member eval to evaluator.
5214         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5215         (tstate-make): Delete arg op-fn.  All callers updated.
5216         (tstate-op-fn,tstate-set-op-fn!): Delete.
5217         (rtx-traverse): Delete op-fn arg.  All callers updated.
5218         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5219         split out of -simplify-for-compilation.
5220
5221         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5222         (cgen_DEPENDENCIES): Add stamp-cgen.
5223         (stamp-cgen): New rule.
5224         * Makefile.in: Rebuild.
5225
5226         * rtl-c.scm (enum:): Define emitter for.
5227         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5228         enums as well.
5229         (rtx-constant-value,rtx-enum-value): New procs.
5230         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5231         (rtx-compile-time-constant?): Return #t for enums.
5232         (rtx-true?,rtx-false?): Handle enums.
5233         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5234         building result by hand.
5235         (rtx-simplify-eq-attr-insn): Ditto.
5236         * rtx-funcs.scm (enum:,enum): New rtx functions.
5237
5238         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5239         aliases-analyzed?.
5240         (arch-analyze-insns!): New proc.
5241         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5242         of calling ifmt-compute! directly.
5243         * sid.scm (-sim-insns-analyzed?): Delete.
5244         (sim-analyze!): Call arch-analyze-insns! instead of calling
5245         ifmt-compute! directly.
5246         * sim.scm (-sim-insns-analyzed?): Delete.
5247         (sim-analyze!): Call arch-analyze-insns! instead of calling
5248         ifmt-compute! directly.
5249
5250         * utils.scm (string-take-with-filler): New proc.
5251         (string-take): Use it.
5252
5253         * pgmr-tools.scm: New file.
5254         * read.scm: Load it.
5255         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5256
5257         * insn.scm (insn-base-mask): Renamed from insn:mask.
5258         All callers updated.
5259         (insn-base-mask-length): Renamed from insn:mask-length.
5260         All callers updated.
5261         (insn-foo): Renamed from insn:foo.  All callers updated.
5262         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5263         * iformat.scm (compute-insn-base-mask-length): Renamed from
5264         compute-insn-mask-length.  All callers updated.
5265         (compute-insn-base-mask): Renamed from compute-insn-mask.
5266         All callers updated.
5267
5268         * enum.scm (-enum-parse-prefix): New proc.
5269         (<enum>,make!): Don't parse enum values here.
5270         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5271         (define-full-insn-enum): Ditto.
5272         (enum-vals-upcase): New proc.
5273         * hardware.scm (define-keyword): Make enum prefix uppercase.
5274         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5275
5276         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5277         (<ifield>,field-extract): New method.
5278         (<multi-ifield>,field-extract): New method.
5279         (ifld-extract): New proc.
5280         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5281         (ifld-extract-fn-name): Renamed from ifld-extract.
5282
5283         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5284         All callers updated.
5285
5286         * ifield.scm (ifld-lsb0?): New proc.
5287         (sort-ifield-list): New arg up?.  All callers updated.
5288         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5289         rather than global state.
5290
5291 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5292
5293         * insn.scm (pretty-print-insn-format): New proc.
5294
5295         * Makefile.in: Rebuild.
5296         * aclocal.m4: Rebuild
5297         * configure: Rebuild.
5298
5299 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5300
5301         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5302         * configure: Rebuild.
5303         * aclocal.m4: Rebuild.
5304         * Makefile.in: Rebuild.
5305         * doc/Makefile.in: Rebuild.
5306         * doc/version.texi: Rebuild.
5307
5308 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5309
5310         * utils.scm (bits->bools): New proc.
5311
5312 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5313
5314         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5315         subfield's gen-ifld-extract-decl method.
5316
5317 1999-04-23  Ben Elliston  <bje@cygnus.com>
5318
5319         * arm7.cpu (ldrsh-pu): Remove.
5320         (do-halfword-load): New pmacro.
5321         (load-halfword): Likewise.
5322         (do-halfword-store): Likewise.
5323         (store-halfword): Likewise.
5324         (strh-*): New instructions.
5325         (ldrsb-*): Likewise.
5326         (ldrh-*): Likewise.
5327         (ldrsh-*): Likewise.
5328
5329 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5330
5331         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5332         fields.
5333
5334         * arm7.cpu (do-word/byte-store): Fix typo.
5335
5336 1999-04-22  Ben Elliston  <bje@cygnus.com>
5337
5338         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5339         register is the program counter (R15).
5340
5341         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5342         (str-*): Implement using store-word-byte. Remove older versions.
5343         (bic): Use the `inv' rtx for obtaining bitwise complements.
5344         (bic-imm): Likewise.
5345         (mvn): Likewise.
5346         (mvn-imm): Likewise.
5347         (store-indev-reg): Remove crufty pmacro.
5348         (load-indiv-reg): Likewise.
5349         (ldm-p): Reverse the order of register processing for decrement.
5350         (stm-p): Likewise.
5351         (stbi): Remove; handled by the str-* insns.
5352
5353 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5354
5355         * thumb.cpu (cmp): Fix carry bit computation.
5356         (alu-cmp): Ditto.
5357
5358 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5359
5360         * arm.cpu (h-tbit): Specify set spec.
5361         (h-cpsr): Ditto.
5362         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5363         (set-sub-flags): Interpret "carry bit" as a borrow.
5364         (all sub/cmp insns): Carry bit is actually a borrow bit.
5365         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5366         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5367         .pmacro instead.
5368         (hireg-add,hireg-cmp,hireg-move): Ditto.
5369
5370         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5371         (-CGEN-LANG-VERSION): Ditto.
5372
5373 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5374
5375         * pmacros.scm (-pmacro-make): New arg `default-values',
5376         all callers updated.
5377         (-pmacro-default-values): New proc.
5378         (-pmacro-process-keyworded-args): New proc.
5379         (-pmacro-process-args): New proc.
5380         (-pmacro-invoke): Process arguments before expanding macro.
5381         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5382         (define-pmacro): Handle default values specified in arg list.
5383         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5384         (rtx-boolif-op-arg[01]): New procs.
5385         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5386         (rtx-simplify): Handle not,orif,andif.
5387         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5388         * utils.scm (alist-copy): New proc.
5389         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5390         (ldr*): Rewrite.
5391         (swi): Explicitly set pc.
5392
5393         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5394
5395 1999-04-17  Ben Elliston  <bje@cygnus.com>
5396
5397         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5398         correctly adjusts the program counter now.
5399
5400         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5401         (f-signed?): Rename from `f-hdt-signed?'.
5402         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5403         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5404         (f-hdt-offset8): Use new field names.
5405         (ldr): Use `imm12' field, not `offset12', since we do our own
5406         address arithmetic.
5407         (str, str-*): Likewise.
5408         (ldu-*): Remove most; better not implemented than broken.
5409         (ldrh*): Likewise.
5410         (ldrsh-pu): New insn.
5411         (stri): Likewise.
5412         (stri-p): Likewise.
5413         (stbi): Likewise.
5414         (ldm-p): Likewise; replace (load-indiv-reg) version.
5415
5416 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5417
5418         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5419         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5420         (*): Explicitly specify mode in c-call.
5421         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5422         (arith-op): Ditto.
5423         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5424         (arith-imm-op): New pmacro.
5425         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5426         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5427
5428 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5429
5430         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5431
5432         * rtl.scm (rtl-find-ifields): Implement.
5433
5434         * utils-gen.scm: New file.
5435         * read.scm: Load it.
5436         * desc.scm: Move generic attribute code to utils-gen.scm.
5437         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5438         * Makefile.in: Rebuild.
5439
5440         * arm7.cpu (R15-OFFSET): New attribute.
5441         (dnai): New pmacro.
5442         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5443         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5444         for reg-shift version.
5445         (arith-op): Ditto.
5446         (data processing insns): Reorganize.  Use dnai.
5447
5448         * attr.scm (attr-kind): New proc.
5449         (attr-list-enum-list): Rewrite.
5450         (-attr-sort): Split result into two lists, bools and non-bools.
5451         (current-attr-list-for): Update.
5452
5453         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5454         * sid-cpu.scm (-gen-attr-decls): New proc.
5455         (-gen-insn-attr-decls): New proc.
5456         (cgen-desc.h): New proc.
5457         (cgen-cpu.h): Put everything in @cpu@ namespace.
5458         (gen-parallel-exec-type): Change prefix of parexec struct from
5459         @cpu@ to @prefix@.
5460         (-gen-trace-record-type): Ditto for trace_record struct.
5461         (-gen-write-case): Update.
5462         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5463         @prefix@.  Update scache struct references.
5464         (-gen-sem-case): Update scache struct references.
5465         (-gen-sem-switch-fn): Update idesc struct reference.
5466         Update insn_type enum reference.
5467         (cgen-write.cxx): Update scache,argbuf references.
5468         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5469         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5470         from @cpu@ to @prefix@.
5471         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5472         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5473         from @CPU@ to @PREFIX@.
5474         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5475         from @CPU@ to @PREFIX@.
5476         (-gen-decode-insn-globals): Generate insn attributes.
5477         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5478         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5479         semantic fn typedef.
5480         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5481         Change prefix of scache struct from @cpu@ to @prefix@.
5482         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5483         Change prefix of idesc struct from @cpu@ to @prefix@.
5484         Change prefix of insn_type enum from @cpu@ to @prefix@.
5485         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5486         from @cpu@ to @prefix@.
5487         (-gen-scache-decls): Change prefix of scache struct from
5488         @cpu@ to @prefix@.  Update idesc struct name.
5489         Update decode,execute methods.
5490         (-gen-extract-case): Update to type name changes.
5491         (-gen-decode-fn): Ditto.
5492         (cgen-decode.h): Put everything in @cpu@ namespace (except
5493         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5494         (cgen-decode.cxx): Add using namespace @cpu@.
5495         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5496         model_mark_get/set from @cpu@ to @prefix@.
5497         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5498         @prefix@.
5499         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5500         of model_insn_before/after from @cpu@ to @prefix@.
5501         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5502         Update insn_word type name.
5503         (-gen-model-timing-table): Update INSN_TIMING struct name.
5504         (-gen-model-init-fn): Update MODEL_DATA struct name.
5505         (-gen-mach-defns): Update name of init_idesc_table fn.
5506         (cgen-model.cxx): Add using namespace @cpu@.
5507         * sid.scm (gen-cpu-class): Delete.
5508         (gen-attr-type): New proc.
5509         (gen-obj-attr-sid-defn): New proc.
5510         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5511         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5512         @CPU@ to @PREFIX@.
5513         (gen-cpu-insn-enum): Update name of insn enum.
5514         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5515         (bx-hs): Ditto.
5516         (swi): Rename @cpu@_swi to @prefix@_swi.
5517
5518         * decode.scm (-build-decode-table-entry): Remove heuristic for
5519         distinguishing insns, and use insn ifield-assertion specs.
5520
5521         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5522         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5523         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5524         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5525         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5526         all callers updated.
5527         (gen-attr-name): New proc
5528         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5529         (gen-obj-attr-defn): Delete num_nonbools count.
5530
5531         * iformat.scm (ifmt-analyze): Handle insn-condition.
5532         (ifmt-compute!): Ditto.
5533         * insn.scm (<insn>): Specify default value for condition,
5534         post-cond-trap,compiled-condition,compiled-semantics.
5535         (<insn>,make!): New arg condition.
5536         (<insn>): Add getters for condition,compiled-condition.
5537         (-insn-parse): New arg condition, all callers updated.
5538         (-insn-read): Recognize condition spec.
5539         (define-full-insn): New arg condition.
5540         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5541         * semantics.scm (semantic-compile): Change arg sem-code to
5542         sem-code-list.
5543         (semantic-attrs): Ditto.
5544         * sim.scm (sim-finish!): Update calls to define-full-insn.
5545         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5546         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5547         * sid.scm (sim-finish!): Update call to define-full-insn.
5548
5549 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5550
5551         * Makefile.am (sim-cpu): Allow specification of ISA.
5552         * Makefile.in: Rebuild.
5553
5554 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5555
5556         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5557
5558 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5559
5560         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5561
5562         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5563
5564         * attr.scm (atlist?): New proc.
5565         (-attr-eval): Rewrite.
5566         (attr-parse): New proc.
5567         (atlist-parse): Use it.
5568
5569         * decode.scm (exprtable-entry-make): New proc.
5570         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5571         (exprtable-make,exprtable-insns): New procs.
5572
5573         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5574         All uses updated.
5575         (hardware-builtin!): Make h-memory a vector.
5576
5577         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5578         All callers updated.
5579         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5580
5581         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5582         All uses updated.
5583         (-insn-parse): Set semantics to #f if not specified.
5584         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5585         if simulator.
5586         (-parse-insn-format): Recognize `=' iformat spec.
5587
5588         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5589         (isa-max-insn-bitsize): Ditto.
5590
5591         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5592         rtl-c-with-alist.
5593         (<ifield>,gen-extract): Ditto.
5594         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5595         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5596         (gen-define-ifmt-ifields): New proc.
5597         (gen-semantic-code): Rewrite.
5598         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5599         (-gen-decoder-switch): Handle expression tables.
5600         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5601         gen-define-fields.
5602         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5603         instead of gen-define-fields.
5604         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5605         callers updated.
5606         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5607         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5608         (-gen-ifld-extract-beyond): Ditto.
5609         (<multi-ifield>,gen-ifld-extract): Ditto.
5610         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5611         rtl evaluation code.
5612         (op:read): Build an <eval-state> to pass to gen-read.
5613         (op:write): Build an <eval-state> to pass to gen-write.
5614         (op:record-profile): Build an <eval-state> to pass to
5615         gen-record-profile.
5616         * sim-cpu.scm (gen-semantic-code): Rewrite.
5617         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5618         rtl-c-with-alist.
5619         (-gen-ifld-extract-beyond): Ditto.
5620         (<multi-ifield>,gen-ifld-extract): Ditto.
5621         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5622         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5623         rtl evaluation code.
5624         (op:read): Build an <eval-state> to pass to gen-read.
5625         (op:write): Build an <eval-state> to pass to gen-write.
5626         (op:record-profile): Build an <eval-state> to pass to
5627         gen-record-profile.
5628
5629         * operand.scm (<operand>): Give `selector' default value of #f.
5630         Give `num' default value of -1.  Give `cond?' default value of #f.
5631         (op:new-mode): Delete arg `set?', all uses updated.
5632
5633         * read.scm (reader-error): Handle #f return from port-filename.
5634         (-init-parse-cpu!): Call rtl-c-init!.
5635         (reader-install-builtin!): Call rtl-builtin!.
5636
5637         * rtl-c.scm: New file.
5638         * semantics.scm: New file.
5639         * read.scm: Load them.
5640         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5641         to semantics.scm.
5642         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5643         type,eval,num.
5644         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5645         (-rtx-num-text,-rtx-max-num): New globals.
5646         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5647         (-rtx-macro-lookup): New proc.
5648         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5649         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5650         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5651         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5652         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5653         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5654         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5655         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5656         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5657         (rtx-pretty-name): New proc.
5658         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5659         (rtx-traverse-*): Rewrite rtx traversing.
5660         (rtx-eval-*): Rewrite rtx evaluation.
5661         (rtx-compile): New proc.
5662         (rtx-simplify): New proc.
5663         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5664         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5665         (ifield,index-of): Rewrite.
5666         (name): Renamed from `operand:'.
5667         (operand,xop,local): New rtx's.
5668         (current-insn): Rewrite.
5669         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5670         (cgen-hob.h): Remove rule for.
5671         (cgen-hob.o): Depend on cgen-hob.c only.
5672         * Makefile.in: Rebuild.
5673
5674         * utils-cgen.scm (vmake): New proc.
5675         (<context>): New class.
5676         (context-make-prefix,context-error): New procs.
5677
5678 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5679
5680         * i960.cpu: Add some ??? comments.
5681         (xnor, ornot): New instructions.
5682         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5683
5684 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5685
5686         * cos.scm (-object-error): Print better error message.
5687
5688         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5689         (-pmacro-env-ref): Renamed from -env-ref.
5690
5691 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5692
5693         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5694         (h-pc): Delete.
5695         (hardware-builtin!): Delete h-pc builtin.
5696         * arm.cpu (h-pc): Define.
5697         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5698         * arm7.cpu (set-logical-cc-maybe): Delete.
5699         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5700         (data processing insns): Rewrite.
5701         * m32r.cpu (h-pc): Define.
5702         * fr30.cpu (h-pc): Define.
5703         * i960.cpu (h-pc): Define.
5704         * sparc.cpu (h-pc): Define.
5705
5706         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5707         (s-parallel): Replace do {...} while (0) with {...}.
5708         (s-sequence): Ditto.
5709
5710         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5711         consistent.
5712         (-gen-write-case,-gen-sem-case): Ditto.
5713         (-gen-sem-case): Only specify `written' if profiling or
5714         parallel-write-back.
5715         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5716         (-gen-sem-switch-fn): New proc.
5717         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5718         based on with-sem-switch option.
5719         * sid-decode.scm (-gen-decode-insn-globals): Only define
5720         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5721         addresses in idesc_table if !with-sem-switch.
5722         (-gen-sem-fn-decls): Rewrite.
5723         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5724         member based on with-sem-switch.  Only define
5725         `idesc_table_initialized_p' member if with-sem-switch.
5726         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5727         * sid.scm (-with-sem-switch?): New variable.
5728         (option-init!): Initialize it.
5729         (option-set!): Set it.
5730         (with-sem-switch?): New proc.
5731         (-op-gen-set-trace): Only emit `written' reference if profiling.
5732         (sim-finish!): Use h_pc_set to set pc.
5733
5734 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5735
5736         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5737         All callers updated.
5738         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5739
5740         * sid.scm (gen-argbuf-type): Delete.
5741         (-gen-argbuf-fields-union): Move to ...
5742         * sid-decode.scm: ... here.
5743
5744         * read.scm (-reader-process-expanded-1): New proc.
5745         (-reader-process-expanded): Call it to catch nested begin's.
5746         (reader-process): Move `begin' handling to -reader-process-expanded.
5747
5748         * insn.scm (-insn-read): Fix name of `format' spec.
5749
5750         * pmacros.scm (.pmacro): New builtin.
5751         (scan-symbol): If procedure macro, return macro rather than its symbol.
5752         (check-macro): Don't do lookup, instead check if (car expr) is
5753         macro object.
5754         (scan-list): Handle .pmacro.
5755         (scan): No longer re-examine text for another macro invocation.
5756         (-pmacro-build-lambda): New proc.
5757         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5758         another, fetch the other's value (rather than doing it during
5759         expansion).
5760
5761 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5762
5763         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5764         * Makefile.in: Rebuild.
5765
5766         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5767         (-fill-slot!): Simplify.
5768         (-build-slots): Simplify.
5769
5770         * dev.scm (load-sid): Don't load sid-arch.scm.
5771
5772         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5773         switch's.
5774         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5775         switch's.
5776
5777 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5778
5779         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5780         * decode.scm: ... here.  New file.
5781         * sid-decode.scm: Use decoder computation code in decode.scm.
5782         * read.scm: Load decode.scm.
5783
5784         * arm.cpu (arm710 model): Add u-exec function unit.
5785         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5786         Add get/set specs to redirect reg 15 to h-pc.
5787         (h-*): Indicate for both ARM and THUMB isas.
5788         (cbit,nbit,vbit,zbit): Ditto.
5789         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5790         (h-cpsr): Make virtual.  Add get/set specs.
5791         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5792         (h-spsr): New virtual reg.
5793         * arm7.cpu (shift-type): New explicitly defined keyword.
5794         (h-operand2-shifttype): Use it.
5795         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5796         All callers updated.  Don't set cbit.
5797         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5798         shift-type enum as case choices.  Set cbit.
5799         (and,orr,eor,add-imm): Uncomment out.
5800         (undefined): Temporarily comment out.
5801         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5802         (lda-pc,lda-sp): Ditto.
5803         (ldr-pc): Rename from ldr.
5804         (cbranch): Mark insns as being thumb insns.
5805
5806         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5807
5808         * cgen-sid.scm: Don't load sid-arch.scm.
5809         (sim-arguments): Delete unused entries.
5810         * sid-arch.scm: Delete.
5811
5812         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5813         (<insn>,ifld-assertions): New member.
5814         (<insn>,make!): New arg ifld-assertions, all callers updated.
5815         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5816         (insn:fields): Delete.
5817         (-insn-parse): New arg ifld-assertions.  All callers updated.
5818         (-insn-read,define-insn): New procs.
5819         (define-full-insn): New arg ifld-assertions.  All callers updated.
5820         (insn-init!): New comment define-insn.
5821
5822         * model.scm (-model-parse): Ensure at least one unit specified.
5823
5824         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5825         (<c-expr-temp>,get-name): New method.
5826         (-rtx-make-current-closure,s-closure): New proc.
5827         (hw:): Wrap rtx indices in a closure.
5828         (-gen-case-prefix): New proc.
5829         (s-case): Simplify.
5830         * rtx-funcs.scm (case:): Fix call to s-case.
5831         (closure): New rtx func.
5832
5833         * hardware.scm (<hardware-base>): New member isas-cache.
5834         (<hardware-base>,get-isas): New method.
5835         (hardware-builtin): Indicate for all isas.
5836         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5837         * mach.scm (current-arch-mach-name-list): Return list of names.
5838         (current-isa-mach-name-list): Ditto.
5839         (define-arch): Install builtin objects here.
5840         * read.scm (keep-atlist?): Only keep if both mach and isa are
5841         being kept.
5842         (keep-mach-atlist?): New proc.
5843         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5844         (reader-install-builtin!): Renamed from -install-builtin!.
5845         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5846         -gen-cpu-reg-access-defns.  Rewrite.
5847         (gen-reg-access-defn): Delete.
5848         (-gen-hardware-struct): New proc.
5849         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5850         (gen-semantic-fn,-gen-all-semantics): Delete.
5851         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5852         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5853         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5854         Call sem-analyze-insns!.
5855         (cgen-semantics.cxx): Add multiple-isa support.
5856         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5857         (-gen-scache-decls,-gen-decode-fn): Ditto.
5858         (cgen-decode.h): Call sem-analyze-insns!.
5859         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5860         * sid.scm (-with-multiple-isa?): New variable.
5861         (option-init!): Initialize it.
5862         (option-set!): Set it.
5863         (with-multiple-isa?): New proc.
5864         (gen-cpu-ref): New arg isas.  All callers updated.
5865         (gen-cpu-class): New proc.
5866         (*-get-macro,*-set-macro): Delete.
5867         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5868         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5869         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5870         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5871         (-sim-insns-analyzed): New global variable.
5872         (sim-init!): Reset it.
5873         (sim-analyze-insns!): New proc.
5874         (sim-analyze!): Don't do instruction analysis here.
5875         (sim-finish!): Specify isa of x-invalid insn.
5876         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5877
5878 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5879
5880         * thumb.cpu (cpu,mach,model): Delete.
5881         (dntf): New pmacro.  Use it for all field definitions.
5882         (dntop): New pmacro.  Use it for all operand definitions.
5883         (asr): Correct field list.
5884         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5885
5886         * utils-cgen.scm (define-getters): New macro to simplify
5887         writing class accessors.
5888         (define-setters): Ditto.
5889         (sanitize): Recognize isa elements.
5890
5891         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5892         state-parallel-exec?.
5893         * sid-model.scm (*): Ditto.
5894         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5895         state-decode-assist.
5896
5897         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5898         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5899         * sim-decode.scm (-gen-decode-switch): Ditto.
5900
5901         * sim-arch.scm (-regs-for-access-fns): Delete.
5902         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5903         (-gen-arch-reg-access-defns): Delete.
5904
5905         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5906         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5907         with state-parallel=exec?.
5908         (cgen-*): Call sim-analyze-insns! here.
5909         * sim-decode.scm (cgen-*): Ditto.
5910         * sim-model.scm (cgen-*): Ditto.
5911         * sim.scm (-sim-insns-analyzed): New global variable.
5912         (sim-init!): Reset it.
5913         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5914         already done the analysis.
5915
5916         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5917         MACH struct.
5918
5919         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5920         (arm arch): Update isa spec.
5921         (arm,thumb isas): Define.
5922         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5923         (arm7tdmi mach): Add isa spec.
5924         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5925         `const' on word number.
5926         * fr30.cpu (fr30 arch): Update isa spec.
5927         (fr30 isa): Define.
5928         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5929         moved to isa spec.
5930         * i960.cpu (i960 arch): Update isa spec.
5931         (i960 isa): Define.
5932         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5933         liw-insns,parallel-insns moved to isas spec.
5934         * m32r.cpu (m32r arch): Update isas spec.
5935         (m32r isa): Define.
5936         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5937         liw-insns,parallel-insns moved to isa spec.
5938         * sparc.cpu (sparc arch): Update isas spec.
5939         (sparc isa): Define.
5940         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5941         decode-assist moved to isa spec.
5942         * sparc64.cpu (sparc64 cpu): Ditto.
5943         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5944         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5945         (-gen-mach-table-defns): Output mach table.
5946         (-gen-hash-defines): Delete insn size macros, except for
5947         CGEN_MAX_INSN_SIZE.
5948         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5949         (cgen-desc.h): Define MAX_ISAS.
5950         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5951         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5952         (arch-* accessors): Renamed from arch:*.  All callers updated.
5953         (current-arch-isa-name-list): New proc.
5954         (-arch-parse-isas): Renamed from -arch-parse-isa.
5955         (def-isa-attr!): Rewrite.
5956         (<iframe>): New class.
5957         (<itype>): New class.
5958         (<isa>): Rewrite.
5959         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5960         (isa-integral-insn?,isa-parallel-exec?): New procs.
5961         (-isa-parse,-isa-read,define-isa): New proc.
5962         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5963         liw-insns moved to <isa>.
5964         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5965         (-cpu-parse,-cpu-read): Update.
5966         (state-*): Renamed from state:*.  All callers updated.
5967         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5968         not cpu.
5969         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5970         (state-decode-assist): New proc.
5971         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5972         (-adata-set-derived!): Rewrite.
5973         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5974         callers updated.
5975         (arch-init!): Add define-isa command.
5976         * read.scm (<reader>): Default keep-isa member to (all).
5977         (reader-* accessors): Renamed from reader:*.  All callers updated.
5978         (-keep-isa-set!): Call string->symbol on isa name list.
5979         (keep-isa-validate!): Rewrite.
5980         (current-isa): New proc.
5981         (keep-isa?): Recognize "all".
5982         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5983         Call -keep-isa-set!.
5984         (cmd-if): Recognize keep-isa?.
5985         (cpu-load): New arg keep-isa.  All callers updated.
5986         (-opt-spec-update): New proc.
5987         (common-arguments): First arg is string, not symbol.
5988         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5989
5990         * rtl.scm (rtx-get): Default mode of string arg is INT.
5991
5992         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5993
5994         * rtx-funcs.scm (join:): Pass cpu to handler.
5995
5996         * configure.in (guile_include_dir): Delete.
5997         * configure: Rebuild.
5998         * Makefile.in: Rebuild.
5999         * doc/Makefile.in: Rebuild.
6000
6001         * sid-cpu.scm (-extract-chunk-specs): New proc.
6002         (gen-define-fields): Use it.
6003         (-extract-chunk): New proc.
6004         (-gen-extract-beyond-var-list): Use it.
6005         (gen-extract-fields): Simplify.
6006
6007 1999-03-22  Ben Elliston  <bje@cygnus.com>
6008
6009         * arm7.cpu (ldri-p): New instruction.
6010         (swi): Do not vector through 0x8 yet--there is nothing there.
6011         (addi): Reinstate.
6012         (movi): Likewise.
6013         (all): Use (const x) in subreg expressions.
6014
6015 1999-03-19  Ben Elliston  <bje@cygnus.com>
6016
6017         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6018         (smlal): Likewise.
6019
6020 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6021
6022         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6023         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6024         * sim-cpu.scm (-extract-chunk-specs): New proc.
6025         (gen-define-fields): Use it.
6026         (-extract-chunk): New proc.
6027         (-gen-extract-beyond-var-list): Use it.
6028         (gen-extract-fields): Simplify.
6029
6030         Port to guile 1.3.1.
6031         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6032         (LIBIBERTY): New var.
6033         (HOB_OBJS): Add cgen-gh.o.
6034         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6035         * Makefile.in: Rebuild.
6036         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6037         * config.in: Rebuild.
6038         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6039         libncurses, libtermcap.
6040         Add checks for needed functions in guile 1.2 not in guile 1.3,
6041         and vice versa.  Add test for 3 argument scm_make_vector.
6042         * configure: Rebuild.
6043         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6044         definitions if guile doesn't have them.
6045         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6046         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6047         with gh_vector_set_x.
6048         (cgh_qsort): Replace gh_list_length with gh_length.
6049         * cgen-gh.h: Add decls for added functions.
6050         (cgh_qsort): Don't declare if IN_HOBBIT.
6051         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6052         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6053         scm_make_vector with gh_make_vector.
6054         * cos.scm: Use vector-length instead of length on vectors.
6055         * dev.scm (cload): Make varargs proc with keyword/value args.
6056         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6057         provide version that works with guile 1.2 or 1.3.
6058         Include private copy of scmhob.h.
6059         * scmhob.h: New file.  Keep our own copy for now.
6060
6061 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6062
6063         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6064         plain text.
6065         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6066         (-cx-temp-dump-stack): Pretty up output.
6067
6068         * arm.cpu: comment out thumb.cpu until isa support ready.
6069         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6070         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6071         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6072
6073         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6074
6075 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6076
6077         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6078         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6079
6080         * operand (op:new-mode): Improve error message.
6081
6082         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6083         * arm7.cpu: New file.
6084
6085 1999-03-12  Ben Elliston  <bje@cygnus.com>
6086
6087         * arm.cpu: Lots of minor fixes after desk checking.
6088
6089 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6090
6091         * thumb.cpu: snapshot of current work
6092
6093         * rtl.scm (rtx-get): Tweak error message.
6094
6095 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6096
6097         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6098         * Makefile.in: Rebuild.
6099
6100         * cos.c (cos_vector_copy): New function.
6101         (_object_copy): Use it.
6102
6103         * mode.scm (mode:eq?): Clean up.
6104         * rtl.scm (cx-new-mode): Copy attributes.
6105         (rtx-get): Don't make copy if <c-expr> with identical mode.
6106
6107         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6108         add new isas spec.
6109         (gr-names): h-gr register names moved here.
6110         (h-gr): Update.
6111         (cr-names): h-cr register names moved here.
6112         (h-cr): update.
6113         (dr-names): h-dr register names moved here.
6114         (h-dr): update.
6115         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6116         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6117         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6118         add new isas spec.
6119         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6120         add new isas spec.
6121         (gr-names): h-gr register names moved here.
6122         (h-gr): Update.
6123         (cr-names): h-cr register names moved here.
6124         (h-cr): update.
6125         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6126         (h-accums,h-psw): Ditto.
6127         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6128         add new isas spec.
6129         (gr-names): h-gr register names moved here.
6130         (h-gr-indices): Delete.
6131         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6132         (sparc64 h-gr): Ditto.
6133         (h-y): Add get/set specs.
6134         (fp regs): Rewrite.
6135         (fp operands): Rewrite.
6136         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6137         (h-tbr,h-cwp,h-wim): Ditto.
6138         * sparc64.cpu (h-fpsr): Add get/set specs.
6139         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6140         (fp-ld-op): New arg `dest', all callers updated.
6141         (*): Replace `make-di' with `join'.
6142
6143         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6144         present.
6145         (gen-semantic-code): Save/restore rtl generator state.
6146         (cgen-cpu.h): Call rtl-gen-init!.
6147         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6148         (-gen-ifld-extract-beyond): Ditto.
6149         (<multi-ifield>,gen-ifld-extract): Ditto.
6150         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6151         `gstate'.
6152         (-hw-gen-set-quiet-pc): Ditto.
6153         (<hw-pc>,gen-write): Ditto.
6154         (-hw-cxmake-get): Ditto.  Call getter function if present.
6155         (<hw-register>,cxmake-get-raw): New method.
6156         (<hw-register>,gen-set-quiet-raw): New method.
6157         (-hw-gen-set-quiet): New arg `gstate'.
6158         (hw-fun-access?): Delete.
6159         (gen-reg-access-defn): Output function contents.
6160         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6161         invocation.
6162         (-gen-hw-index): Ditto.
6163         (op:read): Update gen-read invocation.
6164         (op:write): Update gen-write invocation.
6165         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6166         operands.
6167         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6168         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6169         (<unit>,gen-profile-code): Update to sim.scm version.
6170
6171         * sim-arch.scm (-regs-for-access-fns): New proc.
6172         (-biggest-reg-mode): New proc.
6173         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6174         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6175         virtual regs separately.
6176         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6177         get/set specs.
6178         (gen-semantic-code): Save/restore rtl generator state.
6179         (cgen-cpu.h): Call rtl-gen-init!.
6180         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6181         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6182         renamed to mach-bfd-name.
6183         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6184         (-gen-ifld-extract-beyond): Ditto.
6185         (<multi-ifield>,gen-ifld-extract): Ditto.
6186         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6187         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6188         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6189         `gstate'.
6190         (hw-fun-access?): Delete.
6191         (-hw-gen-set-quiet-pc): New arg `gstate'.
6192         (<hw-register>,gen-get-macro): Rewrite.
6193         (<hw-register>,gen-set-macro): Rewrite.
6194         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6195         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6196         (<hw-register>,cxmake-get-raw): New method.
6197         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6198         (<hw-register>,gen-set-quiet-raw): New method.
6199         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6200         invocation.
6201         (-gen-hw-index): Ditto.
6202         (<hw-index>): New arg `gstate'.
6203         (-gen-hw-selector): Update call to rtx-c.
6204         (<pc>): New arg `gstate'.
6205         (op:read): Update gen-read invocation.
6206         (op:write): Update gen-write invocation.
6207         (<operand>,cxmake-get): Handle raw-reg.
6208         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6209         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6210         (<operand>,gen-set-quiet): Handle raw-reg.
6211         (<operand>,gen-set-trace): Handle raw-reg.
6212         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6213
6214         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6215         cgen_operand_type enum.
6216         (gen-operand-table): Add operand type enum.  Replace pointer to
6217         hardware element with its enum.  Null terminate table.
6218         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6219         Build operand table.
6220         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6221         * mach.scm (<arch-data>): New member `isas'.
6222         (adata-isas): New accessor.
6223         (<isa>): New class.
6224         (isa-default-insn-word-bitsize): New accessor.
6225         (isa-enum): New proc.
6226         (current-arch-default-insn-word-bitsize): Delete.
6227         (current-isa-list,current-isa-lookup): New procs.
6228         (-arch-parse-isa): New proc.
6229         (-arch-parse): Rewrite.
6230         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6231         (define-arch): Define ISA attribute.
6232         (def-isa-attr!,isa-supports?): New procs.
6233         (<mach>): New member `isas'.
6234         (mach-isas): New accessor.
6235         (-mach-parse): New arg `isas', all callers updated.
6236         (-mach-read): Recognize `isas'.
6237         (arch-finish!): Rewrite.
6238         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6239         @arch@_cgen_get_{int,vma}_operand.
6240         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6241         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6242         of pointer to table entry.
6243         * opcodes.scm (gen-switch): Handle multiply defined operands.
6244         * operand.scm (op-sort): New proc.
6245
6246         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6247         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6248         (hw-enum): Accept symbol argument.
6249         (hardware-builtin!): Delete attribute FUN-ACCESS.
6250         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6251
6252         * attr.scm (atlist-source-form): New proc.
6253         (attr-builtin!): New attr `PRIVATE'.
6254         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6255         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6256         if they have `PRIVATE' attribute.
6257         (gen-hw-table-defns): Output definitions of explicitly defined
6258         keyword tables.
6259         * hardware.scm (<keyword>): New member print-name.  Rename member
6260         `value' to `values', all uses updated.
6261         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6262         (keyword-parse): Rewrite.
6263         (-keyword-read): New proc.
6264         (define-keyword): New proc.
6265         (-hw-parse-keyword): New proc.
6266         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6267         `extern-keyword'.
6268         (-hw-parse-values): Ditto.
6269         (-hw-parse-get,-hw-parse-set): Rewrite.
6270         (hardware-init!): Add new comment define-keyword.
6271         * mach.scm (<arch>): New member `kw-list'.
6272         (arch:kw-list,arch_set-kw-list!): New accessors.
6273         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6274
6275         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6276         * mode.scm (mode-class-integral?): New proc.
6277         (mode-class-float?,mode-class-numeric?): New procs.
6278         (mode-integral?,mode-float?,mode-numeric?): New procs.
6279         (mode-compatible?): New proc.
6280         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6281         rtx-c-with-alist.
6282         (<ifield>,gen-extract): Ditto.
6283         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6284         (<gstate>): New class.
6285         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6286         (gstate-context,gstate-set-context!): New accessors.
6287         (gstate-macro?,gstate-set-macro?!): New accessors.
6288         (gstate-make,gstate-copy): New procs.
6289         (-rtl-current-gstate): New global.
6290         (current-gstate-simulator?): New proc.
6291         (current-gstate-context,current-gstate-macro?): New procs.
6292         (current-gstate,current-gstate-set!): New procs.
6293         (rtl-gen-init!): Rewrite.
6294         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6295         (tstate-make): New arg `gstate', all callers updated.
6296         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6297         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6298         (tstate-gstate,tstate-set-gstate!): New accessors.
6299         (tstate-copy): New proc.
6300         (tstate-new-cond?,tstate-new-set?): Rewrite.
6301         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6302         (rtx-traverse): New arg `gstate', all callers updated.
6303         (rtx-strdump): New proc.
6304         (-simplify-for-compilation): New arg `gstate', all callers updated.
6305         (semantic-in-out-operands): Ditto.
6306         (semantic-attrs): Ditto.
6307         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6308         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6309         (rtx-value): Rewrite.
6310         (<c-expr>,gen-name): New method.
6311         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6312         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6313         (cx-new-mode): New proc.
6314         (-rtx-c-with-tstate): New proc.
6315         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6316         callers updated.
6317         (-rtx-mode): Rewrite.
6318         (-rtx-mode-compatible?): New proc.
6319         (<c-expr-temp>): New member `value'.
6320         (cx-temp:value): New accessor.
6321         (<c-expr-temp>,make!): Override default method.
6322         (<c-expr-temp>,cxmake-get): Rewrite.
6323         (<c-expr-temp>,gen-set-quiet): Rewrite.
6324         (<c-expr-temp>,gen-set-trace): Rewrite.
6325         (gen-temp-defs): Use cx-temp:value.
6326         (record-temp!): New arg value, all callers updated.
6327         (cx-temp:cx:make): Delete.
6328         (-cx-temp-dump-stack): New proc.
6329         (rtx-get): New arg `gstate', all callers updated.  Do mode
6330         compatibility checks.  Ensure result has specified mode.
6331         (rtx-set-quiet): New arg `gstate', all callers updated.
6332         (rtx-set-trace): Ditto.
6333         (s-c-call): New arg `tstate', all callers updated.
6334         (s-c-raw-call): Ditto.
6335         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6336         (s-cmpop,s-if,e-if): Ditto.
6337         (s-subreg): New proc.
6338         (-par-new-temp!): New proc.
6339         (-par-next-temp!): Rewrite.
6340         (-par-replace-set-dests): Use -par-new-temp!.
6341         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6342         (s-sequence): Use -rtx-c-with-state.
6343         * rtx-funcs.scm (*): Update.
6344         (raw-reg:): New rtx function.
6345         (make-di): Delete.
6346         (join:,subreg:): New rtx functions.
6347
6348         * insn.scm (<insn>): New members pre-cond-trap, condition,
6349         post-cond-trap, compiled-condition.
6350
6351         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6352
6353         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6354
6355         * utils-cgen.scm (parse-symbol): New proc.
6356         (parse-string): New proc.
6357         (gen-get-macro,gen-set-macro): New arg `index-args'.
6358         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6359         Prepend \ to newlines.
6360
6361         * utils.scm (alist-remove-duplicates): Delete.
6362
6363         * sid.scm (sim-init!): Delete private debugging code.
6364
6365 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6366
6367         * cgen-sid.scm: New file for C++ simulator application.
6368         * sid-arch.scm: Ditto.
6369         * sid-cpu.scm: Ditto.
6370         * sid-decode.scm: Ditto.
6371         * sid-model.scm: Ditto.
6372         * sid.scm: Ditto.
6373         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6374
6375 1999-03-05  Ben Elliston  <bje@cygnus.com>
6376
6377         * arm.cpu: New file.
6378
6379 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6380
6381         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6382         * Makefile.in: Rebuild.
6383
6384         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6385         (-attr-parse): Validate default value.
6386
6387         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6388         (-CGEN-LANG-VERSION): Ditto.
6389         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6390         (<reader>): New member keep-isa plus accessors.
6391         (-keep-isa-set!,keep-isa-validate!): New procs.
6392         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6393         (common-arguments): New variable.
6394         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6395         (-debug-repl,continue): New procs.
6396         (-cgen,cgen): New procs.
6397         * cgen-gas.scm: Rewrite.
6398         * cgen-opc.scm: Rewrite.
6399         * cgen-sim.scm: Rewrite.
6400         * cgen-stest.scm: Rewrite.
6401
6402         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6403         (gas-test-finish!): Call opcodes-finish!.
6404         (gas-test-analyze!): Call opcodes-analyze!.
6405         (<hw-asm>): New method test-data.
6406         (<operand>,testdata): Rewrite.
6407         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6408         (sim-test-finish!): Call opcodes-finish!.
6409         (sim-test-analyze!): Call opcodes-analyze!.
6410         (<hw-asm>): New method test-data.
6411         (<operand>,testdata): Rewrite.
6412
6413 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6414
6415         * fixup.scm (reverse!): Define if missing.
6416         * *.scm: Use reverse! instead of list-reverse!.
6417
6418         * utils.scm (leading-id-char?): New proc.
6419         (id-char?): Rewrite.
6420         (chars-until-delimiter): New proc.
6421         * opc-itab.scm (extract-syntax-operands): Rewrite.
6422         (strip-mnemonic): Rewrite.
6423         (compute-syntax): Rewrite.
6424
6425         * pmacros.scm (-pmacro-substr): New proc.
6426         (pmacros-init!): Add builtin .substr.
6427
6428 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6429
6430         * thumb.cpu: New file.
6431
6432 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6433
6434         * Makefile.am (CGENCFLAGS): New variable.
6435         (WITH_HOBBIT): Use automake conditional.
6436         (CGEN_HOB_SRC): New variable.
6437         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6438         (*.o): Compile with CGENCFLAGS.
6439         (cgen-hob.c): Simplify.
6440         (cgen-nohob.c): New rule.
6441         (hobbit): Renamed from hob.x.
6442         (CLEANFILES): Add cgen-nohob.c.
6443         * Makefile.in: Rebuild.
6444         * doc/Makefile.in: Rebuild.
6445         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6446         (WITH_HOBBIT): Use AM_CONDITIONAL.
6447         * configure: Rebuild.
6448         * aclocal.m4: Rebuild.
6449
6450         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6451         with string-write-map.
6452
6453         * sim-cpu.scm (hw-need-storage?): New proc.
6454         (-gen-hardware-types): Use it.
6455         (gen-parallel-exec-elm): Call op-save-index?.
6456
6457         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6458
6459         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6460         UNSIGNED attribute.
6461         (-gen-ifld-extract-beyond): Ditto.
6462         (<integer>): Delete all references.
6463         (<sim-hardware>): Delete.
6464         (hw-profilable?): New proc.
6465         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6466         (<hw-register>): Rename method get-index-mode to save-index?.
6467         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6468         (<hw-register>,gen-sym-decl): Make virtual.
6469         (<hw-memory>,gen-sym-decl): Make virtual.
6470         (<hw-memory>): Rename method get-index-mode to save-index?.
6471         (<hw-address>,gen-sym-decl): Make virtual.
6472         (<operand>): New method save-index?.
6473         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6474
6475         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6476         prefix added.  All uses updated.
6477
6478         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6479         rather than pointer to table entry.
6480
6481         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6482         Remove all hw-asm,op-asm support.
6483         (-gen-parse-number,-gen-parse-address): New procs.
6484         (<keyword>,gen-parse): Redo function name computation.
6485         (<keyword>,gen-print): Ditto.
6486         (<operand>,gen-function-name): Rewrite.
6487         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6488         (opcodes-init!): Delete call to add-parser!.
6489
6490         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6491         Define enum using hardware semantic name.
6492         (-gen-hw-decl,-gen-hw-defn): New procs.
6493         (gen-hw-table-decls): Use -gen-hw-decl.
6494         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6495         CGEN_HW_ENTRY structs.
6496         (gen-operand-table): Output hw's enum, not pointer to table entry.
6497         (-gen-cpu-open): Build table of selected hardware elements.
6498
6499         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6500         (<hardware> support): Delete.
6501         (<hw-asm>): Delete, moved to hardware.scm.
6502         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6503         (<hw-asm>,gen-table-entry): New method.
6504         (<hw-asm>,parse!): Delete.
6505         (<keyword>,gen-table-entry): New method.
6506         (<keyword>,parse!): Delete.
6507         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6508         for gen-decl,gen-defn,gen-ref,gen-init.
6509         (desc-init!): Don't create parser for operand asm specs.
6510
6511         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6512         * ifield.scm (<ifield>): New member `mode'.
6513         (<ifield>,make!): New arg `mode'.
6514         (ifld-mode): Rewrite.
6515         (ifld-hw-type): Rewrite.
6516         (<ifield>,min-value): Rewrite.
6517         (<ifield>,max-value): Rewrite.
6518         (-ifield-parse): New arg `mode'.
6519         (-ifield-read): Update.
6520         (define-full-ifield): New arg `mode'.
6521         (define-full-multi-ifield): Ditto.
6522         (-multi-ifield-parse): Ditto.
6523         (-multi-ifield-read): Update.
6524         (define-full-multi-ifield): New arg `mode'.
6525         (ifield-builtin!): Update definition of f-nil.
6526         * simplify.inc (define-normal-ifield): Update call to
6527         define-full-ifield.
6528         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6529         (define-normal-hardware): Delete arg asm.  New args indices, values,
6530         handlers.  Update call to define-full-hardware.
6531         (define-simple-hardware,dsh): New pmacros.
6532         (define-normal-operand): Update call to define-full-operand.
6533         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6534         Specify INT/UINT mode instead.
6535         (h-gr,h-cr): Use "indices" instead of "asm".
6536         (h-dr,h-ps): Update keyword syntax.
6537         (h-r13,h-r14,h-r15): Ditto.
6538         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6539         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6540         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6541         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6542         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6543         Specify INT/UINT mode instead.
6544         (h-gr): Use "indices" instead of "asm".
6545         (h-cc): Update keyword syntax.
6546         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6547         Specify INT/UINT mode instead.
6548         (h-hi16,h-slo16,h-ulo16): Update.
6549         (h-gr,h-cr): Use "indices" instead of "asm".
6550         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6551         (h-accums): Update keyword syntax.
6552         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6553         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6554         Specify INT/UINT mode instead.
6555         (h-gr-indices): New pmacro.
6556         (h-gr32,h-gr64): Split up from h-gr.
6557         (h-a): Update type spec.  Use values instead of asm spec.
6558         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6559         (h-y,h-annul-p): Ditto.
6560         (h-asr): Update keyword spec.
6561         (h-lo10,h-lo13,h-hi22): Update.
6562         (get-freg-spec,set-freg-spec): New pmacros.
6563         (h-fr32,h-fr64): Split up from h-fr.
6564         (rdd): Comment out get/set specs.
6565         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6566         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6567         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6568         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6569         UNSIGNED.  Specify INT/UINT mode instead.
6570         (h-*): Use dsh instead of dnh where appropriate.
6571         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6572         (h-p,h-membarmask): Ditto.
6573         (membarmask): Use "handlers" instead of "asm".
6574
6575         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6576         values,handlers,getters,setters plus accessors.
6577         (hw-mode-ok?,hw-default-mode): New procs.
6578         (<hardware-base>): Rename method new-mode to mode-ok?
6579         (<hardware-base>): New method get-index-mode.
6580         (hw-index-mode): New proc.
6581         (pc?): Delete, moved to operand.scm.
6582         (address?): New proc.
6583         (<hardware>): Delete.
6584         (<hw-asm>): Definition moved here from desc.scm.
6585         (keyword-parse): New proc.
6586         (hardware-parsers): Delete.
6587         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6588         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6589         (-hw-parse-get,-hw-parse-set): New procs.
6590         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6591         indices,values,handlers,get,set.  Rewrite.
6592         (-hw-read-extra): Delete.
6593         (-hw-read): Update.
6594         (define-hardware): Don't add object if not selected.
6595         (define-full-hardware): Ditto.
6596         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6597         (<hw-register>): Member `type' moved to baseclass.  Delete member
6598         hw-asm.
6599         (<hw-register>,parse!): Rewrite.
6600         (<hw-register>): Delete methods get-rank,get-mode.
6601         (<hw-register>): Method new-mode renamed to mode-ok?
6602         (<hw-register>): New method get-index-mode.
6603         (<hw-pc>,parse!): Rewrite.
6604         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6605         (<hw-memory>,parse!): Rewrite.
6606         (<hw-memory>): Delete methods get-rank,get-mode.
6607         (<hw-memory>): Method new-mode renamed to mode-ok?
6608         (<hw-memory>): New method get-index-mode.
6609         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6610         hw-asm.
6611         (<hw-immediate>,parse!): Rewrite.
6612         (<hw-immediate>): Delete methods get-rank,get-mode.
6613         (<hw-immediate>): Method new-mode renamed to mode-ok?
6614         (<hw-address>): Delete member hw-asm.
6615         (<hw-address>,parse!): Rewrite.
6616         (<hw-address>): Delete methods get-rank,get-mode.
6617         (<hw-address>): Method new-mode renamed to mode-ok?
6618         (hw-profilable?): Delete.
6619         (hardware-init!): Delete hardware-parsers reference.
6620         Update argument specs of command define-full-hardware.
6621         (hardware-builtin!): Update definitions of hardware builtins.
6622         * operand.scm (<operand>): New members hw-name,mode-name.
6623         Delete member op-asm.  New member handlers.
6624         (<operand>,make!): Update.
6625         (op:hw-name,op:mode-name,op:handlers): New procs.
6626         (op:type): Rewrite.
6627         (op:mode): Rewrite.
6628         (<operand>): New method get-index-mode.
6629         (<pc>,make!): Update.
6630         (op:new-mode): Rewrite.
6631         (operand-parsers): Delete.
6632         (-operand-parse): Rewrite.  Return #f if insn not selected.
6633         (-op-read-extra): Delete.
6634         (-operand-read): Update.
6635         (define-operand,define-full-operand): Update.
6636         (operand-init!): Delete operand-parsers reference.
6637         Update syntax of define-full-operand command.
6638
6639         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6640         (define-full-insn): Update.
6641         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6642         (define-full-minsn): Update.
6643
6644         * mode.scm (<mode>): New member class.
6645         (mode:class): New proc.
6646         (mode?): Rewrite.
6647         (-mode-parse): New arg class.
6648         (define-full-mode): Update.
6649         (mode-find): Rewrite.
6650         (mode-make-int,mode-make-uint): New procs.
6651         (mode-init!): Update syntax of define-full-mode command.
6652         (mode-builtin!): Update definitions of builtin modes.
6653
6654         * model.scm (<profile>): Delete.
6655
6656         * read.scm (keep-atlist?): New proc.
6657         (keep-multiple?): New proc.
6658         (<parser-list>): Delete.
6659         (add-parser!,parse-spec!): Delete.
6660
6661         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6662         (def-rtx-syntax-node): Ditto.
6663         (-rtx-traverse-debug?): New variable.
6664         (tstate-make): New proc.
6665         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6666         (tstate-new-cond?,tstate-new-set?): New procs.
6667         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6668         tstate.  All callers updated.
6669         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6670         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6671         (-build-operand!): Replace arg cond? with tstate.
6672         (-build-reg-operand!,-build-mem-operand!): Ditto.
6673         (-build-index-of-operand!): Update making of <operand> object.
6674         (s-ifield): New arg tstate.  All callers updated.
6675         (hw:): New arg tstate.  All callers updated.  Replace call to
6676         current-hw-lookup with current-hw-sem-lookup-1.
6677         (s-index-of): New arg tstate.  All callers updated.
6678         (reg:,mem:): Ditto.
6679         (-rtx-use-sem-fn?): New proc.
6680         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6681         semantic cover fns.
6682         (s-convop): Only use semantic mode when using semantic cover fns.
6683         (s-cmpop): Call -rtx-use-sem-fn?.
6684         (s-cond,s-case): New arg tstate.  All callers updated.
6685         (s-parallel,s-sequence): Ditto.
6686
6687         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6688
6689         * types.scm (<scalar>): Rewrite implementation.
6690         (<integer>): Delete.
6691         (parse-type): Rewrite.
6692
6693         * utils-cgen.scm (parse-handlers): New proc.
6694
6695         * utils.scm (!=): New proc.
6696
6697 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6698
6699         * pmacros.scm (-pmacro-expand): Fix typo.
6700
6701 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6702
6703         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6704         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6705         * i960.cpu (build-hex2): New pmacro.
6706         (insn-opcode): Simplify.
6707         (insn-opcode2): Ditto.
6708
6709         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6710         * cgen-stest.scm (catch-with-backtrace): Ditto.
6711
6712 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6713
6714         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6715         All callers updated.
6716         (-pmacro-invoke): New proc.
6717         (-pmacro-sym,-pmacro-str): New procs.
6718         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6719         (pmacros-init!): Install builtins .iota, .map, .apply.
6720         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6721         (h-fr): Simplify register name spec.
6722         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6723         * utils.scm (num-args-ok?): New proc.
6724
6725 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6726
6727         * pmacros.scm (-pmacro-error): New proc.
6728         (-pmacro-expand): Use it.
6729         (-pmacro-splice): New proc.
6730         (pmacros-init!): Install new builtin .splice.
6731
6732         * sparc.cpu: Include sparc64.cpu when appropriate.
6733         (f-mmask,f-simm11): Moved to sparc64.cpu.
6734         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6735         (ANNUL attribute): Delete.
6736         (test-* pmacros): New arg cc, all callers updated.
6737         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6738         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6739         atomic-opc.
6740         (ldstub,swap): Moved to sparccom.cpu.
6741         * sparc64.cpu: Add more insns.
6742
6743 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6744
6745         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6746         CGEN_ATTR_VALUE.
6747         (cgen-sem-switch.c): Ditto.
6748         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6749         moved to cgen-engine.h.
6750         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6751         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6752         global.  Cache attributes and insn length in IDESC.
6753         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6754         @cpu@_opcode renamed to @cpu@_get_idata.
6755         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6756         done later underneath sim_resume.
6757         (@mach@_mach): Record @cpu@_prepare_run.
6758         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6759         updated.
6760         (-hw-gen-set-quiet-pc): Ditto.
6761         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6762         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6763         (<hw-addr>,cxmake-get): Ditto.
6764         (<hw-iaddr>,cxmake-get): Ditto.
6765         (<pc>,cxmake-get): Ditto.
6766         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6767         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6768         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6769         (<hw-pc>,gen-write): Use hw-selector-default.
6770         (<hw-register>,gen-write): Ditto.
6771         (<hw-memory>,gen-write): Ditto.
6772         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6773         (-gen-hw-selector): New proc.
6774
6775         * desc.scm: New file.
6776         * desc-cpu.scm: New file.
6777         * opcodes.scm: Split up into several smaller files.
6778         * opc-asmdis.scm: New file.
6779         * opc-ibld.scm: New file.
6780         * opc-itab.scm: New file.
6781         * opc-opinst.scm: New file.
6782         * Makefile.am (desc): New target.
6783         (opcodes): Update args to cgen-opc.scm.
6784         * Makefile.in: Rebuild.
6785         * aclocal.m4: Rebuild.
6786         * config.in: Rebuild.
6787         * configure.in: Update arg to AC_INIT.
6788         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6789         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6790         AC_PROG_INSTALL.
6791         * configure: Rebuild.
6792         * cgen-gas.scm: Update files to load.
6793         * cgen-opc.scm: Ditto.  Reorganize option letters.
6794         * cgen-sim.scm: Update files to load.
6795         * cgen-stest.scm: Ditto.
6796         * dev.scm (cload): New app "DESC".
6797         (load-opc): Update files to load.
6798         (load-gtest,load-sim,load-stest): Ditto.
6799
6800         * attr.scm (bool-attr?): New proc.
6801         (attr-list-enum-list): New proc.
6802         (-attr-sort): Rewrite.
6803         (attr-builtin!): Give ALIAS attribute a fixed index.
6804         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6805         calculate attribute enum list.
6806         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6807
6808         * insn.scm (-insn-parse): Renamed from parse-insn.
6809
6810         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6811         (-hw-read): Ditto.
6812
6813         * mode.scm (-mode-parse): Renamed from parse-mode.
6814
6815         * operand.scm (<operand>): New member `selector'.
6816         (<operand>,make!): Use default selector.
6817         (hw-selector-default): New variable.
6818         (hw-selector-default?): New proc.
6819
6820         * pmacros.scm (pmacros-init!): New proc.
6821         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6822         (-env-set!): Delete.
6823         (-pmacro-expand): New proc apply-macro.
6824         Use it in scan-list,scan.  Scan list first, then see if macro
6825         invocation.
6826         (define-pmacro): Rewrite.
6827         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6828
6829         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6830         selected if (current-mach) seen.
6831         (rtx?): Renamed from rtx-uneval?, all callers updated.
6832         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6833         updated.
6834         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6835         selector, all callers updated.
6836         (hw:): New arg selector, all callers updated.  Delete old comments
6837         and code.
6838         (reg:,mem:): Handle selectors
6839         * rtx-funcs.scm (reg:): Handle selectors.
6840
6841         * read.scm: Renamed from cpu.scm.
6842         (<command>): New class.
6843         (<reader>): New member commands.
6844         (reader-add-command!): New proc.
6845         (reader-lookup-command): New proc.
6846         (reader-error,-reader-process-expanded,reader-process): New procs.
6847         (reader-read-file!): New proc.
6848         (include): Call reader-read-file!.
6849         (cmd-if): New proc.
6850         (cpu-load): Call reader-read-file!.
6851         * utils.scm (num-args): New proc.
6852         * simplify.inc: New file.
6853         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6854         procs.  Move define-normal-foo procs (and abbreviated forms) to
6855         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6856         routines.
6857         * fr30.cpu: Include simplify.inc.
6858         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6859         * i960.cpu: Include simplify.inc.
6860         * m32r.cpu: Include simplify.inc.
6861         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6862         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6863         * sparc.cpu: Include simplify.inc.
6864         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6865         * utils-cgen.scm (parse-error): Moved to read.scm.
6866         (sanitize): Rewrite.
6867         (utils-init!): New proc.
6868
6869 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6870
6871         * sparc.cpu: New file.
6872         * sparc32.cpu: New file.
6873         * sparc64.cpu: New file.
6874         * sparccom.cpu: New file.
6875         * sparc.opc: New file.
6876
6877 1999-01-27  Frank Eigler  <fche@cygnus.com>
6878
6879         * utils.scm (gen-copyright): New proc.
6880
6881 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6882
6883         Parameterize rtl parsing, rather than having lots of little handlers.
6884         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6885         Delete member traverse.
6886         (rtx:set-traverse!): Delete.
6887         (-rtx-valid-types,-rtx-valid-matches): New variables.
6888         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6889         instead of expression.  All callers updated.
6890         (def-rtx-node): New args arg-types,arg-modes.
6891         (def-rtx-syntax-node): Ditto.
6892         (def-rtx-dual-mode): Ditto.
6893         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6894         All callers updated.
6895         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6896         All callers updated.
6897         (rtx-macro-expand): New proc.
6898         (-rtx-traverse-check-args): Delete.
6899         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6900         an rtx specific traverser.
6901         (-rtx-any-mode?,-rtx-symornum?): New procs.
6902         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6903         (-rtx-traverse-no-mode): Delete.
6904         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6905         (-rtx-traverse-operands): Rewrite.
6906         (-rtx-traverse-expr): Rewrite.
6907         (rtx-traverse): Don't expand macros here, leave for caller to do.
6908         (rtx-simplify): Delete.
6909         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6910         attributes.
6911         (rtx-true?,rtx-false?): Ditto.
6912         (-rtx-ref-type): Set dest is operand 1 now.
6913         (-simplify-for-compilation): New proc.
6914         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6915         Expand macros before calling rtx-traverse.  Sort operands by name
6916         to avoid unnecessary semantic formats.
6917         (semantic-attrs): New proc.
6918         (rtx-uneval?): Handle (<rtx-func> ...).
6919         (s-boolifop): Delete arg mode.  All callers updated.
6920         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6921         (eq-attr): New arg obj.
6922         (eq-attr:): Delete.
6923         * m32r.cpu (rach): Update calls to andif.
6924
6925         * minsn.scm (-minsn-parse-expansion): Renamed from
6926         parse-minsn-expansion.
6927         (-minsn-parse): Renamed from parse-minsn.
6928         (-minsn-read): Renamed from read-minsn.
6929         (def-minsn): Don't check APPLICATION here.
6930         (def-full-minsn): New proc.
6931         (define-macro-insn): Check APPLICATION here.  Expand macros.
6932         (define-normal-macro-insn): Ditto.
6933
6934         * utils.scm (word-value): New arg start-lsb?.
6935         (word-mask,word-extract): Ditto.
6936         (split-bits,powers-of-2): Use integer-expt instead of expt.
6937         (bit-set?): Handle 32 bit values (which are bignums).
6938         (cg-logand,cg-logxor): New functions.
6939         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6940         (<ifield>,field-value): Update call to word-value.
6941         (<ifield>,min-value): Use integer-expt instead of expt.
6942         (<ifield>,max-value): Ditto.
6943
6944         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6945
6946         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6947
6948         Compute raw instruction format in addition to semantic based format.
6949         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6950         (<iformat> accessors): Rename accessors to ifmt-*.
6951         (<sformat>): New class.
6952         (fmt-enum): Renamed from fmt:enum.
6953         (-ifmt-search-key): Rewrite.
6954         (-sfmt-search-key): New proc.
6955         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6956         Compute iformat and sformat search keys.
6957         (ifmt-build): Update.
6958         (sfmt-build): New proc.
6959         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6960         (ifmt-compute!): Compute instruction format <iformat> based on
6961         instruction fields alone.  Compute new semantic format <sformat>
6962         based on instruction fields and semantic information.
6963         (ifmt:lookup): Delete.
6964         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6965         (current-sfmt-list): New proc.
6966         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6967         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6968         (insn-length,insn-length-bytes): Update.
6969         (insn:mask-length,insn:mask): Update.
6970         (insn-lookup-op): Update.
6971         * gas-test.scm (gas-test-analyze!): Update.
6972         (gen-gas-test): Ditto.
6973         * sim-test.scm (sim-test-analyze!): Update.
6974         (gen-sim-test): Ditto.
6975         * opcodes.scm (gen-operand-instance-table): Update.
6976         (gen-operand-instance-ref): Ditto.
6977         (max-operand-instances): Use heuristic if semantics not parsed.
6978         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6979         (opcodes-analyze!): Only scan semantics of building operand instance
6980         tables.
6981         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6982         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6983         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6984         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6985         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6986         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6987         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6988
6989         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6990         New arg lsb0?  All callers updated.
6991         (decode-bits): New arg lsb0?.  All callers updated.
6992         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6993         of expt.
6994         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6995         (build-slots): Call integer-expt instead of expt.
6996         (build-decode-table-entry): Handle crossing word boundaries better.
6997         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6998         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6999
7000         * enum.scm (define-enum): Rewrite.
7001         (define-normal-enum): Ditto.
7002         (def-full-insn-enum): New proc.
7003         (define-normal-insn-enum): Rewrite.
7004
7005         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7006         valid C.
7007         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7008
7009         * dev.scm: Add sid support.
7010
7011         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7012         (CLEANFILES): Add tmp-*.
7013         * Makefile.in: Rebuild.
7014
7015         * doc/Makefile.am: New file.
7016         * doc/Makefile.in: New file.
7017         * doc/cgen.texi: New file.
7018         * Makefile.am (SUBDIRS): Define.
7019         * Makefile.in: Rebuild.
7020         * configure.in: Create doc/Makefile.
7021         * configure: Rebuild.
7022
7023 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7024
7025         * insn.scm (insn:syn): Delete.
7026
7027 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7028
7029         * fr30.cpu (model fr30-1): Add state variables load-regs,
7030         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7031         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7032         (model m32rx): Ditto.
7033         (addi): Simplify function unit usage spec.
7034         (ld-plus): Rewrite operand names in function unit usage spec.
7035         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7036         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7037         overridden.  Allow operand to appear in input and output spec.
7038         (<insn>,gen-profile-code): string-append -> string-list.
7039
7040         * ifield.scm (define-ifield): Call pmacro-expand.
7041         (define-full-ifield,define-normal-ifield): Ditto.
7042         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7043
7044         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7045         with-scache and without-scache cases.
7046
7047 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7048
7049         * fr30.cpu (fr30-1): Add state variable h-gr.
7050         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7051         (all insns): First pass at providing cycle counts.
7052         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7053         when initializing unit output operands, ditto for input operands.
7054
7055         * insn.scm (insn-length,insn-length-bytes): New procs.
7056         * mach.scm (-adata-set-derived!): Use them.
7057         * sim-cpu.scm (-gen-sem-case): Ditto.
7058
7059         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7060         (-gen-write-case): Ditto.
7061         (gen-semantic-fn): Ditto.  Split into two:
7062         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7063         in non-scache case.
7064         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7065         scache/no-scache appropriately.  All callers updated.
7066         (-gen-sem-case): PCADDR->IADDR.
7067         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7068
7069         * sim-decode.scm (*): Replace string-append,string-map with
7070         string-list,string-list-map where the result is sufficiently large.
7071         (-gen-decode-insn-table): Go back to simple version for non-scache
7072         case: just record IDESC in decoder tables and leave field extraction
7073         to the caller.
7074         (-gen-decode-switch): Ditto.
7075         (-gen-decode-fn): Ditto.
7076         (-gen-extract-decls): Only emit format enum if with-scache?.
7077         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7078         non-scache case.
7079         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7080         (-gen-insn-timing): Ditto.
7081         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7082         with-scache case.
7083
7084         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7085         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7086
7087 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7088
7089         * cpu.scm (keep-mach-validate!): New proc.
7090         (include): New proc.
7091
7092         * mach.scm (current-arch-mach-name-list): New proc.
7093         (-parse-arch-machs): Always return canonical form.
7094         (def-arch): Validate user specified machs to be kept.
7095         (def-mach-attr!): Simplify.
7096
7097         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7098         (option-init!): Initialize it.
7099         (option-set!): Set it.
7100         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7101         output operand instance tables.
7102         (cgen-opc.in): Only output operand instance tables if asked to.
7103
7104         * sim.scm (option-init!,option-set!): Clarify returned value.
7105
7106         * sim.scm (gen-mach-bfd-name): Move from here.
7107         * utils-cgen.scm: To here.
7108
7109 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7110
7111         * fr30.cpu (ilm): Fix comment field.
7112         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7113         compute it.
7114
7115         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7116         (rtx-true?, rtx-false?): New procs.
7117         * rtx-funcs.scm (annul): Rename vpc to pc.
7118         (-rtx-traverse-if): Improve determination of whether then/else parts
7119         are conditionally executed.
7120
7121         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7122         outer level.
7123         (gen-argbuf-type): Simplify generated definition (big sem_fields
7124         union moved outside).
7125
7126 1999-01-11  Ben Elliston  <bje@cygnus.com>
7127
7128         * doc/porting.texi: New file.
7129
7130         * doc/intro.texi: New file.
7131         (Layout): Use @example to insert preformatted ASCII text (such as
7132         diagrams). @code is inappropriate here.
7133
7134 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7135
7136         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7137
7138         * m32r.opc (print_hash): Cast dis_info.
7139
7140         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7141         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7142         get/set macros.
7143
7144 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7145
7146         * i960.cpu (f-br-disp): Remove RELOC attribute.
7147         (f-ctrl-disp): Ditto.
7148         (callx-disp): set-quiet -> set for (reg h-gr 2).
7149         (callx-indirect,callx-indirect-offset): Ditto.
7150
7151         * Makefile.am (gas-test): Fix dependencies.
7152         * Makefile.in: Rebuild.
7153         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7154         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7155         (gas-test-analyze!): Use syntax-break-out.
7156         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7157         (sim-test-analyze!): Use syntax-break-out.
7158         (cgen-build.sh): Use gen-file-name.
7159         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7160         * insn.scm (syntax-break-out): New proc.
7161         * utils.scm (gen-file-name): New proc.
7162
7163         * fixup.scm (nil,<?,<=?,>?): Delete.
7164
7165         * utils.scm (count-true): Rewrite.
7166
7167         * slib/sort.scm: Move sort.scm to slib directory.
7168         * cpu.scm: Update.
7169
7170         * iformat.scm (ifmt-compute!): Record empty format.
7171
7172         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7173         internal procs outside.  Handle expression register numbers.
7174         Handle index-of.
7175
7176         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7177
7178         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7179         every register.
7180         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7181         (gen-semantic-fn,-gen-sem-case): Ditto.
7182         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7183         (cgen-semantics.c): Ditto.
7184         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7185         (gen-ifmt-argvars-defns): New proc.
7186         (gen-ifmt-argvars-assigns): New proc.
7187         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7188         (-gen-decode-fn): Handle non-with-scache case.
7189         (cgen-decode.c): Define WANT_CPU to @cpu@.
7190         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7191         (cgen-model.c): Define WANT_CPU to @cpu@.
7192         * sim.scm (gen-ifld-extract-argvar): New proc.
7193         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7194         with FUN-ACCESS specified.
7195         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7196         (<hw-register>,gen-extract): New arg local?.
7197         (<hw-address>,gen-extract): Ditto.
7198         (-hw-cxmake-get): Handle non-with-scache case.
7199         (-hw-gen-set-quiet): Ditto.
7200         (<hw-address>,cxmake-get): Handle non-with-scache case.
7201         (gen-op-extract-argvar): New proc.
7202         (<operand>,gen-record-profile): Rewrite.
7203         (<operand>,gen-profile-code): Rewrite.
7204         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7205         (gen-argbuf-fields-union): New proc.
7206         (gen-argbuf-type): Use it.  Handle non-scache case.
7207
7208         * *.scm: class:foo procs renamed to class-foo.
7209         * attr.scm (<attribute>): New member `for'.
7210         (-attr-parse): New first value in list for default if
7211         none specified.
7212         (non-bool-attr-list,attr:add!): Delete.
7213         (def-attr): Use current-attr-add!.
7214         (atlist-attr-value-no-default): New proc.
7215         (attr-lookup-default): Handle boolean attributes.
7216         (gen-attr-enum): New proc.
7217         (-attr-remove-meta-attrs-alist): New proc.
7218         (attr-nub): New proc.
7219         (current-attr-list-for): New proc.
7220         (current-{ifld,hw,op,insn}-attr-list): New procs.
7221         (attr-builtin!): New proc.
7222         * cpu.scm (keep-obj?): Rewrite.
7223         (-init-parse-cpu!): Call arch-init!.
7224         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7225         (-finish-parse-cpu!): Call arch-finish!.
7226         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7227         (def-enum,def-full-enum): Use current-enum-add!.
7228         (gen-obj-list-enums): New proc.
7229         * hardware.scm (hw:add!,hw:lookup): Delete.
7230         (def-hardware,def-hardware-ext): Use current-hw-add!.
7231         (hw:std-attrs,hw:attr-list): Delete.
7232         (hardware-builtin!): Define builtin hardware attributes.
7233         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7234         (def-ifield,def-full-ifield): Use current-ifld-add!.
7235         (ifld:std-attrs,ifld:attr-list): Delete.
7236         (ifield-builtin!): New proc.
7237         * insn.scm (insn:add!,insn:lookup): Delete.
7238         (def-full-insn): Use current-insn-add!.
7239         (insn:std-attrs): Delete.
7240         (insn-builtin!): New proc.
7241         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7242         minsn-list.
7243         (<arch-data>): New member machs.
7244         (current-attr-list,current-enum-list): New procs.
7245         (current-op-list,current-minsn-list): New procs.
7246         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7247         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7248         Ditto.
7249         (-parse-arch-machs): New proc.
7250         (-arch-parse): New arg machs, all callers updated.
7251         (-arch-read): Handle machs spec.
7252         (def-arch): Define MACH attribute here.
7253         (mach-init!,mach-finish!): Not here.
7254         (cpu:add!,cpu:lookup): Delete.
7255         (def-cpu): Use current-cpu-add!.
7256         (<mach>): New member bfd-name.
7257         (-mach-parse): New arg bfd-name, all callers updated.
7258         (-mach-read): Handle bfd-name spec.
7259         (mach:add!,mach:lookup): Delete.
7260         (def-mach): Use current-mach-add!.
7261         (def-mach-attr!): New proc.
7262         (arch-init!): New proc.
7263         (arch-finish!): New proc.  Reverse all object lists here.
7264         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7265         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7266         (define-normal-macro-insn): Ignore minsn if mach not kept.
7267         * mode.scm (mode-builtin!): New proc.
7268         * model.scm (model:add!,model:lookup): Delete.
7269         (def-model): Use current-model-add!.
7270         * opcodes.scm (insn:attr-list): Delete.
7271         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7272         (gen-attr-table-defn): Emit value for default.
7273         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7274         (op:attr-list): Delete.
7275         (gen-operand-decls,gen-insn-decls): New proc.
7276         (compute-insn-attr-list): Delete.
7277         (cgen-opc.h): Reorganize and simplify.
7278         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7279         (def-operand,def-full-operand): Use current-op-add!.
7280         (op:std-attrs): Delete.
7281         (operand-enum): Delete.
7282         (operand-builtin!): Define builtin operand attrs.
7283         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7284         (gen-attr-enum-decl): Use gen-obj-list-enums.
7285         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7286         Rewrite.
7287         * fr30.cpu (define-arch): Add machs spec.
7288         (f-i4): SIGNED attribute -> !UNSIGNED.
7289         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7290         (HASH-PREFIX): Define operand attribute.
7291         (NOT-IN-DELAY-SLOT): Define insn attribute.
7292         * i960.cpu (define-arch): Add machs spec.
7293         * m32r.cpu (define-arch): Add machs spec.
7294         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7295         (HASH-PREFIX): Define operand attribute.
7296         (FILL-SLOT): Define insn attribute.
7297
7298 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7299
7300         * fr30.cpu (stilm): Correct mask for and operation.
7301
7302 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7303
7304         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7305         Replace START/EXIT with start/pass.
7306         (gen-sim-test): Delete ".text".
7307
7308 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7309
7310         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7311
7312 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7313
7314         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7315         (h-sbit): Make it FUN-ACCESS.
7316         (h-gr): Reorder so that general regs are always printed by number.
7317
7318 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7319
7320         * i960.cpu (flushreg): Use nop.
7321
7322 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7323
7324         * m32r.cpu (default-alignment): Specify.
7325         * mach.scm (<arch-data>): New member default-alignment.
7326         (adata:default-alignment): New proc.
7327         (current-arch-default-alignment): New proc.
7328         (-arch-parse): New arg default-alignment.
7329         (parse-alignment): New proc.
7330         (-arch-read): Handle default-alignment spec.
7331
7332         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7333
7334         * insn.scm (f-%): Delete.
7335         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7336         be readded if proved useful.
7337         (gen-extract-fields): Ditto.  Use gen-ifetch.
7338         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7339         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7340
7341 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7342
7343         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7344
7345 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7346
7347         * fr30.cpu: Remove stub macros.
7348         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7349         (div2): Don't use addc/subc.
7350
7351 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7352
7353         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7354         if opcodes.
7355
7356 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7357
7358         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7359
7360 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7361
7362         * cpu.scm (keep-all?): New proc.
7363         (assert-keep-all): Use it.
7364         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7365         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7366         Check for spelling errors.
7367
7368 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7369
7370         * rtl.scm (s-convop): Call -rtx-sem-mode.
7371
7372 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7373
7374         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7375         (-parse-hw-profile): Ditto.
7376         (<hw-register>, parse!): Return `void' result.
7377         (<hw-pc>, parse!): Ditto.
7378         (<hw-memory>, parse!): Ditto.
7379         (<hw-immediate>, parse!): Ditto.
7380         (<hw-address>, parse!): Ditto.
7381
7382         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7383         (-ifld-parse-encode-decode): New proc.
7384         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7385         (-multi-ifield-parse): Set encode/decode to #f.
7386         (ifld:decode-mode): New proc.
7387         * utils.scm (nub): Rewrite.
7388         * operand.scm (op-nub): Rewrite.
7389         * sim.scm (<ifield>, gen-type): Rewrite.
7390         (-gen-ifld-argbuf-defn): New proc.
7391         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7392         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7393         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7394         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7395         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7396         New method gen-trace-extract.
7397         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7398         from gen-argbuf-elm, return "" if not caching register address.
7399         Rewrite gen-extract.  New method gen-trace-extract.
7400         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7401         gen-extract, gen-trace-extract, cxmake-get.
7402         (<hw-iaddress>): New method cxmake-get.
7403         (op-needed-iflds): New proc.
7404         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7405         (-gen-op-argbuf-defn): New proc.
7406         (gen-op-extract): Renamed from op:extract.
7407         (gen-op-trace-extract): Renamed from op:trace-extract.
7408         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7409         and rewritten.
7410         (gen-argbuf-elm): Rewrite.
7411         * sim-decode.scm (-gen-record-args): Update.
7412
7413         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7414
7415         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7416         argument position.  Flag symbolic macros in function position as
7417         an error.
7418         (define-pmacro): Handle quoting in definition of symbolic macros.
7419         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7420
7421 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7422
7423         * fr30.opc (parse_register_list): Account for reverse masks
7424         for load and store.
7425         (print_register_list): Ditto.
7426         (parse_low_register_list_ld): New function.
7427         (parse_hi_register_list_ld): New function.
7428         (parse_low_register_list_st): New function.
7429         (parse_hi_register_list_st): New function.
7430         (print_hi_register_list_ld): New function.
7431         (print_hi_register_list_st): New function.
7432         (print_low_register_list_ld): New function.
7433         (print_low_register_list_st): New function.
7434         * fr30.cpu (ldr15dr): Implement workaround.
7435         (ldm0,ldm1,stm0,stm1): Implemented.
7436
7437 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7438
7439         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7440         * configure: Regenerate.
7441         * Makefile.am (WITH_HOBBIT): Update.
7442         (cgen-hob.c): Remove Makefile dependency.
7443         (cgen.o): Depend on cgen-gh.h, config.h.
7444         * Makefile.in: Regenerate.
7445         * aclocal.m4: Regenerate.
7446
7447 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7448
7449         * i960.cpu, i960.opc: New files.
7450
7451 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7452
7453         * fr30.opc (parse_register_number): New function.
7454         (parse_register_list): New function.
7455         (parse_low_register_list): Use parse_register_list.
7456         (parse_hi_register_list): Use parse_register_list.
7457         * fr30.cpu (sth): Fix assembler syntax. Implement more
7458         insns.
7459
7460 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7461
7462         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7463         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7464         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7465         (-op-gen-set-trace-parallel): Ditto.
7466         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7467
7468         * fr30.cpu (call,calld): Fix setting of pc.
7469         (f-op5): Fix start bit number.
7470
7471 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7472
7473         * fr30.cpu (st): Fix operand ordering. Implement more
7474         insns.
7475
7476 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7477
7478         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7479         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7480         (fmt-semantic-operands): Move to sim.scm.
7481         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7482         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7483         (<hw-index>): New method get-name.
7484         (op-profilable?): Moved to sim.scm.
7485         (op-nub): New proc.
7486         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7487         (op-profilable?): Moved here from operand.scm.
7488         (gen-extract-type): Delete.
7489         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7490         (-gen-argfld-ref): New proc.
7491         (-gen-ifld-argfld-name): New proc.
7492         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7493         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7494         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7495         (<hardware-base>): Delete method gen-extract-type.  New method
7496         gen-argbuf-elm.
7497         (<hw-register): Ditto.  Update method gen-extract.
7498         (<operand>, method gen-argbuf-elm): Rewrite.
7499         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7500         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7501         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7502
7503         * sim-decode.scm (-gen-record-args): Tweak.
7504
7505         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7506
7507 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7508
7509         * doc/porting: Fix typo: gas->sim.
7510         * fr30.opc (print_m4): New function.
7511         * fr30.cpu: Implemented many insns.
7512
7513 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7514
7515         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7516
7517         * fr30.cpu (f-rel9): Delete RELOC attribute.
7518         (f-rel12): Add PCREL-ADDR attribute.
7519         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7520         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7521         * fr30.opc (print_label9): Delete.
7522
7523         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7524         code for CTI indicators.
7525         * insn.scm (insn-cti?): Simplify.
7526         * utils-cgen.scm (atlist:cti?): New proc.
7527
7528 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7529
7530         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7531         (f-i20-4,f-i20-16,f-i20): New fields.
7532         (i20): New operand.
7533         (ldi8): Implement.
7534         (ldi20): New insn.
7535         (ldi32m): Delete.
7536         (jmpd): Implement.
7537         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7538         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7539         * mach.scm (arch-data): Ditto.
7540         (current-arch-default-insn-word-bitsize): Renamed from
7541         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7542         (-arch-read): Update.
7543
7544         * hardware.scm (hw:attr-list): Move here ...
7545         * opcodes.scm: ... from here.
7546
7547         * ifield.scm (fld:bitrange): Delete.
7548         (fld:word-offset,fld:word-length): New procs.
7549         (ifield?): Use class-instance.
7550         (<ifield>, method field-start): Rewrite.
7551         (ifld:enum): New proc.
7552         (<ifield>, methods field-mask,field-value): Rewrite.
7553         (-ifield-parse): Rewrite.
7554         (<multi-ifield> support): Rewrite.
7555         (ifld-beyond-base?): Rewrite.
7556         (ifld:std-attrs): New variable.
7557         (ifld:attr-list): New proc.
7558         * iformat.scm (-compute-insn-mask): Rewrite.
7559         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7560         Simplify.
7561         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7562         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7563         onto type.
7564         (<operand>): Ditto.  Forward onto index instead.
7565         (gen-ifld-decls,gen-ifld-defns): New procs.
7566         (ifld:insert,ifld:extract): New procs.
7567         (<ifield>): New methods gen-insert, gen-extract.
7568         (<multi-ifield>): Ditto.
7569         (<hw-index>): Forward gen-insert,gen-extract onto value.
7570         (<hw-asm>): Delete insert/extract support.
7571         (<hw-register,hw-memory,hw-immediate>): Ditto.
7572         (gen-hash-defines): Use string-list.
7573         Define CGEN_MAX_IFMT_OPERANDS.
7574         (gen-switch): Use string-list,string-list-map.
7575         (gen-fget-switch,gen-fset-switch): Use string-list.
7576         (gen-parse-switch,gen-insert-switch): Ditto.
7577         (gen-extract-switch,gen-print-switch): Ditto.
7578         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7579         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7580         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7581         (gen-ivalue-entry): New proc.
7582         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7583         computation.  Use 0 for operand ref table if ALIAS insn.
7584         (gen-minsn-table-entry): Use string-list.
7585         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7586         (gen-opcode-open): Record address of ifield table.
7587         (cgen-opc.h): Call gen-ifld-decls.
7588         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7589         * types.scm (<bitrange>): New members word-offset,word-length.
7590         Delete member total-length.  Delete methods start,mask,value.
7591         (bitrange:word-offset,bitrange:word-length): New procs.
7592         * sim-cpu.scm (gen-define-fields): Simplify.
7593         (gen-extract-fields): Simplify.
7594         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7595         (<ifield>): New methods gen-ifld-extract-decl.
7596         Delete method gen-ifld-extract-beyond.
7597         (<multi-ifield>): New methods gen-ifld-extract-decl.
7598         (<multi-ifield>, method gen-ifld-extract): Implement.
7599         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7600         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7601
7602         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7603         (-rtx-traverse-syntax-no-mode): New proc.
7604         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7605         (s-ifield): New proc.
7606         (s-shop): Don't prepend `unsigned' for unsigned modes.
7607         * rtx-funcs.scm (ifield): New rtx function.
7608         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7609         (delay): New rtx function.
7610         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7611
7612         * cos.scm (-elm-make-method-getter): Fix typo.
7613
7614         * utils.scm (backslash): Handle lists of strings.
7615
7616 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7617
7618         * fr30.cpu (f-rel9): Correct for pc+2.
7619         (label9): Use print_label9.
7620         * fr30.opc (print_label9): New function.
7621
7622 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7623
7624         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7625         * fr30.opc (parse_low_register_list): Renamed.
7626         (parse_hi_register_list): Renamed.
7627         (print_hi_register_list): Renamed.
7628         (print_low_register_list): Renamed.
7629
7630 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7631
7632         * fr30.cpu (f-rel9): Now a pc relative offset.
7633
7634 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7635
7636         * opcodes.scm (op-asm): Move to here, from operands.scm.
7637         (<op-asm>, method parse!): Validate arguments.
7638         (<operand>, method gen-function-name): Fix thinko.
7639         * operand.scm (<operand>, method make!): Don't set op-asm here.
7640         * utils.scm (list-elements-ok?): New proc.
7641
7642         * opcodes.scm: Clean up pass.
7643
7644 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7645
7646         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7647         the fr30_int function.
7648         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7649         (h-dr): Add FUN-ACCESS attribute.
7650
7651 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7652
7653         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7654         for C symbol for models array.
7655
7656 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7657
7658         * fr30.opc (parse_reglist_low): New function.
7659         (parse_reglist_hi): New function.
7660         (print_reglist_low): New function.
7661         (print_reglist_hi): New function.
7662         * fr30.cpu: Finish remaining insn stubs.
7663
7664 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7665
7666         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7667
7668         * fr30.cpu (ldi32m): Don't use for disassembly.
7669
7670 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7671
7672         * fr30.cpu (int): Implement it.
7673
7674 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7675
7676         * rtx-funcs.scm (nop): Fix C code.
7677
7678         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7679
7680         * fr30.cpu (f-i32): New ifield.
7681         (i32): New operand.
7682         (ldi32): New insn.
7683         (ldi32m): New macro insn.
7684         (inte): Provide simple version for now.
7685
7686         * sim-arch.scm: New file.
7687         * sim.scm: Move architecture support generation to sim-arch.scm.
7688         * cgen-sim.scm: Load sim-arch.scm.
7689         * dev.scm: Ditto.
7690
7691         * hardware.scm (pc?) New proc.
7692         (class <hardware-base>): Rewrite method 'pc?.
7693         (class <hardware>): Forward 'pc? to the hardware type.
7694         (class <hw-pc>): New method 'pc?.
7695
7696         Add support for variable length ISAs.
7697         * ifield.scm (ifld-beyond-base?): New proc.
7698         * m32r.cpu: Remove integral-insn? spec.
7699         * mach.scm (arch:derived,arch:set-derived!): New procs.
7700         (arch:app-data,arch:set-app-data!): New procs.
7701         (class <arch>): New members derived, app-data.
7702         (class <cpu>): Delete member integral-insn?.
7703         (cpu:integral-insn?): Delete.
7704         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7705         (-cpu-read): Delete integral-insn? support.
7706         (state:decode-assist): Delete.
7707         (state:int-insn?): Delete.
7708         (<derived-arch-data>): New class.
7709         (-adata-set-derived!): New proc.
7710         (mach-finish!): Call it.
7711         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7712         (gen-operand-instance): Add COND_REF support.
7713         (gen-operand-instance-table): Ditto.
7714         (gen-hash-defines): Update.
7715         (gen-extract-switch): Update type of `insn_value' arg.
7716         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7717         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7718         updated.
7719         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7720         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7721         beyond the base insn (for large insns).
7722         (-gen-extract-beyond-var-list): New proc.
7723         (gen-extract-fields): Handle large insns.
7724         (-gen-write-case): Update sem_arg computation.
7725         Update initial vpc computation.
7726         (gen-semantic-fn): Ditto.  Update type of `insn'.
7727         (-gen-sem-case): Update sem_arg computation.
7728         Update initial vpc computation.
7729         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7730         (-gen-extract-word): New proc.
7731         (<ifield>): New method gen-ifld-extract-beyond.
7732         (gen-ifld-extract-beyond): New proc.
7733         * types.scm (bitrange-overlap?): New proc.
7734
7735         * utils.scm (bits->bytes): New proc.
7736         (bytes->bits): New proc.
7737
7738         Move extraction support into decoder.
7739         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7740         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7741         support to sim-decode.scm.
7742         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7743         be array of IDESC,FMT entries.  Make the array const.
7744         (-gen-gcc-label-table): Make array const.
7745         (-gen-decode-switch): Branch to extraction code after insn has been
7746         identified.
7747         (-gen-decode-insn-globals): Delete extract handler from
7748         @cpu@_insn_sem.
7749         (gen-decode-fn): Add extraction support.
7750         (-gen-sem-fn-decls): Delete extraction fn decls.
7751         (-gen-idesc-decls): Update @cpu@_decode decl.
7752         (-gen-idesc-init-fn): Delete extraction support.
7753         (-gen-extract-decls): New proc.
7754
7755         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7756         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7757
7758         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7759         All callers updated.
7760         (table-entry:make): Record insn value as insn object, not name.
7761         All uses updated.
7762
7763         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7764         collision with C function.
7765         (path_dirname): Similarily.
7766         * hobbit.c,hobbit.h: Rebuild.
7767
7768 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7769
7770         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7771
7772 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7773
7774         * fr30.cpu: Implement more instruction stubs.
7775
7776 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7777
7778         * fr30.cpu: Implement more instruction stubs.
7779
7780 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7781
7782         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7783
7784         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7785
7786         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7787         (op:std-attrs): Ditto.
7788         * opcodes.scm (gen-operand-instance): Ditto.
7789         (gen-switch): Ditto.
7790         * m32r.cpu (condbit,accum): Update.
7791         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7792
7793 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7794
7795         * enum.scm (-enum-read): Fix typo.
7796
7797         * iformat.scm (-ifmt-search-key): Simplify a little.
7798
7799 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7800
7801         * doc/porting: semantics.c -> sem.c.
7802         * Makefile.in: Regenerate.
7803         * fr30.cpu (add): Change ADD to add. Add more registers and set
7804         status bits on 'add' instruction.
7805
7806 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7807
7808         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7809         of 0.
7810
7811 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7812
7813         * minsn.scm (minsn:enum): Update, call current-arch-name.
7814
7815         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7816
7817         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7818         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7819         (ARCH,CGEN,CGENFLAGS): New variables.
7820         (gas-test,sim-test): New rules.
7821         * Makefile.in: Rebuild.
7822         * configure.in (arch): Define.
7823         * configure: Rebuild.
7824
7825         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7826         * All .scm files: Ditto.
7827
7828         * dev.scm: Fix gas-test call to cpu-load.
7829         * gas-test.scm: Clean up pass to remove bit-rot.
7830         * sim-test.scm: Ditto.
7831
7832         * enum.scm (read-enum): Fix typo in `vals' handling.
7833
7834         * hardware.scm (-parse-hw-type): Fix typo.
7835         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7836         (def-hardware,define-normal-hardware): Ditto.
7837
7838         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7839         (display-var): Use it.
7840         * hobbit.c: Rebuild.
7841         * hobbit.h: Rebuild.
7842
7843         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7844         avoid hobbit problem.
7845         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7846         `parallel-insns-' to avoid hobbit problem.
7847
7848 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7849
7850         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7851         (parse_slo16,parse_ulo16): Ditto.
7852         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7853
7854 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7855
7856         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7857         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7858         * Makefile.in: Rebuild.
7859         * insn.scm (define-normal-insn): Expand pmacros.
7860         * mode.scm (<mode>): New member `host?'.  All uses updated.
7861         (mode:host?): New proc.
7862         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7863         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7864         (define-rtx-dual-mode): Ditto.
7865         (s-index-of): New proc.
7866         (s-unop): Use plain C for host mode operations.
7867         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7868         * rtx-funcs.scm (index-of): New rtx function.
7869         * sim.scm (<hw-index>): New method cxmake-get.
7870
7871 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7872
7873         * sim-cpu.scm (-gen-engine-decls): Delete.
7874
7875 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7876
7877         * doc/rtl (Example): Correct Typo.
7878         * doc/porting: Add 'make dep' step to opcodes port instructions.
7879         * fr30.opc: New file.
7880         * fr30.cpu: New file.
7881
7882 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7883
7884         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7885         * Makefile.am (GUILEINCDIR): New variable.
7886         (INCLUDES): Use it.
7887         * configure: Regenerate.
7888         * Makefile.in: Ditto.
7889         * aclocal.m4: Ditto.
7890
7891 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7892
7893         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7894         (cgen-semantics.c): Ditto.
7895         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7896         * sim-model.scm (cgen-model.c): Ditto.
7897         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7898         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7899
7900         * opcodes.scm (read-cpu.opc): Handle empty file.
7901
7902         * cos.scm (-elm-make-method-setter): Fix typo.
7903
7904         * cpu.scm (-init-parse-cpu!): Call types-init!.
7905         (-finish-parse-cpu!): Call types-finish!.
7906         * ifield.scm (<ifield>): Delete members start,length.
7907         New member bitrange.
7908         (<ifield>, methods field-start,field-length): Update.
7909         (fld:start): New arg insn-len.  All callers updated.
7910         (<ifield>, methods field-mask,field-value): Update.
7911         (-ifield-parse): Update.
7912         (ifield-init!): Update.
7913         * iformat.scm (compute-insn-length): Simplify.
7914         (compute-insn-mask): Update.
7915         * insn.scm (insn:value): Update.
7916         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7917         (current-arch-default-insn-bitsize): New proc.
7918         (current-arch-insn-lsb0?): New proc.
7919         (-arch-parse,-arch-read): Update.
7920         (<cpu>): New member file-transform.
7921         (-cpu-parse,-cpu-read): Update.
7922         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7923         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7924         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7925         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7926         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7927         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7928         * operand.scm (op:start): Update call to field-start method.
7929         * sim-decode.scm (opcode-slots): New arg lsb0?.
7930         (fill-slot!,build-slots): Ditto.
7931         (build-decode-table-entry,build-decode-table-guts): Ditto.
7932         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7933         (gen-decode-fn): Ditto.
7934         (cgen-decode.c): Update call to gen-decode-fn.
7935         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7936         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7937         (cgen-cpuall.h): Call -gen-cpuall-includes.
7938         * types.scm (<bitrange>): New class.
7939         (types-init!,types-finish!): New procs.
7940         * utils-cgen.scm (parse-number): New proc.
7941         (parse-boolean): New proc.
7942         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7943         (word-mask): Rewrite.
7944         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7945         (m32rxf): New field `file-transform'.
7946         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7947
7948         * hobbit.h: Fix include file name.
7949
7950 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7951
7952         * slib: New directory of slib files used by cgen/hobbit.
7953         * hobbit.scm: New file.
7954         * hobbit.c: New file.
7955         * hobbit.h: New file.
7956         * hobscmif.h: New file.
7957         * hob-main.c: New file.
7958         * hobslib.scm: New file.
7959         * hob.sh: New file.
7960         * Makefile.am: Add support for compiling hobbit, and using compiled
7961         version of hobbit to compile cgen.
7962         * Makefile.in: Regenerate.
7963         * configure.in: Support --with-hobbit.
7964         * configure: Regenerate.
7965         * acconfig.h (WITH_HOBBIT): Add.
7966         * config.in: Regenerate.
7967
7968         * rtl.scm: New file, was cdl-c.scm.
7969         Definition of rtx funcs moved to rtx-funcs.scm.
7970         (semantic-in-out-operands): Rewrite to compute object form of
7971         semantic code.
7972         * rtx-funcs.scm: New file.
7973
7974         * cgen-gh.c: #include "config.h".
7975         (gh_cadddr,gh_cddddr): New fns.
7976         (cgh_vector_to_list): New fn.
7977         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7978         (cgh_init): Prefix qsort procs with "cgh-".
7979         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7980         * cgen.c: #include "config.h".
7981
7982         * attr.scm (bitset-attr?): New proc.
7983         (<bitset-attribute>, method parse-value): Value syntax changed from
7984         (val1 val2 ...) to val1,val2,....
7985         (<bitset-attribute>): New method gen-value.
7986         (<integer-attribute>): New method gen-value.
7987         (<enum-attribute>): New method gen-value.
7988         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7989         (<reader>): New class.
7990         (CURRENT-ARCH,CURRENT-READER): New globals.
7991         (keep-mach?): Move here from mach.scm.
7992         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7993         (<arch>): New class.
7994         (<arch-data>): New class.
7995         (<cpu>): Make subclass of <ident>.
7996         (*ENDIAN* variables): Delete.
7997         (process-state-vars): Delete.
7998         (mach-finish!): Add `base' value to MACH attribute.
7999         * hardware.scm (<hardware>): Make subclass of <ident>.
8000         (hw:std-attrs): New global.
8001         (hw-profilable?): New proc.
8002         * ifield.scm (<ifield>): Make subclass of <ident>.
8003         (sort-ifield-list): Move here from iformat.scm.
8004         * iformat.scm (<iformat>): Renamed from <insn-format>.
8005         Make subclass of <ident>.
8006         (-ifmt-search-key): Include cti? in categorization of formats.
8007         (ifmt-analyze): Compile semantics (turn to object form).
8008         * insn.scm (<insn>): Make subclass of <ident>.
8009         New member compiled-semantics.
8010         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8011         * mode.scm (<mode>): Make subclass of <ident>.
8012         (UBI): Delete.
8013         * model.scm (<unit>): Make subclass of <ident>.
8014         New members inputs,outputs.
8015         (<model>): Make subclass of <ident>.  New member state.
8016         (-unit-parse): Parse inputs,outputs.
8017         (<iunit>): New class.
8018         (-insn-timing-parse-model): New proc.
8019         (parse-insn-timing): Function unit spec rewritten.
8020         * operand.scm (<operand>): Make subclass of <ident>.
8021         New members sem-name,num,cond?  New method gen-pretty-name.
8022         (hw-index-scalar): New global.
8023         (op-nub-hw): Move here from rtl.scm.
8024         (op:lookup-sem-name,op-profilable?): New procs.
8025         * pmacros.scm: Rewrite to pass through hobbit.
8026         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8027         * utils.scm (logit): Make a macro.
8028         (bit-set?): Rewrite.
8029         (high-part): Rewrite.
8030
8031         * m32r.cpu (define-arch): Move to top of file.
8032         (cpu family m32rbf): Renamed from m32rb.
8033         (model m32r/d): Function unit spec rewritten.
8034         (all insns): Ditto.  Replace UBI with BI.
8035
8036         * opcodes.scm (gen-attr-table-decls): Declare
8037         @arch@_cgen_hw_attr_table.
8038         (gen-attr-table-defns): Generate hw attribute table.
8039
8040         * sim-cpu.scm (-gen-engine-decls): New proc.
8041         (-gen-model-decls): New proc.
8042         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8043         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8044         (-gen-record-profile-args): Simplify.
8045         (-gen-parallel-sem-case): Delete.
8046         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8047         New local `written'.  Delete profiling code.
8048         (-gen-sem-case): Ditto.
8049         (-uncond-written-mask,-any-cond-written?): New procs.
8050         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8051         parallelly or serially, and write-back handlers for all parallel insns.
8052         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8053         support to initialization of struct insn_sem.
8054         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8055         (-gen-insn-sem-type): Add parallel write-back support to struct
8056         insn_sem.
8057         (-gen-idesc-init-fn): Add support for virtual insns.
8058         Add parallel write-back support.
8059         * sim-model.scm (gen-model-profile-fn): Delete
8060         (-gen-model-fn-decls): New proc.
8061         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8062         (-gen-model-init-fn): New proc.
8063         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8064         members in @mach@_init_cpu.
8065         (cgen-model.c): Generate model handlers for each insn.
8066         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8067         (<hw-pc>): New method gen-write.
8068         (<hw-register>, method gen-write): New arg `mode'.
8069         (<hw-register>): Delete method gen-record-profile!.
8070         New method gen-profile-index-type.
8071         (<hw-memory>, method gen-write): New arg `mode'.
8072         (<hw-address>, method gen-extract): Delete.
8073         (<hw-address>, method gen-write): New arg `mode'.
8074         (<hw-index>, method get-write-index): Rewrite.
8075         (<pc>, method cxmake-get-direct): Delete.
8076         (<pc>): New method cxmake-get.  Comment out methods
8077         gen-set-quiet,gen-set-trace.
8078         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8079         gen-profile-index-type,gen-profile-code.
8080         Delete method gen-pretty-name.  Rewrite method gen-write.
8081         Delete method cxmake-get-direct.
8082         (-op-gen-set-trace): Update `written'.
8083         (-op-gen-set-trace-parallel): Ditto.
8084         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8085         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8086         insns and their write-back handlers.
8087         (insn-op-lookup): New proc.
8088         (<unit>): New method gen-profile-code.
8089         (<iunit>): New method gen-profile-code.
8090         (gen-argbuf-elm): Add profiling elements.
8091         (gen-argbuf-type): Define cti insns separately in their own struct.
8092         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8093         insns.  Move semantic entries here from struct scache.
8094         Delete everything from struct scache except argbuf.
8095         (<insn>, method gen-profile-locals): Rewrite.
8096         (<insn>, method gen-profile-code): Rewrite.
8097         (sim-finish!): Create virtual pbb insns.
8098
8099 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8100
8101         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8102         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8103         (h-psw,h-bpsw,h-bbpsw): Define.
8104         (rte,trap): Handle bbpc,bbpsw.
8105         * opcodes.scm (max-operand-instances): Fix typo.
8106         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8107         hardware elements to be fun-access.
8108         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8109
8110 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8111
8112         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8113
8114 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8115
8116         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8117
8118 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8119
8120         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8121         architecture name.
8122         (mach m32r): Update.
8123
8124         * mach.scm (mach:supports?): New proc.
8125         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8126         gen-reg-access-{decls,defns}.
8127         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8128         (gen-mach-bfd-name): New proc.
8129         (gen-arch-reg-access-{decls,defns}): New procs.
8130         (cgen-arch.[ch]): Output register access cover fns.
8131
8132         * hardware.scm (hardware-builtin!): Set print handlers for
8133         h-addr,h-iaddr.
8134         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8135         `od'.
8136         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8137         (my_print_insn): Ditto.  Delete args buf, buflen.
8138         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8139         (-hw-asm-specs): Add `handlers' spec.
8140         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8141         `normal-hw-asm'.
8142         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8143         print.
8144         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8145         (<hw-asm>, parse!): New method.
8146         (gen-insn-table-entry): Print semantics.
8147         (gen-opcode-open): Renamed from gen-opcode-table.
8148
8149         * utils.scm (string-write): No longer a macro.
8150         (-string-write): Handle procedure args.
8151         * opcodes.scm: Update all calls to string-write.
8152         * sim-cpu.scm: Ditto.
8153         * sim-decode.scm: Ditto.
8154         * sim-model.scm: Ditto.
8155         * sim.scm: Ditto.
8156
8157 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8158
8159         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8160         (-gen-insn-builders,-gen-insn-builder): New procs.
8161
8162 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8163
8164         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8165         (gen-opcode-table): Properly terminate comment.
8166
8167 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8168
8169         * Version 0.6.0.
8170         Clean up pass over everything, so starting fresh.