OSDN Git Service

541a3be3a6617a438299fb33a6e2403c7904336c
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-10-24  Doug Evans  <dje@sebabeach.org>
2
3         * doc/rtl.texi: Add note that different ifields, operands, insns,
4         and minsns may occur with the same name in different isas.
5         Add note on the canonical form of rtl expressions.
6
7 2009-10-23  Doug Evans  <dje@sebabeach.org>
8
9         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
10         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
11
12         * decode.scm: Tweak various comments.
13         (/opcode-slots): Add FIXME.
14         (/build-decode-table-guts): Add assert.
15         * utils-sim.scm (/gen-set-itype-and-extract): New function.
16         (/gen-bracketed-set-itype-and-extract): New function.
17         (/gen-decode-default-entry): Rewrite.
18         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
19         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
20         updated.  Don't unnecessarily emit check for whether all opcode bits
21         have been examined.
22         (/gen-decode-expr-set-itype): Delete.
23         (/gen-decode-expr-entry): Update.
24         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
25         updated.  Keep track of decoder tables used thus far.
26         (/gen-decoder-switch): Ditto.
27         * utils.scm (word-bit-value): New function.
28
29 2009-10-14  Doug Evans  <dje@sebabeach.org>
30
31         * ifield.scm (<ifield>, value): Provide default initial value.
32         (ifield-encode-mode): Delete
33         (ifield-decode-mode): Delete duplicate definition.
34         (<derived-ifield>, 'make!): Initialize members encode, decode.
35         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
36         ifld-encode-mode.
37         (<multi-ifield>, 'gen-insert): Ditto.
38         
39 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
40
41         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
42         for @foo@_init_idesc_table.
43
44 2009-09-30  Doug Evans  <dje@sebabeach.org>
45
46         * doc/intro.texi: Mention SID.
47         * doc/sim.texi: Ditto.
48         * doc/porting.text (Doing a simulator port): Add some text.
49
50 2009-09-27  Doug Evans  <dje@sebabeach.org>
51
52         * cos.scm (/class-table): New global.
53         (/class-uid, /class-set-uid!): New functions.
54         (/class-parent-name): Renamed from /class-parents.
55         (/class-make!): Change parents arg to parent-name, all callers updated.
56         Assign uid to class.
57         (/class-lookup-uid): New function.
58         (/class-parent-classes): Rewrite.
59         (/class-mi?): Delete.
60         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
61         Delete.
62         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
63         (/class-compute-class-desc, class-desc-dump): Update.
64         (/object-make!): Update.
65         (/object-make-with-values!): Delete arg class-desc, all callers
66         updated.
67         (/object-copy): Delete arg top?, all callers updated.
68         (/object-specialize): Delete.
69         (/object-elements, /object-top-class): Delete.
70         (/object-class-name, /object-class-desc): Update.
71         (/object-class-uid): New function.
72         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
73         class-make, /class-subclass? /class-lookup-element,
74         Update.
75         (/elm-delta, elm-list): Delete.
76         (/elm-make-method-getter, elm-get, elm-xget): Update.
77         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
78         (elm-make-getter, elm-make-setter): Update.
79         (/method-lookup-next): Update.
80         (send): Don't specialize class passed to method.
81         (send-next): New arg class-name, all callers updated.
82         (/class-parent, /class-parent-via-path, object-parent): Delete.
83         (class-cons-parent!, class-append-parent!): Delete.
84         (object-reset!): Init /class-table.
85
86         * cos.scm (/object-debug-classes): Delete.
87         (/object-debug-elements, /object-debug-methods): Delete.
88
89         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
90         (method-proc): Delete.
91         (method-make-virtual!, method-make-virtual-forward!): Delete.
92         * ifield.scm (<ifield> field-start): Update.
93         (<ifield> field-length, pretty-print): Update.
94         (<multi-ifield> field-length, field-start, pretty-print): Update.
95         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
96         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
97         (<array> gen-sym-defn): Ditto.
98         (<hardware-base> gen-defn): Renamed from gen-defn.
99         (<hw-register> gen-type): Update.
100         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
101         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
102         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
103         (<hw-immediate> gen-type): Update.
104         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
105         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
106         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
107         (<array> gen-sym-defn): Ditto.
108         (<hardware-base> gen-defn): Renamed from gen-defn.
109         (<hw-register> gen-type): Update.
110         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
111         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
112         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
113         (<hw-immediate> gen-type): Update.
114         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
115
116 2009-09-25  Doug Evans  <dje@sebabeach.org>
117
118         * operand.scm (/anyof-merge-setter): Handle set-quiet.
119         * rtl.scm (rtx-single-set?): Handle set-quiet.
120
121         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
122         rtl-cover-fns?, macro?.  All callers updated.
123         (estate-make-for-normal-rtl-c): Delete, have all callers call
124         estate-make-for-rtl-c directly.
125         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
126         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
127
128         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
129         replaces /par-replace-set-dests.
130         (/par-replace-set-src-expr-fn): New function, replaces
131         /par-replace-set-srcs.
132         (s-parallel): Rewrite.
133
134         * rtl.scm (rtx-pretty-strdump): New function.
135         * rtl-traverse.scm (/rtx-canon-error): Use it.
136         (<eval-state>): New member outer-expr.
137         (estate-error): Include outer expression in error message if present.
138
139 2009-09-23  Doug Evans  <dje@sebabeach.org>
140
141         * xc16x.cpu (h-cr): New hardware.
142         (muls): Comment out parts that won't compile, add fixme.
143         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
144         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
145         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
146
147         Rewrite rtl processing to require it to be "canonicalized" first,
148         and write a full canonicalizer / expression checker.
149         Remove all appearances of DFLT in canonical rtl.
150         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
151         then rtx-simplify.
152         * iformat.scm (ifmt-analyze) Use canonical semantics.
153         * insn (<insn>): New member canonical-semantics.
154         * mach.scm (<arch>): New member multi-insns-instantiated?.
155         (/instantiate-multi-insns!): New function.
156         (/canonicalize-insns!): New function.
157         (arch-analyze-insns!): Canonicalize insn semantics before processing
158         them.
159         * mode.scm (/mode-set-word-params!): New function.
160         (mode-void?): New function.
161         (mode-compatible?): VOID is compatible with VOID.
162         (/mode-word-sizes-defined?): New global.
163         (mode-set-word-modes!): Use/set it.
164         (mode-ensure-word-sizes-defined): Update.
165         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
166         Redo WI/UWI/AI/IAI handling.
167         (op:new-mode): No longer accept DFLT.
168         (<derived-operand> constructor): Ensure all fields are initialized.
169         (<anyof-operand> constructor): Ditto.
170         (/derived-parse-ifield-assertion): Delete arg `args'.
171         All callers updated.
172         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
173         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
174         (rtl-c-expr, rtl-c++): Ditto.
175         (/rtl-c-get): Use mode of operand, not containing expression.
176         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
177         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
178         estate-for-insn? instead.
179         (s-unop): Use mode of expression, not first operand.
180         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
181         (s-sequence): Remove DFLT support.
182         (ifield): Use mode of expression, not UINT.
183         (pc): Comment out, unused.
184         (int-attr): New rtx kind.
185         (attr): Deprecate.
186         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
187         * rtl-traverse.scm (/rtx-canon-debug?): New global.
188         (/make-cstate): New function.
189         (/cstate-context, /cstate-outer-expr): New functions.
190         (/rtx-canon-error): New function.
191         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
192         /rtx-get-last-cond-case-rtx): New functions.
193         (/rtx-canon-*): New functions.
194         (/rtx-canner-table, /rtx-operand-canoners): New globals.
195         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
196         (/rtx-option, /rtx-option-list?): Rewrite.
197         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
198         Rewritten, all callers updated.
199         (/rtx-canon-expr, /rtx-canon): New functions.
200         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
201         (rtx-canonicalize-stmt): New function.
202         (tstate-make): Remove arg `set?'.  All callers updated.
203         (tstate-new-set?): Delete.
204         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
205         moved to /rtx-canon-*.
206         (/rtx-traverse-normal-operand): New function.
207         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
208         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
209         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
210         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
211         Ditto.
212         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
213         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
214         (/rtx-make-traverser-table): Update.
215         (/rtx-traverse-operands): Remove mode processing, now done during
216         canonicalization.
217         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
218         (/rtx-traverse): Ditto.
219         (rtx-init-traverser-tables!): New function.
220         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
221         (rtx-verify-no-dflt-modes): New function.
222         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
223         (rtx-simplify-insn): Use insn-canonical-semantics.
224         (rtx-canonicalize): Moved to rtl-traverse.scm.
225         (/compile-expr-fn, rtx-compile): Delete.
226         (/rtx-trim-rtx-list): New function.
227         (/rtx-trim-for-doc): Handle set, if.
228         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
229         (/rtx-valid-mode-types): Update.
230         (/rtx-valid-matches): Update.
231         (/rtx-find-matchexpr-index): New function.
232         (rtx-lookup): Require rtx-kind to be the rtx name.
233         (def-rtx-node): New arg result-mode, all callers updated.
234         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
235         (rtx-lazy-sem-mode): Delete.
236         (/rtx-closure-make): New arg `mode', all callers updated.
237         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
238         (rtx-operand-obj): Rewrite.
239         (rtx-make-xop): New functions.
240         (/hw): Renamed from `hw', all callers updated.
241         Use the correct mode instead of DFLT for the index.
242         (rtl-builtin!): Call rtx-init-traversal-tables!.
243         (rtl-finish!): Update.
244         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
245         Update mode arg-type.
246         (pc): Comment out.
247         (int-attr): New rtx kind.
248         (attr): Deprecate.
249         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
250         (/frag-cost-compute!): Ditto.
251         * semantics.scm (/build-operand!): Delete args op-name, op.
252         New arg op-expr.  All callers updated.
253         (/build-mem-operand!): Remove DFLT support.
254         (semantic-compile): Update process-expr!, mode arg deleted.
255         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
256         rtl-c++ calls.
257         (/gen-sem-case, /gen-sfrag-code): Ditto.
258         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
259         (/op-gen-set-trace): New function.  If not doing profiling, or using
260         the pbb engine, call /op-gen-set-quiet.
261         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
262         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
263         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
264         * utils.scm (find-first-index): New function.
265         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
266
267         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
268         to COMPARE.
269         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
270
271 2009-09-21  Doug Evans  <dje@sebabeach.org>
272
273         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
274         All callers updated.  Add FIXME.
275         (all rtx functions): Rename local estate to *estate*.  It's an
276         artificial argument added to the rtx, so make it stand out.
277
278         * openrisc.cpu (or32 isa): Fix setup-semantics.
279
280         * rtl.scm (rtx-class-*?): Delete, unused.
281         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
282
283         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
284         (init-reader!): Set /CGEN-RTL-VERSION to default.
285
286         * read.scm (cpu-load): Print load parameters.
287
288         * dev.scm (load-doc): Set verbose-level to 2.
289
290 2009-09-20  Doug Evans  <dje@sebabeach.org>
291
292         * rtl.scm (rtx-strdump): Use write instead of display.
293
294 2009-09-17  Doug Evans  <dje@sebabeach.org>
295
296         * utils-cgen.scm (obj-csv-names): New function.
297         * utils-sim.scm (/sfmt-contents): Use it in logging message.
298
299 2009-09-12  Doug Evans  <dje@sebabeach.org>
300
301         Clean up pass of mode handling.
302         Make use of mode name vs <mode> object more consistent and clear.
303         * hardware.scm (/keyword-read): Default mode to the mode name,
304         not the <mode> object.
305         (/hw-parse-indices): Parse mode name and pass mode object to
306         <hw-asm> constructor.
307         (/hw-parse-values): Ditto.
308         (<hw-register> parse!): Pass mode name to /hw-parse-indices
309         and /hw-parse-values.
310         (<hw-memory> parse!): Ditto.
311         (<hw-address> parse!): Ditto.
312         * mode.scm (/mode-table): New global, replaces mode-list.
313         Modes stored in hashtable instead of list.
314         (/mode-class-table): New global.
315         (mode-list-non-alias-values): Update.
316         (mode:eq?, mode-compatible?, mode:add!): Update.
317         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
318         (mode-maybe-lookup): New function.
319         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
320         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
321         (mode-find, mode-set-word-modes!): Update
322         (mode-ensure-word-sizes-defined): Update.
323         (/sort-mode-classes!): New function.
324         (mode-builtin!): Update.  Sort mode classes here.
325         (mode-finish!): Sort mode classes here too.
326         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
327         All callers updated.
328         (rtl-c-set-quiet): Allow mode to be name of object.
329         (rtl-c-set-trace): Ditto.
330         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
331         <mode> object.  All callers updated.
332         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
333         (rtx-lazy-sem-mode): Ditto.
334         (<rtx-temp> make!): Assert mode arg is a <mode> object.
335         (rtx-env-make): Allow var-list modes to be name or object.
336         * sem-frags.scm (/frag-expr-assq-locals): New function.
337         (/frag-compute-locals!): Call it.
338         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
339         All callers updated.
340         * semantics.scm (/build-mem-operand!): Handle mode aliases.
341
342         * sim-test.scm (*): Symbols no longer can be passed to string-append.
343
344 2009-09-10  Doug Evans  <dje@sebabeach.org>
345
346         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
347         Improve error message for missing or too many bits.
348         (/insn-parse): Don't verify iformat for virtual insns.
349         
350         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
351         non-multi-insns.
352         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
353         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
354         * sid.scm (pbb-engine-insns): Ditto.
355         * sim-decode.scm (cgen-decode.c): Ditto.
356
357 2009-09-09  Doug Evans  <dje@sebabeach.org>
358
359         * rtl-traverse.scm: Comment tweaks.
360         * rtl-xform.scm: Comment and reformatting tweaks.
361         * doc/rtl.texi: Add text to docs on ifield-assertions.
362
363         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
364         saving.
365
366         Add support for controlling warnings/errors.
367         Add tests for iformat description errors.
368         * dev.scm (cload): New option #:diag.
369         * read.scm (<reader>): New member verify-iformat?.
370         (/parse-diagnostic, parse-warning): New functions.
371         (parse-error): Guts moved to /parse-diagnostic.
372         (/set-diagnostic-options!): New function.
373         (cpu-load): New arg diagnostic-options, all callers updated.
374         Recognize -w diagnostic-option-list.
375         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
376         (ifld-simple-ifields, ifields-simple-ifields): New function.
377         * insn.scm (/parse-insn-format-iflds): New function.
378         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
379         New arg isa, all callers updated.  Do some basic validation of the
380         ifield list if requested.
381         * mach.scm (/sanity-check-insns): Improve error message text.
382         * doc/running.texi: Document -w option.
383         * doc/porting.texi: Document #:trace, #:diag options to cload.
384
385         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
386
387         * dev.scm (*): Change default verbosity level to 2.
388
389         * ifield.scm (<ifield> pretty-print): New method.
390         (ifld-pretty-print): New function.
391         (<multi-ifield> pretty-print): New method.
392
393         * ifield.scm (<ifield> field-start): Delete word-len arg.
394         All callers updated.
395         (ifld-start): Ditto.
396         (<multi-ifield> field-start): Ditto.
397         * operand.scm (<hw-index> field-start): Ditto.
398
399         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
400         total-bitsize.  All callers updated.
401         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
402         New member /insn-base-value.
403         (insn-base-value): New function.
404         * mach.scm (/sanity-check-insns): New function.
405         (arch-analyze-insns!): Call it.
406
407 2009-09-08  Doug Evans  <dje@sebabeach.org>
408
409         * iformat.scm (ifields-base-ifields): Simplify.
410         (compute-insn-length): Simplify, call ifields-base-ifields.
411         (compute-insn-base-mask): Ditto.
412         * ifield.scm (ifld-known-values): Ditto.
413         (ifld-base-ifields): Ditto.
414         * insn.scm (insn-value): Ditto.
415         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
416
417 2009-09-08  DJ Delorie  <dj@redhat.com>
418
419         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
420         preprocessor macro, not an enum.
421
422 2009-09-08  Doug Evans  <dje@sebabeach.org>
423
424         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
425         to string-append.
426         (*): Remove trailing ":" from error messages passed to estate-error.
427
428 2009-09-07  Doug Evans  <dje@sebabeach.org>
429
430         * types.scm (<struct>): Delete.
431
432         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
433         updated.
434         (/pmacro-loc-error): New function.
435
436         * mach.scm (/isa-parse-decode-assist): New function.
437         (/isa-parse): Call it.
438
439         * decode.scm (/get-subopcode-value): New function.
440         (/opcode-slots): Call it.
441         (/fill-slot!): Add logging message.
442
443         * cos.scm (/object-error): Convert symbols to strings before passing
444         to string-append.
445
446         * read.scm (rtl-version-equal?): New function.
447         (rtl-version-at-least?, rtl-version-older?): New functions.
448
449         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
450         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
451         rtl versions >= 0.9.
452         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
453
454 2009-09-03  Doug Evans  <dje@sebabeach.org>
455
456         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
457         is simple.
458
459 2009-09-01  DJ Delorie  <dj@redhat.com>
460
461         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
462         (parse_unsigned16_range): Likewise.
463         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
464         isa.
465
466 2009-09-01  Doug Evans  <dje@sebabeach.org>
467
468         Pmacro .equals -> .equal?
469         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
470         -pmacro-builtin-equals.  All callers updated.
471         (pmacros-init!): Rename .equals to .equal?.
472         * doc/pmacros.texi: Update.
473         * testsuite/pmacros-1.test: Update.
474
475         * doc/porting.texi: Work around texi2html bug where it doesn't
476         properly escape <> inside double-quotes inside @code.
477
478         * doc/porting.texi (Doing an opcodes port): Add step to specify
479         the .opc file.
480
481 2009-08-29  Doug Evans  <dje@sebabeach.org>
482
483         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
484         rtl version 0.7.
485         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
486
487 2009-08-27  Doug Evans  <dje@sebabeach.org>
488
489         Add do-count rtl function.
490         * rtl-c.scm (s-do-count): New function.
491         (do-count): New rtl handler.
492         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
493         (-rtx-make-traverser-table): Add ITERATION.
494         * rtl.scm (rtx-make-iteration-limit-var): New function.
495         (rtx-env-make-iteration-locals): New function.
496         * rtx-funcs.scm (do-count): New rtl function.
497         * cpu/play.cpu: Add do-count-test insn.
498         * doc/rtl.texi: Add docs on do-count.
499
500 2009-08-26  Doug Evans  <dje@sebabeach.org>
501
502         * read.scm (parse-error): Change error message output format
503         to match context-owner-error.
504         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
505         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
506         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
507         (operand): Call estate-error instead of context-error.
508         (local, delay): Ditto.
509         (ref, attr): Call estate-error instead of error.
510         * rtl-traverse.scm (tstate-error): New function.
511         (-rtx-traverse-error): Call tstate-error instead of context-error.
512         (-rtx-traverse-operands, -rtx-traverse): Ditto.
513         (estate-error): New function.
514         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
515         instead of error.
516         (e-if): Call estate-error instead of error.
517         * rtx-funcs.scm (error): Call estate-error instead of context-error.
518         (member): Ditto.
519         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
520         Rewrite to call context-owner-error.
521         (context-owner-error): New function.
522
523         * ifield.scm (<ifield> constructor): New arg `location',
524         all callers updated.
525         * insn.scm (<insn> constructor): Ditto.
526         (<multi-insn> constructor): Ditto.
527         * minsn.scm (<macro-insn> constructor): Ditto.
528         * operand.scm (<operand> constructor): Ditto.
529         * utils-cgen.scm (builtin-location): New function.
530         (<source-ident>): Fix default value of member `location'.
531         (source-ident?): New function.
532
533         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
534         (estate-push-env, estate-with-modifiers): Ditto.
535         (estate-deepen): New function.
536
537 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
538
539         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
540         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
541         routines.
542
543 2009-08-25  Doug Evans  <dje@sebabeach.org>
544
545         * doc/pmacros.texi (pmacro default argument values): Add text.
546
547 2009-08-23  Doug Evans  <dje@sebabeach.org>
548
549         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
550         Rename member prefix -> name-prefix.
551         (<keyword> getters): Update.
552         (-keyword-parse): Update.  Default enum-prefix to NAME-.
553         (-keyword-read): Update.  Don't compute default value for
554         enum-prefix here.
555         (define-keyword): Update.
556         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
557         * read.scm (cgen-rtl-version): New function.
558         (-supported-rtl-versions): Add (0 8).
559         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
560         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
561         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
562         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
563         Update, print-name -> enum-prefix, make uppercase.
564         Remove unnecessary name-prefix spec.
565         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
566         * cpu/ip2k.cpu (register-names): Ditto.
567         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
568         * cpu/sparc.cpu (gr-names): Ditto.
569         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
570         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
571         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
572         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
573         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
574         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
575         prefix -> name-prefix.
576         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
577         Update, print-name -> enum-prefix, make uppercase.
578         (drc-names, xf-names): Ditto.
579         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
580         * doc/rtl.texi (Keywords): New section.
581         (hardware indices): Update text.
582         (rtl versions): Add 0.8.
583
584         Add define-rtl-version.
585         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
586         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
587         (cgen-lang-fixlevel): Delete.
588         (-supported-rtl-versions): New variable.
589         (-cmd-define-rtl-version): New function.
590         (init-reader!): New command define-rtl-version.
591         (-cgen): Add rtl version to --version output.
592         * doc/rtl.texi: Document rtl version support.
593         * cpu/play.cpu: Add define-rtl-version.
594
595 2009-08-22  Doug Evans  <dje@sebabeach.org>
596
597         * Makefile.am (OPTIONS): Define.
598         (desc): Just generate <arch>-desc.[ch] files.
599         * Makefile.in: Regenerate.
600         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
601         no .opc file.
602         (cgen-desc.c): Similarly.
603         * gen-all-desc: New file.
604         * opcodes.scm (opc-file-provided?): New function.
605
606         * mach.scm (current-*-add!): Update calls to parse-error.
607         * operand.scm (op:new-mode): Update call to parse-error.
608         * utils-cgen.scm (make-obj-context): New function.
609
610         * NEWS: Copy over entries from 1.1 branch.
611
612 2009-08-20  Doug Evans  <dje@sebabeach.org>
613
614         * gas-test.scm (<keyword> test-data): Catch invalid requests,
615         flag a warning and compensate.
616         (<hw-address test-data): Tweak for readability.
617         (<hw-iaddress test-data): Ditto.
618         (cgen-build.sh): Convert symbols to strings before passing to
619         string-append.
620         (cgen-allinsn.exp): Ditto.
621
622         * doc/pmacros.texi (.splice): Add more text.
623
624 2009-08-19  Doug Evans  <dje@sebabeach.org>
625
626         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
627         distinguish from 1.1.
628         * configure: Regenerate.
629         * read.scm (-CGEN-VERSION): Update.
630         * doc/version.texi: Update.
631
632         New builtin .pmacro?.
633         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
634         (pmacros-init!): Add .pmacro?.
635         * doc/pmacros.text: Document .pmacro?.
636         * testsuite/pmacros-1.test: Test .pmacro?.
637
638         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
639         of a pmacro begins before its arguments are evaluated, improves
640         readability.
641
642         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
643         * testsuite/pmacros-1.test: Ditto.  Add better tests.
644
645         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
646         in assembler syntax.
647         (Operands): Similarly.
648
649 2009-08-18  Doug Evans  <dje@sebabeach.org>
650
651         * ifield.scm (ifld-encode-mode): Add FIXME.
652         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
653         modes.
654         (<ifield> gen-extract): Similarly.
655
656         * read.scm (parse-error): Handle #f for context-location.
657         * utils-cgen.scm (unspecified-location): Fix building of
658         single-location.
659
660         * doc/rtl.texi: Document how to write hex and boolean values.
661
662         * gas-test.scm (<hw-asm> test-data): Handle () values.
663         (<keyword> test-data): Convert symbols to strings before passing
664         to string-append.
665         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
666         result for scalars.
667
668         * operand.scm (hw-index-scalar): Set `name'.
669         (hw-index-anyof, hw-index-derived): Ditto.
670
671 2009-08-17  Doug Evans  <dje@sebabeach.org>
672
673         * pmacros.scm (-pmacro-builtin-internal-test): New function.
674         (pmacros-init!): Add .internal-test.
675         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
676         * testsuite/testsuite.cpu (internal-verify): New pmacro.
677         * doc/pmacros.text: Document .internal-test.
678
679         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
680         (parse-comment): Allow numbers.
681         * doc/porting.texi: Document that names and comments may be lists.
682
683         * insn.scm (-insn-parse): Fix typo.
684
685         Rename .eval -> .exec.  Add new .eval.
686         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
687         (-pmacro-builtin-eval): New function.
688         (pmacros-init!): Add .exec.
689         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
690         * testsuite/location-1.test: Update.
691         * testsuite/pmacros-1.test: Add test for .eval.
692
693 2009-08-16  Doug Evans  <dje@sebabeach.org>
694
695         * doc/porting.texi: Remove support for Guile 1.4.
696
697         * read.scm (current-reader-location): Return unspecified location
698         if reader hasn't been initialized yet.
699
700 2009-08-13  Doug Evans  <dje@sebabeach.org>
701
702         * dev.scm: Document tracing options.
703
704         * pmacros.scm (pmacro-dump): New function.
705         (check-pmacro): Tweak debugging output.
706         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
707         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
708
709         Add .let* pmacro builtin.
710         * pmacros.scm (-pmacro-builtin-let*): New function.
711         (pmacros-init!): Add .let*.
712         * doc/pmacros.texi: Document .let*.
713         * testsuite/pmacros-1.test: Test .let*.
714
715 2009-08-12  Doug Evans  <dje@sebabeach.org>
716
717         Clean up cpu file parsing, pass context consistently instead of the
718         old "errtxt" argument.
719         NOTE: ACU == "All Callers Updated".
720         * attr.scm (-parse-simple-attribute): Renamed from
721         parse-simple-attribute, ACU.
722         (-attr-parse): Change errtxt argument to context, ACU.
723         (-attr-read): Ditto.
724         (atlist-parse): Ditto.  Put context arg first.
725         (attr-parse): Use parse-error instead of context-error.
726         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
727         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
728         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
729         `context' arg is now a <context> object.  ACU.
730         (-keyword-read): `context' arg is now a <context> object.  ACU.
731         (-hw-parse-indices): Change errtxt argument to context, ACU.
732         (-hw-parse-values, -hw-parse-handlers): Ditto.
733         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
734         (-hw-validate-layout, -hw-create-getter-from-layout,
735         -hw-create-setter-from-layout): Ditto.
736         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
737         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
738         (<hw-address>:parse!): Ditto.
739         * ifield.scm (-ifield-parse, ifield-read): Ditto.
740         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
741         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
742         (-multi-ifield-parse, -multi-ifield-read): Ditto.
743         * insn.scm (-insn-parse, -insn-read): Ditto.
744         (parse-syntax): Ditto.  Put context arg first.
745         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
746         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
747         (-parse-insn-format): Ditto.
748         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
749         (-arch-parse-isas): Ditto.
750         (-isa-read): Add context arg, ACU.
751         (-cpu-parse, -cpu-read, -mach-read): Ditto.
752         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
753         context, ACU.
754         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
755         (minsn-make-alias): Ditto.
756         * mode.scm (-mode-parse): Ditto.
757         (parse-mode-name): Ditto.  Put context arg first.
758         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
759         errtxt argument to context, ACU.
760         (-unit-parse, -model-parse, -model-read): Ditto.
761         * operand.scm (-operand-parse-getter): Use parse-error instead of
762         context-error.
763         (-operand-parse-setter): Ditto.
764         (-operand-parse): Change errtxt argument to context, ACU.
765         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
766         (-anyof-operand-parse, -anyof-operand-read): Ditto.
767         * read.scm (reader-error): Delete.  Use parse-error instead.
768         (parse-error): Change errtxt argument to context, ACU.  Split args
769         argument into expr and maybe-help-text.
770         (-reader-process-expanded-1!): Reorganize.
771         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
772         * types.scm (parse-type): Ditto.
773         * utils-cgen.scm (single-location->simple-string): New function.
774         (<context>): Replace members file,lineno with location.
775         (make-prefix-context): Renamed from context-make-prefix, ACU.
776         (make-current-context): New function.
777         (context-append, context-append-name): New functions.
778         (context-make-reader): Delete.
779         (parse-name): Change errtxt argument to context, ACU.
780         Put context arg first.
781         (parse-comment): Ditto.
782         (parse-number): Change errtxt argument to context, ACU.
783         (arg-list-validate-name, arg-list-check-no-args,
784         arg-list-symbol-arg): Ditto.
785
786         * read.scm (-cmd-if): Don't assume test is a list.
787
788         * html.scm (get-insn-properties): Delete errtxt, unused.
789
790 2009-08-11  Doug Evans  <dje@sebabeach.org>
791
792         * doc/rtl.texi (hardware types): Add pc.
793
794 2009-08-07  Doug Evans  <dje@sebabeach.org>
795
796         Add -t option for tracing things like commands, pmacro expansion.
797         * dev.scm (cload): New arg #:trace.
798         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
799         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
800         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
801         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
802         (-reader-process-expanded-1!): Trace commands if requested.
803         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
804         (-set-trace-options!): New function.
805         (-init-reader!): New function.
806         (cpu-load): New arg trace-options, all callers updated.
807         Call -init-reader! and -set-trace-options!.
808         (cgen-usage): Improve output formatting.
809         (common-arguments): New option -t.
810         (-cgen): Process -t.
811         * utils-cgen.scm (single-location->string): Renamed from
812         pretty-print-single-location.  All callers updated.
813         (location->string): Renamed from pretty-print-location.
814         All callers updated.
815         (source-properties-location->string): New function.
816         * doc/running.texi: Document -t.
817
818 2009-08-06  Doug Evans  <dje@sebabeach.org>
819
820         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
821         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
822         * utils.scm: ... here.
823
824 2009-08-05  Doug Evans  <dje@sebabeach.org>
825
826         Track source location better, for better error messages.
827         * pmacros.scm (-pmacro-eval): Delete, unused.
828         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
829         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
830         (scan-list, scan): Ditto.
831         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
832         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
833         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
834         (scan-list1): New function.
835         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
836         * read.scm (<reader>): New member `location'.
837         (-reader-lookup-command): Renamed from reader-lookup-command,
838         all callers updated.
839         (reader-error): Rewrite to produce better source location info.
840         (current-reader-location): New function.
841         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
842         All callers updated.  Record source location of expression.
843         (reader-process-expanded!): Renamed from reader-process-expanded.
844         All callers updated.
845         (-reader-process!): Renamed from reader-process.  New arg `loc'.
846         All callers updated.  Record source location of define-pmacro.
847         * utils-cgen.scm (<location>): New class.
848         (single-location): New (pseudo) class.
849         (pretty-print-single-location, pretty-print-location): New functions.
850         (location-top, location-push-single, location-push): New functions.
851         (unspecified-location, current-input-location): New functions.
852         (location-property): New object property.
853         (location-property-set!): New function.
854         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
855         All uses updated.
856         * testsuite/location-1.test: New testcase.
857         * testsuite/run-tests.sh: Fix fail count handling.
858         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
859         to expect cgen to fail.
860
861         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
862
863         * read.scm (-cmd-include): Renamed from include.  All callers updated.
864         (-cmd-if): Renamed from cmd-if.  All callers updated.
865         Use reader-process-expanded! on then/else clauses instead of eval1.
866
867 2009-07-22  Doug Evans  <dje@sebabeach.org>
868
869         * modes.scm (TI,OI): New modes.
870         * types.scm (parse-type): Improve error checking.  Don't hardwire
871         mode names here.
872         * utils.scm (non-negative-integer?): New function.
873
874         * pmacros.scm (-pmacro-builtin-find): New predicate.
875         (pmacros-init!): Add .find.
876         * doc/pmacros.tex: Document .find.
877         * testsuite/pmacros-1.test: Test .find.
878
879 2009-07-20  Doug Evans  <dje@sebabeach.org>
880
881         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
882         commented out printfs.
883         * rtl.scm (rtl-finish!): Whitespace tweaks.
884         * model.scm (parse-insn-timing): Tweak logging message.
885         * operand.scm: Comment and whitespace tweaks.
886         (op:type): Tweak error message.
887         (op-ifield): Tweak logging message.
888         (-derived-operand-parse, anyof-merge-semantics): Ditto.
889         * read.scm: Whitespace cleanup.
890         * utils.scm: Whitespace cleanup.
891
892 2009-07-19  Doug Evans  <dje@sebabeach.org>
893
894         Fix binding of nested pmacro parameters.
895         * pmacros.scm (-pmacro-env-make): New arg prev-env.
896         All callers updated.
897         (-pmacro-bulid-lambda): Ditto.
898         * doc/pmacros.texi: Update.
899         * testsuite/pmacros-1.test: Add testcase.
900
901         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
902         calculation.
903         (-multi-ifield-make-default-extract): Ditto.
904
905         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
906         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
907         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
908         Define.
909         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
910         * doc/rtl.texi: Update.
911
912         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
913
914         Rename builtin boolean pmacros, for consistency with rtl.
915         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
916         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
917         * doc/pmacros.texi: Update.
918         * testsuite/pmacros-1.test: Update.
919
920 2009-07-17  Doug Evans  <dje@sebabeach.org>
921
922         Use hash tables to record ifields, operands, insns, macro-insns.
923         * attr.scm (attr-builtin!): Tweak some comments.
924         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
925         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
926         <ident>.
927         (<multi-ifield>): New constructor.
928         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
929         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
930         <ident>.
931         (-sub-insn-make!): Add hack to avoid differences in generated code.
932         (multi-insn-instantiate!): Add total number of multi-insns to
933         logging message.
934         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
935         minsn-list to foo-table.  New member next-ordinal.
936         Update getters/setters.
937         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
938         New functions.
939         (-get-next-ordinal!, -get-lowest-ordinal): New function.
940         (-make-ident-object-table, -ident-object-table->list,
941         -ident-object-table-add!, -ident-object-table-lookup): New functions.
942         (current-ifld-list, current-ifld-add! current-ifld-lookup,
943         -ifld-already-defined?): Rewrite.
944         (current-op-list, current-op-add! current-op-lookup,
945         -op-already-defined?): Rewrite.
946         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
947         (current-insn-list, current-insn-add! current-insn-lookup,
948         -insn-already-defined?): Rewrite.
949         (current-minsn-list, current-minsn-add! current-minsn-lookup,
950         -minsn-already-defined?): Rewrite.
951         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
952         (MAX-VIRTUAL-INSNS): Define.
953         (arch-analyze-insns!): Add hack to avoid differences in generated code.
954         Update use of arch-insn-list.
955         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
956         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
957         minsn-list.
958         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
959         <ident>.  New constructor.
960         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
961         <ident>.
962         * sid.scm (-virtual-insn-add!): New function.
963         (-create-virtual-insns!): Call it.
964         (-fill-sim-insn-list!): Rewrite.
965         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
966         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
967         * utils-cgen.scm (<ordered-ident>): New class.
968         (obj-ordinal, obj-set-ordinal!): New functions.
969         (add-ident-methods!): Delete.
970
971         * model.scm (parse-insn-timing): Change logging message to level 3.
972
973 2009-07-16  Doug Evans  <dje@sebabeach.org>
974
975         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
976         add a link to define-normal-insn-enum.
977
978         * doc/porting.texi (Conventions): Add docs on writing integers.
979
980         * cpu/simplify.inc (*): One line doc strings don't need \n.
981         (df): Invoke define-full-ifield instead of claiming it's an alias.
982         (dno): Define.
983         (dnop): Mark as deprecated.
984
985         * cpu/play.cpu: Add example of hardware `layout'.
986         * doc/porting.tex: Add docs on simplify.inc.
987         * doc/rtl.texi: Cleanup pass over "Simplification macros",
988         and other things.
989
990         * ifield.scm: Whitespace/formatting cleanup.
991
992         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
993
994         * read.scm (parse-error): Don't print single entry args as a list.
995         (-reader-process-expanded-1): Convert symbol to string for
996         string-append.
997
998         * insn.scm (multi-insn-instantiate!): Tweak logging message.
999
1000 2009-07-15  Doug Evans  <dje@sebabeach.org>
1001
1002         * cpu/simplify.inc (dno): New pmacro.
1003         * doc/porting.texi: Add section on simplify.inc.
1004         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1005
1006 2009-07-15  Doug Evans  <devans@sourceware.org>
1007
1008         * gen-all-doc: Generate index.html.
1009
1010 2009-07-13  Doug Evans  <dje@sebabeach.org>
1011
1012         Extend pmacro language, add testsuite.
1013         * Makefile.am (SUBDIRS): Add testsuite.
1014         * Makefile.in: Regenerate.
1015         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1016         testsuite/test-utils.sh.
1017         * configure: Regenerate.
1018         * dev.scm (cload): Handle testsuite app.
1019         (load-testsuite): New function.
1020         * pmacros.scm: (-pmacro-debug?): New global.
1021         (-smacro-table): New global.
1022         (-smacro-lookup, -smacro-set!): New functions.
1023         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1024         (-pmacro-syntactic-form?): New function.
1025         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1026         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1027         (-pmacro-expected-non-negative-integer): New function.
1028         (-pmacro-verify-non-negative-integer): New function.
1029         (-pmacro-expand-expr-list): New function.
1030         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1031         (-pmacro-process-args): Renamed from -pmacro-invoke.
1032         (-pmacro-apply, -smacro-apply): New functions.
1033         (-pmacro-expand): Rewrite syntactic form processing.
1034         (-pmacro-build-lambda): Reformat.
1035         (define-pmacro): Watch for more errors in definition.
1036         (pmacro-debug): New function.
1037         (pmacro-trace): Set/reset -pmacro-debug?.
1038         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1039         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1040         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1041         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1042         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1043         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1044         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1045         (pmacros-init!): Initialize -smacro-table.
1046         Rewrite pmacro initialization.
1047         * read.scm (reader-process-expanded): Renamed from
1048         -reader-process-expanded.  All callers updated.
1049         Recognize () as a no-op.
1050         (cpu-load): Tweak logging messages.
1051         * utils.scm (message): Add comment.
1052         * cpu/play.cpu: Add some instructions to play with .let.
1053         * doc/cgenint.texi: Move some debugging related docs to here from
1054         cgen.texi.
1055         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1056         * testsuite/Makefile.am: New file.
1057         * testsuite/Makefile.in: New file.
1058         * testsuite/test-utils.sh.in: New file.
1059         * testsuite/run-tests.sh: New file.
1060         * testsuite/testsuite.cpu: New file.
1061         * testsuite/pmacros-1.test: New file.
1062
1063         * decode.scm: Comment and formatting tweaks.
1064         (-build-decode-table-guts): Add more data to logging message.
1065
1066 2009-07-12  Doug Evans  <dje@sebabeach.org>
1067
1068         Delete files that now live in ../cpu.
1069         * cpu/iq10.cpu: Delete.
1070         * cpu/iq2000.cpu: Delete.
1071         * cpu/iq2000.opc: Delete.
1072         * cpu/iq2000m.cpu: Delete.
1073         * cpu/m32r.cpu: Delete.
1074         * cpu/m32r.opc: Delete.
1075
1076 2009-07-09  Doug Evans  <dje@sebabeach.org>
1077
1078         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1079         All callers updated.  Work around -ve shifts by referencing the
1080         entire value.
1081
1082         * utils.scm (message): Handle pairs.
1083
1084 2009-07-08  DJ Delorie  <dj@redhat.com>
1085
1086         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1087         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1088         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1089         written to.
1090
1091 2009-07-07  Doug Evans  <dje@sebabeach.org>
1092
1093         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1094         * cpu/play.opc: New file.
1095
1096         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1097         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1098         * doc/rtl.texi (Instructions): Update.
1099
1100         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1101         (opc-arguments, -OPC): Call set-opc-file-path!.
1102         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1103         (set-opc-file-path!): New function.
1104         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1105
1106         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1107         before passing to gen-c-args.
1108
1109 2009-07-06  DJ Delorie  <dj@redhat.com>
1110
1111         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1112         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1113         unspecified accesses to control registers.
1114
1115 2009-07-01  DJ Delorie  <dj@redhat.com>
1116
1117         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1118         unspecified accesses to control registers.
1119
1120         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1121         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1122
1123 2009-06-27  Doug Evans  <dje@sebabeach.org>
1124
1125         * gen-all-intrinsics: New file.
1126
1127 2009-06-24  Doug Evans  <dje@sebabeach.org>
1128
1129         * All *.scm files: Update copyright year.
1130         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1131
1132 2009-06-23  DJ Delorie  <dj@redhat.com>
1133
1134         * intrinsics.scm: Updates to support IVC2.
1135         (belongs-to-group?): Check IVC2 slots.
1136         (-slots-attribute): New.
1137         (targets::attributes): Add SLOTS.
1138         (target:add-well-known-intrinsics): Add CPMOV.
1139         (md-insn): Add CPTYPE and CRET?.
1140         (add-md-insn): Likewise.
1141         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1142         duplicate insns with different bit patterns.
1143         (write-cgen-insn?): Add cret? support.
1144         (intrinsics.h): Add vector types.
1145         (runtime-op): Add vector support.
1146         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1147
1148         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1149         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1150         (h-cr-ivc2): Default to typeless.
1151         (h-ccr-ivc2): Fix register width.
1152         (SLOTS): Fix values and default.
1153         (ivc2_*): Add control register names.
1154         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1155
1156         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1157         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1158
1159 2009-06-22  Doug Evans  <dje@sebabeach.org>
1160
1161         * semantics.scm (insn-build-known-values): Fix typo in comment.
1162
1163 2009-06-21  Doug Evans  <dje@sebabeach.org>
1164
1165         * rtl-xform.scm (rtx-simplify-insn): New function.
1166         * html.scm (gen-insn-docs): Call it.
1167         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1168         * iformat.scm (ifmt-analyze): Minor simplification.
1169
1170         * semantics.scm (semantic-compile): Change arg sem-code-list to
1171         sem-code.
1172         (semantic-attrs): Ditto.
1173         * iformat.scm (ifmt-analyze): Update.
1174         (ifmt-compute!): Update.
1175         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1176         rtl-xform.scm.
1177         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1178         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1179         * semantics.scm (rtx-simplify): Ditto.
1180         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1181         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1182         (-simplify-expr-fn): Move to rtl-xform.scm.
1183         (-solve-expr-fn, rtx-solve): Ditto.
1184         * rtl-xform.c: New file.
1185         * read.scm: Load it.
1186
1187         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1188         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1189         (-rtx-traverse, rtx-traverse): Ditto.
1190
1191 2009-06-20  Doug Evans  <dje@sebabeach.org>
1192
1193         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1194
1195         * configure.in: Update version to 1.1.
1196         * configure: Regenerate.
1197         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1198
1199 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1200             Doug Evans  <dje@sebabeach.org>
1201
1202         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1203         (cgen-desc.c): Ditto.
1204         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1205         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1206         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1207         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1208         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1209         (cgen-cpuall.h, cgen-ops.c): Ditto.
1210         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1211         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1212         (cgen-sem-switch.c): Ditto.
1213         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1214         * sim-model.c (cgen-model.c): Ditto.
1215
1216 2009-06-18  Doug Evans  <dje@sebabeach.org>
1217
1218         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1219
1220         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1221
1222         * dev.scm (cload): Change #:arch argument to take the path to the
1223         .cpu file instead of just the name of the architecture.
1224         * read.scm (arch-path): Remove trailing '/'.
1225         (cpu-load): Set `arch-path' to directory of .cpu file.
1226         (-cgen): Don't set `arch-path' here.
1227         (include): Update.
1228         * doc/porting.texi: Update.
1229
1230 2009-06-14  Doug Evans  <dje@sebabeach.org>
1231
1232         * gen-all-doc: Use files in ../cpu where possible.
1233
1234         * Makefile.am (ARCHFILE): Fix path.
1235         * Makefile.in: Regenerate.
1236         * html.scm: Use "pre" instead of "plaintext".
1237
1238         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1239         * doc/app.texi: Cleanup pass.
1240         * doc/cgen.texi: Cleanup pass.
1241         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1242         * doc/intro.texi: Cleanup pass.
1243         * doc/mdate-sh: New file.
1244         * doc/opcodes.texi: Cleanup pass.
1245         * doc/pmacros.texi: Cleanup pass.
1246         * doc/porting.texi: Cleanup pass.
1247         * doc/rtl.texi: Cleanup pass.
1248         * doc/running.texi: Cleanup pass.  Document more runtime options.
1249         * doc/stamp-vti: Update.
1250         * doc/version.texi: Update.
1251
1252         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1253         (GUILE): Fix definition.
1254         * Makefile.in: Regenerate with automake 1.9.6.
1255         * aclocal.m4: Regenerate with aclocal 1.9.6.
1256         * configure.in (AC_PREREQ): Set to 2.59.
1257         (GENINSRC_NEVER): Define.
1258         * configure: Regenerate with autoconf 2.59.
1259         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1260         (cgen.info,cgen.dvi): Delete.
1261         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1262         (noinst_TEXINFOS): Add cgenint.texi.
1263         (DOCFILES): Add missing files.
1264         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1265         * doc/Makefile.in: Regenerate with automake 1.9.6.
1266
1267         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1268
1269         * attr.scm: Removing trailing whitespace.
1270         * cgen-intrinsics.scm: Ditto.
1271         * cgen-sim.scm: Ditto.
1272         * cos.scm: Ditto.
1273         * enum.scm: Ditto.
1274         * guile.scm: Ditto.
1275         * sim.scm: Ditto.
1276
1277 2009-05-28  DJ Delorie  <dj@redhat.com>
1278
1279         * cpu/mep.opc (parse_signed16_range): New.
1280         (parse_unsigned16_range): New.
1281         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1282
1283 2009-05-26  DJ Delorie  <dj@redhat.com>
1284
1285         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1286         accumulator names.
1287         (f-ivc2-ccrn-c3hi): New.
1288         (f-ivc2-ccrn-c3lo): New.
1289         (f-ivc2-ccrn-c3): New.
1290         (ivc2c3ccrn): Use it.
1291
1292 2009-05-22  DJ Delorie  <dj@redhat.com>
1293
1294         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1295         (mep_config_map): Regenerate.
1296
1297         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1298         ivc2-specific names.
1299         (simm8p20): New.
1300         (cmovc): move to after field definitions, use ivc2-specific
1301         register names.
1302         (cpmovi_b_P0S_P1): New.
1303         
1304 2009-05-19  DJ Delorie  <dj@redhat.com>
1305
1306         * cpu/mep.opc: Regenerate configuration.
1307         (parse_cdisp10): Only check CPU flags, not COP flags.
1308         (check_configured_mach): Likewise.
1309
1310 2009-05-13  DJ Delorie  <dj@redhat.com>
1311
1312         * intrinsics.scm (insns.md): Add RTL predicates.
1313         (intrinsics.h): Remove old C intrinsics.
1314
1315 2009-04-29  DJ Delorie  <dj@redhat.com>
1316
1317         * mep-ivc2.cpu: New.
1318         * mep-core.cpu: Regenerated.  Add support for deferred register
1319         writes.
1320         (SLOT): Add IVC2 slot types.
1321         (sim-syscall): Rename to something more appropriate.
1322         * mep-ext-cop.cpu: Regenerate.
1323         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1324         (print_slot_insn): New.
1325         (mep_examine_ivc2_insns): New.
1326         (mep_print_insn_set_ivc2_mode): New.
1327         (mep_print_insn): Support IVC2 slotting.
1328         
1329 2009-04-20  DJ Delorie  <dj@redhat.com>
1330
1331         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1332         (guess-mode): Drop COP* syntax.
1333         (need-insn): Add "--syscall--" to the list.
1334         (enum-type): Drop COP* syntax.
1335         (intrinsics.h): Likewise.
1336         (intrinsic-protos.h): Change file header to allow it to be
1337         included.
1338
1339 2009-04-17  DJ Delorie  <dj@redhat.com>
1340
1341         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1342         (lhucpm1): Limit to C5 mach.
1343         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1344         * cpu/mep-core.cpu (extend-cdisp10): New.
1345         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1346         
1347 2009-04-08  DJ Delorie  <dj@redhat.com>
1348
1349         * cpu/mep-c5.cpu: New.
1350         * cpu/mep-core.cpu: Add C5 support.
1351         * cpu/mep.opc: Likewise.
1352
1353 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1354
1355         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1356         about calling memset with a zero length.
1357
1358 2009-02-03  DJ Delorie  <dj@redhat.com>
1359
1360         * cpu/mep-core.cpu: Update to new MeP configuration.
1361         * cpu/mep-ext-cop.cpu: Likewise.
1362         * cpu/mep.opc: Likewise.
1363
1364 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1365
1366         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1367
1368 2008-06-17  Dave Brolley  <brolley@redhat.com>
1369
1370         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1371         (h-gr): Likewise.
1372
1373 2007-11-13  Dave Brolley  <brolley@redhat.com>
1374
1375         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1376
1377 2007-11-05  Dave Brolley  <brolley@redhat.com>
1378
1379         * intrinsics.scm,cgen-intrinsics.scm: New application which
1380         generates code to support intrinsic functions for insns in the
1381         mep architecture in gcc.
1382
1383 2007-09-21  Dave Brolley  <brolley@redhat.com>
1384
1385         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1386         (rn3us): CDATA attribute now LONG.
1387         
1388 2007-08-21  Dave Brolley  <brolley@redhat.com>
1389
1390         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1391         than 32 bits.
1392
1393 2007-07-05  Nick Clifton  <nickc@redhat.com>
1394
1395         * utils.scm (copyright-fsf): Update copyright notice to refer to
1396         the GPL version 3.
1397
1398 2007-05-22  Nick Clifton  <nickc@redhat.com>
1399
1400         * doc/cgen.texi: Use @copying around the copyright notice.
1401         * doc/internals.texi: Likewise.
1402
1403 2007-02-05  Dave Brolley  <brolley@redhat.com>
1404
1405         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1406
1407 2007-02-05  Dave Brolley  <brolley@redhat.com>
1408
1409         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1410         in the generated code for @arch@_cgen_init_asm if it is defined.
1411
1412         * Contribute the following changes:
1413         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1414
1415         * attr.scm (<string-attribute>): New attribute class.
1416         (attr-kind): Handle <string-attribute>.
1417         (parse-simple-attribute): New function.
1418         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1419         (<bitset-attribute> 'parse-value): Likewise.
1420         (<boolean-attribute> 'parse-value): Likewise.
1421         (<enum-attribute> 'parse-value): Likewise.
1422         (<string-attribute> 'parse-value): New function.
1423         (-attr-parse): Handle <string-attribute>.
1424         (-attr-read): Likewise.
1425         (<string-attribute> 'gen-value-for-defn-raw): New function.
1426         (<string-attribute> 'gen-value-for-defn): New function.
1427
1428 2006-11-07  Dave Brolley  <brolley@redhat.com>
1429
1430         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1431         necessary.
1432
1433 2006-10-18  Dave Brolley  <brolley@redhat.com>
1434
1435         * Contribute the following changes:
1436
1437         2006-07-11  Dave Brolley  <brolley@redhat.com>
1438
1439         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1440         (movcol): New insn.
1441         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1442         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1443         hardware or memory mode which was used.
1444         * sid-cpu.scm (hw-need-write-stack?): New function.
1445         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1446         identify hardware which uses write stacks.
1447         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1448         Initialized to an empty list.
1449         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1450         hw-need-write-stack?.
1451         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1452         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1453         (used-in-delay-rtl?): New method of <hardware-base>.
1454         (hw-used-in-delay-rtl?): New function.
1455
1456         2006-06-20  Dave Brolley  <brolley@redhat.com>
1457
1458         * sid.scm (gen-attr-type): Removed.
1459         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1460         (SH2a-MACH): Add sh5.
1461         (sh2a-nofpu-models): Add units for sh5.
1462         (sh2a-fpu-models): Likewise.
1463
1464         2006-06-15  Dave Brolley  <brolley@redhat.com>
1465
1466         * cpu/sh-sim.cpu: New file.
1467         * cpu/sh-sid.cpu: New file.
1468         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1469         (All fields): Remap for (insn-lsb0? #f)
1470         (All insns): Add timing specs.
1471         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1472         'xattrs' and .splice it in.
1473         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1474         (h-frc,h-drc): Add PROFILE attribute.
1475         (h-fpccr): Removed.
1476         (h-vbr): New hardware.
1477         (All fields): Remap for (insn-lsb0? #f)
1478         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1479         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1480         (fpscr): Use h-fpscr.
1481         (fsdm,fsdn): Use h-fsd.
1482         (dshci): Add xtiming argument and splice it in.
1483         (dr,xd): pmacros removed.
1484         (All insns): Add timing specs, *-MACH attribibutes,
1485         SH4{A}-GROUP attributes.
1486         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1487         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1488         we're being processed for sim or sid.
1489         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1490         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1491         (define-isa compact): Add (isa-parallel-insns 2).
1492         (define-isa media): Add (isa-parallel-insns 2). Add
1493         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1494         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1495         sh4a, sh4al
1496         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1497         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1498         (SH4al-MACH, SH5-MACH): New pmacros.
1499         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1500         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1501         (sh5-media-fp-units, common-model, common-model-with-fp) 
1502         (sh3-model, sh3e-model): New pmacros.
1503         (define-model sh2): New model.
1504         (define-model sh2e): New model.
1505         (define-model sh3): New model.
1506         (define-model sh3e): New model.
1507         (define-model sh2a-nofpu): New model.
1508         (define-model sh2a-fpu): New model.
1509         (define-model sh4-nofpu): New model.
1510         (define-model sh4): New model.
1511         (define-model sh4a-nofpu): New model.
1512         (define-model sh4a): New model.
1513         (define-model sh4al): New model.
1514         (define-model sh5-media): New model.
1515         (define-model sh5): Add all units.
1516         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1517         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1518         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1519         (h-pc): Add PROFILE attribute.
1520         (h-fr): Likewise.
1521         (h-tr): Likewise.
1522         (h-gr,h-grc): Likewise.
1523         (h-cr): Set h-sr in setter.
1524         (h-frbit): Get/Set h-fpscr.
1525         (h-szbit,h-prbit): Likewise.
1526         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1527         Add getter and setter.
1528         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1529         Adjust getter and setter.
1530         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1531         Adjust getter and setter.
1532         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1533         (h-fsd,h-fmov): New hardware.
1534
1535 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1536
1537         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1538         doc/notes.texi, doc/porting.texi, doc/running.texi,
1539         doc/sim.texi: Fix some typos.
1540
1541 2006-07-14  Dave Brolley  <brolley@redhat.com>
1542
1543         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1544         hardware or memory mode which was used.
1545         * sid-cpu.scm (hw-need-write-stack?): New function.
1546         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1547         identify hardware which uses write stacks.
1548         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1549         Initialized to an empty list.
1550         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1551         hw-need-write-stack?.
1552         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1553         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1554         (used-in-delay-rtl?): New method of <hardware-base>.
1555         (hw-used-in-delay-rtl?): New function.
1556
1557 2006-06-20  Dave Brolley  <brolley@redhat.com>
1558
1559         * sid.scm (gen-attr-type): Removed.
1560
1561 2006-05-10  Dave Brolley  <brolley@redhat.com>
1562
1563         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1564         support for (if (application-is? <appname>) (...) (...)).
1565         (-cgen): Add trailing "/" to arch-path.
1566         * utils.scm (dirname): Removed. dirname is a primitive function.
1567
1568 2006-05-09  Dave Brolley  <brolley@redhat.com>
1569
1570         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1571         'entire_insn' not 'base_insn'.
1572         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1573         is null.
1574         * sim.scm (-gen-arch-model-decls): Likewise.
1575         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1576         abuf->written if profiling.
1577         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1578         object->string om the mode.
1579         (-hw-gen-write-stack-decl): Likewise.
1580         * read.scm (include): Use arch-path as file location.
1581         (arch-path): Define it with a default setting.
1582         (-cgen): Update arch-path when "-a" option is specified.
1583         * utils.scm (dirname): New function.
1584
1585 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1586
1587         * configure.in: Remove AC_ARG_PROGRAM.
1588         * configure: Regenerate with autoconf 2.59.
1589
1590 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1591
1592         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1593         SIMULATOR.
1594
1595 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1596
1597         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1598         or an error message otherwise.
1599         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1600         Fix up comments to correctly describe the functions.
1601
1602 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1603             Anil Paranjape   <anilp1@kpitcummins.com>
1604             Shilin Shakti    <shilins@kpitcummins.com>
1605
1606         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1607         CPU description.
1608         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1609
1610 2006-02-10  Nick Clifton  <nickc@redhat.com>
1611
1612         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1613
1614 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1615
1616         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1617         for concatenation.
1618         (-hw-gen-write-stack-decl): Likewise.
1619
1620 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1621
1622         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1623         non-(adata-integral-insn? CURRENT-ARCH) case.
1624
1625 2005-10-28  Dave Brolley  <brolley@redhat.com>
1626
1627         Contribute the following changes:
1628         2005-09-19  Dave Brolley  <brolley@redhat.com>
1629
1630         * attr.scm (gen-value-for-defn-raw): New methods.
1631         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1632         gen-value-for-defn-raw.
1633         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1634
1635         2002-12-13  Dave Brolley  <brolley@redhat.com>
1636
1637         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1638         (-gen-attr-accessors): New function.
1639         (gen-obj-attr-defn): Update terminating initializer.
1640         (gen-obj-attr-end-defn): New function.
1641         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1642         * sid-cpu.scm (cgen-desc.h): Generate code to include
1643         "opcode/cgen-bitset.h"
1644         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1645         name.
1646         * desc.scm ('gen-defn): Update terminating initializer.
1647         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1648         terminatinig initializer.
1649         (gen-hw-decls): Ditto.
1650         (gen-operand-decls): Ditto.
1651         (gen-insn-decls): Ditto.
1652         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1653         (gen-insn-table): Update terminating initializer.
1654         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1655         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1656         * attr.scm (charmask-bytes): New function.
1657         (bitset-attr->charmask): New function.
1658         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1659         differences for SID-SIMULATOR.
1660         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1661         (<enum-attribute>): Ditto.
1662
1663 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1664
1665         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1666
1667 2005-10-24  DJ Delorie  <dj@redhat.com>
1668
1669         * operand.scm (-anyof-merge-syntax): Print a more useful error
1670         message.
1671
1672 2005-10-19  Nick Clifton  <nickc@redhat.com>
1673
1674         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1675         patch.
1676
1677 2005-10-18  Andreas Schwab  <schwab@suse.de>
1678
1679         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1680
1681 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1682
1683         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1684         size.
1685
1686 2005-08-02  Dave Brolley  <brolley@redhat.com>
1687
1688         * rtl-c.scm (s-unop): Don't dereference
1689         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1690         (s-binop, s-convop, s-cmpop): Likewise.
1691
1692 2005-07-29  Dave Brolley  <brolley@redhat.com>
1693
1694         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1695         if with-profile or with-parallel-write.
1696         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1697         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1698         string-append.
1699
1700 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1701
1702         * cpu/fr30.opc (print_register_list): Correct format strings.
1703         * cpu/ip2k.opc: Likewise.
1704
1705 2005-07-05  Nick Clifton  <nickc@redhat.com>
1706
1707         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1708         unsigned in order to avoid compile time warnings about sign
1709         conflicts.
1710
1711 2005-07-01  Nick Clifton  <nickc@redhat.com>
1712
1713         * desc-cpu.scm: Update to ISO C90 function declaration style.
1714         * opc-asmdis.scm: Likewise.
1715         * opc-ibld.scm: Likewise.
1716         * opc-itab.scm: Likewise.
1717         * cpu/fr30.opc: Likewise.
1718         * cpu/i960.opc: Likewise.
1719         * cpu/ip2k.opc: Likewise.
1720         * cpu/iq2000.opc: Likewise.
1721         * cpu/m32r.opc: Likewise.
1722         * cpu/openrisc.opc: Likewise.
1723         * cpu/sh.opc: Likewise.
1724         * cpu/sparc.opc: Likewise.
1725         * cpu/xstormy16.opc: Likewise.
1726
1727 2005-06-15  Dave Brolley  <brolley@redhat.com>
1728
1729         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1730         (cgen-cpu.h): Call it.
1731
1732         Contributed on behalf of Graydon Hoare
1733         2001-06-05  graydon hoare  <graydon@redhat.com>
1734
1735         * utils.scm (foldl): Define.
1736         (foldr): Define.
1737         (filter): Define.
1738         (union): Define.
1739         (intersection): Simplify.
1740         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1741         (-op-gen-delayed-set-maybe-trace): Define.
1742         (<operand> 'gen-set-{quiet,trace}): Delegate to
1743         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1744         up and needs cleaning.
1745         (-with-parallel?): Hardwire with-parallel to #t.
1746         (<operand> 'cxmake-get): Replace with lookahead-aware code
1747         * sid-decode.scm: Remove per-insn writeback fns.
1748         (-gen-idesc-decls): Redefine sem_fn type.
1749         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1750         with write stack stuff.
1751         (cgen-write.cxx): Replace per-insn writebacks with single write
1752         stack writeback. Add write stack reset function.
1753         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1754         stack stuff.
1755         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1756         estate attribute set.
1757         (delay): Set #:delayed attribute to calculated delay, update
1758         maximum delay of cpu, check (delay ...) usage.
1759         * operand.scm (<operand>): Add delayed slot to <operand>.
1760         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1761         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1762         * doc/rtl.texi (Expressions): Add section on (delay ...).
1763
1764 2005-06-13  Jim Blandy  <jimb@redhat.com>
1765
1766         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1767         as well as strings.
1768
1769 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1770
1771         * doc/porting.texi: Change all mention of md_apply_fix3 and
1772         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1773         respectively.
1774
1775 2005-05-18  Dave Brolley  <brolley@redhat.com>
1776
1777         * utils-sim.scm (-gen-decode-default-entry): New function.
1778         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1779         code to check that all opcodes bits match.
1780         (-gen-decoder-switch): Use -gen-decode-default-entry.
1781
1782 2005-05-16  Jim Blandy  <jimb@redhat.com>
1783
1784         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1785         fetched by one of our GETIMEM* methods.
1786         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1787         base-insn-sized chunks.
1788
1789 2005-05-10  Nick Clifton  <nickc@redhat.com>
1790
1791         * Update the address and phone number of the FSF organization in
1792         the GPL notices in the following files:
1793         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1794         cpu/powerpc.cpu, slib/random.scm
1795
1796 2005-05-06  Jim Blandy  <jimb@redhat.com>
1797
1798         * pprint.scm, cos-pprint.scm: Add documentation.
1799
1800         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1801
1802         * pprint.scm, cos-pprint.scm: New files.
1803
1804 2005-04-04  Nick Clifton  <nickc@redhat.com>
1805
1806         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1807         avoid a compile time warning.
1808
1809 2005-03-18  Nick Clifton  <nickc@redhat.com>
1810
1811         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1812         "percent-operand" from "%operand" as the latter confuses xgettext
1813         into thinking that it is a C printf formating directive, which
1814         prevents proper translation.
1815
1816 2005-02-23  Nick Clifton  <nickc@redhat.com>
1817
1818         * opcodes.scm (gen-parse-number): Add a cast to the desired
1819         pointer signed'ness in order to prevent compile time warnings.
1820         * cpu/ip2k.opc: Fixed compile time warnings about differing
1821         signed'ness of pointers passed to functions.
1822         * cpu/iq2000.opc: Likewise.
1823         * cpu/m32r.opc: Likewise.
1824         * cpu/openrisc.opc: Likewise.
1825         * cpu/xstormy16.opc: Likewise.
1826
1827 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1828
1829         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1830         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1831
1832 2005-02-16  Dave Brolley  <brolley@redhat.com>
1833
1834         * utils.scm: Update copyright years.
1835         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1836         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1837         * operand.scm (-derived-operand-parse): Move logit message from level 1
1838         to level 2.
1839
1840 2005-02-15  Nick Clifton  <nickc@redhat.com>
1841
1842         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1843         prevent compile time warning messages.
1844         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1845         * utils-gen.scm (attr-int-gen-defn): Likewise.
1846         (attr-gen-defn): Likewise.
1847         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1848         (print_dollarhex16): Remove unused function.
1849
1850 2005-02-15  Jim Blandy  <jimb@redhat.com>
1851
1852         * guile.scm (cgen-call-with-debugging): Doc fix.
1853
1854         Make backtraces work more reliably.
1855         * guile.scm: Set up debugging parameters, and enable debugging and
1856         source positions while loading.
1857         (cgen-call-with-debugging, cgen-debugging-stack-start): New
1858         functions.
1859         * read.scm: Don't set debugging parameters here.
1860         (catch-with-backtrace): Function deleted.
1861         (-cgen): Simply note the presence or absence of the -b option.
1862         Pass the flag to cgen-call-with-debugging, so debugging is turned
1863         off here if the user didn't request it, for faster computation.
1864         (cgen): Call cgen-debugging-stack-start here, instead of
1865         catch-with-backtrace.
1866
1867         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1868         trailing -s.
1869         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1870         Don't write out the trailing -s here.
1871         * Makefile.in: Regenerated.
1872         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1873         fixup.scm here; let the caller decide which Scheme's customization
1874         file to preload.
1875         * dev.scm: Load guile.scm, not fixup.scm.
1876         * fixup.scm: Deleted; contents have all moved to guile.scm.
1877         * README: Doc fix.
1878
1879         * guile.scm (debug-write): New function.
1880
1881 2005-02-14  Jim Blandy  <jimb@redhat.com>
1882
1883         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1884         transformer procedure, not eval.  Transformer procedures take one
1885         argument.
1886
1887 2005-02-11  Nick Clifton  <nickc@redhat.com>
1888
1889         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1890         to 'bfd_vma *' in order avoid compile time warning message.
1891
1892 2005-02-09  Jim Blandy  <jimb@redhat.com>
1893
1894         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
1895         corresponding change in the sim/common directory.)
1896
1897 2005-02-07  Jim Blandy  <jimb@redhat.com>
1898
1899         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
1900         changes in the opcodes directory.)
1901
1902         * guile.scm: New file, containing Guile-specific definitions and
1903         adaptations.  This is loaded by the app-specific shell scripts.
1904         Initially identical to fixup.scm.
1905         * cgen-sid.scm: Don't load fixup.scm here.
1906
1907         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1908         latter is a macro.
1909
1910 2005-01-27  Jim Blandy  <jimb@redhat.com>
1911
1912         * utils.scm (string/symbol->append): Renamed from 'concat'.
1913         * opcodes.scm (gen-switch): Use new name.
1914         * insn.scm (-sub-insn-make!): Same.
1915         * rtl.scm (rtx-dump): Same.
1916         * semantics.scm (semantic-compile): Same.
1917
1918 2005-01-20  Jim Blandy  <jimb@redhat.com>
1919
1920         * opcodes.scm (gen-switch): Use concat instead of string-map.
1921
1922         * utils.scm (concat): New function.
1923         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1924         * rtl.scm (rtx-dump): Same.
1925         * semantics.scm (semantic-compile): Same.
1926
1927 2004-12-16  Jim Blandy  <jimb@redhat.com>
1928
1929         * utils-cgen.scm (parse-name): Don't assume that string-map can be
1930         applied to symbols.  Process everything as strings, and then
1931         convert to a symbol at the end.
1932
1933         * read.scm (debug-repl): Temporarily redirect input and output to
1934         /dev/tty while we debug, so we don't interfere with whatever CGEN
1935         is reading or writing.
1936         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1937         New functions.
1938
1939 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
1940
1941         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1942         will work with newer versions of guile.
1943
1944 2004-10-27  Nick Clifton  <nickc@redhat.com>
1945
1946         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1947         * cpu/iq2000.cpu: Likewise.
1948
1949 2004-07-21  DJ Delorie  <dj@redhat.com>
1950
1951         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1952
1953 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
1954
1955         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1956         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1957
1958 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1959
1960         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1961
1962 2004-03-22  Dave Brolley  <brolley@redhat.com>
1963
1964         * utils.scm (copyright-fsf): Update copyright years.
1965         (copyright-red-hat): Ditto.
1966         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1967         code.
1968         (-op-gen-set-trace-parallel): Ditto.
1969
1970 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
1971
1972         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1973         disassembling codes for 0x*2 addresses.
1974
1975 2004-01-29  Dave Brolley  <brolley@redhat.com>
1976
1977         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1978         zeroes in the extra bit positions and generate 'opcode-mask' with ones
1979         in the extra bit positions.
1980
1981 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1982
1983         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1984
1985 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
1986
1987         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1988         "short" being 16 bit.
1989         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
1990         internationalize error message.
1991         (parse_lo16): Likewise.  Remove useless code.
1992
1993 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1994
1995         * cpu/m32r.cpu : Add new model m32r2.
1996         Add new instructions.
1997         Replace occurrances of 'Mitsubishi' with 'Renesas'.
1998         Changed PIPE attr of push from O to OS.
1999         Care for Little-endian of M32R.
2000         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2001         Care for Little-endian of M32R.
2002         (parse_slo16): signed extension for value.
2003
2004 2003-10-26  Dave Brolley  <brolley@redhat.com>
2005
2006         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2007         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2008         (-gen-extract-fn): Call -gen-record-profile-args.
2009
2010 2003-10-21  Dave Brolley  <brolley@redhat.com>
2011
2012         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2013         a static const int.
2014         * decode.scm (-opcode-slots): Correct typo in logit call.
2015
2016 2003-10-09  Jim Blandy  <jimb@redhat.com>
2017
2018         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2019         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2020
2021         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2022
2023 2003-10-06  Dave Brolley  <brolley@redhat.com>
2024
2025         * gen-all-doc: Add fr550.
2026
2027 2003-09-11  Doug Evans  <dje@sebabeach.org>
2028
2029         * Makefile.am (ARCHFILE): New var.
2030         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2031         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2032         * Makefile.in: Regenerate.
2033
2034 2003-09-08  Dave Brolley  <brolley@redhat.com>
2035
2036         On behalf of Doug Evans <dje@sebabeach.org>
2037         Pass in paths to input files, instead of assuming they live in
2038         $srcdir/cpu.  Plus misc. option processing cleanup.
2039         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2040         Add pre-process pass to all options.
2041         * cgen-gas.scm (gas-arguments): Ditto.
2042         * cgen-sid.scm (sim-arguments): Ditto.
2043         * cgen-sim.scm (sim-arguments): Ditto.
2044         * cgen-stest.scm (stest-arguments): Ditto.
2045         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2046         (-opc-file-path): New global.
2047         (opc-file-path): New fn.
2048         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2049         All callers updated.
2050         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2051         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2052         Replace srcdir arg with opc-file.  All callers updated.
2053         * read.scm (-opt-spec-update): Delete.
2054         (opt-get-first-pass,opt-get-second-pass): New fns.
2055         (-cgen): Process application-specific arguments in two passes.
2056
2057 2003-08-29  Dave Brolley  <brolley@redhat.com>
2058
2059         * cpu/frv.cpu: Removed.
2060         * cpu/frv.opc: Removed.
2061
2062 2003-08-21  Nick Clifton  <nickc@redhat.com>
2063
2064         * cpu/frv.cpu (mbtoh): Replace input parameter to
2065         u-media-dual-expand and u-media-dual-btoh with output parameter.
2066         (cmbtoh): Add profiling hack.
2067
2068 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2069
2070         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2071
2072 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2073
2074         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2075         the elements for the END record of CGEN_OPINST, silencing warnings.
2076
2077 2003-07-15  Doug Evans  <dje@sebabeach.org>
2078
2079         Add guile 1.6.4 support.
2080         - empty list must be quoted
2081         - string functions have stricter type checking
2082         - eval now takes a second argument
2083         - symbol-bound? is deprecated
2084         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2085         (bitset-attr->list): Ensure arg to string-cut is a string.
2086         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2087         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2088         * cos.scm (-class-list): Must quote empty list.
2089         (-class-parent-classes,-class-compute-class-desc): Ditto.
2090         (class-make,make,object-reset!): Ditto.
2091         (method-make-make!): Call eval1 instead of eval.
2092         (method-make-forward!,method-make-virtual-forward!): Ditto.
2093         * decode.scm (subdtable-add): Use stringsym-append instead of
2094         string-append.
2095         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2096         (-build-decode-table-entry): Fetch string name of insn.
2097         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2098         (-gen-mach-table-defns): Ditto for mach.
2099         (gen-ifld-defns): Ditto for ifld.
2100         (gen-hw-table-defns): Ditto for hw.
2101         (gen-operand-table): Ditto for op.
2102         (gen-insn-table-entry): Ditto for insn.
2103         * desc.scm (gen-attr-table-defn): Ditto for attr.
2104         (<keyword>,gen-defn): Don't pass symbols to string-append.
2105         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2106         symbol-append.
2107         (enum-vals-upcase): Use symbol-upcase to build result.
2108         (-enum-parse): Use stringsym-append to build errtxt.
2109         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2110         (eval1): New function.
2111         (symbol-bound?): Provide own version if >= guile 1.6.
2112         * hardware.scm (define-keyword): Use string-append instead of
2113         symbol-append.
2114         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2115         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2116         before using.
2117         (gen-list-entry): Handle either symbol or string `name' arg.
2118         (gen-obj-doc-header): Fetch string name of `o' arg.
2119         (define-cpu-intro): Ditto for cpu.
2120         (gen-mach-intro): Ditto for mach.
2121         (gen-model-intro): Ditto for model.
2122         (gen-isa-intro): Ditto for isa.
2123         (gen-machine-doc-1): Ditto for isa.
2124         (gen-reg-doc-1): Convert mach to string first.
2125         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2126         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2127         to string first.
2128         (gen-insn-categories): Fetch string name of mach.  Convert
2129         enum-val-name to string first.
2130         (gen-insn-docs): Fetch string name of mach.
2131         * ifield.scm (ifld-ilk): Result is a string.
2132         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2133         Fetch string name of ifld.
2134         (-sfmt-search-key): Similarily for ifld and op.
2135         * insn.scm (syntax-make): Fetch string name of syntax element.
2136         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2137         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2138         * mode.scm (mode:c-type): Result is a string.
2139         (mode:enum): Fetch string name of mode.
2140         (-mode-parse): Use stringsym-append to build errtxt.
2141         * model.scm (model:enum): Fetch string name of model.
2142         (-model-parse): Use stringsym-append to build errtxt.
2143         (parse-insn-timing): Must quote empty list.
2144         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2145         (-gen-minsn-opcode-entry): Ditto.
2146         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2147         convert to string.
2148         (read-cpu.opc): Convert current-arch-name to a string before using.
2149         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2150         (<derived-operand>): Must quote empty list.
2151         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2152         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2153         of ifld.
2154         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2155         (-pmacro-sym): Must convert symbols to strings before passing to
2156         string-append.
2157         (-pmacro-str): Ditto.
2158         (pmacros-init!): Use eval1 instead of eval.
2159         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2160         (keep-isa-atlist?): Ditto.
2161         (cmd-if): Use eval1 instead of eval.
2162         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2163         (-rtl-c-get): Fetch string name of src.
2164         (s-unop): Ditto for mode.
2165         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2166         (-gen-par-temp-defns,subword): Ditto.
2167         (join): Use stringsym-append instead of string-append.
2168         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2169         (rtx-traverse-debug): Fetch string name of rtx-obj.
2170         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2171         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2172         (rtx-pretty-name): Result is a string.
2173         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2174         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2175         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2176         before using.
2177         (-gen-sfrag-case): Fetch string name of user.
2178         * sid-model.scm (unit:enum): Fetch string name of unit.
2179         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2180         (<hw-memory>,gen-set-quiet): Ditto.
2181         (gen-mode-defs): Ditto.
2182         (sim-finish!): Convert current-arch-name to a string before using.
2183         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2184         (-gen-no-scache-semantic-fn): Ditto.
2185         (cgen-defs.h): Fetch string name of isa.
2186         (cgen-read.c): Convert current-arch-name to a string before using.
2187         (cgen-write.c): Ditto.
2188         * sim-model.scm (unit:enum): Fetch string name of unit.
2189         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2190         (-gen-model-timing-table): Fetch string name of model.
2191         (-gen-mach-model-table): Ditto.
2192         (-gen-mach-defns): Fetch string name of mach.
2193         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2194         (<hw-memory>,cxmake-get): Fetch string name of mode.
2195         (<hw-memory>,gen-set-quiet): Ditto.
2196         (gen-mode-defs): Ditto.
2197         (sim-finish!): Must quote empty list.
2198         * utils-cgen.scm (<ident>): Must quote empty list.
2199         (obj:str-name): New fn.
2200         (parse-comment): Result is a string.
2201         (parse-symbol): Result is a symbol.
2202         (parse-string): Result is a string.
2203         (keyword-list?): Convert arg to string before calling string-ref.
2204         (keyword-list->arg-list): Ditto.
2205         (gen-attr-name): Convert attr-name to string first.
2206         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2207         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2208         (gen-define-ifmt-ifields): Ditto for fld.
2209         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2210         map-over-string.
2211         (gen-file-name): Ditto.
2212         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2213         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2214         (reduce): Call eval1 instead of eval.
2215         * cpu/m32r.cpu (addi): Don't use `#.'.
2216
2217         * gen-all-sim: Fix some typos.
2218
2219 2003-07-08  Doug Evans  <dje@sebabeach.org>
2220
2221         * gen-all-doc: Ensure run from cgen src dir.
2222         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2223         * gen-all-sid: Similarily, in ./tmp-sid.
2224         * gen-all-sim: Similarily, in ./tmp-sim.
2225
2226 2003-06-20  Doug Evans  <dje@sebabeach.org>
2227
2228         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2229
2230 2003-06-19  Doug Evans  <dje@sebabeach.org>
2231
2232         * mach.scm (-ifld-already-defined?): New proc.
2233         (current-ifld-add!): Use it.
2234         (-op-already-defined?): New proc.
2235         (current-op-add!): Use it.
2236         (-insn-already-defined?): New proc.
2237         (current-insn-add!): Use it.
2238         (-minsn-already-defined?): New proc.
2239         (current-minsn-add!): Use it.
2240         (obj-isa-list): New proc.
2241         (isa-supports?): Use it.
2242
2243 2003-06-10  Doug Evans  <dje@sebabeach.org>
2244
2245         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2246         * cpu/m32r.cpu (all insns): Ditto.
2247
2248         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2249         "unspecified".
2250
2251         * gen-all-doc: Split arm and frv docs up a bit.
2252
2253         * cpu/arm.cpu: Add IDOC attribute.
2254         * cpu/frv.cpu: Ditto.
2255         * cpu/i960.cpu: Ditto.
2256         * cpu/openrisc.cpu: Ditto.
2257         * cpu/xstormy16.cpu: Ditto.
2258         * cpu/m32r.cpu: Ditto.
2259         (all insns): Explicitly specify IDOC attribute.
2260
2261         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2262         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2263         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2264         * Makefile.in: Regenerate.
2265         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2266         (-attr-read): Defer computing default value until we know the type.
2267         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2268         (<attr-list>:attr-present?): New method.
2269         (atlist-attr-present?,obj-attr-present?): New fns.
2270         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2271         (attr-builtin!): New insn attr IDOC.
2272         * cgen-doc.scm (doc-arguments): New args -I,-N.
2273         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2274         Support comment as fourth element of enum value.
2275         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2276         * html.scm (gen-html-header): New arg kind, all callers updated.
2277         (gen-table-of-contents): New arg insn-file, all callers updated.
2278         (gen-list-entry,gen-doc-header): New fn.
2279         (get-operands): Delete.
2280         (gen-iformat-table): Rewrite.
2281         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2282         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2283         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2284         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2285         (get-insns-for-category,gen-categories-insn-lists): New fns.
2286         (gen-insn-docs): Simplify each insn's semantics first.
2287         Print insn tables sorted by IDOC categories.
2288         (*insn-html-file-name*): New global.
2289         (cgen-insn.html): New fn.
2290         (cgen-all): Update.
2291         * insn.scm (<insn>): Create a setter for the `tmp' member.
2292         * semantics.scm (insn-build-known-values): Renamed from
2293         -build-known-values.  All callers updated.
2294
2295         * rtl.scm: Move traveral/evaluation support to ...
2296         * rtl-traverse.scm: New file.
2297         * read.scm: Maybe-load rtl-traverse.scm.
2298
2299         * rtl.scm (-rtx-valid-types): Add SETRTX.
2300
2301         * rtx-funcs.scm (nop,parallel): Fix mode.
2302
2303         * utils.scm (eqv-lookup-index): New fn.
2304         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2305
2306         * dev.scm (load-doc): Set APPLICATION.
2307
2308 2003-06-10  Dave Brolley  <brolley@redhat.com>
2309
2310         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2311         * sid-decode.scm: Generate #include of config.h into
2312         @prefix@-decode.cxx.
2313         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2314
2315 2003-06-07  Doug Evans  <dje@sebabeach.org>
2316
2317         * gen-all-sid: New file.
2318         * gen-all-opcodes: New file.
2319
2320 2003-06-05  Nick Clifton  <nickc@redhat.com>
2321
2322         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2323         version of the FRinti operand.
2324         (FRintjeven): Likewise for FRintj.
2325         (FRintkeven): Likewise for FRintk.
2326         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2327         media-quad-arith-sat-semantics, media-quad-arith-sat,
2328         conditional-media-quad-arith-sat, mdunpackh,
2329         media-quad-multiply-semantics, media-quad-multiply,
2330         conditional-media-quad-multiply, media-quad-complex-i,
2331         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2332         conditional-media-quad-multiply-acc, munpackh,
2333         media-quad-multiply-cross-acc-semantics, mdpackh,
2334         media-quad-multiply-cross-acc, mbtoh-semantics,
2335         media-quad-cross-multiply-cross-acc-semantics,
2336         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2337         media-quad-cross-multiply-acc-semantics, cmbtoh,
2338         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2339         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2340         cmhtob): Use new operands.
2341         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2342         (parse_even_register): New function.
2343
2344 2003-06-04  Doug Evans  <dje@sebabeach.org>
2345
2346         Better handling of 64 bit and mixed 32/64 bit architectures.
2347         * hardware.scm (hw-update-word-modes!): New fn.
2348         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2349         hw-update-word-modes!.
2350         (state-word-bitsize): Replace FIXME with requested check.
2351         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2352         * mode.scm (mode-find): Ignore INT,UINT.
2353         (-mode-word-sizes-kind): New global.
2354         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2355         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2356         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2357         of mode-list to ...
2358         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2359         unusable, correct values set later.
2360         (mode-finish!): Remove cruft.
2361         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2362         * opcodes.scm (opcodes-init!): Ditto.
2363         * rtx-funcs.scm (annul): Fix mode of pc.
2364         * cpu/ia64.cpu: Remove cruft that sets word modes.
2365         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2366
2367 2003-06-03  Nick Clifton  <nickc@redhat.com>
2368
2369         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2370         immediate value not unsigned.
2371
2372 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2373
2374         * cpu/sh.cpu: Amend comments to refer to SuperH.
2375         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2376         * cpu/sh64-media.cpu: Likewise.
2377         (Saturation): Update manual reference.
2378
2379 2003-05-15  Doug Evans  <dje@sebabeach.org>
2380
2381         * Makefile.am (srcroot): New var.
2382         (html): New rule.
2383         * Makefile.in: Regenerate.
2384         * cgen-doc.scm: New file.
2385         * html.scm: New file.
2386         * gen-all-doc: New file.
2387         * dev.scm (cload): Handle DOC application.
2388         (load-doc): New fn.
2389         * machs.scm (machs-for-cpu): New fn.
2390         * model.scm (models-for-cpu): New fn.
2391         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2392         All uses updated.
2393         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2394         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2395
2396         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2397         (-gen-decode-bits): Instead put in better fix here.
2398
2399         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2400
2401 2003-05-01  DJ Delorie  <dj@redhat.com>
2402
2403         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2404         word accesses.
2405         (set-alignfix-mem): Likewise.
2406
2407 2003-04-16  Dave Brolley  <brolley@redhat.com>
2408
2409         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2410         * utils.scm (copyright-fsf): Update generate copyright years.
2411         (copyright-cygnus): Ditto.
2412         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2413         operands.
2414         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2415         here.
2416         (<operand>'gen-profile-code): New parameter 'when'.
2417         (<iunit>'gen-profile-code): Ditto.
2418         (<insn>'gen-profile-code): Ditto.
2419         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2420         'insn_reference' for the 'after' function.
2421         * model.scm (unit:enum): Moved to sim-model.scm.
2422         * sim-model.scm (unit:enum): Moved from model.scm.
2423         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2424         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2425         * sid-model.scm (unit:enum): New version for sid.
2426         (gen-model-class-name): New function.
2427         (gen-model-unit-fn-decl): New function.
2428         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2429         (gen-model-unit-fn-name): New parameter 'when'.
2430         (-gen-model-insn-fn-name): Ditto.
2431         (-gen-model-insn-qualified-fn-name): New function.
2432         (-gen-model-insn-fn-decl): New function.
2433         (-gen-model-insn-fn-decls): New function.
2434         (-gen-model-insn-fn): New parameter 'when'. Call
2435         -gen-model-insn-qualified-fn-name.
2436         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2437         functions for modelling insn before and after execution.
2438         (-gen-model-class-decls): New function.
2439         (" (gen-model-class-name model) "): New function.
2440         (gen-model-classes): New function.
2441         (-gen-insn-timing): Generate functions for modelling insn before and after
2442         execution.
2443         (-gen-insn-unit-timing): Generate class-qualified names.
2444         (-gen-model-timing-table): Ditto.
2445         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2446         not needed (yet) by sid.
2447         (cgen-model.h): New function.
2448
2449 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2450
2451         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2452         * cpu/sh64-compact.cpu: Likewise.
2453         * cpu/sh64-media.cpu: Likewise.
2454
2455 2003-03-21  DJ Delorie  <dj@redhat.com>
2456
2457         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2458         which indicates if the sign flag is set from bit 15 or 7.
2459         Adjust all callers.
2460         (set-psw): New argument ws, propogate it.
2461         (set-psw-nowrite): Likewise.
2462         (set-mem-psw): Likewise.
2463         (set-psw-carry): Likewise.  Use temporaries to prevent
2464         prematurely overwriting needed inputs.
2465         (set-psw-rrotate17): Fix logic.
2466         (shrgrgr): Preserve carry for zero-bit shifts.
2467         (shrgrimm): Likewise.
2468         (shlgrgr): Likewise.
2469         (shlgrimm): Likewise.
2470         (asrgrgr): Likewise.
2471         (asrgrimm): Likewise.
2472         (reset): New.
2473
2474 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2475
2476         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2477
2478 2002-03-05  DJ Delorie  <dj@redhat.com>
2479
2480         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2481         prematurely overwriting needed inputs.
2482         (set-psw-sub): Likewise.
2483
2484 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2485
2486         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2487
2488 2003-02-18  DJ Delorie  <dj@redhat.com>
2489
2490         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2491         (movlmemimm): Just mask the address.
2492         (movhmemimm): Likewise.
2493         (movlmemgr): Likewise.
2494         (movhmemgr): Likewise.
2495         (set-psw): Always set the psw last.
2496         (set-psw-carry): Likewise.
2497         (set-psw-add): Likewise.
2498         (set-psw-sub): Likewise.
2499
2500         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2501         of 16 patterns from the set-psw-rotate17 function.
2502         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2503         movgriipostincgr, movgriipredecgr): Set psw correctly.
2504         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2505         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2506         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2507
2508 2003-02-11  Dave Brolley  <brolley@redhat.com>
2509
2510         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2511         @arch@_cgen-ifld_table.
2512         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2513         @arch@_cgen-ifld_table.
2514
2515 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2516
2517         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2518
2519 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2520
2521         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2522         empty ISAs.
2523
2524 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2525
2526         * utils-gen.scm (attr-int-gen-defn): Define.
2527
2528 2002-12-21  Doug Evans  <dje@sebabeach.org>
2529
2530         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2531         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2532
2533         * dev.scm (cload): Update location of .cpu files.
2534
2535 2002-12-19  Doug Evans  <dje@sebabeach.org>
2536
2537         * utils-sim.scm (gen-profile-sym): New fn.
2538         (<operand>,sbuf-profile-sym): New method.
2539         (<operand>,sbuf-profile-elm): Use it.
2540         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2541         of hardcoding symbol name.
2542         (<operand>,gen-profile-code): Ditto.
2543         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2544         symbol name.
2545
2546         * mode.scm (mode-sem-mode): New fn.
2547         * operand.scm (op:new-mode): Update. mode-name.
2548         (op-natural-mode?) New fn.
2549         * rtl.scm (hw): Set hw-name,mode-name.
2550
2551         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2552         Instead do:
2553         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2554         as size of IDESC-TABLE-VAR.
2555         (@prefix@_init_idesc_table): Ditto.
2556         * sim-model.scm (-gen-mach-defns): Ditto.
2557         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2558
2559         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2560
2561         * insn.scm (-parse-insn-format-symbol): Improve error message.
2562         (-parse-insn-format): Ditto.
2563
2564         * gen-all-sim: New script.
2565
2566 2002-12-16  DJ Delorie  <dj@delorie.com>
2567
2568         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2569
2570 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2571
2572         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2573         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2574         (parse_immediate16): Handle immediate16 values, which now include
2575         @hi(label) and @lo(label)
2576
2577 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2578
2579         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2580         Add braces and cast for union field.
2581         (gen-multi-ifield-nodes): Add braces and cast for union field.
2582         (cgen_operand_table): Similarly fix sentinel.
2583         (cgen_cpu_close): Constify "insns".  Formatting.
2584         (cgen-desc.c): Include xregex.h.
2585         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2586         Prototype.
2587         <opc.c>: Include safe-ctype.h.
2588         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2589         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2590         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2591         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2592         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2593         (parse_addr16): Correct type of "value".  Formatting.
2594         (parse_addr16_p): Likewise.
2595         (parse_addr16_cjp): Likewise.
2596         (parse_lit8): Likewise.
2597         (parse_bit3): Formatting.
2598         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2599         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2600         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2601         print_decimal.
2602         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2603         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2604         (print_dollarhex8): Likewise.
2605         (print_dollarhex16): Likewise.
2606         (print_dollarhex_addr16h): Likewise.
2607         (print_dollarhex_addr16l): Likewise.
2608         (print_dollarhex_p): Likewise.
2609         (print_dollarhex_cj): Likewise.
2610         (print_decimal): Likewise.
2611         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2612
2613 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2614
2615         * doc/rtl.texi (Model variants): Mention current limitations for
2616         unit inputs and outputs.
2617         (Hardware elements) <attribute PROFILE>: Be slightly more
2618         verbose.
2619         (Instructions) <timing>: input/output overrides have a direction
2620         operand.
2621
2622 2002-11-25  DJ Delorie  <dj@redhat.com>
2623
2624         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2625
2626 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2627
2628         * cpu/iq10.cpu: New file.
2629         * cpu/iq2000.cpu: Likewise.
2630         * cpu/iq2000.opc: Likewise.
2631         * cpu/iq2000m.cpu: Likewise.
2632
2633 2002-11-19  DJ Delorie  <dj@redhat.com>
2634
2635         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2636
2637 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2638
2639         * dev.scm: Call getenv with a string, not a symbol.
2640
2641 2002-10-08  Doug Evans  <dje@transmeta.com>
2642             Hans-Peter Nilsson  <hp@axis.com>
2643
2644         * types.scm (bitrange-overlap?): Handle lsb0?.
2645
2646 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2647
2648         From Robert Cragie <rcc@jennic.com>:
2649         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2650
2651 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2652             Ben Elliston  <bje@redhat.com>
2653             John Healy  <jhealy@redhat.com>
2654             Jeff Johnston  <jjohnstn@redhat.com>
2655             Alan Lehotsky  <alehotsky@redhat.com>
2656             Ubicom Inc. <SupportDesk@ubicom.com>
2657
2658         * cpu/ip2k.cpu: New file.
2659         * cpu/ip2k.opc: Likewise.
2660
2661 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2662
2663         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2664
2665 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2666
2667         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2668         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2669         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2670         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2671         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2672         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2673         (-sthi-byte): If there is a single byte to store, store it at
2674         proper address.
2675         (sthil, sthiq): Fix big-endian behaviour.
2676         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2677         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2678         (saturate): Use Dimode to check if saturation operation is required.
2679         (usaturate): Likewise.
2680         (mpermw): Fix mask.
2681         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2682         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2683         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2684         (msadubq): Fix subword index in second operand of first subtraction.
2685
2686 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2687
2688         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2689         code.
2690
2691 2002-06-18  Dave Brolley  <brolley@redhat.com>
2692
2693         * cpu/frv.cpu: New cpu description.
2694         * cpu/frv.opc: New cpu support code.
2695
2696 2002-05-21  Dave Brolley  <brolley@redhat.com>
2697
2698         * decode.scm (-opcode-slots): Don't consider bits beyond the
2699         length of the insn.
2700
2701 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2702
2703         * cpu/powerpc.cpu: New file.
2704
2705 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2706
2707         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2708
2709 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2710
2711         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2712         results are expanded recursively.
2713
2714 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2715
2716         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2717         call scan-symbol on it, to enable recursive macro-expansion.
2718
2719 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2720
2721         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2722         for multiple-isa configurations.
2723         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2724
2725 2002-02-04  Ben Elliston  <bje@redhat.com>
2726
2727         * cpu/sh.cpu, cpu/sh.opc: New files.
2728         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2729
2730 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2731
2732         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2733         (Enumerated constants): Mention that an ifield must not specify a
2734         multi-ifield.
2735         (Instruction operands): Ditto for index.
2736         (Expressions) <parallel>: Remove misplaced mention of local
2737         variables.
2738         <if>: Mention that mode must be specified and non-VOID when the
2739         result is used.
2740
2741 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2742
2743         * doc/porting.texi: When referring to *.opc, mention they are in
2744         the cpu subdir.  Call top-level directory toplevel, not devo.
2745         Close string in define-normal-insn example.
2746
2747         * doc/pmacros.texi: Fix .substr typo to .substring.
2748         Mention that .sym expansions are not further expanded.
2749
2750 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2751
2752         * desc-cpu.scm (ifld-number-cache): Add.
2753         (ifld-number): Add.
2754         (gen-maybe-multi-ifld-of-op): Add.
2755         (gen-maybe-multi-ifld): Add.
2756         (gen-multi-ifield-nodes): Add.
2757         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2758
2759 2002-01-10  matthew green  <mrg@redhat.com>
2760
2761         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2762         (gr-Rb-names): ... to this.
2763         (h-Rb): New hardware piece.
2764         (h-Rbj): Use gr-Rb-names.
2765         (Rb): Use h-Rb.
2766         (holdx): New instruction.
2767
2768 2002-01-07  Ben Elliston  <bje@redhat.com>
2769
2770         * utils.scm (package-cygnus-simulators): Rename from this ..
2771         (package-red-hat-simulators): .. to this.
2772         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2773         * sid-cpu.scm (cgen-desc.h): Likewise.
2774         (cgen-cpu.h): Likewise.
2775         (cgen-defs.h): Likewise.
2776         (cgen-write.cxx): Likewise.
2777         (cgen-semantics.cxx): Likewise.
2778         (cgen-sem-switch.cxx): Likewise.
2779         * sid-decode.scm (cgen-decode.h): Likewise.
2780         (cgen-decode.cxx): Likewise.
2781         * sid-model.scm (cgen-model.cxx): Likewise.
2782         * sid.scm (option-set!): Likewise.
2783         * sim.scm (option-set!): Likewise.
2784
2785 2002-01-07  Ben Elliston  <bje@redhat.com>
2786
2787         * utils.scm (copyright-fsf): Add 2002.
2788         (copyright-cygnus): Rename to copyright-red-hat.
2789         (copyright-red-hat): Add 2002.
2790         (CURRENT-COPYRIGHT): Update comment.
2791         * opcodes.scm (option-set!): Update callers.
2792         * sid-model.scm (cgen-model.cxx): Likewise.
2793         * sid-cpu.scm: Likewise.
2794         * sid-decode.scm: Likewise.
2795         * sid.scm (option-set!): Handle "redhat" as an option for
2796         "copyright"; use copyright-red-hat.
2797         * sim.scm (option-set!): Likewise.
2798
2799 2002-01-03  Dave Brolley  <brolley@redhat.com>
2800
2801         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2802         number of insns in the list.  Update the population count function to
2803         identify and prioritize 3 catgories of useful bits.
2804         (-population-top-few): Don't consider bits with a population count of
2805         zero.
2806         (-build-decode-table-entry): Don't call
2807         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2808         identical insns at the next tree level.
2809         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2810         this function is no longer used.
2811         (filter-non-specialized-ambiguous-insns): New function.
2812         (filter-identical-ambiguous-insns): New function.
2813         (find-identical-insn): New function.
2814         (filter-harmlessly-ambiguous-insns): Removed.
2815
2816 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2817             matthew green  <mrg@redhat.com>
2818             Frank Ch. Eigler  <fche@redhat.com>
2819             Nick Clifton  <nickc@cambridge.redhat.com>
2820
2821         * cpu/xstormy16.cpu: New file.
2822         * cpu/xstormy16.opc: New file.
2823
2824 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2825
2826         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2827
2828 2001-11-14  Dave Brolley  <brolley@redhat.com>
2829
2830         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2831         of the field being extracted.
2832
2833 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2834
2835         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2836         (cos ...) and (sin ..) rtx.
2837
2838 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2839
2840         * desc-cpu.scm: Do not include ctype.h in generated desc
2841         files.  They will inherit safe-ctype.h instead.
2842
2843 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2844
2845         * desc-cpu.scm: Add missing function prototypes (for generated
2846         C files).  Fix compile time warning messages about unused
2847         parameters (for generated C files).
2848         * opc-asmdis.scm: The same.
2849         * opc-ibld.c: The same.
2850         * opc-itab.scm: The same.
2851         * cpu/fr30.opc: The same.
2852         * cpu/m32r.opc: The same.
2853         * cpu/openrisc.opc: The same.
2854
2855 2001-09-17  graydon hoare  <graydon@redhat.com>
2856
2857         * insn.scm (syntax-break-out): Correct logic in handling escaped
2858         syntax characters.
2859
2860 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
2861
2862         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2863         call @arch@_cgen_build_insn_regex now that regex support is in
2864         libiberty.
2865
2866 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
2867
2868         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2869         (mask-superset?): Look for strict supersets to allow rejection of
2870         duplicate insns.
2871
2872 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2873
2874         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2875         (cgen-desc.h): Call it.
2876         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2877         decode-size.
2878         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2879         entire_insn for extraction, if it's shorter than base-insn-bitsize.
2880
2881 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2882
2883         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2884         mach->cpu insn-chunk-bitsize.
2885         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2886         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2887         * mach.scm (<cpu>): New field insn-chunk-bitsize.
2888         (-cpu-parse, -cpu-read): Parse/initialize it.
2889         * doc/rtl.texi (define-cpu): Document it.
2890
2891 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
2892
2893         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2894
2895 2001-07-06  Ben Elliston  <bje@redhat.com>
2896
2897         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2898
2899 2001-07-05  Ben Elliston  <bje@redhat.com>
2900
2901         * README: Update.
2902
2903         * read.scm (include): Include files from srcdir/cpu.
2904         (-cgen): Likewise for loading .cpu files.
2905         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2906         * *.cpu: Move all cpu descriptions into cpu subdirectory.
2907         * *.opc: Likewise.
2908         * simplify.inc: Likewise.
2909
2910 2001-07-04  Ben Elliston  <bje@redhat.com>
2911
2912         * read.scm (include): Log "Including file" message at level 1,
2913         rather than outputting it with (display).
2914         (cpu-load): Log "Loading cpu description" and "Processing cpu
2915         description" messages at levels 1 and 2, respectively, rather than
2916         using (display).
2917
2918 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
2919
2920         * desc.scm (<keyword> 'gen-defn): Add extra zero into
2921         CGEN_KEYWORD_ENTRY initializers.
2922
2923         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2924         (<operand> 'test-data): Involve both the index and the hardware
2925         in testcase generation.
2926         (<hw-indx> 'test-data): Generate test data from the underlying
2927         object.
2928         (<ifield> 'test-data): Generate test data by computing bit
2929         patterns for the field, then decoding them.
2930         (<hw-address> 'test-data): Allow for new calling convention.
2931         (<hw-iaddress> 'test-data): Likewise.
2932         (<keyword> 'test-data): Convert index values into keywords.
2933         (<hw-asm> 'test-data): Convert index values into integer strings.
2934
2935         * gas-test.scm (cgen-build.sh): Escape '.' as well.
2936
2937 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
2938
2939         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2940         is required for multi-mode hw types (memory).
2941
2942 2001-05-11  Ben Elliston  <bje@redhat.com>
2943
2944         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2945         when generating allinsn.d from objdump output. Without it, the
2946         testsuite will treat $ as the regular expression for end of line.
2947
2948 2001-05-09  Ben Elliston  <bje@redhat.com>
2949
2950         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2951         with `cgen_cpu_open'; documentation had become out of date.
2952         * doc/rtl.texi (Instruction operands): Likewise.
2953
2954 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
2955
2956         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2957         various-base-length instruction sets.
2958
2959 2001-04-02  Ben Elliston  <bje@redhat.com>
2960
2961         * sid-cpu.scm (-last-insn): New function.
2962         (-gen-sem-switch-engine): Loop through idesc while less than or
2963         equal to the last instruction enum, not less than the MAX enum.
2964         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2965         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2966         table's size to be the last instruction enum plus one, not
2967         @PREFIX@_INSN_MAX.
2968         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2969         instruction onto the instruction list.
2970
2971         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2972         using the size of the table and its elements.
2973         (-gen-decode-insn-globals): Define the idesc table's size to be
2974         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2975         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2976         last instruction enum plus one, not @CPU@_INSN_MAX.
2977
2978 2001-03-28  Ben Elliston  <bje@redhat.com>
2979
2980         * doc/version.texi (UPDATED, EDITION): Update.
2981         * doc/stamp-vti: Likewise.
2982
2983 2001-03-26  Ben Elliston  <bje@redhat.com>
2984
2985         * doc/credits.texi (Credits): Update.
2986
2987         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2988         specified prefix and, if necessary, escape `$' in gas-build.sh to
2989         prevent unwanted shell variable expansion.
2990
2991 2001-03-24  Ben Elliston  <bje@redhat.com>
2992
2993         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2994         (<keyword>,test-data): Likewise.
2995         (<hw-address>,test-data): Likewise.
2996         (<hw-iaddress>,test-data): Likewise.
2997         (-collate-test-set): New function.
2998         (build-test-set): Use it.
2999         (gen-gas-test): Generate five test cases per instruction.
3000         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3001
3002         * read.scm: Load "slib/random" if random is not defined.
3003         * slib/random.scm: New file.
3004
3005         * utils.scm: Remove comments about the Hobbit compiler.
3006         (copyright-cygnus): Add 2001.
3007         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3008         (package-gnu-simulators): Tidy.
3009
3010 2001-03-23  Ben Elliston  <bje@redhat.com>
3011
3012         * cgen-gas.scm: Inline documentation improvements.
3013
3014 2001-03-21  Ben Elliston  <bje@redhat.com>
3015
3016         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3017         given in a syntax string is undefined.
3018
3019         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3020         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3021
3022 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3023
3024         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3025         for arg_type CGEN_CPU_OPEN_BFDMACH.
3026
3027 2001-03-20  Ben Elliston  <bje@redhat.com>
3028
3029         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3030         instruction onto the instruction list. Define MAX_INSNS to be the
3031         value of the last instruction enum plus one.
3032
3033 2001-03-14  Nick Clifton  <nickc@redhat.com>
3034
3035         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3036
3037 2001-03-05  Dave Brolley  <brolley@redhat.com>
3038
3039         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3040         if the number of ifields is greater than zero.
3041
3042 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3043
3044         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3045         Emit LIKELY/UNLIKELY branch probability hints.
3046         * sid-decode.cpu (-gen-record-args): Ditto.
3047
3048 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3049
3050         * desc-cpu.scm (-gen-hash-defines): Rename
3051         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3052
3053 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3054
3055         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3056         writeback tracking.
3057         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3058         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3059         if unnecessary.
3060         * sid.scm (<operand> gen-write): Use unsigned long long expression
3061         for writeback.
3062         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3063         (<unit> gen-profile-code): Ditto.
3064
3065 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3066
3067         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3068         (regno ...) rtx.
3069
3070 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3071
3072         * operand.scm (<operand> pretty-sem-name): New field.
3073         (<operand> make): Initialize it from hw-name.
3074         (op:set-pretty-sem-name!): New function.
3075         (<operand> gen-pretty-name): Default to fetching new field.
3076         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3077         sem-name setting from -rtx-hw-name.
3078
3079 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3080
3081         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3082         its subsequent gen-pretty-name.
3083
3084         * read.scm: Increase thread working stack limit and backtrace
3085         depth limits.
3086
3087 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3088
3089         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3090
3091 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3092
3093         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3094         current insn plus 4.
3095         (h-delay-insn): New hardware register.
3096         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3097         (l-jalr): Likewise.
3098         (l-bal): Likewise.
3099
3100         * openrisc.opc (parse_hi16): Sign extend value.
3101         (parse_lo16): Likewise.
3102
3103 2001-01-06  Ben Elliston  <bje@redhat.com>
3104
3105         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3106         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3107         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3108         (-gen-semantic-fn-table): Likewise.
3109         (-gen-scache-semantic-fn): Likewise.
3110         (-gen-no-scache-semantic-fn): Likewise.
3111         (cgen-read.c): Likewise.
3112         (cgen-sem-switch.c): Likewise.
3113         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3114         is a filename prefix.
3115         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3116         (-gen-decode-insn-globals): Likewise.
3117         (-gen-idesc-decls): Likewise.
3118         (cgen-decode.h): Likewise.
3119         (cgen-decode.c): Likewise.
3120         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3121         (gen-cpu-insn-enum): Likewise.
3122         (sim-finish!): Likewise.
3123
3124 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3125
3126         * openrisc.cpu: New file.
3127         * openrisc.opc: Likewise.
3128
3129 2000-12-12  Ben Elliston  <bje@redhat.com>
3130
3131         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3132
3133 2000-12-07  Ben Elliston  <bje@redhat.com>
3134
3135         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3136         "insn" when there are zero ifields to extract.
3137
3138 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3139
3140         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3141         used by simple/non-scache simulators.
3142         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3143         regardless of with-scache?.
3144         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3145
3146 2000-12-03  Ben Elliston  <bje@redhat.com>
3147
3148         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3149         (cgen-desc.c): Likewise.
3150
3151 2000-12-01  Greg McGary  <greg@mcgary.org>
3152
3153         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3154
3155 2000-12-01  Ben Elliston  <bje@redhat.com>
3156
3157         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3158         definitions if run without with-multipla-isa?.
3159         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3160         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3161
3162 2000-11-24  Ben Elliston  <bje@redhat.com>
3163
3164         * sim-cpu.scm (-gen-hardware-struct): New function.
3165         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3166         hardware elements wich have share one or more ISAs with the ISAs
3167         being kept.
3168
3169         * sim.scm (-with-multiple-isa?): New symbol.
3170         (with-multiple-isa?): New function.
3171         (option-init!): Initialise -with-multiple-isa?.
3172         (option-set!): Handle with-multiple-isa option.
3173
3174 2000-11-21  Ben Elliston  <bje@redhat.com>
3175
3176         * utils.scm (copyright-fsf): Add the year 2000.
3177
3178 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3179
3180         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3181         unneeded "\n\n" from F() macro definition.
3182
3183 2000-11-15  Greg McGary  <greg@mcgary.org>
3184
3185         * utils-cgen.scm (gen-define-with-symcat): New function.
3186         * desc-cpu.scm (gen-ifld-defns): Use it.
3187         (gen-hw-table-defns): Use it.
3188         (-gen-hash-defines): Use it.
3189         (gen-operand-table): Use it.
3190         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3191         * opc-itab.scm (-gen-ifmt-table): Use it.
3192         (-gen-insn-opcode-table): Use it.
3193         (-gen-macro-insn-table): Use it.
3194         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3195         * sim-cpu.scm (cgen-semantics.c): Use it.
3196         (cgen-sem-switch.c): Use it.
3197
3198 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3199
3200         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3201         request to emit calls to insn extractors as functions rather than
3202         branches to inline blocks.
3203         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3204         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3205
3206         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3207         to extractor clauses.
3208
3209 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3210
3211         * decode.scm (-distinguishing-bit-population): Significantly
3212         improve popularity heuristic.  Renamed from
3213         (-mask-bit-population): Gone.
3214         (-population-above-threshold): Sort new bit numbers in order of
3215         popularity.
3216         (-population-top-few): Allow up to three more bits to be selected
3217         than requested.  Correct selection order to prefer better bits.
3218         Correct bug in fewer-than-requested case.  Keep threshold as
3219         floating-point.
3220         (decode-best-get-bits): Pass also the insn-values.
3221
3222         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3223         future optimization.
3224
3225         * utils.scm (message): Format nested lists better.
3226
3227 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3228
3229         * dev.scm: Add srcdir to %load-path.
3230
3231         * rtx-funcs.scm (subword): Mode of argument can be different
3232         than mode of result, so don't use OP0 to specify argument's mode.
3233
3234 2000-11-02  Ben Elliston  <bje@redhat.com>
3235
3236         * doc/porting.texi (Building a GAS test suite): Document my change
3237         to gas-build.sh.
3238
3239 2000-11-01  Ben Elliston  <bje@redhat.com>
3240
3241         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3242
3243 2000-10-31  Ben Elliston  <bje@redhat.com>
3244
3245         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3246         with no command line arguments if the gas build directory can be
3247         determined.
3248
3249 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3250
3251         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3252         op-ifld -> op-ifield.
3253
3254 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3255
3256         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3257
3258 2000-10-13  matthew green  <mrg@cygnus.com>
3259
3260         * utils-cgen.scm (get-ifetch): Move from here ...
3261         * sim.scm (get-ifetch): ... to here.
3262         * sid.scm (get-ifetch): Copy and port to c++.
3263
3264 2000-10-06  Dave Brolley  <brolley@redhat.com>
3265
3266         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3267         ifld-start + ifld-word-offset.
3268         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3269         the field is beyond the base number of bits.
3270         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3271         (gen-extract-ifields): Ditto.
3272         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3273         characters in the regular expression.
3274
3275 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3276
3277         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3278         preprocessor constant.
3279
3280 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3281
3282         * slib/logical.scm: New file from slib.  Provides robust bitwise
3283         logical operations for large integers.
3284         * read.scm: maybe-load it.
3285
3286 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3287
3288         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3289         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3290         single-isa predicate, but support keep-isa filtering.
3291
3292 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3293
3294         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3295         statement-expression and comma-expression contexts.
3296         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3297
3298 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3299
3300         * decode.scm (-population-top-few): Signal error gracefully if
3301         decoding is about to become ambiguous.
3302
3303 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3304
3305         * doc/rtl.texi (decode-assist): Describe this field as optional.
3306
3307 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3308
3309         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3310         with decode proc.
3311
3312 2000-09-05  Dave Brolley  <brolley@redhat.com>
3313
3314         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3315         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3316
3317 2000-08-29  Dave Brolley  <brolley@redhat.com>
3318
3319         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3320         adata-integral-insn is true for this architecture.
3321
3322 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3323
3324         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3325         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3326         * rtl-c.scm (-c-rtl-get): Improve an error message.
3327         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3328
3329 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3330
3331         * Makefile.in (DIST_COMMON): Regenerated.
3332         * ifield.scm (<derived-ifield> needed-iflds): New method.
3333         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3334         sfmts built from <derived-ifield>s.
3335         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3336         type symbol 'derived-ifield, not an unparseable string.
3337         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3338         (-sfmt-contents): Add tracing.
3339
3340         From Doug Evans <dje@transmeta.com>:
3341         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3342         C code.
3343
3344 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3345
3346         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3347         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3348         (-rtl-c-get): Rename from rtl-c-get.
3349         (rtl-c-get): New fn for getter logging.
3350
3351 2000-07-28  Ben Elliston  <bje@redhat.com>
3352
3353         * NEWS: Update.
3354
3355 2000-07-25  Ben Elliston  <bje@redhat.com>
3356
3357         * doc/credits.texi (Credits): Add Frank Eigler.
3358
3359 2000-07-24  Dave Brolley  <brolley@redhat.com>
3360
3361         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3362         fully.
3363         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3364         (<keyword>): Initialize all elements fully.
3365         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3366         fully.
3367         (-gen-mach-table-defns): Ditto.
3368         (-gen-ifld-defns): Ditto.
3369         (-gen-operand-table): Ditto.
3370         (-gen-insn-table): Ditto.
3371         (-gen-cpu-open): Nothing to do for the mach table.
3372
3373 2000-07-13  Ben Elliston  <bje@redhat.com>
3374
3375         * doc/version.texi (UPDATED): Update.
3376
3377 2000-07-05  Ben Elliston  <bje@redhat.com>
3378
3379         * configure.in (AC_PATH_PROG): Remove.
3380         * configure: Regenerate.
3381         * Makefile.am (GUILE): Locate guile dynamically.
3382         * Makefile.in: Regenerate.
3383         * doc/Makefile.in: Likewise.
3384
3385 2000-07-03  Ben Elliston  <bje@redhat.com>
3386
3387         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3388         * opc-itab.scm (cgen-opc.c): Likewise.
3389
3390 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3391
3392         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3393         guile 1.4 compatibility.
3394         (rtx-env-dump): Comment out buggy display calls.
3395
3396 2000-06-15  matthew green  <mrg@redhat.com>
3397
3398         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3399
3400 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3401
3402         * Makefile.in: Regenerated.
3403
3404         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3405         (gen-ifld-defns): Ditto.
3406         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3407         * rtl.c (rtl-finish!): Ditto.
3408         * opc-itab.scm (-gen-ifield-decls): Ditto.
3409         * opcodes.scm (gen-switch): Exclude derived operands.
3410         * operand.scm (op-iflds-used): Expand derived operands.
3411         (hw-index-derived): New dummy function to create dummy object.
3412         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3413         constructor.  Set object's hw-name and index fields.
3414         (-anyof-merge-subchoices): Set instance object's index also.
3415         (-anyof-name): New helper function.
3416         (anyof-merge-semantics): Correct replacement of operand names in
3417         anyof instance.
3418         (op-ifield): Tolerate derived-operands and their funny indices better.
3419         * ifield.scm (ifld-known-values): Expand derived ifields.
3420         (non-multi-ifields, non-derived-ifields): New utility functions.
3421         (ifld-decode-mode): Tolerate objects with unbound decode field.
3422         * iformat.scm (compute-insn-length): Expand derived ifields.
3423         (compute-insn-base-mask): Ditto.
3424         * insn.scm (insn-base-ifields): Remove.
3425         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3426         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3427         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3428         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3429         (-frag-test-data): Ditto.
3430         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3431         (-gen-sem-switch-engine); Ditto.
3432         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3433         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3434         (-gen-record-args): Tolerate unbound op-ifield.
3435         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3436         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3437         Exclude multi-insns.
3438         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3439         * utils-sim.scm (op-extract?): Handle derived operands.
3440
3441         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3442         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3443         * hardware.scm (hardware-for-mode): New function.
3444
3445         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3446         cleaning up decode tables.
3447         (mask-superset?): Little helper function for above.
3448         * decode.scm (-build-decode-table-entry): Call it.
3449         (-opcode-slots): Add some more tracing.
3450         * arm.cpu: Disable decode-splits construct due to implementation
3451         conflict with `filter-harmlessly-ambiguous-insns'
3452
3453         * decode.scm (-population-top-few): New function for better decode
3454         bit generation.  Includes minor helper functions.
3455         (decode-get-best-bits): Call it instead.
3456         (OLDdecode-get-best-bits): Renamed previous version of above.
3457
3458
3459 2000-06-13  Ben Elliston  <bje@redhat.com>
3460
3461         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3462         for the Guile library directory.
3463         * configure: Regenerate.
3464         * Makefile.in, doc/Makefile.in: Regenerate.
3465
3466         * Makefile.in, doc/Makefile.in: Regenerate.
3467         * configure.in: Remove unnecessary tests. Move to version 1.0.
3468         * acconfig.h, config.in: Remove.
3469         * configure, aclocal.m4: Regenerate.
3470         * doc/stamp-vti, doc/version.texi: Likewise.
3471         * AUTHORS: New file.
3472
3473 2000-06-07 Ben Elliston  <bje@redhat.com>
3474
3475         * fixup.scm (symbol-bound?): Reduce debugging output.
3476
3477 2000-06-02  matthew green  <mrg@redhat.com>
3478
3479         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3480         a given instruction, replacing derived fields with their subfields.
3481         (insn-value): Use `insn-base-ifields' to find all constant values.
3482         (multi-insn-instantiate!): Comment some debug messages.
3483
3484 2000-06-01  Ben Elliston  <bje@redhat.com>
3485
3486         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3487         symbol names used in a (c-call ..) rtx.
3488
3489         * sim-test.scm (build-test-set): Return (()) for an instruction
3490         with no operands, so it too is included in the generated test set.
3491
3492 2000-05-31  Ben Elliston  <bje@redhat.com>
3493
3494         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3495         (sim-test): Likewise.
3496         * Makefile.in: Regenerate.
3497
3498 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3499
3500         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3501         stack traceback, in an order that resembles gdb's `bt'.
3502
3503 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3504
3505         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3506         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3507         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3508         multi insns.
3509         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3510         virtual functions.
3511         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3512         * iformat.scm (ifmt-expanded-ifields): Gone.
3513         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3514         work.
3515         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3516         ifmt entries.
3517
3518         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3519         code.
3520
3521 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3522
3523         * sid.scm (with-any-profile?): New function clone.
3524
3525 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3526
3527         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3528
3529 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3530
3531         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3532         (-multi-ifield-read): Parse them.
3533         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3534         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3535         (multi-ifield gen-extract): Add decode hook.
3536         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3537
3538         * insn.scm (syntax-break-out): More correctly handle \-escaped
3539         syntax characters.
3540         (syntax-make-elements): Ditto.
3541         * opc-itab.scm (compute-syntax): Ditto.
3542
3543 2000-05-17  Ben Elliston  <bje@redhat.com>
3544
3545         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3546
3547 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3548
3549         * gas-test.scm (build-test-set): Return (()) for an instruction
3550         with no operands, so it too is included in the generated test set.
3551
3552 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3553
3554         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3555         IFMT_OPERANDS and SYNTAX_BYTES.
3556
3557 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3558
3559         * sim.scm (with-any-profile?): New function.
3560         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3561         to decide whether or not to include profiling counters.
3562
3563 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3564
3565         Fuller derived-operand support for opcodes.
3566         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3567         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3568         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3569         (gen-operand-table): Omit derived- and anyof- operands from table.
3570         (gen-insn-table): Omit multi-insns from table.
3571         * iformat.scm (ifmt-expanded-fields): New function to expand
3572         subfields of derived-ifields.
3573         (ifmt-compute!): Ignore remaining multi-insns.
3574         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3575         multi-insns.
3576         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3577         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3578         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3579         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3580         (gen-switch): Omit anyof-operands.
3581         * operand.scm (-anyof-syntax): New function.
3582         (-anyof-merge-syntax): Call it.
3583         * utils.scm (collect): New idiomatic function.
3584
3585 2000-05-10  Ben Elliston  <bje@redhat.com>
3586
3587         * m68k.cpu: New file (work in progress).
3588
3589 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3590
3591         * Makefile.am (all-local): New target.  Create stamp-cgen.
3592         * Makefile.in: Regenerated.
3593         * doc/Makefile.in: Regenerated.
3594
3595 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3596
3597         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3598         (-operand-parse-setter): Ditto.
3599         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3600         for CACHE-ADDR operands.
3601         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3602         trace entries.  Widen byte-wide values for printing.
3603         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3604         Widen byte-wide values for printing.  Hexify memory addresses.
3605
3606 2000-04-23  matthew green  <mrg@redhat.com>
3607
3608         * m32r.cpu: Fix a typo.
3609
3610 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3611
3612         * ia64.cpu (define-model): Change merced to Itanium.
3613         (f-qp): Change quilifying to qualifying.
3614         (movbr_ph, movbr_pvec): Delete.
3615         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3616
3617 2000-04-07  Ben Elliston  <bje@redhat.com>
3618
3619         * doc/porting.texi (Building a simulator test suite): Clarify
3620         where generated test cases are placed.
3621
3622 2000-04-07  Ben Elliston  <bje@redhat.com>
3623
3624         * Makefile.am (gas-test): Remove dependency on `cgen'.
3625         (sim-test): Ditto.
3626         * Makefile.in: Regenerate.
3627
3628 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3629
3630         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3631         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3632         type reconfiguration.
3633         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3634         with-profile?.
3635
3636 2000-03-30  Ben Elliston  <bje@redhat.com>
3637
3638         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3639
3640 2000-03-24  Ben Elliston  <bje@redhat.com>
3641
3642         * Makefile.am (stamp-cgen): Reinstate target.
3643         * Makefile.in: Regenerate.
3644
3645 2000-03-22  Ben Elliston  <bje@redhat.com>
3646
3647         * slib/ppfile.scm: Remove; unused.
3648         * slib/defmacex.scm: Likewise.
3649
3650 2000-03-21  Ben Elliston  <bje@redhat.com>
3651
3652         * doc/internals.texi (Source file overview): Document.
3653
3654         * Makefile.am (GUILEDIR): Remove.
3655         (CGEN): Ditto. Callers use $(GUILE) instead.
3656         (GUILEFLAGS): Ditto.
3657         (CGENFILES): Ditto.
3658         (APPDESCFILES): Ditto.
3659         (OPCODESFILES): Ditto.
3660         (SIMFILES): Ditto.
3661         (pkgdata_SCRIPTS): Ditto.
3662         (stamp-cgen): Remove target.
3663         * Makefile.in: Regenerate.
3664
3665         * configure.in: Remove header and library tests.
3666         * configure: Regenerate.
3667         * config.in: Likewise.
3668
3669 2000-03-20  Ben Elliston  <bje@redhat.com>
3670
3671         * read.scm: Cease loading "hob-sup.scm".
3672         * utils.scm: Inherit the fastcall family of procedures (for now).
3673         * hob-sup.scm: Remove.
3674
3675 2000-03-20  Ben Elliston  <bje@redhat.com>
3676
3677         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3678         * configure: Regenerate.
3679         * gdbinit.in: Remove.
3680
3681 2000-03-17  Ben Elliston  <bje@redhat.com>
3682
3683         * Makefile.am (CGEN): Use guile, not cgen.
3684         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3685         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3686         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3687         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3688         (HOB_OBJS): Likewise.
3689         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3690         (CGENOBJS): Likewise.
3691         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3692         (hobbit, hobbit.o, hobbit.c): Remove targets.
3693         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3694         (CLEANFILES): Update.
3695         * acconfig.h (WITH_HOBBIT): Remove.
3696         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3697         option --with-cgen-hobbit.
3698         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3699         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3700         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3701         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3702         * Makefile.in: Regenerate.
3703         * config.in: Likewise.
3704         * aclocal.m4: Likewise.
3705         * configure: Likewise.
3706         * README (Hobbit support): Remove.
3707         * doc/internals.texi (Conventions): Do not mention Hobbit.
3708         * doc/porting.texi (Supported Guile versions): Likewise.
3709
3710 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3711
3712         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3713         callback convention to new sid sidutil::basic_cpu code.
3714         (-gen-sfrag-engine-fn): Ditto.
3715         * sid.scm (-create-virtual-insns!): Ditto.
3716         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3717         mode.
3718         (cxmake-skip): Implement properly for pbb mode.
3719
3720 2000-03-03  Ben Elliston  <bje@redhat.com>
3721
3722         * doc/internals.texi: New file.
3723
3724 2000-02-29  Ben Elliston  <bje@redhat.com>
3725
3726         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3727         * doc/porting.texi: Formatting tweaks.
3728
3729 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3730
3731         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3732         field.
3733
3734 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3735
3736         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3737         mode.
3738
3739 2000-02-23  Andrew Haley  <aph@cygnus.com>
3740
3741         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3742         instruction.
3743
3744 2000-02-24  Ben Elliston  <bje@redhat.com>
3745
3746         * doc/rtl.texi (Derived operands): Add some cindex entries.
3747
3748 2000-02-23  Ben Elliston  <bje@redhat.com>
3749
3750         * ia32.cpu (dndo): Move general purpose macro from here ..
3751         * simplify.inc (dndo): .. to here.
3752
3753 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3754
3755         * arm.cpu (h-tbit): Add c-call setter function.
3756         (h-mbits): Ditto.
3757
3758 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3759
3760         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3761         (-frag-cost-compute!): Ditto.
3762         * utils.scm (copyright-cygnus): Add Y2K.
3763         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3764
3765 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3766
3767         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3768         flags field of the CGEN_CPU_TABLE structure.
3769
3770 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3771
3772         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3773         All references updated.
3774
3775 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3776
3777         * ia32.cpu: Rewrite addressing mode support.
3778
3779         * ifield.scm (<ifield>): New member `follows'.
3780         (ifld-known-values): New proc.
3781         (<ifield>): New method set-word-offset!.
3782         (ifld-set-word-offset!): New proc.
3783         (ifld-new-word-offset): New proc.
3784         (<ifield>): New method next-word.
3785         (<multi-ifield>): New method next-word.
3786         (ifld-next-word): New proc.
3787         (ifld-precedes?): New proc.
3788         (-ifield-parse): New args word-offset,word-length,follows.
3789         All callers updated.  Handle CISC-style vs RISC-style ifields.
3790         (-ifield-read): Recognize word-offset,word-length,follows specs.
3791         (-ifld-parse-follows): New proc.
3792         (-multi-ifield-make-default-insert): New proc.
3793         (-multi-ifield-make-default-extract): New proc.
3794         (-multi-ifield-parse): Provide default values for insert,extract
3795         handlers if not specified.
3796         (<derived-ifield>): New class.
3797         (derived-ifield?): New predicate.
3798         (ifld-derived-operand?): New predicate.
3799         (f-anyof): New global.
3800         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3801         (f-derived,ifld-derived?): Delete.
3802         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3803         * insn.scm (-sub-insn-ifields): New proc.
3804         (-sub-insn-make!): New proc.
3805         (multi-insn-instantiate!): Provide initial implementation.
3806         (-insn-parse): If insn contains "anyof" operands, create a
3807         <multi-insn> object instead of a plain <insn>.
3808         (-parse-insn-format-symbol): Rewrite derived operand handling.
3809         Add anyof operand handling.
3810         (-parse-insn-format-ifield-spec): Rewrite.
3811         (-parse-insn-format-operand-spec): Delete.
3812         (-parse-insn-format-list): Delete support for `(operand value)'.
3813         (anyof-operand-format?): Replaces derived-operand-format?.
3814         * operand.scm (-operand-parse-getter): Improve error messages.
3815         (-operand-parse-setter): Ditto.
3816         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3817         ifield-assertion.
3818         (<anyof-operand>): Change baseclass from <derived-operand> to
3819         <operand>.  Delete member values.  New members base-ifield,choices.
3820         (anyof-operand?): New predicate.
3821         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3822         (-derived-operand-parse): Rewrite.
3823         (-derived-operand-read): Rewrite.
3824         (-anyof-parse-choice): New proc.
3825         (-anyof-operand-parse): Rewrite.
3826         (-anyof-operand-read,define-anyof-operand): New procs.
3827         (<anyof-value>): Rewrite.
3828         (-anyof-initial-known): New proc.
3829         (anyof-satisfies-assertions?): New proc.
3830         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3831         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3832         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3833         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3834         (-anyof-value-from-derived): New proc.
3835         (-anyof-all-choices-1,anyof-all-choices): New procs.
3836         (operand-init!): Create define-anyof-operand reader command.
3837
3838         * insn (syntax-break-out): Take syntax as argument instead of insn.
3839         All callers updated.
3840         (syntax-make): Move here, from ???.
3841
3842         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3843         bitrange-foo. All uses updated.
3844         (bitrange-next-word): New proc.
3845
3846         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3847
3848         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3849         (rtx-make-const,rtx-make-enum): New procs.
3850         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3851         (rtx-mem-addr,rtx-mem-sel): New procs.
3852         (rtx-change-address): New proc.
3853         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3854         (rtx-make-set,rtx-single-set?): New procs.
3855         (rtx-combine): New proc.
3856
3857         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
3858         (rtx-traverse-with-locals): Ditto.
3859         (-rtx-traverse,-rtx-traverse-*): Ditto.
3860
3861         * rtl.scm (define-subr): New proc.
3862         (rtl-init!): Create reader command `define-subr'.
3863
3864         * cos.c (_object_mi_p): Ensure argument is an object.
3865         (indent): New function.
3866         (_object_print_elms): Add pretty-printing support.
3867         (_object_print): Ditto.
3868
3869         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3870         (*floats-s->c-fun-table*): Ditto.
3871         * hobbit.c,hobbit.h: Rebuild.
3872         * hob-sup.c (fastcall7): New proc.
3873         * hob-sup.h (fastcall7): Declare.
3874         * hob-sup.scm (fastcall7): New macro.
3875
3876         * mach.scm (<arch>): New member subr-list.
3877         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3878         (arch-finish!): Reverse recorded subr list.
3879
3880         * read.scm (debug-env): New global.
3881         (debug-var-names,debug-var,debug-repl-env): New procs.
3882         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
3883         (debug-quit): Renamed from `continue'.
3884
3885         * simplify.inc (dsmf): New pmacro.
3886
3887         * utils.scm (plus-scan): New proc.
3888         (split-bits): Rewrite.
3889         (split-value): New proc.
3890
3891 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
3892
3893         * doc/Makefile.am (DOCFILES): Add notes.texi.
3894         * doc/Makefile.in: Rebuild.
3895
3896 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
3897
3898         * ifield.scm (ifld-derived?): New proc.
3899         (f-derived): New global.
3900         (ifield-builtin!): Create ifield f-derived.
3901         (<multi-insn>): New class.
3902         (multi-insn?): New predicate.
3903         (multi-insn-instantiate!): New proc.
3904         (-insn-parse): Create <multi-insn> objects for insns with derived
3905         ifields.
3906         (-parse-insn-format-symbol): Handle derived ifields.
3907         (-parse-insn-format-ifield-spec): New proc.
3908         (-parse-insn-format-operand-spec): New proc.
3909         (-parse-insn-format-list): Simplify.
3910         (-parse-insn-format): No longer allow (ifield-object value) spec.
3911         (derived-operand-format?): New proc.
3912         (insn-alias?): New proc.
3913         (non-alias-insns): Rewrite.
3914         (insn-real?): Renamed from real-insn?, all callers updated.
3915         (virutal-insns): Rewrite.
3916         (multi-insns): New proc.
3917         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3918         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3919         Return #f if operand doesn't have an index or if index is not an
3920         ifield.
3921         (hw-index-anyof): New proc.
3922         (-operand-parse): Allow integer indices.
3923         (<derived-operand>): New class.
3924         (derived-operand?): New predicate.
3925         (<anyof-operand>): New class.
3926         (<anyof-value>): New class.
3927         (-anyof-parse-value,-anyof-operand-parse): New procs.
3928         (-derived-operand-parse,-derived-operand-read): New procs.
3929         (define-derived-operand,define-full-derived-operand): New procs.
3930         (operand-init!): New reader command define-derived-operand.
3931
3932         * utils.scm (list-take): Handle negative amount.
3933         (element?): Rewrite.
3934
3935 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
3936
3937         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3938
3939 1999-10-04  Richard Henderson  <rth@cygnus.com>
3940
3941         * ia64.cpu: Checkpoint.
3942
3943 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
3944
3945         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3946
3947         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
3948         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
3949
3950 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
3951
3952         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3953         PC returned by sim_engine_invalid_insn.
3954
3955 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
3956
3957         * ia32.cpu: New file.
3958
3959 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
3960
3961         * utils.scm (bit-set?): Fix off by one error.
3962
3963         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3964
3965         * rtl.scm (hw): Check for valid hardware element before trying to
3966         get its mode.
3967
3968         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
3969         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3970         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3971         * thumb.cpu (*): arm_compute_operand2_foo renamed to
3972         compute_operand2_foo.
3973
3974         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3975         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3976         Call delayed_branch/branch methods instead of assigning to `vpc'.
3977         (<hw-pc>,cxmake-skip): Call skip method.
3978         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3979         (<pc>,cxmake-skip): Ditto.
3980         (-create-virtual-insns!): Ditto.
3981         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3982         (op:write): Ditto.
3983         (op:record-profile): Specify #:output-language "c++".
3984         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3985         @arch@_insn_attr.
3986         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3987         Define enums here.
3988         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3989         (gen-semantic-code): Ditto.
3990         (-gen-sem-case,-gen-sfrag-code): Ditto.
3991         (-gen-hardware-types): Delete class @cpu@_cpu_base.
3992         (cgen-cpu.h): File is now #included by main cpu class, rather than
3993         subclassing.
3994         (cgen-defs.h): New proc.
3995         (-gen-scache-semantic-fn): Change result type to sem_status.
3996         New local `status'.  Call done_cti_insn/done_insn method at end.
3997         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3998         cgen-ops.h.
3999         (cgen-sem-switch.cxx): Ditto.
4000         * sid-decode.scm (-gen-idesc-decls): Update return type of
4001         @prefix@_sem_fn.
4002         (cgen-decode.h): Add using namespace @arch@.
4003         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4004
4005         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4006         (estate-output-language-c?,estate-output-language-c++?): New procs.
4007         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4008         (estate-make-for-normal-rtl-c++): New proc.
4009         (rtl-c++-parsed,rtl-c++): New proc.
4010         (s-c-call): Invoke cpu class method if c++.
4011         (join): Use s-c-raw-call.
4012
4013         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4014         (nop): Rewrite.
4015
4016         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4017         * rtl.scm (<eval-state>): New member `modifiers'.
4018         (<eval-state>,vmake!): Handle #:modifiers.
4019         (estate-with-modifiers): New proc.
4020
4021         * rtl.scm (rtx-side-effects?): New proc.
4022         (rtx-canonical-bool): Don't change expr if it has side effects.
4023         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4024         better.
4025
4026 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4027
4028         * sim.scm (gen-scache-type): Fix typo in last patch.
4029
4030 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4031
4032         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4033
4034 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4035
4036         * sid.scm (<hw-pc>,cxmake-skip): New method.
4037         (<pc>,cxmake-skip): New method.
4038
4039         * decode.scm (decode-build-table): Delete args startbit,index-list.
4040         All callers updated.
4041         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4042         All callers updated.
4043         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4044         to decode-get-best-bits.
4045         * sid-decode.scm (-gen-decode-fn): Ditto.
4046
4047         * hardware.scm (hw-bits): New proc.
4048         (-hw-parse): New arg layout.  All callers updated.
4049         (define-full-hardware): New arg layout.  All callers updated.
4050         (-hw-validate-layout): New proc.
4051         (-hw-create-[gs]etter-from-layout): New procs.
4052         (<hw-register>,parse!): Handle layout spec.
4053         * types.scm (type-bits): New proc.
4054
4055         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4056         UNARY, BINARY, TRINARY rtxs.
4057
4058         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4059         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4060         Support '- as "unused spot" indicator.
4061
4062 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4063
4064         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4065
4066 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4067
4068         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4069
4070         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4071         construction.
4072         (tstate-make): New arg `depth'.  All callers updated.
4073         (tstate-depth,tstate-set-depth!): New procs.
4074         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4075         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4076         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4077
4078 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4079
4080         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4081         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4082         * utils-sim.scm: Decoder generator support moved here.
4083         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4084         (-gen-decoder-switch): Sort entries for more fall-throughs.
4085
4086         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4087         * Makefile.in: Rebuild.
4088         * sim-test.scm (build-sim-testcase): Add logging message.
4089         * dev.scm (cload): Recognize SIM-TEST application.
4090         (load-stest): Set APPLICATION to SIM-TEST.
4091
4092         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4093
4094         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4095         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4096         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4097
4098         * insn.scm (syntax-break-out): Handle ${foo}.
4099
4100 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4101
4102         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4103         (bin_PROGRAMS): Define.
4104         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4105         (cgen-hob.c): Prepend $(srcdir)/ here.
4106         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4107         (libcpu_a_SOURCES): Delete.
4108         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4109         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4110         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4111         Add AC_CHECK_LIB(guile,main).
4112         * Makefile.in: Rebuild.
4113         * doc/Makefile.in: Rebuild.
4114         * aclocal.m4: Rebuild.
4115         * config.in: Rebuild.
4116         * configure: Rebuild.
4117
4118 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4119
4120         Rename rtx functions from name: to name, accept optional leading
4121         modifier and mode.
4122         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4123         * attr.scm (-attr-eval): Update.
4124         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4125         (<hw-register>,mode-ok?): Disallow VOID.
4126         (<hw-immediate>,mode-ok?): Disallow VOID.
4127         (<hw-address>,mode-ok?): Disallow VOID.
4128         * mode.scm (mode-name?): New proc.
4129         (VOID): Renamed from VM.
4130         (DFLT): Renamed from DM.
4131         (mode-builtin!): Update.
4132         * opcodes.scm (<ifield>,gen-insert): Update.
4133         (<ifield>,gen-extract): Update.
4134         (<multi-ifield>,gen-insert,gen-extract): Update.
4135         * operand.scm (op:mode): Update.
4136         (<pc>,make!): Update.
4137         (op:new-mode): Update.
4138         (-operand-read): Update.
4139         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4140         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4141         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4142         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4143         (rtx-make): Call -rtx-munge-mode&options.
4144         (rtx accessors): Rewrite.
4145         (rtx-pretty-name): Update.
4146         (-rtx-traverse-*): Update.
4147         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4148         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4149         (-rtx-make-traverse-table): Update.
4150         (-rtx-traverse-operands): Update.
4151         (-rtx-option?,-rtx-option-list?): New procs.
4152         (-rtx-munge-mode&options): New proc.
4153         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4154         (-rtx-traverse): Update.
4155         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4156         (rtx-compile-time-constant?): Update.
4157         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4158         (rtx-value): Update.
4159         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4160         * rtx-funcs.scm (*): Update.
4161         * rtl-c.scm (rtl-c-get): Update.
4162         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4163         (s-c-call,s-c-raw-call): Update.
4164         (s-boolifop,s-convop,s-if,s-cond): Update.
4165         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4166         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4167         (s-parallel,s-sequence): Update.
4168         (rtl-c-build-table): Update.
4169         * sem-frags.scm (-frag-hash-compute!): Update.
4170         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4171         for temporary bug compatibility with previous version.
4172         (-frag-expr-locals,-frag-expr-stmts): Update.
4173         (-frag-compute-desired-frags,-frag-pick-best): Update.
4174         * semantics.scm (-simplify-expr-fn): Update.
4175         (rtx-simplify): Update.
4176         (-rtx-ref-type): Update.  Account for modifiers.
4177         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4178         (-build-ifield-operand!): Update.
4179         (-build-known-values): Update.
4180         (semantic-compile): Update.
4181         (-gen-reg-access-defns): Update.
4182         (gen-semantic-code,-gen-sem-case): Update.
4183         (-gen-sfrag-code,-gen-sfrag-case): Update.
4184         * sim-cpu (gen-semantic-code): Update.
4185         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4186         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4187         (-hw-cxmake-get): Update.
4188         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4189         (<hw-index>,cxmake-get): Update.
4190         (<operand>,gen-type,gen-read,cxmake-get): Update.
4191         (<operand>,gen-set-quiet,gen-set-trace): Update.
4192         (<pc>,cxmake-get): Update.
4193         (sim-finish!): Update.
4194         * utils-gen.scm (-gen-ifld-extract-base): Update.
4195         (-gen-ifld-extract-beyond): Update.
4196         (gen-multi-ifld-extract): Update.
4197         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4198         * sid.scm (<hw-pc>,gen-write): Update.
4199         (-gen-decode-insn-globals): Update.
4200         (-hw-cxmake-get): Update.
4201         (<hw-register>,cxmake-get-raw): Update.
4202         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4203         (<hw-index>,cxmake-get): Update.
4204         (<operand>,gen-type,gen-read,cxmake-get): Update.
4205         (<operand>,gen-set-quiet,gen-set-trace): Update.
4206         (<pc>,cxmake-get): Update.
4207         (-create-virtual-insns!): Update.
4208         (-decode-split-build-assertion): Update.
4209         * *.cpu: Update.
4210         * simplify.inc: Update.
4211
4212 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4213
4214         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4215         Prefix queue function name with sim_ instead of @cpu@_.
4216
4217         * sim.scm (-with-parallel-only?): New global.
4218         (option-init!): Initialize it.
4219         (option-set!): Set it.
4220         (with-parallel-only?): New proc.
4221         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4222         and writeback markers if with-parallel-only.
4223         (-gen-idesc-init-fn): Update.
4224         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4225         with-generic-write.
4226
4227 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4228
4229         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4230         with the invalid insn handler.
4231
4232         * utils.scm (list-maybe-ref): New proc.
4233
4234         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4235         define-arch.
4236         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4237
4238         * i960.cpu (test*-*): Delete `expr' arg.
4239         (test-op,branch-op): Update.
4240
4241 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4242
4243         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4244         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4245         updated.
4246         (gen-reg-access-defn): Ditto.
4247         (-gen-hw-addr): Rewrite.
4248         (-op-gen-queued-write): Rewrite.
4249         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4250         (-gen-scache-semantic-fn): Handle with-generic-write.
4251         (-gen-no-scache-semantic-fn): Ditto.
4252
4253 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4254
4255         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4256
4257         * sim.scm (-with-generic-write?): New global.
4258         (option-init!): Initialize it.
4259         (option-set!): Set it.
4260         (with-generic-write?): New proc.
4261         (-gen-hw-addr): New proc.
4262         (-op-gen-queued-write): New proc.
4263         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4264
4265         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4266         turned off.
4267         (-gen-sem-switch): Preserve existing with-parallel? value.
4268         (-gen-sem-parallel-switch): Ditto.
4269         (-gen-write-case): Add /indent support.
4270         (cgen-write.c): Rewrite.
4271
4272         * utils.scm (-current-print-state): New global.
4273         (make-print-state): New proc.
4274         (pstate-indent,pstate-set-indent!): New procs.
4275         (pstate-cmd?,pstate-cmd-do): New procs.
4276         (/indent): New global.
4277         (/indent-set,/indent-add): New procs.
4278         (string-write): Set -current-print-state.
4279         (-string-write): New arg pstate, all callers updated.
4280         Handle print-state commands.
4281         (-string-list-flatten): New proc.
4282         (string-list->string): Use it.
4283
4284         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4285         (-gen-sem-fn-table-entry): New proc.
4286         (-gen-semantic-fn-table): New proc.
4287         (-gen-scache-semantic-fn): Make fn static.
4288         (-gen-no-scache-semantic-fn): Ditto.
4289         (cgen-semantics.c): Define macro SEM_FN_NAME.
4290         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4291         FAST,FULL.  Update @cpu@_insn_sem contents.
4292         (-gen-semf-fn-name): Delete.
4293         (-gen-sem-fn-decls): Delete.
4294         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4295         @cpu@_semf_init_idesc_table.
4296         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4297         handlers here.
4298         (cgen-decode.h): Print sfmt enum.
4299         * sid-decode.scm (-gen-semf-fn-name): Delete.
4300         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4301
4302         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4303         (ifmt-compute!): Ditto.
4304         * sim-decode.scm (-gen-decoder-switch): Ditto.
4305         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4306         (-gen-decoder-switch): Ditto.
4307
4308         * insn.scm (insn-virtual?): New proc.
4309
4310         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4311         convert to string.
4312         * mach.scm (<arch>): attr-list is now a pair of lists.
4313         (current-attr-list): Rewrite.
4314         (current-attr-add!,current-attr-lookup): Rewrite.
4315         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4316
4317 1999-08-06  Richard Henderson  <rth@cygnus.com>
4318
4319         * ia64.cpu: Initial checkpoint.
4320
4321 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4322
4323         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4324         (pmacros-init!): Update .apply help string.
4325
4326 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4327
4328         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4329         (<hw-pc>,cxmake-skip): New method.
4330         (<pc>,cxmake-skip): New method.
4331         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4332         (gen-argbuf-type): New member `skip_count'.
4333         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4334         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4335
4336         * utils-sim.scm: New file.
4337         * dev.scm (load-sim): Load it.
4338         (load-sid): Load it.
4339         * cgen-sid.scm: Load it.
4340         * cgen-sim.scm: Load it.
4341         * iformat.scm (<sformat>): New member sbuf, not initialized by
4342         default make.
4343         * rtx-funcs.scm (skip): Rewrite.
4344         * rtl-c.scm (skip): Rewrite.
4345         * m32r.cpu (sc,snc): Update `skip' usage.
4346         * mode.scm (mode-real-mode): New proc.
4347         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4348         Distinguish fragments by the <sformat-abuf> they use.
4349         * sim.scm (gen-profile-index-type): Delete.
4350         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4351         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4352         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4353         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4354         (-gen-argbuf-elm): Rewrite.
4355         (-gen-argbuf-hw-elm): Delete.
4356         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4357         of each sfmt.
4358         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4359         (sim-init!): Initialize them.
4360         (sim-analyze-insns!): Set them.
4361         (current-sbuf-list): New proc.
4362         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4363         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4364         * sim-model.scm (-gen-model-insn-fn): Ditto.
4365         * sim-decode.scm (-gen-extract-decls): Delete.
4366         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4367         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4368         sim.scm.
4369         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4370         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4371         (-gen-op-extract,-gen-op-trace-extract): New procs.
4372         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4373         gen-sfmt-argvars-foo and rewrite.
4374         (-gen-record-args): Rewrite.
4375         (-gen-extract-case): Tweak.
4376         * sid.scm (gen-profile-index-type): Delete.
4377         (ifield argbuf support): Move to utils-sim.scm.
4378         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4379         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4380         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4381         (-sim-sformat-argbuf-list): New global.
4382         (sim-init!): Initialize it.
4383         (sim-analyze-insns!): Set it.
4384         (current-sbuf-list): New proc.
4385         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4386         (-gen-argbuf-hw-elm): Delete.
4387         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4388         of each sfmt.
4389         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4390         (-gen-extract-decls): Delete.
4391         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4392         sid.scm.
4393         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4394         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4395         (-gen-op-extract,-gen-op-trace-extract): New procs.
4396         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4397         gen-sfmt-argvars-foo and rewrite.
4398         (-gen-record-args): Rewrite.
4399         (-gen-extract-case): Tweak.
4400
4401         * cgen-gh.c (gh_putc,gh_puts): New functions.
4402         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4403         * cos.c (_object_print_elms,_object_print): Use them.
4404         * hob-sup.c (fastcall_print): Use them.
4405         * configure.in: Check for scm_gen_puts, scm_puts.
4406         * config.in: Rebuild.
4407         * configure: Rebuild.
4408         * aclocal.m4: Rebuild.
4409         * Makefile.in: Rebuild.
4410
4411         * dev.scm (load-opc): Use load instead of maybe-load.
4412         (load-gtest,load-sim,load-stest): Ditto.
4413         (load-sid): Ditto.
4414
4415 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4416
4417         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4418         up to avoid g++ 'goto crosses initialization' warning.
4419         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4420         (-gen-sfrag-case): Update use of NEXT_FRAG.
4421
4422 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4423
4424         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4425
4426         * read.scm: Load sem-frags.scm.
4427         * sem-frags.scm (*): Lots rewritten.
4428         * sid.scm (-with-sem-frags?): New global
4429         (with-sem-frags?): New proc.
4430         (option-init!): Initialize -with-sem-frags?.
4431         (option-set!): Recognize with-sem-frags.
4432         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4433         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4434         if asked to.
4435         (-gen-sfrag-engine-decls): New proc.
4436         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4437         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4438         (-gen-sfrag-engine): New proc.
4439         (-gen-sem-case): Emit setup-semantics if specified.
4440         (-gen-sem-switch-engine): Update init/use of computed goto label.
4441         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4442         from local vars.
4443         (-gen-idesc-decls): Replace sem_address with cgoto.
4444         (-gen-scache-decls): Rewrite definition of `execute' member.
4445         * arm.cpu (arm isa): Enable decode-splits.
4446         * arm7.cpu (multiply insns): Rename result to mul-result.
4447
4448         Rename decode-specialize to decode-split.
4449         * decode.scm (*): Update.
4450         * insn.scm (*): Update.
4451         * mach.scm (*): Update.
4452         * sid.scm (*): Update.
4453
4454 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4455
4456         Record objects as a smob.
4457         * cos.c (scm_tc16_object): New static global.
4458         (cos_init): Initialize it.
4459         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4460         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4461         (_object_tag): Delete.
4462         (_object_make_smob): New function.
4463         (_object_make_x,_object_make_with_values_x): Rewrite.
4464         (_object_elements,_object_class_desc): Rewrite.
4465         (_object_copy,object_p): Rewrite.
4466         (_object_specialize): Rewrite.
4467         (_object_print_elms,_object_print): New functions.
4468         (object_smob): New static global.
4469         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4470
4471         * cos.c (_make_x_symbol): New static global.
4472         (object_make): Use it.
4473         (cos_init): Initialize it.
4474
4475 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4476
4477         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4478         instead to determine whether to use FLD macro.
4479         (<rtl-c-eval-state>): New member ifield-var?.
4480         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4481         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4482         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4483
4484         * rtl.scm (rtx-sequence-assq-locals): New proc.
4485
4486         * cos.scm (-object-error): Don't crash on non-objects.
4487
4488         * Makefile.am (CLEANFILES): Add hobbit.
4489         * Makefile.in: Rebuild.
4490
4491         * rtl-c.scm (s-c-call): Delete unnecessary code.
4492
4493 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4494
4495         * rtl-c.scm (ifield): Always reference value via `FLD'.
4496
4497         * cos.c (elm_bound_p): Return problem SCM boolean values.
4498
4499         * utils-cgen.scm (display-argv): New proc.
4500         * cgen-opc.scm (cgen): Call it.
4501         * cgen-sim.scm (cgen): Ditto.
4502         * cgen-gas.scm (cgen): Ditto.
4503         * cgen-stest.scm (cgen): Ditto.
4504         * cgen-sid.scm (cgen): Ditto.
4505
4506 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4507
4508         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4509         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4510         (-gen-extract-switch): Initialize result to 1.
4511         * opcodes.scm (gen-ifield-default-type): New proc.
4512         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4513         updated.
4514         (<hw-index>,gen-insert): Handle non-ifield indices.
4515         (<hw-index>,gen-extract): Ditto.
4516         (<hw-asm>,gen-parse): Ditto.
4517         (<hw-asm>,gen-print): Ditto.
4518         (<keyword>,gen-parse): Ditto.
4519         (<keyword>,gen-print): Ditto.
4520         (<operand>,gen-fget): Ditto.
4521         (<operand>,gen-fset): Ditto.
4522
4523         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4524         (-gen-hw-index): Ditto.
4525         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4526         (-gen-hw-index): Ditto.
4527
4528         * sem-frags.scm: New file.
4529
4530         * attr.scm (attr-parse): Add better checking of input.
4531
4532         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4533         All uses updated.
4534         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4535
4536         * ifield.scm (ifld-nil?): New proc.
4537
4538         * operand.scm (<operand>): New members getter,setter.
4539         (<operand>,make!): New args getter,setter.  All uses updated.
4540         (op:getter,op:setter): New procs.
4541         (<hw-index>,field-start): Return 0 for non-ifield indices.
4542         (<hw-index>,field-length): Return 0 for non-ifield indices.
4543         (-operand-parse-getter,-operand-parse-setter): New procs.
4544         (-operand-parse): New args getter,setter.  All callers updated.
4545         Always use hw-index-scalar for scalar operands.
4546         (-operand-read): Handle getter,setter.
4547         (define-full-operand): New args getter,setter.  All uses updated.
4548         * semantics.scm (-build-ifield-operand!): Update.
4549         (-build-index-of-operand!): Update.
4550         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4551         * simplify.inc (define-normal-operand): Update.
4552
4553         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4554         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4555         (s-binop,s-cmpop,s-convop): Ditto.
4556         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4557         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4558         (fcc-tests): New insn-enum.
4559         (fcc-value): Rename from fcc-type.
4560         * sparcfpu.cpu: New file.  All fp support moved here.
4561
4562         * rtl.scm (<rtx-func>): New member class.
4563         (rtx-class-*?): New procs.
4564         (def-rtx-node): New arg class.  All callers updated.
4565         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4566         * rtx-funcs.scm (*): Specify class.
4567
4568         * utils-cgen.scm (context-make-reader): New proc.
4569
4570         * utils.scm (assert-fail-msg): New variable.
4571         (assert): Use it.
4572         (list-drop,list-tail-drop): New procs.
4573
4574 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4575
4576         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4577         CGEN_MIN_INSN_SIZE deleted on March 22.
4578
4579         * ifield.scm (<ifield>,needed-iflds): New method.
4580         (<multi-ifield>,needed-iflds): New method.
4581         (ifld-needed-iflds): New proc.
4582         (multi-ifield?): New proc.
4583         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4584         (-sfmt-search-key): Include insn length in key.
4585         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4586         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4587         (-ifmt-lookup-ifmt!): Compute key here.
4588         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4589         All callers updated.
4590         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4591         All callers updated.
4592         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4593         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4594         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4595         to ifmt-build.
4596         * operand.scm (op-iflds-used): New proc.
4597         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4598         and sim-cpu.scm.
4599         And from sid.scm,sid-cpu.scm as well.
4600         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4601         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4602         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4603         (gen-extracted-ifld-value): Ditto.
4604         (-extract-chunk-specs): Ditto.
4605         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4606         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4607         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4608         (-extract-insert-subfields): New function.
4609         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4610         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4611         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4612         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4613         gen-extract-foo.
4614         (-gen-no-scache-semantic-fn): Ditto.
4615         (-gen-sem-case): Ditto.
4616         (-gen-read-case): Update calls to gen-define-ifields,
4617         gen-extract-ifields.
4618         * sim-decode.scm (-gen-record-args): Update.
4619         (-gen-sfmt-argvars-assigns): Update.
4620         (-gen-extract-case): Update.
4621         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4622         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4623         gen-extract-foo.
4624         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4625         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4626         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4627         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4628         gen-define-ifields, gen-extract-ifields.
4629         (-gen-record-args): Update.
4630         (gen-sfmt-argvars-assigns): Update.
4631         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4632         with gen-define-ifields.  Ditto for gen-extract-foo.
4633         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4634         procs rather than method calls.
4635
4636 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4637
4638         * sid.scm (-create-virtual-insns!): New local `context', pass it
4639         to insn-read.
4640
4641         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4642         (operand name) not (operand object), (local name) not (local object).
4643         (rtx-traverse-with-locals): New proc.
4644         (-compile-expr-fn): New proc.
4645         (rtx-compile): Rewrite.
4646         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4647         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4648         (rtl-c-set-trace): Ditto.
4649         (operand define-fn): Recognize operand name argument.
4650         (local define-fn): Recognize sequence temp name argument.
4651         * rtx-funcs.scm (operand): Argument is operand name, not object,
4652         so call current-op-lookup.
4653         (local): Similarily, so call rtx-temp-lookup.
4654
4655         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4656         (rtx-operand?): Ditto.
4657         (rtx-pretty-name): Ditto.
4658         (rtx-local-obj): Flag symbol argument as an error.
4659         (rtx-local-name): New proc.
4660         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4661
4662         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4663
4664         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4665         updated.
4666
4667         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4668         (and: QI rd #xff).
4669
4670         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4671         (*floats-s->c-fun-table*): Ditto.
4672         * hobbit.c,hobbit.h: Rebuild.
4673         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4674         * semantics.scm (rtx-simplify): Use /fastcall-make.
4675
4676         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4677
4678         * insn.scm (<insn>): Delete members condition, compiled-condition.
4679         (<insn>,make!): Update
4680         (<insn> getters,setters): Update.
4681         (-insn-parse,insn-read,define-full-insn): Update.
4682         * minsn.scm (minsn-make-alias): Update.
4683         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4684         (ifmt-compute!): Ditto.
4685         * sim.scm (sim-finish!): Update.
4686         * simplify.inc: (define-normal-insn): Update.
4687         * sid-cpu.scm (gen-semantic-code): Update.
4688
4689         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4690         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4691         (ifmt-compute!): Ditto.
4692
4693 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4694
4695         * minsn.scm (minsn-compute-iflds): Print better error message for
4696         missing ifields.
4697
4698 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4699
4700         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4701
4702         * Makefile.am (HOBFLAGS): New variable.
4703         (cgen-hob.c): Use it.
4704         (hobbit.c): Use it.
4705         (libcpu_a_SOURCES): Add hob-sup.c.
4706         (hob-sup.o): New rule.
4707         * Makefile.in: Rebuild.
4708         * cgen.c: #include hob-sup.h.
4709         (cgen_init_c): Call hobbit_init_support.
4710         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4711         (*special-scm->c-functions*): Add them.
4712         (display-c-expression): Handle *c-symbol*.
4713         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4714         (*floats-s->c-fun-table*): Ditto.
4715         (normalize): Recognize /fastcall-make.
4716         (normalize-fastcall-make): New proc.
4717         * hobbit.c,hobbit.h: Rebuild.
4718         * hob-sup.scm: New file.
4719         * hob-sup.c: New file.
4720         * hob-sup.h: New file.
4721         * read.scm: Load hob-sup.scm.
4722         * rtl.scm (-rtx-name-list): New variable.
4723         (rtx-name-list): New proc.
4724         (rtx-lookup): Try symbol first.
4725         (def-rtx-node): Add name to -rtx-name-list.
4726         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4727         (-rtx-traverse-anymode): New proc.
4728         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4729         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4730         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4731         (-rtx-traverse-{symornum,object}): New procs.
4732         (-rtx-make-traverse-table): Rewrite.
4733         (-rtx-traverse-operands): Rewrite arg-types handling.
4734         Handle #f result of traverser.
4735         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4736         Move debug handling here.
4737         (-rtx-traverse-debug): Delete.
4738         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4739         for each rtx.
4740         * semantics.scm (semantic-compile:process-expr!): Fix call to
4741         -rtx-traverse.
4742         * utils.scm (map1-improper): New proc.
4743
4744 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4745
4746         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4747         (h-mbits): Ditto.
4748         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4749         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4750         (<operand>,cxmake-get): Tweak.
4751         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4752
4753 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4754
4755         * thumb.cpu (dnti): Delete timing spec.
4756         (all insn): Update.
4757
4758         * arm.cpu (arm isa): New fields condition, setup-semantics.
4759         (thumb isa): New field setup-semantics.
4760         (h-gr): Add attribute CACHE-ADDR.
4761         * arm7.cpu (dnai): Delete condition.
4762         (eval-cond): Delete.
4763
4764         * mach.scm (<isa>): New member setup-semantics.
4765         (-isa-parse-setup-semantics): New proc.
4766         (-isa-parse): New arg setup-semantics.
4767         (-isa-read): Recognize setup-semantics.
4768
4769         * sid-cpu.scm (gen-extract-fields): Split into two:
4770         gen-extract-ifields, gen-extract-ifmt-ifields.
4771         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4772         tracing begin/end messages (done by caller now).
4773         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4774         tracing begin/end messages (done by x-before,x-after virtual insns).
4775         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4776         end so don't have to look it up again next time.
4777         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4778         (-decode-expr-ifield-tracking-key): New proc.
4779         (-decode-expr-ifield-tracking): New proc.
4780         (-decode-expr-ifield-values-used): New proc.
4781         (-decode-expr-ifield-mark-used!): New proc.
4782         (-gen-decode-expr-set-itype): New proc.
4783         (-gen-decode-expr-entry): Rewrite.
4784         (-gen-decode-table-entry): New proc.
4785         (-gen-decoder-switch): Use it.
4786         (-gen-virtual-insn-finder): New proc.
4787         (-gen-argbuf-elm): Move here from sid.scm.
4788         (-gen-argbuf-hw-elm): Ditto.
4789         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4790         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4791         conditional-execution isas.
4792         (-gen-decode-fn): Record conditional-exec ifield.
4793         * sid.scm (-current-pbb-engine?): New global.
4794         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4795         (<ifield>,gen-ifld-extract): New arg `indent'.
4796         (<multi-ifield>,gen-ifld-extract): Ditto.
4797         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4798         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4799         (-gen-arch-model-decls): Only scan real insns.
4800         (scache-engine-insns,pbb-engine-insns): New procs.
4801         (-create-virtual-insns!): New proc.
4802         (sim-finish!): Call it.
4803         (-decode-specialize-insn?): New proc.
4804         (-decode-specialize-build-assertion): New proc.
4805         (-decode-specialize-insn-1): New proc.
4806         (-decode-specialize-insn): New proc.
4807         (-fill-sim-insn-list!): New proc.
4808         (sim-analyze!): Create copies of insns to be specialized.
4809         * utils-cgen.scm (obj-set-name!): New proc.
4810
4811         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4812         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4813         semantic-attrs.
4814         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4815         sformats.
4816         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4817         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4818         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4819         (attr): Rewrite test for insn owner.
4820         (member): New rtx function.
4821         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4822         as separate function.
4823         (rtx-ifield?,rtx-ifield-name): New procs.
4824         (rtx-operand-obj): Rewrite.
4825         (rtx-operand-name): New proc.
4826         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4827         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4828         (tstate-make): New args owner, known.  All callers updated.
4829         (tstate-known-lookup): New proc.
4830         (rtx-traverse): New arg owner.  All callers updated.
4831         (rtx-make-bool): New proc.
4832         (rtl-find-ifields): Rewrite.
4833         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4834         * semantics.scm: ... here.
4835         (rtx-const-equal,rtx-const-list-equal): New procs.
4836         (-build-known-values): New proc.
4837         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4838         (semantic-attrs): Ditto.
4839         * rtx-funcs.scm (member,number-list): New rtx functions.
4840
4841         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4842         Rewrite.  Delete arg `all-attrs'. All callers updated.
4843         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4844         updated.
4845         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4846
4847         * decode.scm (subdtable-add): Handle `expr' entries.
4848         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4849         (exprtable-entry-*): Update.
4850         (exprtable-entry-iflds): New proc.
4851         (exprentry-cost): New proc.
4852         (exprtable-sort,-gen-exprtable-name): New procs.
4853         (exprtable-make): New arg `name'.  All callers updated.  use vector.
4854         (exprtable-*): Update.
4855         (-build-decode-table-entry): Don't issue collision warning if all are
4856         specialized insns.  Sort exprtable entries before building table.
4857
4858         * read.scm (-reader-process-expanded-1): Move pretty printing of
4859         input to logging level 4.
4860
4861         * utils.scm (string-list->string): New proc.
4862
4863         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4864         semantics.
4865         (insn-read): Delete leading '-' in name.  All callers updated.
4866         (real-insn?): New proc.
4867         (real-insns): Rewrite.
4868         (insn-has-ifield?): New proc.
4869         (insn-builtin!): Create insn attribute SPECIALIZED.
4870
4871         * mach.scm (<arch>): Delete member app-data.
4872         (current-raw-insn-list): New proc.
4873         (insn-list-car,insn-list-splice!): New procs.
4874         (<decode-specialize>): New class.
4875         (-isa-parse-decode-specialize): New proc.
4876         (-isa-parse-decode-specializes): New proc.
4877         (<isa>): New members `condition', `decode-specializes'.
4878         (-isa-parse-condition): New proc.
4879         (-isa-parse): New args condition, decode-specializes.
4880         (-isa-read): Recognize condition, decode-specializes.
4881         (-isa-add-decode-specialize!): New proc.
4882         (modify-isa): New proc.
4883         (isa-conditional-exec?,state-conditional-exec?): New procs.
4884         (arch-init!): New reader command `modify-isa'.
4885
4886         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4887         (mode-signed,mode-unsigned?): New procs.
4888
4889 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
4890
4891         * types.scm (<array>): New method get-shape.
4892         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4893         onto type.
4894         (hw-shape,hw-num-elms): New procs.
4895         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4896         if there's more than 255 registers.
4897         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4898
4899         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4900         with get/set specs.
4901
4902 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
4903
4904         * cgen-sid.scm (sim-arguments): Add -X.
4905         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4906         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4907         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
4908         Simplify by supporting pbb engine only.
4909         (-gen-sem-switch-init): New proc.
4910         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4911         (cgen-sem-switch.cxx): New proc.
4912         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4913         with with-pbb?.  Support dual scache/pbb engines.
4914         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4915         Support dual scache/pbb engines.
4916         (cgen-decode.h): Generate semantic fn decls if with-scache?.
4917         * sid.scm (*) with-pbb? replaces with-sem-switch?.
4918         (sim-finish!): Create pbb support virtual insns if with-pbb?.
4919
4920 1999-05-10  Ben Elliston  <bje@cygnus.com>
4921
4922         * arm7.cpu: Remove coprocessor related fields, operands and insn
4923         definitions for now. Take the undefined instruction trap instead.
4924         (ldmda-wb): New instruction.
4925         (ldmib-wb): Likewise.
4926         (ldmdb-wb): Likewise.
4927         (stmdb-wb): Likewise.
4928         (stmib-wb): Likewise.
4929         (stmda-wb): Likewise.
4930
4931 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
4932
4933         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4934         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4935
4936         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4937         hobbit can't handle optional third arg.
4938
4939 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
4940
4941         * arm.cpu (h-tbit): Delete set spec.
4942         (h-mbits): Don't call arm_mbits_set in set spec.
4943         * arm.sim: New file.
4944         * hardware.scm (modify-hardware): New proc.
4945         (hardware-init!): Add modify-hardware command.
4946         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4947         (-hw-gen-set-quiet): Ditto.
4948         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
4949         hardware attribute.  Load $arch.sim file if present.
4950         * utils-cgen.scm (keyword-list?): New proc.
4951         (keyword-list->arg-list,arg-list-validate-name): New procs.
4952         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4953
4954         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4955
4956         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4957         @cpu@_cpu_cgen.
4958
4959         * attr.scm (obj-prepend-atlist!): New proc.
4960
4961         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4962
4963         * sid.scm (<operand>,profilable?): Use op:type.
4964         * sim.scm (<operand>,profilable?): Use op:type.
4965
4966 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
4967
4968         * utils.scm (find-index,find): Be more stack friendly.
4969
4970         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4971         (bic-imm): Ditto.
4972
4973 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
4974
4975         * arm.cpu (h-gr-usr): New hardware element.
4976         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4977         (arm-mode): New keyword.
4978         (h-mbits): Add set spec.
4979         (h-spsr): Implement get/set specs.
4980
4981         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4982         (-reader-process-expanded-1): Pretty print logging output.
4983
4984         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4985         (cgen-cpu.h): Print enums before hardware elements.
4986         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4987         * sid-decode.scm (cgen-decode.cxx): Ditto.
4988         * sid-model.scm (cgen-model.cxx): Ditto.
4989
4990         * utils-cgen.scm (context-error): Accept variable number of
4991         trailing args.
4992
4993         * rtx-funcs.scm (error:): New rtx function.
4994         * rtl-c.scm (s-case-vm): New proc.
4995         (-gen-non-vm-case-get,s-case-non-vm): New procs.
4996         (s-case): Simplify, handle non-VM result.
4997         (error:): New rtx function.
4998
4999 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5000
5001         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5002         (test-hi,test-ls): Fix cbit handling.
5003         (shift-type,h-operand2-shifttype): Move here ...
5004         * arm7.cpu: ... from here.
5005         (set-cond,set-cond-maybe,dnix): Delete, unused.
5006         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5007         * arm.cpu: ... to here.
5008         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5009         (alu-cmn): Use set-add-flags.
5010         (alu-tst): Use set-zn-flags.
5011         (alu-cmp): Use set-sub-flags.
5012         (lsl,lsr,asr): Set condition codes.
5013         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5014         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5015         alu-shift-op.
5016         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5017         All callers updated.
5018         (sub-sp): Rename from add-sp-neg.
5019         (f-lbwl-offset): Delete.
5020         (f-lbwl-hi,f-lbwl-lo): New ifields.
5021         (lbwl-hi,lbwl-lo): Update.
5022         (bl-hi): Add 4 to pc.
5023         (push-reg,pop-reg): Simplify.
5024         (push,push-lr): Push registers in correct order.
5025         (pop,pop-pc): Pop registers in correct order.
5026         (save-reg-inc,load-reg-inc): Simplify.
5027         (ldmia): Save registers in correct order.
5028
5029 1999-04-30  Ben Elliston  <bje@cygnus.com>
5030
5031         * arm7.cpu (f-op-hdt): Remove; unused.
5032         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5033         (f-ror-imm8): New multi-ifield.
5034         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5035         callers updated.
5036         (f-uimm12): New field.
5037         (ror-imm8): New operand.
5038         (uimm12): Likewise.
5039         (hdt-offset8): Reinstate operand.
5040         (offset4-hi,offset4-lo): Remove.
5041         (set-cond): Remove macro; unused.
5042         (set-cond-maybe): Likewise.
5043         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5044         (store-word/byte): Likewise.
5045         (load-halfword): Use hdt-offset8 multifield operand instead of two
5046         4-bit operands that are explicitly combined by semantic code.
5047         (do-halfword-store): Bug fix. Set address when not preindexing.
5048         (store-halfword): Also use hdt-offset8 operand.
5049         (arith-op): Avoid clobbering source registers when one of them is
5050         the destination register.
5051         (arith-imm-op): Likewise.
5052         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5053         (teq-imm): Likewise.
5054         (ldm-p): Rename to ldmdb.
5055         (stm-pw): Rename to stmdb-wb.
5056         (multi-action): New macro; test reg-list bits and execute a
5057         semantic fn if the bit is set.
5058         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5059         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5060         (all insns): Use dnai entries for simplicity rather than dni.
5061         (*): Use short-form of (const ..).
5062
5063 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5064
5065         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5066         member eval to evaluator.
5067         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5068         (tstate-make): Delete arg op-fn.  All callers updated.
5069         (tstate-op-fn,tstate-set-op-fn!): Delete.
5070         (rtx-traverse): Delete op-fn arg.  All callers updated.
5071         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5072         split out of -simplify-for-compilation.
5073
5074         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5075         (cgen_DEPENDENCIES): Add stamp-cgen.
5076         (stamp-cgen): New rule.
5077         * Makefile.in: Rebuild.
5078
5079         * rtl-c.scm (enum:): Define emitter for.
5080         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5081         enums as well.
5082         (rtx-constant-value,rtx-enum-value): New procs.
5083         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5084         (rtx-compile-time-constant?): Return #t for enums.
5085         (rtx-true?,rtx-false?): Handle enums.
5086         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5087         building result by hand.
5088         (rtx-simplify-eq-attr-insn): Ditto.
5089         * rtx-funcs.scm (enum:,enum): New rtx functions.
5090
5091         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5092         aliases-analyzed?.
5093         (arch-analyze-insns!): New proc.
5094         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5095         of calling ifmt-compute! directly.
5096         * sid.scm (-sim-insns-analyzed?): Delete.
5097         (sim-analyze!): Call arch-analyze-insns! instead of calling
5098         ifmt-compute! directly.
5099         * sim.scm (-sim-insns-analyzed?): Delete.
5100         (sim-analyze!): Call arch-analyze-insns! instead of calling
5101         ifmt-compute! directly.
5102
5103         * utils.scm (string-take-with-filler): New proc.
5104         (string-take): Use it.
5105
5106         * pgmr-tools.scm: New file.
5107         * read.scm: Load it.
5108         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5109
5110         * insn.scm (insn-base-mask): Renamed from insn:mask.
5111         All callers updated.
5112         (insn-base-mask-length): Renamed from insn:mask-length.
5113         All callers updated.
5114         (insn-foo): Renamed from insn:foo.  All callers updated.
5115         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5116         * iformat.scm (compute-insn-base-mask-length): Renamed from
5117         compute-insn-mask-length.  All callers updated.
5118         (compute-insn-base-mask): Renamed from compute-insn-mask.
5119         All callers updated.
5120
5121         * enum.scm (-enum-parse-prefix): New proc.
5122         (<enum>,make!): Don't parse enum values here.
5123         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5124         (define-full-insn-enum): Ditto.
5125         (enum-vals-upcase): New proc.
5126         * hardware.scm (define-keyword): Make enum prefix uppercase.
5127         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5128
5129         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5130         (<ifield>,field-extract): New method.
5131         (<multi-ifield>,field-extract): New method.
5132         (ifld-extract): New proc.
5133         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5134         (ifld-extract-fn-name): Renamed from ifld-extract.
5135
5136         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5137         All callers updated.
5138
5139         * ifield.scm (ifld-lsb0?): New proc.
5140         (sort-ifield-list): New arg up?.  All callers updated.
5141         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5142         rather than global state.
5143
5144 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5145
5146         * insn.scm (pretty-print-insn-format): New proc.
5147
5148         * Makefile.in: Rebuild.
5149         * aclocal.m4: Rebuild
5150         * configure: Rebuild.
5151
5152 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5153
5154         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5155         * configure: Rebuild.
5156         * aclocal.m4: Rebuild.
5157         * Makefile.in: Rebuild.
5158         * doc/Makefile.in: Rebuild.
5159         * doc/version.texi: Rebuild.
5160
5161 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5162
5163         * utils.scm (bits->bools): New proc.
5164
5165 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5166
5167         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5168         subfield's gen-ifld-extract-decl method.
5169
5170 1999-04-23  Ben Elliston  <bje@cygnus.com>
5171
5172         * arm7.cpu (ldrsh-pu): Remove.
5173         (do-halfword-load): New pmacro.
5174         (load-halfword): Likewise.
5175         (do-halfword-store): Likewise.
5176         (store-halfword): Likewise.
5177         (strh-*): New instructions.
5178         (ldrsb-*): Likewise.
5179         (ldrh-*): Likewise.
5180         (ldrsh-*): Likewise.
5181
5182 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5183
5184         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5185         fields.
5186
5187         * arm7.cpu (do-word/byte-store): Fix typo.
5188
5189 1999-04-22  Ben Elliston  <bje@cygnus.com>
5190
5191         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5192         register is the program counter (R15).
5193
5194         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5195         (str-*): Implement using store-word-byte. Remove older versions.
5196         (bic): Use the `inv' rtx for obtaining bitwise complements.
5197         (bic-imm): Likewise.
5198         (mvn): Likewise.
5199         (mvn-imm): Likewise.
5200         (store-indev-reg): Remove crufty pmacro.
5201         (load-indiv-reg): Likewise.
5202         (ldm-p): Reverse the order of register processing for decrement.
5203         (stm-p): Likewise.
5204         (stbi): Remove; handled by the str-* insns.
5205
5206 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5207
5208         * thumb.cpu (cmp): Fix carry bit computation.
5209         (alu-cmp): Ditto.
5210
5211 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5212
5213         * arm.cpu (h-tbit): Specify set spec.
5214         (h-cpsr): Ditto.
5215         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5216         (set-sub-flags): Interpret "carry bit" as a borrow.
5217         (all sub/cmp insns): Carry bit is actually a borrow bit.
5218         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5219         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5220         .pmacro instead.
5221         (hireg-add,hireg-cmp,hireg-move): Ditto.
5222
5223         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5224         (-CGEN-LANG-VERSION): Ditto.
5225
5226 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5227
5228         * pmacros.scm (-pmacro-make): New arg `default-values',
5229         all callers updated.
5230         (-pmacro-default-values): New proc.
5231         (-pmacro-process-keyworded-args): New proc.
5232         (-pmacro-process-args): New proc.
5233         (-pmacro-invoke): Process arguments before expanding macro.
5234         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5235         (define-pmacro): Handle default values specified in arg list.
5236         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5237         (rtx-boolif-op-arg[01]): New procs.
5238         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5239         (rtx-simplify): Handle not,orif,andif.
5240         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5241         * utils.scm (alist-copy): New proc.
5242         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5243         (ldr*): Rewrite.
5244         (swi): Explicitly set pc.
5245
5246         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5247
5248 1999-04-17  Ben Elliston  <bje@cygnus.com>
5249
5250         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5251         correctly adjusts the program counter now.
5252
5253         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5254         (f-signed?): Rename from `f-hdt-signed?'.
5255         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5256         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5257         (f-hdt-offset8): Use new field names.
5258         (ldr): Use `imm12' field, not `offset12', since we do our own
5259         address arithmetic.
5260         (str, str-*): Likewise.
5261         (ldu-*): Remove most; better not implemented than broken.
5262         (ldrh*): Likewise.
5263         (ldrsh-pu): New insn.
5264         (stri): Likewise.
5265         (stri-p): Likewise.
5266         (stbi): Likewise.
5267         (ldm-p): Likewise; replace (load-indiv-reg) version.
5268
5269 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5270
5271         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5272         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5273         (*): Explicitly specify mode in c-call.
5274         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5275         (arith-op): Ditto.
5276         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5277         (arith-imm-op): New pmacro.
5278         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5279         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5280
5281 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5282
5283         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5284
5285         * rtl.scm (rtl-find-ifields): Implement.
5286
5287         * utils-gen.scm: New file.
5288         * read.scm: Load it.
5289         * desc.scm: Move generic attribute code to utils-gen.scm.
5290         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5291         * Makefile.in: Rebuild.
5292
5293         * arm7.cpu (R15-OFFSET): New attribute.
5294         (dnai): New pmacro.
5295         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5296         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5297         for reg-shift version.
5298         (arith-op): Ditto.
5299         (data processing insns): Reorganize.  Use dnai.
5300
5301         * attr.scm (attr-kind): New proc.
5302         (attr-list-enum-list): Rewrite.
5303         (-attr-sort): Split result into two lists, bools and non-bools.
5304         (current-attr-list-for): Update.
5305
5306         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5307         * sid-cpu.scm (-gen-attr-decls): New proc.
5308         (-gen-insn-attr-decls): New proc.
5309         (cgen-desc.h): New proc.
5310         (cgen-cpu.h): Put everything in @cpu@ namespace.
5311         (gen-parallel-exec-type): Change prefix of parexec struct from
5312         @cpu@ to @prefix@.
5313         (-gen-trace-record-type): Ditto for trace_record struct.
5314         (-gen-write-case): Update.
5315         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5316         @prefix@.  Update scache struct references.
5317         (-gen-sem-case): Update scache struct references.
5318         (-gen-sem-switch-fn): Update idesc struct reference.
5319         Update insn_type enum reference.
5320         (cgen-write.cxx): Update scache,argbuf references.
5321         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5322         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5323         from @cpu@ to @prefix@.
5324         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5325         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5326         from @CPU@ to @PREFIX@.
5327         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5328         from @CPU@ to @PREFIX@.
5329         (-gen-decode-insn-globals): Generate insn attributes.
5330         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5331         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5332         semantic fn typedef.
5333         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5334         Change prefix of scache struct from @cpu@ to @prefix@.
5335         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5336         Change prefix of idesc struct from @cpu@ to @prefix@.
5337         Change prefix of insn_type enum from @cpu@ to @prefix@.
5338         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5339         from @cpu@ to @prefix@.
5340         (-gen-scache-decls): Change prefix of scache struct from
5341         @cpu@ to @prefix@.  Update idesc struct name.
5342         Update decode,execute methods.
5343         (-gen-extract-case): Update to type name changes.
5344         (-gen-decode-fn): Ditto.
5345         (cgen-decode.h): Put everything in @cpu@ namespace (except
5346         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5347         (cgen-decode.cxx): Add using namespace @cpu@.
5348         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5349         model_mark_get/set from @cpu@ to @prefix@.
5350         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5351         @prefix@.
5352         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5353         of model_insn_before/after from @cpu@ to @prefix@.
5354         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5355         Update insn_word type name.
5356         (-gen-model-timing-table): Update INSN_TIMING struct name.
5357         (-gen-model-init-fn): Update MODEL_DATA struct name.
5358         (-gen-mach-defns): Update name of init_idesc_table fn.
5359         (cgen-model.cxx): Add using namespace @cpu@.
5360         * sid.scm (gen-cpu-class): Delete.
5361         (gen-attr-type): New proc.
5362         (gen-obj-attr-sid-defn): New proc.
5363         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5364         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5365         @CPU@ to @PREFIX@.
5366         (gen-cpu-insn-enum): Update name of insn enum.
5367         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5368         (bx-hs): Ditto.
5369         (swi): Rename @cpu@_swi to @prefix@_swi.
5370
5371         * decode.scm (-build-decode-table-entry): Remove heuristic for
5372         distinguishing insns, and use insn ifield-assertion specs.
5373
5374         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5375         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5376         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5377         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5378         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5379         all callers updated.
5380         (gen-attr-name): New proc
5381         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5382         (gen-obj-attr-defn): Delete num_nonbools count.
5383
5384         * iformat.scm (ifmt-analyze): Handle insn-condition.
5385         (ifmt-compute!): Ditto.
5386         * insn.scm (<insn>): Specify default value for condition,
5387         post-cond-trap,compiled-condition,compiled-semantics.
5388         (<insn>,make!): New arg condition.
5389         (<insn>): Add getters for condition,compiled-condition.
5390         (-insn-parse): New arg condition, all callers updated.
5391         (-insn-read): Recognize condition spec.
5392         (define-full-insn): New arg condition.
5393         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5394         * semantics.scm (semantic-compile): Change arg sem-code to
5395         sem-code-list.
5396         (semantic-attrs): Ditto.
5397         * sim.scm (sim-finish!): Update calls to define-full-insn.
5398         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5399         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5400         * sid.scm (sim-finish!): Update call to define-full-insn.
5401
5402 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5403
5404         * Makefile.am (sim-cpu): Allow specification of ISA.
5405         * Makefile.in: Rebuild.
5406
5407 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5408
5409         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5410
5411 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5412
5413         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5414
5415         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5416
5417         * attr.scm (atlist?): New proc.
5418         (-attr-eval): Rewrite.
5419         (attr-parse): New proc.
5420         (atlist-parse): Use it.
5421
5422         * decode.scm (exprtable-entry-make): New proc.
5423         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5424         (exprtable-make,exprtable-insns): New procs.
5425
5426         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5427         All uses updated.
5428         (hardware-builtin!): Make h-memory a vector.
5429
5430         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5431         All callers updated.
5432         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5433
5434         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5435         All uses updated.
5436         (-insn-parse): Set semantics to #f if not specified.
5437         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5438         if simulator.
5439         (-parse-insn-format): Recognize `=' iformat spec.
5440
5441         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5442         (isa-max-insn-bitsize): Ditto.
5443
5444         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5445         rtl-c-with-alist.
5446         (<ifield>,gen-extract): Ditto.
5447         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5448         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5449         (gen-define-ifmt-ifields): New proc.
5450         (gen-semantic-code): Rewrite.
5451         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5452         (-gen-decoder-switch): Handle expression tables.
5453         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5454         gen-define-fields.
5455         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5456         instead of gen-define-fields.
5457         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5458         callers updated.
5459         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5460         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5461         (-gen-ifld-extract-beyond): Ditto.
5462         (<multi-ifield>,gen-ifld-extract): Ditto.
5463         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5464         rtl evaluation code.
5465         (op:read): Build an <eval-state> to pass to gen-read.
5466         (op:write): Build an <eval-state> to pass to gen-write.
5467         (op:record-profile): Build an <eval-state> to pass to
5468         gen-record-profile.
5469         * sim-cpu.scm (gen-semantic-code): Rewrite.
5470         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5471         rtl-c-with-alist.
5472         (-gen-ifld-extract-beyond): Ditto.
5473         (<multi-ifield>,gen-ifld-extract): Ditto.
5474         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5475         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5476         rtl evaluation code.
5477         (op:read): Build an <eval-state> to pass to gen-read.
5478         (op:write): Build an <eval-state> to pass to gen-write.
5479         (op:record-profile): Build an <eval-state> to pass to
5480         gen-record-profile.
5481
5482         * operand.scm (<operand>): Give `selector' default value of #f.
5483         Give `num' default value of -1.  Give `cond?' default value of #f.
5484         (op:new-mode): Delete arg `set?', all uses updated.
5485
5486         * read.scm (reader-error): Handle #f return from port-filename.
5487         (-init-parse-cpu!): Call rtl-c-init!.
5488         (reader-install-builtin!): Call rtl-builtin!.
5489
5490         * rtl-c.scm: New file.
5491         * semantics.scm: New file.
5492         * read.scm: Load them.
5493         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5494         to semantics.scm.
5495         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5496         type,eval,num.
5497         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5498         (-rtx-num-text,-rtx-max-num): New globals.
5499         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5500         (-rtx-macro-lookup): New proc.
5501         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5502         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5503         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5504         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5505         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5506         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5507         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5508         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5509         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5510         (rtx-pretty-name): New proc.
5511         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5512         (rtx-traverse-*): Rewrite rtx traversing.
5513         (rtx-eval-*): Rewrite rtx evaluation.
5514         (rtx-compile): New proc.
5515         (rtx-simplify): New proc.
5516         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5517         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5518         (ifield,index-of): Rewrite.
5519         (name): Renamed from `operand:'.
5520         (operand,xop,local): New rtx's.
5521         (current-insn): Rewrite.
5522         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5523         (cgen-hob.h): Remove rule for.
5524         (cgen-hob.o): Depend on cgen-hob.c only.
5525         * Makefile.in: Rebuild.
5526
5527         * utils-cgen.scm (vmake): New proc.
5528         (<context>): New class.
5529         (context-make-prefix,context-error): New procs.
5530
5531 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5532
5533         * i960.cpu: Add some ??? comments.
5534         (xnor, ornot): New instructions.
5535         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5536
5537 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5538
5539         * cos.scm (-object-error): Print better error message.
5540
5541         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5542         (-pmacro-env-ref): Renamed from -env-ref.
5543
5544 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5545
5546         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5547         (h-pc): Delete.
5548         (hardware-builtin!): Delete h-pc builtin.
5549         * arm.cpu (h-pc): Define.
5550         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5551         * arm7.cpu (set-logical-cc-maybe): Delete.
5552         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5553         (data processing insns): Rewrite.
5554         * m32r.cpu (h-pc): Define.
5555         * fr30.cpu (h-pc): Define.
5556         * i960.cpu (h-pc): Define.
5557         * sparc.cpu (h-pc): Define.
5558
5559         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5560         (s-parallel): Replace do {...} while (0) with {...}.
5561         (s-sequence): Ditto.
5562
5563         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5564         consistent.
5565         (-gen-write-case,-gen-sem-case): Ditto.
5566         (-gen-sem-case): Only specify `written' if profiling or
5567         parallel-write-back.
5568         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5569         (-gen-sem-switch-fn): New proc.
5570         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5571         based on with-sem-switch option.
5572         * sid-decode.scm (-gen-decode-insn-globals): Only define
5573         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5574         addresses in idesc_table if !with-sem-switch.
5575         (-gen-sem-fn-decls): Rewrite.
5576         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5577         member based on with-sem-switch.  Only define
5578         `idesc_table_initialized_p' member if with-sem-switch.
5579         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5580         * sid.scm (-with-sem-switch?): New variable.
5581         (option-init!): Initialize it.
5582         (option-set!): Set it.
5583         (with-sem-switch?): New proc.
5584         (-op-gen-set-trace): Only emit `written' reference if profiling.
5585         (sim-finish!): Use h_pc_set to set pc.
5586
5587 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5588
5589         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5590         All callers updated.
5591         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5592
5593         * sid.scm (gen-argbuf-type): Delete.
5594         (-gen-argbuf-fields-union): Move to ...
5595         * sid-decode.scm: ... here.
5596
5597         * read.scm (-reader-process-expanded-1): New proc.
5598         (-reader-process-expanded): Call it to catch nested begin's.
5599         (reader-process): Move `begin' handling to -reader-process-expanded.
5600
5601         * insn.scm (-insn-read): Fix name of `format' spec.
5602
5603         * pmacros.scm (.pmacro): New builtin.
5604         (scan-symbol): If procedure macro, return macro rather than its symbol.
5605         (check-macro): Don't do lookup, instead check if (car expr) is
5606         macro object.
5607         (scan-list): Handle .pmacro.
5608         (scan): No longer re-examine text for another macro invocation.
5609         (-pmacro-build-lambda): New proc.
5610         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5611         another, fetch the other's value (rather than doing it during
5612         expansion).
5613
5614 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5615
5616         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5617         * Makefile.in: Rebuild.
5618
5619         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5620         (-fill-slot!): Simplify.
5621         (-build-slots): Simplify.
5622
5623         * dev.scm (load-sid): Don't load sid-arch.scm.
5624
5625         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5626         switch's.
5627         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5628         switch's.
5629
5630 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5631
5632         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5633         * decode.scm: ... here.  New file.
5634         * sid-decode.scm: Use decoder computation code in decode.scm.
5635         * read.scm: Load decode.scm.
5636
5637         * arm.cpu (arm710 model): Add u-exec function unit.
5638         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5639         Add get/set specs to redirect reg 15 to h-pc.
5640         (h-*): Indicate for both ARM and THUMB isas.
5641         (cbit,nbit,vbit,zbit): Ditto.
5642         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5643         (h-cpsr): Make virtual.  Add get/set specs.
5644         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5645         (h-spsr): New virtual reg.
5646         * arm7.cpu (shift-type): New explicitly defined keyword.
5647         (h-operand2-shifttype): Use it.
5648         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5649         All callers updated.  Don't set cbit.
5650         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5651         shift-type enum as case choices.  Set cbit.
5652         (and,orr,eor,add-imm): Uncomment out.
5653         (undefined): Temporarily comment out.
5654         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5655         (lda-pc,lda-sp): Ditto.
5656         (ldr-pc): Rename from ldr.
5657         (cbranch): Mark insns as being thumb insns.
5658
5659         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5660
5661         * cgen-sid.scm: Don't load sid-arch.scm.
5662         (sim-arguments): Delete unused entries.
5663         * sid-arch.scm: Delete.
5664
5665         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5666         (<insn>,ifld-assertions): New member.
5667         (<insn>,make!): New arg ifld-assertions, all callers updated.
5668         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5669         (insn:fields): Delete.
5670         (-insn-parse): New arg ifld-assertions.  All callers updated.
5671         (-insn-read,define-insn): New procs.
5672         (define-full-insn): New arg ifld-assertions.  All callers updated.
5673         (insn-init!): New comment define-insn.
5674
5675         * model.scm (-model-parse): Ensure at least one unit specified.
5676
5677         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5678         (<c-expr-temp>,get-name): New method.
5679         (-rtx-make-current-closure,s-closure): New proc.
5680         (hw:): Wrap rtx indices in a closure.
5681         (-gen-case-prefix): New proc.
5682         (s-case): Simplify.
5683         * rtx-funcs.scm (case:): Fix call to s-case.
5684         (closure): New rtx func.
5685
5686         * hardware.scm (<hardware-base>): New member isas-cache.
5687         (<hardware-base>,get-isas): New method.
5688         (hardware-builtin): Indicate for all isas.
5689         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5690         * mach.scm (current-arch-mach-name-list): Return list of names.
5691         (current-isa-mach-name-list): Ditto.
5692         (define-arch): Install builtin objects here.
5693         * read.scm (keep-atlist?): Only keep if both mach and isa are
5694         being kept.
5695         (keep-mach-atlist?): New proc.
5696         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5697         (reader-install-builtin!): Renamed from -install-builtin!.
5698         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5699         -gen-cpu-reg-access-defns.  Rewrite.
5700         (gen-reg-access-defn): Delete.
5701         (-gen-hardware-struct): New proc.
5702         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5703         (gen-semantic-fn,-gen-all-semantics): Delete.
5704         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5705         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5706         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5707         Call sem-analyze-insns!.
5708         (cgen-semantics.cxx): Add multiple-isa support.
5709         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5710         (-gen-scache-decls,-gen-decode-fn): Ditto.
5711         (cgen-decode.h): Call sem-analyze-insns!.
5712         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5713         * sid.scm (-with-multiple-isa?): New variable.
5714         (option-init!): Initialize it.
5715         (option-set!): Set it.
5716         (with-multiple-isa?): New proc.
5717         (gen-cpu-ref): New arg isas.  All callers updated.
5718         (gen-cpu-class): New proc.
5719         (*-get-macro,*-set-macro): Delete.
5720         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5721         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5722         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5723         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5724         (-sim-insns-analyzed): New global variable.
5725         (sim-init!): Reset it.
5726         (sim-analyze-insns!): New proc.
5727         (sim-analyze!): Don't do instruction analysis here.
5728         (sim-finish!): Specify isa of x-invalid insn.
5729         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5730
5731 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5732
5733         * thumb.cpu (cpu,mach,model): Delete.
5734         (dntf): New pmacro.  Use it for all field definitions.
5735         (dntop): New pmacro.  Use it for all operand definitions.
5736         (asr): Correct field list.
5737         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5738
5739         * utils-cgen.scm (define-getters): New macro to simplify
5740         writing class accessors.
5741         (define-setters): Ditto.
5742         (sanitize): Recognize isa elements.
5743
5744         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5745         state-parallel-exec?.
5746         * sid-model.scm (*): Ditto.
5747         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5748         state-decode-assist.
5749
5750         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5751         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5752         * sim-decode.scm (-gen-decode-switch): Ditto.
5753
5754         * sim-arch.scm (-regs-for-access-fns): Delete.
5755         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5756         (-gen-arch-reg-access-defns): Delete.
5757
5758         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5759         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5760         with state-parallel=exec?.
5761         (cgen-*): Call sim-analyze-insns! here.
5762         * sim-decode.scm (cgen-*): Ditto.
5763         * sim-model.scm (cgen-*): Ditto.
5764         * sim.scm (-sim-insns-analyzed): New global variable.
5765         (sim-init!): Reset it.
5766         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5767         already done the analysis.
5768
5769         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5770         MACH struct.
5771
5772         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5773         (arm arch): Update isa spec.
5774         (arm,thumb isas): Define.
5775         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5776         (arm7tdmi mach): Add isa spec.
5777         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5778         `const' on word number.
5779         * fr30.cpu (fr30 arch): Update isa spec.
5780         (fr30 isa): Define.
5781         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5782         moved to isa spec.
5783         * i960.cpu (i960 arch): Update isa spec.
5784         (i960 isa): Define.
5785         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5786         liw-insns,parallel-insns moved to isas spec.
5787         * m32r.cpu (m32r arch): Update isas spec.
5788         (m32r isa): Define.
5789         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5790         liw-insns,parallel-insns moved to isa spec.
5791         * sparc.cpu (sparc arch): Update isas spec.
5792         (sparc isa): Define.
5793         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5794         decode-assist moved to isa spec.
5795         * sparc64.cpu (sparc64 cpu): Ditto.
5796         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5797         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5798         (-gen-mach-table-defns): Output mach table.
5799         (-gen-hash-defines): Delete insn size macros, except for
5800         CGEN_MAX_INSN_SIZE.
5801         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5802         (cgen-desc.h): Define MAX_ISAS.
5803         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5804         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5805         (arch-* accessors): Renamed from arch:*.  All callers updated.
5806         (current-arch-isa-name-list): New proc.
5807         (-arch-parse-isas): Renamed from -arch-parse-isa.
5808         (def-isa-attr!): Rewrite.
5809         (<iframe>): New class.
5810         (<itype>): New class.
5811         (<isa>): Rewrite.
5812         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5813         (isa-integral-insn?,isa-parallel-exec?): New procs.
5814         (-isa-parse,-isa-read,define-isa): New proc.
5815         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5816         liw-insns moved to <isa>.
5817         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5818         (-cpu-parse,-cpu-read): Update.
5819         (state-*): Renamed from state:*.  All callers updated.
5820         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5821         not cpu.
5822         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5823         (state-decode-assist): New proc.
5824         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5825         (-adata-set-derived!): Rewrite.
5826         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5827         callers updated.
5828         (arch-init!): Add define-isa command.
5829         * read.scm (<reader>): Default keep-isa member to (all).
5830         (reader-* accessors): Renamed from reader:*.  All callers updated.
5831         (-keep-isa-set!): Call string->symbol on isa name list.
5832         (keep-isa-validate!): Rewrite.
5833         (current-isa): New proc.
5834         (keep-isa?): Recognize "all".
5835         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5836         Call -keep-isa-set!.
5837         (cmd-if): Recognize keep-isa?.
5838         (cpu-load): New arg keep-isa.  All callers updated.
5839         (-opt-spec-update): New proc.
5840         (common-arguments): First arg is string, not symbol.
5841         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5842
5843         * rtl.scm (rtx-get): Default mode of string arg is INT.
5844
5845         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5846
5847         * rtx-funcs.scm (join:): Pass cpu to handler.
5848
5849         * configure.in (guile_include_dir): Delete.
5850         * configure: Rebuild.
5851         * Makefile.in: Rebuild.
5852         * doc/Makefile.in: Rebuild.
5853
5854         * sid-cpu.scm (-extract-chunk-specs): New proc.
5855         (gen-define-fields): Use it.
5856         (-extract-chunk): New proc.
5857         (-gen-extract-beyond-var-list): Use it.
5858         (gen-extract-fields): Simplify.
5859
5860 1999-03-22  Ben Elliston  <bje@cygnus.com>
5861
5862         * arm7.cpu (ldri-p): New instruction.
5863         (swi): Do not vector through 0x8 yet--there is nothing there.
5864         (addi): Reinstate.
5865         (movi): Likewise.
5866         (all): Use (const x) in subreg expressions.
5867
5868 1999-03-19  Ben Elliston  <bje@cygnus.com>
5869
5870         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5871         (smlal): Likewise.
5872
5873 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
5874
5875         * fr30.cpu (define-arch): Specify "forced" default-alignment.
5876         * mach.scm (-parse-alignment): Recognize "forced" alignment.
5877         * sim-cpu.scm (-extract-chunk-specs): New proc.
5878         (gen-define-fields): Use it.
5879         (-extract-chunk): New proc.
5880         (-gen-extract-beyond-var-list): Use it.
5881         (gen-extract-fields): Simplify.
5882
5883         Port to guile 1.3.1.
5884         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5885         (LIBIBERTY): New var.
5886         (HOB_OBJS): Add cgen-gh.o.
5887         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5888         * Makefile.in: Rebuild.
5889         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5890         * config.in: Rebuild.
5891         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5892         libncurses, libtermcap.
5893         Add checks for needed functions in guile 1.2 not in guile 1.3,
5894         and vice versa.  Add test for 3 argument scm_make_vector.
5895         * configure: Rebuild.
5896         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5897         definitions if guile doesn't have them.
5898         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5899         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
5900         with gh_vector_set_x.
5901         (cgh_qsort): Replace gh_list_length with gh_length.
5902         * cgen-gh.h: Add decls for added functions.
5903         (cgh_qsort): Don't declare if IN_HOBBIT.
5904         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
5905         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5906         scm_make_vector with gh_make_vector.
5907         * cos.scm: Use vector-length instead of length on vectors.
5908         * dev.scm (cload): Make varargs proc with keyword/value args.
5909         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
5910         provide version that works with guile 1.2 or 1.3.
5911         Include private copy of scmhob.h.
5912         * scmhob.h: New file.  Keep our own copy for now.
5913
5914 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
5915
5916         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5917         plain text.
5918         (-rtx-traverse-operands): Dump cx temp stack if debugging.
5919         (-cx-temp-dump-stack): Pretty up output.
5920
5921         * arm.cpu: comment out thumb.cpu until isa support ready.
5922         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5923         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5924         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5925
5926         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5927
5928 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5929
5930         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5931         (<hw-address>,mode-ok?): unsigned/signed are compatible.
5932
5933         * operand (op:new-mode): Improve error message.
5934
5935         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
5936         * arm7.cpu: New file.
5937
5938 1999-03-12  Ben Elliston  <bje@cygnus.com>
5939
5940         * arm.cpu: Lots of minor fixes after desk checking.
5941
5942 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5943
5944         * thumb.cpu: snapshot of current work
5945
5946         * rtl.scm (rtx-get): Tweak error message.
5947
5948 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
5949
5950         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5951         * Makefile.in: Rebuild.
5952
5953         * cos.c (cos_vector_copy): New function.
5954         (_object_copy): Use it.
5955
5956         * mode.scm (mode:eq?): Clean up.
5957         * rtl.scm (cx-new-mode): Copy attributes.
5958         (rtx-get): Don't make copy if <c-expr> with identical mode.
5959
5960         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5961         add new isas spec.
5962         (gr-names): h-gr register names moved here.
5963         (h-gr): Update.
5964         (cr-names): h-cr register names moved here.
5965         (h-cr): update.
5966         (dr-names): h-dr register names moved here.
5967         (h-dr): update.
5968         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5969         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5970         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5971         add new isas spec.
5972         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5973         add new isas spec.
5974         (gr-names): h-gr register names moved here.
5975         (h-gr): Update.
5976         (cr-names): h-cr register names moved here.
5977         (h-cr): update.
5978         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5979         (h-accums,h-psw): Ditto.
5980         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5981         add new isas spec.
5982         (gr-names): h-gr register names moved here.
5983         (h-gr-indices): Delete.
5984         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
5985         (sparc64 h-gr): Ditto.
5986         (h-y): Add get/set specs.
5987         (fp regs): Rewrite.
5988         (fp operands): Rewrite.
5989         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5990         (h-tbr,h-cwp,h-wim): Ditto.
5991         * sparc64.cpu (h-fpsr): Add get/set specs.
5992         * sparccom.cpu (ldd-reg+reg): Load value all at once.
5993         (fp-ld-op): New arg `dest', all callers updated.
5994         (*): Replace `make-di' with `join'.
5995
5996         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5997         present.
5998         (gen-semantic-code): Save/restore rtl generator state.
5999         (cgen-cpu.h): Call rtl-gen-init!.
6000         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6001         (-gen-ifld-extract-beyond): Ditto.
6002         (<multi-ifield>,gen-ifld-extract): Ditto.
6003         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6004         `gstate'.
6005         (-hw-gen-set-quiet-pc): Ditto.
6006         (<hw-pc>,gen-write): Ditto.
6007         (-hw-cxmake-get): Ditto.  Call getter function if present.
6008         (<hw-register>,cxmake-get-raw): New method.
6009         (<hw-register>,gen-set-quiet-raw): New method.
6010         (-hw-gen-set-quiet): New arg `gstate'.
6011         (hw-fun-access?): Delete.
6012         (gen-reg-access-defn): Output function contents.
6013         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6014         invocation.
6015         (-gen-hw-index): Ditto.
6016         (op:read): Update gen-read invocation.
6017         (op:write): Update gen-write invocation.
6018         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6019         operands.
6020         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6021         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6022         (<unit>,gen-profile-code): Update to sim.scm version.
6023
6024         * sim-arch.scm (-regs-for-access-fns): New proc.
6025         (-biggest-reg-mode): New proc.
6026         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6027         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6028         virtual regs separately.
6029         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6030         get/set specs.
6031         (gen-semantic-code): Save/restore rtl generator state.
6032         (cgen-cpu.h): Call rtl-gen-init!.
6033         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6034         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6035         renamed to mach-bfd-name.
6036         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6037         (-gen-ifld-extract-beyond): Ditto.
6038         (<multi-ifield>,gen-ifld-extract): Ditto.
6039         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6040         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6041         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6042         `gstate'.
6043         (hw-fun-access?): Delete.
6044         (-hw-gen-set-quiet-pc): New arg `gstate'.
6045         (<hw-register>,gen-get-macro): Rewrite.
6046         (<hw-register>,gen-set-macro): Rewrite.
6047         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6048         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6049         (<hw-register>,cxmake-get-raw): New method.
6050         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6051         (<hw-register>,gen-set-quiet-raw): New method.
6052         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6053         invocation.
6054         (-gen-hw-index): Ditto.
6055         (<hw-index>): New arg `gstate'.
6056         (-gen-hw-selector): Update call to rtx-c.
6057         (<pc>): New arg `gstate'.
6058         (op:read): Update gen-read invocation.
6059         (op:write): Update gen-write invocation.
6060         (<operand>,cxmake-get): Handle raw-reg.
6061         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6062         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6063         (<operand>,gen-set-quiet): Handle raw-reg.
6064         (<operand>,gen-set-trace): Handle raw-reg.
6065         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6066
6067         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6068         cgen_operand_type enum.
6069         (gen-operand-table): Add operand type enum.  Replace pointer to
6070         hardware element with its enum.  Null terminate table.
6071         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6072         Build operand table.
6073         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6074         * mach.scm (<arch-data>): New member `isas'.
6075         (adata-isas): New accessor.
6076         (<isa>): New class.
6077         (isa-default-insn-word-bitsize): New accessor.
6078         (isa-enum): New proc.
6079         (current-arch-default-insn-word-bitsize): Delete.
6080         (current-isa-list,current-isa-lookup): New procs.
6081         (-arch-parse-isa): New proc.
6082         (-arch-parse): Rewrite.
6083         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6084         (define-arch): Define ISA attribute.
6085         (def-isa-attr!,isa-supports?): New procs.
6086         (<mach>): New member `isas'.
6087         (mach-isas): New accessor.
6088         (-mach-parse): New arg `isas', all callers updated.
6089         (-mach-read): Recognize `isas'.
6090         (arch-finish!): Rewrite.
6091         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6092         @arch@_cgen_get_{int,vma}_operand.
6093         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6094         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6095         of pointer to table entry.
6096         * opcodes.scm (gen-switch): Handle multiply defined operands.
6097         * operand.scm (op-sort): New proc.
6098
6099         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6100         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6101         (hw-enum): Accept symbol argument.
6102         (hardware-builtin!): Delete attribute FUN-ACCESS.
6103         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6104
6105         * attr.scm (atlist-source-form): New proc.
6106         (attr-builtin!): New attr `PRIVATE'.
6107         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6108         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6109         if they have `PRIVATE' attribute.
6110         (gen-hw-table-defns): Output definitions of explicitly defined
6111         keyword tables.
6112         * hardware.scm (<keyword>): New member print-name.  Rename member
6113         `value' to `values', all uses updated.
6114         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6115         (keyword-parse): Rewrite.
6116         (-keyword-read): New proc.
6117         (define-keyword): New proc.
6118         (-hw-parse-keyword): New proc.
6119         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6120         `extern-keyword'.
6121         (-hw-parse-values): Ditto.
6122         (-hw-parse-get,-hw-parse-set): Rewrite.
6123         (hardware-init!): Add new comment define-keyword.
6124         * mach.scm (<arch>): New member `kw-list'.
6125         (arch:kw-list,arch_set-kw-list!): New accessors.
6126         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6127
6128         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6129         * mode.scm (mode-class-integral?): New proc.
6130         (mode-class-float?,mode-class-numeric?): New procs.
6131         (mode-integral?,mode-float?,mode-numeric?): New procs.
6132         (mode-compatible?): New proc.
6133         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6134         rtx-c-with-alist.
6135         (<ifield>,gen-extract): Ditto.
6136         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6137         (<gstate>): New class.
6138         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6139         (gstate-context,gstate-set-context!): New accessors.
6140         (gstate-macro?,gstate-set-macro?!): New accessors.
6141         (gstate-make,gstate-copy): New procs.
6142         (-rtl-current-gstate): New global.
6143         (current-gstate-simulator?): New proc.
6144         (current-gstate-context,current-gstate-macro?): New procs.
6145         (current-gstate,current-gstate-set!): New procs.
6146         (rtl-gen-init!): Rewrite.
6147         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6148         (tstate-make): New arg `gstate', all callers updated.
6149         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6150         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6151         (tstate-gstate,tstate-set-gstate!): New accessors.
6152         (tstate-copy): New proc.
6153         (tstate-new-cond?,tstate-new-set?): Rewrite.
6154         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6155         (rtx-traverse): New arg `gstate', all callers updated.
6156         (rtx-strdump): New proc.
6157         (-simplify-for-compilation): New arg `gstate', all callers updated.
6158         (semantic-in-out-operands): Ditto.
6159         (semantic-attrs): Ditto.
6160         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6161         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6162         (rtx-value): Rewrite.
6163         (<c-expr>,gen-name): New method.
6164         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6165         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6166         (cx-new-mode): New proc.
6167         (-rtx-c-with-tstate): New proc.
6168         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6169         callers updated.
6170         (-rtx-mode): Rewrite.
6171         (-rtx-mode-compatible?): New proc.
6172         (<c-expr-temp>): New member `value'.
6173         (cx-temp:value): New accessor.
6174         (<c-expr-temp>,make!): Override default method.
6175         (<c-expr-temp>,cxmake-get): Rewrite.
6176         (<c-expr-temp>,gen-set-quiet): Rewrite.
6177         (<c-expr-temp>,gen-set-trace): Rewrite.
6178         (gen-temp-defs): Use cx-temp:value.
6179         (record-temp!): New arg value, all callers updated.
6180         (cx-temp:cx:make): Delete.
6181         (-cx-temp-dump-stack): New proc.
6182         (rtx-get): New arg `gstate', all callers updated.  Do mode
6183         compatibility checks.  Ensure result has specified mode.
6184         (rtx-set-quiet): New arg `gstate', all callers updated.
6185         (rtx-set-trace): Ditto.
6186         (s-c-call): New arg `tstate', all callers updated.
6187         (s-c-raw-call): Ditto.
6188         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6189         (s-cmpop,s-if,e-if): Ditto.
6190         (s-subreg): New proc.
6191         (-par-new-temp!): New proc.
6192         (-par-next-temp!): Rewrite.
6193         (-par-replace-set-dests): Use -par-new-temp!.
6194         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6195         (s-sequence): Use -rtx-c-with-state.
6196         * rtx-funcs.scm (*): Update.
6197         (raw-reg:): New rtx function.
6198         (make-di): Delete.
6199         (join:,subreg:): New rtx functions.
6200
6201         * insn.scm (<insn>): New members pre-cond-trap, condition,
6202         post-cond-trap, compiled-condition.
6203
6204         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6205
6206         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6207
6208         * utils-cgen.scm (parse-symbol): New proc.
6209         (parse-string): New proc.
6210         (gen-get-macro,gen-set-macro): New arg `index-args'.
6211         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6212         Prepend \ to newlines.
6213
6214         * utils.scm (alist-remove-duplicates): Delete.
6215
6216         * sid.scm (sim-init!): Delete private debugging code.
6217
6218 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6219
6220         * cgen-sid.scm: New file for C++ simulator application.
6221         * sid-arch.scm: Ditto.
6222         * sid-cpu.scm: Ditto.
6223         * sid-decode.scm: Ditto.
6224         * sid-model.scm: Ditto.
6225         * sid.scm: Ditto.
6226         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6227
6228 1999-03-05  Ben Elliston  <bje@cygnus.com>
6229
6230         * arm.cpu: New file.
6231
6232 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6233
6234         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6235         * Makefile.in: Rebuild.
6236
6237         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6238         (-attr-parse): Validate default value.
6239
6240         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6241         (-CGEN-LANG-VERSION): Ditto.
6242         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6243         (<reader>): New member keep-isa plus accessors.
6244         (-keep-isa-set!,keep-isa-validate!): New procs.
6245         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6246         (common-arguments): New variable.
6247         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6248         (-debug-repl,continue): New procs.
6249         (-cgen,cgen): New procs.
6250         * cgen-gas.scm: Rewrite.
6251         * cgen-opc.scm: Rewrite.
6252         * cgen-sim.scm: Rewrite.
6253         * cgen-stest.scm: Rewrite.
6254
6255         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6256         (gas-test-finish!): Call opcodes-finish!.
6257         (gas-test-analyze!): Call opcodes-analyze!.
6258         (<hw-asm>): New method test-data.
6259         (<operand>,testdata): Rewrite.
6260         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6261         (sim-test-finish!): Call opcodes-finish!.
6262         (sim-test-analyze!): Call opcodes-analyze!.
6263         (<hw-asm>): New method test-data.
6264         (<operand>,testdata): Rewrite.
6265
6266 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6267
6268         * fixup.scm (reverse!): Define if missing.
6269         * *.scm: Use reverse! instead of list-reverse!.
6270
6271         * utils.scm (leading-id-char?): New proc.
6272         (id-char?): Rewrite.
6273         (chars-until-delimiter): New proc.
6274         * opc-itab.scm (extract-syntax-operands): Rewrite.
6275         (strip-mnemonic): Rewrite.
6276         (compute-syntax): Rewrite.
6277
6278         * pmacros.scm (-pmacro-substr): New proc.
6279         (pmacros-init!): Add builtin .substr.
6280
6281 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6282
6283         * thumb.cpu: New file.
6284
6285 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6286
6287         * Makefile.am (CGENCFLAGS): New variable.
6288         (WITH_HOBBIT): Use automake conditional.
6289         (CGEN_HOB_SRC): New variable.
6290         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6291         (*.o): Compile with CGENCFLAGS.
6292         (cgen-hob.c): Simplify.
6293         (cgen-nohob.c): New rule.
6294         (hobbit): Renamed from hob.x.
6295         (CLEANFILES): Add cgen-nohob.c.
6296         * Makefile.in: Rebuild.
6297         * doc/Makefile.in: Rebuild.
6298         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6299         (WITH_HOBBIT): Use AM_CONDITIONAL.
6300         * configure: Rebuild.
6301         * aclocal.m4: Rebuild.
6302
6303         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6304         with string-write-map.
6305
6306         * sim-cpu.scm (hw-need-storage?): New proc.
6307         (-gen-hardware-types): Use it.
6308         (gen-parallel-exec-elm): Call op-save-index?.
6309
6310         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6311
6312         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6313         UNSIGNED attribute.
6314         (-gen-ifld-extract-beyond): Ditto.
6315         (<integer>): Delete all references.
6316         (<sim-hardware>): Delete.
6317         (hw-profilable?): New proc.
6318         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6319         (<hw-register>): Rename method get-index-mode to save-index?.
6320         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6321         (<hw-register>,gen-sym-decl): Make virtual.
6322         (<hw-memory>,gen-sym-decl): Make virtual.
6323         (<hw-memory>): Rename method get-index-mode to save-index?.
6324         (<hw-address>,gen-sym-decl): Make virtual.
6325         (<operand>): New method save-index?.
6326         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6327
6328         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6329         prefix added.  All uses updated.
6330
6331         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6332         rather than pointer to table entry.
6333
6334         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6335         Remove all hw-asm,op-asm support.
6336         (-gen-parse-number,-gen-parse-address): New procs.
6337         (<keyword>,gen-parse): Redo function name computation.
6338         (<keyword>,gen-print): Ditto.
6339         (<operand>,gen-function-name): Rewrite.
6340         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6341         (opcodes-init!): Delete call to add-parser!.
6342
6343         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6344         Define enum using hardware semantic name.
6345         (-gen-hw-decl,-gen-hw-defn): New procs.
6346         (gen-hw-table-decls): Use -gen-hw-decl.
6347         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6348         CGEN_HW_ENTRY structs.
6349         (gen-operand-table): Output hw's enum, not pointer to table entry.
6350         (-gen-cpu-open): Build table of selected hardware elements.
6351
6352         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6353         (<hardware> support): Delete.
6354         (<hw-asm>): Delete, moved to hardware.scm.
6355         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6356         (<hw-asm>,gen-table-entry): New method.
6357         (<hw-asm>,parse!): Delete.
6358         (<keyword>,gen-table-entry): New method.
6359         (<keyword>,parse!): Delete.
6360         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6361         for gen-decl,gen-defn,gen-ref,gen-init.
6362         (desc-init!): Don't create parser for operand asm specs.
6363
6364         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6365         * ifield.scm (<ifield>): New member `mode'.
6366         (<ifield>,make!): New arg `mode'.
6367         (ifld-mode): Rewrite.
6368         (ifld-hw-type): Rewrite.
6369         (<ifield>,min-value): Rewrite.
6370         (<ifield>,max-value): Rewrite.
6371         (-ifield-parse): New arg `mode'.
6372         (-ifield-read): Update.
6373         (define-full-ifield): New arg `mode'.
6374         (define-full-multi-ifield): Ditto.
6375         (-multi-ifield-parse): Ditto.
6376         (-multi-ifield-read): Update.
6377         (define-full-multi-ifield): New arg `mode'.
6378         (ifield-builtin!): Update definition of f-nil.
6379         * simplify.inc (define-normal-ifield): Update call to
6380         define-full-ifield.
6381         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6382         (define-normal-hardware): Delete arg asm.  New args indices, values,
6383         handlers.  Update call to define-full-hardware.
6384         (define-simple-hardware,dsh): New pmacros.
6385         (define-normal-operand): Update call to define-full-operand.
6386         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6387         Specify INT/UINT mode instead.
6388         (h-gr,h-cr): Use "indices" instead of "asm".
6389         (h-dr,h-ps): Update keyword syntax.
6390         (h-r13,h-r14,h-r15): Ditto.
6391         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6392         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6393         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6394         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6395         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6396         Specify INT/UINT mode instead.
6397         (h-gr): Use "indices" instead of "asm".
6398         (h-cc): Update keyword syntax.
6399         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6400         Specify INT/UINT mode instead.
6401         (h-hi16,h-slo16,h-ulo16): Update.
6402         (h-gr,h-cr): Use "indices" instead of "asm".
6403         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6404         (h-accums): Update keyword syntax.
6405         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6406         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6407         Specify INT/UINT mode instead.
6408         (h-gr-indices): New pmacro.
6409         (h-gr32,h-gr64): Split up from h-gr.
6410         (h-a): Update type spec.  Use values instead of asm spec.
6411         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6412         (h-y,h-annul-p): Ditto.
6413         (h-asr): Update keyword spec.
6414         (h-lo10,h-lo13,h-hi22): Update.
6415         (get-freg-spec,set-freg-spec): New pmacros.
6416         (h-fr32,h-fr64): Split up from h-fr.
6417         (rdd): Comment out get/set specs.
6418         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6419         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6420         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6421         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6422         UNSIGNED.  Specify INT/UINT mode instead.
6423         (h-*): Use dsh instead of dnh where appropriate.
6424         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6425         (h-p,h-membarmask): Ditto.
6426         (membarmask): Use "handlers" instead of "asm".
6427
6428         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6429         values,handlers,getters,setters plus accessors.
6430         (hw-mode-ok?,hw-default-mode): New procs.
6431         (<hardware-base>): Rename method new-mode to mode-ok?
6432         (<hardware-base>): New method get-index-mode.
6433         (hw-index-mode): New proc.
6434         (pc?): Delete, moved to operand.scm.
6435         (address?): New proc.
6436         (<hardware>): Delete.
6437         (<hw-asm>): Definition moved here from desc.scm.
6438         (keyword-parse): New proc.
6439         (hardware-parsers): Delete.
6440         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6441         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6442         (-hw-parse-get,-hw-parse-set): New procs.
6443         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6444         indices,values,handlers,get,set.  Rewrite.
6445         (-hw-read-extra): Delete.
6446         (-hw-read): Update.
6447         (define-hardware): Don't add object if not selected.
6448         (define-full-hardware): Ditto.
6449         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6450         (<hw-register>): Member `type' moved to baseclass.  Delete member
6451         hw-asm.
6452         (<hw-register>,parse!): Rewrite.
6453         (<hw-register>): Delete methods get-rank,get-mode.
6454         (<hw-register>): Method new-mode renamed to mode-ok?
6455         (<hw-register>): New method get-index-mode.
6456         (<hw-pc>,parse!): Rewrite.
6457         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6458         (<hw-memory>,parse!): Rewrite.
6459         (<hw-memory>): Delete methods get-rank,get-mode.
6460         (<hw-memory>): Method new-mode renamed to mode-ok?
6461         (<hw-memory>): New method get-index-mode.
6462         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6463         hw-asm.
6464         (<hw-immediate>,parse!): Rewrite.
6465         (<hw-immediate>): Delete methods get-rank,get-mode.
6466         (<hw-immediate>): Method new-mode renamed to mode-ok?
6467         (<hw-address>): Delete member hw-asm.
6468         (<hw-address>,parse!): Rewrite.
6469         (<hw-address>): Delete methods get-rank,get-mode.
6470         (<hw-address>): Method new-mode renamed to mode-ok?
6471         (hw-profilable?): Delete.
6472         (hardware-init!): Delete hardware-parsers reference.
6473         Update argument specs of command define-full-hardware.
6474         (hardware-builtin!): Update definitions of hardware builtins.
6475         * operand.scm (<operand>): New members hw-name,mode-name.
6476         Delete member op-asm.  New member handlers.
6477         (<operand>,make!): Update.
6478         (op:hw-name,op:mode-name,op:handlers): New procs.
6479         (op:type): Rewrite.
6480         (op:mode): Rewrite.
6481         (<operand>): New method get-index-mode.
6482         (<pc>,make!): Update.
6483         (op:new-mode): Rewrite.
6484         (operand-parsers): Delete.
6485         (-operand-parse): Rewrite.  Return #f if insn not selected.
6486         (-op-read-extra): Delete.
6487         (-operand-read): Update.
6488         (define-operand,define-full-operand): Update.
6489         (operand-init!): Delete operand-parsers reference.
6490         Update syntax of define-full-operand command.
6491
6492         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6493         (define-full-insn): Update.
6494         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6495         (define-full-minsn): Update.
6496
6497         * mode.scm (<mode>): New member class.
6498         (mode:class): New proc.
6499         (mode?): Rewrite.
6500         (-mode-parse): New arg class.
6501         (define-full-mode): Update.
6502         (mode-find): Rewrite.
6503         (mode-make-int,mode-make-uint): New procs.
6504         (mode-init!): Update syntax of define-full-mode command.
6505         (mode-builtin!): Update definitions of builtin modes.
6506
6507         * model.scm (<profile>): Delete.
6508
6509         * read.scm (keep-atlist?): New proc.
6510         (keep-multiple?): New proc.
6511         (<parser-list>): Delete.
6512         (add-parser!,parse-spec!): Delete.
6513
6514         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6515         (def-rtx-syntax-node): Ditto.
6516         (-rtx-traverse-debug?): New variable.
6517         (tstate-make): New proc.
6518         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6519         (tstate-new-cond?,tstate-new-set?): New procs.
6520         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6521         tstate.  All callers updated.
6522         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6523         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6524         (-build-operand!): Replace arg cond? with tstate.
6525         (-build-reg-operand!,-build-mem-operand!): Ditto.
6526         (-build-index-of-operand!): Update making of <operand> object.
6527         (s-ifield): New arg tstate.  All callers updated.
6528         (hw:): New arg tstate.  All callers updated.  Replace call to
6529         current-hw-lookup with current-hw-sem-lookup-1.
6530         (s-index-of): New arg tstate.  All callers updated.
6531         (reg:,mem:): Ditto.
6532         (-rtx-use-sem-fn?): New proc.
6533         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6534         semantic cover fns.
6535         (s-convop): Only use semantic mode when using semantic cover fns.
6536         (s-cmpop): Call -rtx-use-sem-fn?.
6537         (s-cond,s-case): New arg tstate.  All callers updated.
6538         (s-parallel,s-sequence): Ditto.
6539
6540         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6541
6542         * types.scm (<scalar>): Rewrite implementation.
6543         (<integer>): Delete.
6544         (parse-type): Rewrite.
6545
6546         * utils-cgen.scm (parse-handlers): New proc.
6547
6548         * utils.scm (!=): New proc.
6549
6550 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6551
6552         * pmacros.scm (-pmacro-expand): Fix typo.
6553
6554 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6555
6556         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6557         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6558         * i960.cpu (build-hex2): New pmacro.
6559         (insn-opcode): Simplify.
6560         (insn-opcode2): Ditto.
6561
6562         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6563         * cgen-stest.scm (catch-with-backtrace): Ditto.
6564
6565 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6566
6567         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6568         All callers updated.
6569         (-pmacro-invoke): New proc.
6570         (-pmacro-sym,-pmacro-str): New procs.
6571         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6572         (pmacros-init!): Install builtins .iota, .map, .apply.
6573         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6574         (h-fr): Simplify register name spec.
6575         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6576         * utils.scm (num-args-ok?): New proc.
6577
6578 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6579
6580         * pmacros.scm (-pmacro-error): New proc.
6581         (-pmacro-expand): Use it.
6582         (-pmacro-splice): New proc.
6583         (pmacros-init!): Install new builtin .splice.
6584
6585         * sparc.cpu: Include sparc64.cpu when appropriate.
6586         (f-mmask,f-simm11): Moved to sparc64.cpu.
6587         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6588         (ANNUL attribute): Delete.
6589         (test-* pmacros): New arg cc, all callers updated.
6590         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6591         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6592         atomic-opc.
6593         (ldstub,swap): Moved to sparccom.cpu.
6594         * sparc64.cpu: Add more insns.
6595
6596 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6597
6598         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6599         CGEN_ATTR_VALUE.
6600         (cgen-sem-switch.c): Ditto.
6601         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6602         moved to cgen-engine.h.
6603         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6604         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6605         global.  Cache attributes and insn length in IDESC.
6606         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6607         @cpu@_opcode renamed to @cpu@_get_idata.
6608         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6609         done later underneath sim_resume.
6610         (@mach@_mach): Record @cpu@_prepare_run.
6611         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6612         updated.
6613         (-hw-gen-set-quiet-pc): Ditto.
6614         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6615         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6616         (<hw-addr>,cxmake-get): Ditto.
6617         (<hw-iaddr>,cxmake-get): Ditto.
6618         (<pc>,cxmake-get): Ditto.
6619         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6620         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6621         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6622         (<hw-pc>,gen-write): Use hw-selector-default.
6623         (<hw-register>,gen-write): Ditto.
6624         (<hw-memory>,gen-write): Ditto.
6625         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6626         (-gen-hw-selector): New proc.
6627
6628         * desc.scm: New file.
6629         * desc-cpu.scm: New file.
6630         * opcodes.scm: Split up into several smaller files.
6631         * opc-asmdis.scm: New file.
6632         * opc-ibld.scm: New file.
6633         * opc-itab.scm: New file.
6634         * opc-opinst.scm: New file.
6635         * Makefile.am (desc): New target.
6636         (opcodes): Update args to cgen-opc.scm.
6637         * Makefile.in: Rebuild.
6638         * aclocal.m4: Rebuild.
6639         * config.in: Rebuild.
6640         * configure.in: Update arg to AC_INIT.
6641         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6642         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6643         AC_PROG_INSTALL.
6644         * configure: Rebuild.
6645         * cgen-gas.scm: Update files to load.
6646         * cgen-opc.scm: Ditto.  Reorganize option letters.
6647         * cgen-sim.scm: Update files to load.
6648         * cgen-stest.scm: Ditto.
6649         * dev.scm (cload): New app "DESC".
6650         (load-opc): Update files to load.
6651         (load-gtest,load-sim,load-stest): Ditto.
6652
6653         * attr.scm (bool-attr?): New proc.
6654         (attr-list-enum-list): New proc.
6655         (-attr-sort): Rewrite.
6656         (attr-builtin!): Give ALIAS attribute a fixed index.
6657         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6658         calculate attribute enum list.
6659         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6660
6661         * insn.scm (-insn-parse): Renamed from parse-insn.
6662
6663         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6664         (-hw-read): Ditto.
6665
6666         * mode.scm (-mode-parse): Renamed from parse-mode.
6667
6668         * operand.scm (<operand>): New member `selector'.
6669         (<operand>,make!): Use default selector.
6670         (hw-selector-default): New variable.
6671         (hw-selector-default?): New proc.
6672
6673         * pmacros.scm (pmacros-init!): New proc.
6674         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6675         (-env-set!): Delete.
6676         (-pmacro-expand): New proc apply-macro.
6677         Use it in scan-list,scan.  Scan list first, then see if macro
6678         invocation.
6679         (define-pmacro): Rewrite.
6680         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6681
6682         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6683         selected if (current-mach) seen.
6684         (rtx?): Renamed from rtx-uneval?, all callers updated.
6685         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6686         updated.
6687         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6688         selector, all callers updated.
6689         (hw:): New arg selector, all callers updated.  Delete old comments
6690         and code.
6691         (reg:,mem:): Handle selectors
6692         * rtx-funcs.scm (reg:): Handle selectors.
6693
6694         * read.scm: Renamed from cpu.scm.
6695         (<command>): New class.
6696         (<reader>): New member commands.
6697         (reader-add-command!): New proc.
6698         (reader-lookup-command): New proc.
6699         (reader-error,-reader-process-expanded,reader-process): New procs.
6700         (reader-read-file!): New proc.
6701         (include): Call reader-read-file!.
6702         (cmd-if): New proc.
6703         (cpu-load): Call reader-read-file!.
6704         * utils.scm (num-args): New proc.
6705         * simplify.inc: New file.
6706         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6707         procs.  Move define-normal-foo procs (and abbreviated forms) to
6708         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6709         routines.
6710         * fr30.cpu: Include simplify.inc.
6711         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6712         * i960.cpu: Include simplify.inc.
6713         * m32r.cpu: Include simplify.inc.
6714         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6715         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6716         * sparc.cpu: Include simplify.inc.
6717         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6718         * utils-cgen.scm (parse-error): Moved to read.scm.
6719         (sanitize): Rewrite.
6720         (utils-init!): New proc.
6721
6722 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6723
6724         * sparc.cpu: New file.
6725         * sparc32.cpu: New file.
6726         * sparc64.cpu: New file.
6727         * sparccom.cpu: New file.
6728         * sparc.opc: New file.
6729
6730 1999-01-27  Frank Eigler  <fche@cygnus.com>
6731
6732         * utils.scm (gen-copyright): New proc.
6733
6734 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6735
6736         Parameterize rtl parsing, rather than having lots of little handlers.
6737         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6738         Delete member traverse.
6739         (rtx:set-traverse!): Delete.
6740         (-rtx-valid-types,-rtx-valid-matches): New variables.
6741         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6742         instead of expression.  All callers updated.
6743         (def-rtx-node): New args arg-types,arg-modes.
6744         (def-rtx-syntax-node): Ditto.
6745         (def-rtx-dual-mode): Ditto.
6746         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6747         All callers updated.
6748         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6749         All callers updated.
6750         (rtx-macro-expand): New proc.
6751         (-rtx-traverse-check-args): Delete.
6752         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6753         an rtx specific traverser.
6754         (-rtx-any-mode?,-rtx-symornum?): New procs.
6755         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6756         (-rtx-traverse-no-mode): Delete.
6757         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6758         (-rtx-traverse-operands): Rewrite.
6759         (-rtx-traverse-expr): Rewrite.
6760         (rtx-traverse): Don't expand macros here, leave for caller to do.
6761         (rtx-simplify): Delete.
6762         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6763         attributes.
6764         (rtx-true?,rtx-false?): Ditto.
6765         (-rtx-ref-type): Set dest is operand 1 now.
6766         (-simplify-for-compilation): New proc.
6767         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6768         Expand macros before calling rtx-traverse.  Sort operands by name
6769         to avoid unnecessary semantic formats.
6770         (semantic-attrs): New proc.
6771         (rtx-uneval?): Handle (<rtx-func> ...).
6772         (s-boolifop): Delete arg mode.  All callers updated.
6773         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6774         (eq-attr): New arg obj.
6775         (eq-attr:): Delete.
6776         * m32r.cpu (rach): Update calls to andif.
6777
6778         * minsn.scm (-minsn-parse-expansion): Renamed from
6779         parse-minsn-expansion.
6780         (-minsn-parse): Renamed from parse-minsn.
6781         (-minsn-read): Renamed from read-minsn.
6782         (def-minsn): Don't check APPLICATION here.
6783         (def-full-minsn): New proc.
6784         (define-macro-insn): Check APPLICATION here.  Expand macros.
6785         (define-normal-macro-insn): Ditto.
6786
6787         * utils.scm (word-value): New arg start-lsb?.
6788         (word-mask,word-extract): Ditto.
6789         (split-bits,powers-of-2): Use integer-expt instead of expt.
6790         (bit-set?): Handle 32 bit values (which are bignums).
6791         (cg-logand,cg-logxor): New functions.
6792         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6793         (<ifield>,field-value): Update call to word-value.
6794         (<ifield>,min-value): Use integer-expt instead of expt.
6795         (<ifield>,max-value): Ditto.
6796
6797         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6798
6799         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6800
6801         Compute raw instruction format in addition to semantic based format.
6802         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6803         (<iformat> accessors): Rename accessors to ifmt-*.
6804         (<sformat>): New class.
6805         (fmt-enum): Renamed from fmt:enum.
6806         (-ifmt-search-key): Rewrite.
6807         (-sfmt-search-key): New proc.
6808         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6809         Compute iformat and sformat search keys.
6810         (ifmt-build): Update.
6811         (sfmt-build): New proc.
6812         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6813         (ifmt-compute!): Compute instruction format <iformat> based on
6814         instruction fields alone.  Compute new semantic format <sformat>
6815         based on instruction fields and semantic information.
6816         (ifmt:lookup): Delete.
6817         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6818         (current-sfmt-list): New proc.
6819         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6820         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6821         (insn-length,insn-length-bytes): Update.
6822         (insn:mask-length,insn:mask): Update.
6823         (insn-lookup-op): Update.
6824         * gas-test.scm (gas-test-analyze!): Update.
6825         (gen-gas-test): Ditto.
6826         * sim-test.scm (sim-test-analyze!): Update.
6827         (gen-sim-test): Ditto.
6828         * opcodes.scm (gen-operand-instance-table): Update.
6829         (gen-operand-instance-ref): Ditto.
6830         (max-operand-instances): Use heuristic if semantics not parsed.
6831         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6832         (opcodes-analyze!): Only scan semantics of building operand instance
6833         tables.
6834         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6835         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6836         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6837         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6838         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6839         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6840         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6841
6842         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6843         New arg lsb0?  All callers updated.
6844         (decode-bits): New arg lsb0?.  All callers updated.
6845         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6846         of expt.
6847         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6848         (build-slots): Call integer-expt instead of expt.
6849         (build-decode-table-entry): Handle crossing word boundaries better.
6850         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6851         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6852
6853         * enum.scm (define-enum): Rewrite.
6854         (define-normal-enum): Ditto.
6855         (def-full-insn-enum): New proc.
6856         (define-normal-insn-enum): Rewrite.
6857
6858         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6859         valid C.
6860         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6861
6862         * dev.scm: Add sid support.
6863
6864         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6865         (CLEANFILES): Add tmp-*.
6866         * Makefile.in: Rebuild.
6867
6868         * doc/Makefile.am: New file.
6869         * doc/Makefile.in: New file.
6870         * doc/cgen.texi: New file.
6871         * Makefile.am (SUBDIRS): Define.
6872         * Makefile.in: Rebuild.
6873         * configure.in: Create doc/Makefile.
6874         * configure: Rebuild.
6875
6876 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
6877
6878         * insn.scm (insn:syn): Delete.
6879
6880 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
6881
6882         * fr30.cpu (model fr30-1): Add state variables load-regs,
6883         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
6884         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6885         (model m32rx): Ditto.
6886         (addi): Simplify function unit usage spec.
6887         (ld-plus): Rewrite operand names in function unit usage spec.
6888         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6889         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6890         overridden.  Allow operand to appear in input and output spec.
6891         (<insn>,gen-profile-code): string-append -> string-list.
6892
6893         * ifield.scm (define-ifield): Call pmacro-expand.
6894         (define-full-ifield,define-normal-ifield): Ditto.
6895         (define-multi-ifield,define-normal-multi-ifield): Ditto.
6896
6897         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6898         with-scache and without-scache cases.
6899
6900 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
6901
6902         * fr30.cpu (fr30-1): Add state variable h-gr.
6903         Add units u-cti, u-load, u-store, u-ldm, u-stm.
6904         (all insns): First pass at providing cycle counts.
6905         * sim.scm (<unit>,gen-profile-code): Only check for output operands
6906         when initializing unit output operands, ditto for input operands.
6907
6908         * insn.scm (insn-length,insn-length-bytes): New procs.
6909         * mach.scm (-adata-set-derived!): Use them.
6910         * sim-cpu.scm (-gen-sem-case): Ditto.
6911
6912         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6913         (-gen-write-case): Ditto.
6914         (gen-semantic-fn): Ditto.  Split into two:
6915         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
6916         in non-scache case.
6917         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
6918         scache/no-scache appropriately.  All callers updated.
6919         (-gen-sem-case): PCADDR->IADDR.
6920         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6921
6922         * sim-decode.scm (*): Replace string-append,string-map with
6923         string-list,string-list-map where the result is sufficiently large.
6924         (-gen-decode-insn-table): Go back to simple version for non-scache
6925         case: just record IDESC in decoder tables and leave field extraction
6926         to the caller.
6927         (-gen-decode-switch): Ditto.
6928         (-gen-decode-fn): Ditto.
6929         (-gen-extract-decls): Only emit format enum if with-scache?.
6930         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6931         non-scache case.
6932         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6933         (-gen-insn-timing): Ditto.
6934         * sim.scm (gen-argbuf-type): Only output sem_fields union in
6935         with-scache case.
6936
6937         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6938         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6939
6940 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
6941
6942         * cpu.scm (keep-mach-validate!): New proc.
6943         (include): New proc.
6944
6945         * mach.scm (current-arch-mach-name-list): New proc.
6946         (-parse-arch-machs): Always return canonical form.
6947         (def-arch): Validate user specified machs to be kept.
6948         (def-mach-attr!): Simplify.
6949
6950         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6951         (option-init!): Initialize it.
6952         (option-set!): Set it.
6953         (gen-insn-table-entry): Emit 0 for operand instance ref if not
6954         output operand instance tables.
6955         (cgen-opc.in): Only output operand instance tables if asked to.
6956
6957         * sim.scm (option-init!,option-set!): Clarify returned value.
6958
6959         * sim.scm (gen-mach-bfd-name): Move from here.
6960         * utils-cgen.scm: To here.
6961
6962 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
6963
6964         * fr30.cpu (ilm): Fix comment field.
6965         (cond-branch): Remove explicit setting of COND-CTI, let cgen
6966         compute it.
6967
6968         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6969         (rtx-true?, rtx-false?): New procs.
6970         * rtx-funcs.scm (annul): Rename vpc to pc.
6971         (-rtx-traverse-if): Improve determination of whether then/else parts
6972         are conditionally executed.
6973
6974         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6975         outer level.
6976         (gen-argbuf-type): Simplify generated definition (big sem_fields
6977         union moved outside).
6978
6979 1999-01-11  Ben Elliston  <bje@cygnus.com>
6980
6981         * doc/porting.texi: New file.
6982
6983         * doc/intro.texi: New file.
6984         (Layout): Use @example to insert preformatted ASCII text (such as
6985         diagrams). @code is inappropriate here.
6986
6987 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
6988
6989         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6990
6991         * m32r.opc (print_hash): Cast dis_info.
6992
6993         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6994         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6995         get/set macros.
6996
6997 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
6998
6999         * i960.cpu (f-br-disp): Remove RELOC attribute.
7000         (f-ctrl-disp): Ditto.
7001         (callx-disp): set-quiet -> set for (reg h-gr 2).
7002         (callx-indirect,callx-indirect-offset): Ditto.
7003
7004         * Makefile.am (gas-test): Fix dependencies.
7005         * Makefile.in: Rebuild.
7006         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7007         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7008         (gas-test-analyze!): Use syntax-break-out.
7009         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7010         (sim-test-analyze!): Use syntax-break-out.
7011         (cgen-build.sh): Use gen-file-name.
7012         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7013         * insn.scm (syntax-break-out): New proc.
7014         * utils.scm (gen-file-name): New proc.
7015
7016         * fixup.scm (nil,<?,<=?,>?): Delete.
7017
7018         * utils.scm (count-true): Rewrite.
7019
7020         * slib/sort.scm: Move sort.scm to slib directory.
7021         * cpu.scm: Update.
7022
7023         * iformat.scm (ifmt-compute!): Record empty format.
7024
7025         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7026         internal procs outside.  Handle expression register numbers.
7027         Handle index-of.
7028
7029         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7030
7031         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7032         every register.
7033         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7034         (gen-semantic-fn,-gen-sem-case): Ditto.
7035         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7036         (cgen-semantics.c): Ditto.
7037         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7038         (gen-ifmt-argvars-defns): New proc.
7039         (gen-ifmt-argvars-assigns): New proc.
7040         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7041         (-gen-decode-fn): Handle non-with-scache case.
7042         (cgen-decode.c): Define WANT_CPU to @cpu@.
7043         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7044         (cgen-model.c): Define WANT_CPU to @cpu@.
7045         * sim.scm (gen-ifld-extract-argvar): New proc.
7046         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7047         with FUN-ACCESS specified.
7048         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7049         (<hw-register>,gen-extract): New arg local?.
7050         (<hw-address>,gen-extract): Ditto.
7051         (-hw-cxmake-get): Handle non-with-scache case.
7052         (-hw-gen-set-quiet): Ditto.
7053         (<hw-address>,cxmake-get): Handle non-with-scache case.
7054         (gen-op-extract-argvar): New proc.
7055         (<operand>,gen-record-profile): Rewrite.
7056         (<operand>,gen-profile-code): Rewrite.
7057         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7058         (gen-argbuf-fields-union): New proc.
7059         (gen-argbuf-type): Use it.  Handle non-scache case.
7060
7061         * *.scm: class:foo procs renamed to class-foo.
7062         * attr.scm (<attribute>): New member `for'.
7063         (-attr-parse): New first value in list for default if
7064         none specified.
7065         (non-bool-attr-list,attr:add!): Delete.
7066         (def-attr): Use current-attr-add!.
7067         (atlist-attr-value-no-default): New proc.
7068         (attr-lookup-default): Handle boolean attributes.
7069         (gen-attr-enum): New proc.
7070         (-attr-remove-meta-attrs-alist): New proc.
7071         (attr-nub): New proc.
7072         (current-attr-list-for): New proc.
7073         (current-{ifld,hw,op,insn}-attr-list): New procs.
7074         (attr-builtin!): New proc.
7075         * cpu.scm (keep-obj?): Rewrite.
7076         (-init-parse-cpu!): Call arch-init!.
7077         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7078         (-finish-parse-cpu!): Call arch-finish!.
7079         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7080         (def-enum,def-full-enum): Use current-enum-add!.
7081         (gen-obj-list-enums): New proc.
7082         * hardware.scm (hw:add!,hw:lookup): Delete.
7083         (def-hardware,def-hardware-ext): Use current-hw-add!.
7084         (hw:std-attrs,hw:attr-list): Delete.
7085         (hardware-builtin!): Define builtin hardware attributes.
7086         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7087         (def-ifield,def-full-ifield): Use current-ifld-add!.
7088         (ifld:std-attrs,ifld:attr-list): Delete.
7089         (ifield-builtin!): New proc.
7090         * insn.scm (insn:add!,insn:lookup): Delete.
7091         (def-full-insn): Use current-insn-add!.
7092         (insn:std-attrs): Delete.
7093         (insn-builtin!): New proc.
7094         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7095         minsn-list.
7096         (<arch-data>): New member machs.
7097         (current-attr-list,current-enum-list): New procs.
7098         (current-op-list,current-minsn-list): New procs.
7099         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7100         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7101         Ditto.
7102         (-parse-arch-machs): New proc.
7103         (-arch-parse): New arg machs, all callers updated.
7104         (-arch-read): Handle machs spec.
7105         (def-arch): Define MACH attribute here.
7106         (mach-init!,mach-finish!): Not here.
7107         (cpu:add!,cpu:lookup): Delete.
7108         (def-cpu): Use current-cpu-add!.
7109         (<mach>): New member bfd-name.
7110         (-mach-parse): New arg bfd-name, all callers updated.
7111         (-mach-read): Handle bfd-name spec.
7112         (mach:add!,mach:lookup): Delete.
7113         (def-mach): Use current-mach-add!.
7114         (def-mach-attr!): New proc.
7115         (arch-init!): New proc.
7116         (arch-finish!): New proc.  Reverse all object lists here.
7117         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7118         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7119         (define-normal-macro-insn): Ignore minsn if mach not kept.
7120         * mode.scm (mode-builtin!): New proc.
7121         * model.scm (model:add!,model:lookup): Delete.
7122         (def-model): Use current-model-add!.
7123         * opcodes.scm (insn:attr-list): Delete.
7124         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7125         (gen-attr-table-defn): Emit value for default.
7126         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7127         (op:attr-list): Delete.
7128         (gen-operand-decls,gen-insn-decls): New proc.
7129         (compute-insn-attr-list): Delete.
7130         (cgen-opc.h): Reorganize and simplify.
7131         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7132         (def-operand,def-full-operand): Use current-op-add!.
7133         (op:std-attrs): Delete.
7134         (operand-enum): Delete.
7135         (operand-builtin!): Define builtin operand attrs.
7136         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7137         (gen-attr-enum-decl): Use gen-obj-list-enums.
7138         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7139         Rewrite.
7140         * fr30.cpu (define-arch): Add machs spec.
7141         (f-i4): SIGNED attribute -> !UNSIGNED.
7142         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7143         (HASH-PREFIX): Define operand attribute.
7144         (NOT-IN-DELAY-SLOT): Define insn attribute.
7145         * i960.cpu (define-arch): Add machs spec.
7146         * m32r.cpu (define-arch): Add machs spec.
7147         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7148         (HASH-PREFIX): Define operand attribute.
7149         (FILL-SLOT): Define insn attribute.
7150
7151 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7152
7153         * fr30.cpu (stilm): Correct mask for and operation.
7154
7155 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7156
7157         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7158         Replace START/EXIT with start/pass.
7159         (gen-sim-test): Delete ".text".
7160
7161 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7162
7163         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7164
7165 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7166
7167         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7168         (h-sbit): Make it FUN-ACCESS.
7169         (h-gr): Reorder so that general regs are always printed by number.
7170
7171 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7172
7173         * i960.cpu (flushreg): Use nop.
7174
7175 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7176
7177         * m32r.cpu (default-alignment): Specify.
7178         * mach.scm (<arch-data>): New member default-alignment.
7179         (adata:default-alignment): New proc.
7180         (current-arch-default-alignment): New proc.
7181         (-arch-parse): New arg default-alignment.
7182         (parse-alignment): New proc.
7183         (-arch-read): Handle default-alignment spec.
7184
7185         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7186
7187         * insn.scm (f-%): Delete.
7188         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7189         be readded if proved useful.
7190         (gen-extract-fields): Ditto.  Use gen-ifetch.
7191         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7192         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7193
7194 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7195
7196         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7197
7198 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7199
7200         * fr30.cpu: Remove stub macros.
7201         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7202         (div2): Don't use addc/subc.
7203
7204 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7205
7206         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7207         if opcodes.
7208
7209 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7210
7211         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7212
7213 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7214
7215         * cpu.scm (keep-all?): New proc.
7216         (assert-keep-all): Use it.
7217         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7218         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7219         Check for spelling errors.
7220
7221 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7222
7223         * rtl.scm (s-convop): Call -rtx-sem-mode.
7224
7225 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7226
7227         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7228         (-parse-hw-profile): Ditto.
7229         (<hw-register>, parse!): Return `void' result.
7230         (<hw-pc>, parse!): Ditto.
7231         (<hw-memory>, parse!): Ditto.
7232         (<hw-immediate>, parse!): Ditto.
7233         (<hw-address>, parse!): Ditto.
7234
7235         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7236         (-ifld-parse-encode-decode): New proc.
7237         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7238         (-multi-ifield-parse): Set encode/decode to #f.
7239         (ifld:decode-mode): New proc.
7240         * utils.scm (nub): Rewrite.
7241         * operand.scm (op-nub): Rewrite.
7242         * sim.scm (<ifield>, gen-type): Rewrite.
7243         (-gen-ifld-argbuf-defn): New proc.
7244         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7245         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7246         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7247         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7248         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7249         New method gen-trace-extract.
7250         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7251         from gen-argbuf-elm, return "" if not caching register address.
7252         Rewrite gen-extract.  New method gen-trace-extract.
7253         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7254         gen-extract, gen-trace-extract, cxmake-get.
7255         (<hw-iaddress>): New method cxmake-get.
7256         (op-needed-iflds): New proc.
7257         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7258         (-gen-op-argbuf-defn): New proc.
7259         (gen-op-extract): Renamed from op:extract.
7260         (gen-op-trace-extract): Renamed from op:trace-extract.
7261         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7262         and rewritten.
7263         (gen-argbuf-elm): Rewrite.
7264         * sim-decode.scm (-gen-record-args): Update.
7265
7266         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7267
7268         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7269         argument position.  Flag symbolic macros in function position as
7270         an error.
7271         (define-pmacro): Handle quoting in definition of symbolic macros.
7272         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7273
7274 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7275
7276         * fr30.opc (parse_register_list): Account for reverse masks
7277         for load and store.
7278         (print_register_list): Ditto.
7279         (parse_low_register_list_ld): New function.
7280         (parse_hi_register_list_ld): New function.
7281         (parse_low_register_list_st): New function.
7282         (parse_hi_register_list_st): New function.
7283         (print_hi_register_list_ld): New function.
7284         (print_hi_register_list_st): New function.
7285         (print_low_register_list_ld): New function.
7286         (print_low_register_list_st): New function.
7287         * fr30.cpu (ldr15dr): Implement workaround.
7288         (ldm0,ldm1,stm0,stm1): Implemented.
7289
7290 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7291
7292         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7293         * configure: Regenerate.
7294         * Makefile.am (WITH_HOBBIT): Update.
7295         (cgen-hob.c): Remove Makefile dependency.
7296         (cgen.o): Depend on cgen-gh.h, config.h.
7297         * Makefile.in: Regenerate.
7298         * aclocal.m4: Regenerate.
7299
7300 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7301
7302         * i960.cpu, i960.opc: New files.
7303
7304 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7305
7306         * fr30.opc (parse_register_number): New function.
7307         (parse_register_list): New function.
7308         (parse_low_register_list): Use parse_register_list.
7309         (parse_hi_register_list): Use parse_register_list.
7310         * fr30.cpu (sth): Fix assembler syntax. Implement more
7311         insns.
7312
7313 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7314
7315         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7316         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7317         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7318         (-op-gen-set-trace-parallel): Ditto.
7319         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7320
7321         * fr30.cpu (call,calld): Fix setting of pc.
7322         (f-op5): Fix start bit number.
7323
7324 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7325
7326         * fr30.cpu (st): Fix operand ordering. Implement more
7327         insns.
7328
7329 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7330
7331         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7332         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7333         (fmt-semantic-operands): Move to sim.scm.
7334         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7335         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7336         (<hw-index>): New method get-name.
7337         (op-profilable?): Moved to sim.scm.
7338         (op-nub): New proc.
7339         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7340         (op-profilable?): Moved here from operand.scm.
7341         (gen-extract-type): Delete.
7342         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7343         (-gen-argfld-ref): New proc.
7344         (-gen-ifld-argfld-name): New proc.
7345         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7346         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7347         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7348         (<hardware-base>): Delete method gen-extract-type.  New method
7349         gen-argbuf-elm.
7350         (<hw-register): Ditto.  Update method gen-extract.
7351         (<operand>, method gen-argbuf-elm): Rewrite.
7352         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7353         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7354         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7355
7356         * sim-decode.scm (-gen-record-args): Tweak.
7357
7358         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7359
7360 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7361
7362         * doc/porting: Fix typo: gas->sim.
7363         * fr30.opc (print_m4): New function.
7364         * fr30.cpu: Implemented many insns.
7365
7366 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7367
7368         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7369
7370         * fr30.cpu (f-rel9): Delete RELOC attribute.
7371         (f-rel12): Add PCREL-ADDR attribute.
7372         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7373         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7374         * fr30.opc (print_label9): Delete.
7375
7376         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7377         code for CTI indicators.
7378         * insn.scm (insn-cti?): Simplify.
7379         * utils-cgen.scm (atlist:cti?): New proc.
7380
7381 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7382
7383         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7384         (f-i20-4,f-i20-16,f-i20): New fields.
7385         (i20): New operand.
7386         (ldi8): Implement.
7387         (ldi20): New insn.
7388         (ldi32m): Delete.
7389         (jmpd): Implement.
7390         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7391         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7392         * mach.scm (arch-data): Ditto.
7393         (current-arch-default-insn-word-bitsize): Renamed from
7394         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7395         (-arch-read): Update.
7396
7397         * hardware.scm (hw:attr-list): Move here ...
7398         * opcodes.scm: ... from here.
7399
7400         * ifield.scm (fld:bitrange): Delete.
7401         (fld:word-offset,fld:word-length): New procs.
7402         (ifield?): Use class-instance.
7403         (<ifield>, method field-start): Rewrite.
7404         (ifld:enum): New proc.
7405         (<ifield>, methods field-mask,field-value): Rewrite.
7406         (-ifield-parse): Rewrite.
7407         (<multi-ifield> support): Rewrite.
7408         (ifld-beyond-base?): Rewrite.
7409         (ifld:std-attrs): New variable.
7410         (ifld:attr-list): New proc.
7411         * iformat.scm (-compute-insn-mask): Rewrite.
7412         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7413         Simplify.
7414         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7415         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7416         onto type.
7417         (<operand>): Ditto.  Forward onto index instead.
7418         (gen-ifld-decls,gen-ifld-defns): New procs.
7419         (ifld:insert,ifld:extract): New procs.
7420         (<ifield>): New methods gen-insert, gen-extract.
7421         (<multi-ifield>): Ditto.
7422         (<hw-index>): Forward gen-insert,gen-extract onto value.
7423         (<hw-asm>): Delete insert/extract support.
7424         (<hw-register,hw-memory,hw-immediate>): Ditto.
7425         (gen-hash-defines): Use string-list.
7426         Define CGEN_MAX_IFMT_OPERANDS.
7427         (gen-switch): Use string-list,string-list-map.
7428         (gen-fget-switch,gen-fset-switch): Use string-list.
7429         (gen-parse-switch,gen-insert-switch): Ditto.
7430         (gen-extract-switch,gen-print-switch): Ditto.
7431         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7432         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7433         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7434         (gen-ivalue-entry): New proc.
7435         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7436         computation.  Use 0 for operand ref table if ALIAS insn.
7437         (gen-minsn-table-entry): Use string-list.
7438         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7439         (gen-opcode-open): Record address of ifield table.
7440         (cgen-opc.h): Call gen-ifld-decls.
7441         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7442         * types.scm (<bitrange>): New members word-offset,word-length.
7443         Delete member total-length.  Delete methods start,mask,value.
7444         (bitrange:word-offset,bitrange:word-length): New procs.
7445         * sim-cpu.scm (gen-define-fields): Simplify.
7446         (gen-extract-fields): Simplify.
7447         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7448         (<ifield>): New methods gen-ifld-extract-decl.
7449         Delete method gen-ifld-extract-beyond.
7450         (<multi-ifield>): New methods gen-ifld-extract-decl.
7451         (<multi-ifield>, method gen-ifld-extract): Implement.
7452         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7453         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7454
7455         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7456         (-rtx-traverse-syntax-no-mode): New proc.
7457         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7458         (s-ifield): New proc.
7459         (s-shop): Don't prepend `unsigned' for unsigned modes.
7460         * rtx-funcs.scm (ifield): New rtx function.
7461         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7462         (delay): New rtx function.
7463         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7464
7465         * cos.scm (-elm-make-method-getter): Fix typo.
7466
7467         * utils.scm (backslash): Handle lists of strings.
7468
7469 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7470
7471         * fr30.cpu (f-rel9): Correct for pc+2.
7472         (label9): Use print_label9.
7473         * fr30.opc (print_label9): New function.
7474
7475 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7476
7477         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7478         * fr30.opc (parse_low_register_list): Renamed.
7479         (parse_hi_register_list): Renamed.
7480         (print_hi_register_list): Renamed.
7481         (print_low_register_list): Renamed.
7482
7483 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7484
7485         * fr30.cpu (f-rel9): Now a pc relative offset.
7486
7487 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7488
7489         * opcodes.scm (op-asm): Move to here, from operands.scm.
7490         (<op-asm>, method parse!): Validate arguments.
7491         (<operand>, method gen-function-name): Fix thinko.
7492         * operand.scm (<operand>, method make!): Don't set op-asm here.
7493         * utils.scm (list-elements-ok?): New proc.
7494
7495         * opcodes.scm: Clean up pass.
7496
7497 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7498
7499         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7500         the fr30_int function.
7501         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7502         (h-dr): Add FUN-ACCESS attribute.
7503
7504 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7505
7506         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7507         for C symbol for models array.
7508
7509 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7510
7511         * fr30.opc (parse_reglist_low): New function.
7512         (parse_reglist_hi): New function.
7513         (print_reglist_low): New function.
7514         (print_reglist_hi): New function.
7515         * fr30.cpu: Finish remaining insn stubs.
7516
7517 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7518
7519         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7520
7521         * fr30.cpu (ldi32m): Don't use for disassembly.
7522
7523 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7524
7525         * fr30.cpu (int): Implement it.
7526
7527 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7528
7529         * rtx-funcs.scm (nop): Fix C code.
7530
7531         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7532
7533         * fr30.cpu (f-i32): New ifield.
7534         (i32): New operand.
7535         (ldi32): New insn.
7536         (ldi32m): New macro insn.
7537         (inte): Provide simple version for now.
7538
7539         * sim-arch.scm: New file.
7540         * sim.scm: Move architecture support generation to sim-arch.scm.
7541         * cgen-sim.scm: Load sim-arch.scm.
7542         * dev.scm: Ditto.
7543
7544         * hardware.scm (pc?) New proc.
7545         (class <hardware-base>): Rewrite method 'pc?.
7546         (class <hardware>): Forward 'pc? to the hardware type.
7547         (class <hw-pc>): New method 'pc?.
7548
7549         Add support for variable length ISAs.
7550         * ifield.scm (ifld-beyond-base?): New proc.
7551         * m32r.cpu: Remove integral-insn? spec.
7552         * mach.scm (arch:derived,arch:set-derived!): New procs.
7553         (arch:app-data,arch:set-app-data!): New procs.
7554         (class <arch>): New members derived, app-data.
7555         (class <cpu>): Delete member integral-insn?.
7556         (cpu:integral-insn?): Delete.
7557         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7558         (-cpu-read): Delete integral-insn? support.
7559         (state:decode-assist): Delete.
7560         (state:int-insn?): Delete.
7561         (<derived-arch-data>): New class.
7562         (-adata-set-derived!): New proc.
7563         (mach-finish!): Call it.
7564         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7565         (gen-operand-instance): Add COND_REF support.
7566         (gen-operand-instance-table): Ditto.
7567         (gen-hash-defines): Update.
7568         (gen-extract-switch): Update type of `insn_value' arg.
7569         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7570         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7571         updated.
7572         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7573         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7574         beyond the base insn (for large insns).
7575         (-gen-extract-beyond-var-list): New proc.
7576         (gen-extract-fields): Handle large insns.
7577         (-gen-write-case): Update sem_arg computation.
7578         Update initial vpc computation.
7579         (gen-semantic-fn): Ditto.  Update type of `insn'.
7580         (-gen-sem-case): Update sem_arg computation.
7581         Update initial vpc computation.
7582         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7583         (-gen-extract-word): New proc.
7584         (<ifield>): New method gen-ifld-extract-beyond.
7585         (gen-ifld-extract-beyond): New proc.
7586         * types.scm (bitrange-overlap?): New proc.
7587
7588         * utils.scm (bits->bytes): New proc.
7589         (bytes->bits): New proc.
7590
7591         Move extraction support into decoder.
7592         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7593         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7594         support to sim-decode.scm.
7595         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7596         be array of IDESC,FMT entries.  Make the array const.
7597         (-gen-gcc-label-table): Make array const.
7598         (-gen-decode-switch): Branch to extraction code after insn has been
7599         identified.
7600         (-gen-decode-insn-globals): Delete extract handler from
7601         @cpu@_insn_sem.
7602         (gen-decode-fn): Add extraction support.
7603         (-gen-sem-fn-decls): Delete extraction fn decls.
7604         (-gen-idesc-decls): Update @cpu@_decode decl.
7605         (-gen-idesc-init-fn): Delete extraction support.
7606         (-gen-extract-decls): New proc.
7607
7608         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7609         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7610
7611         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7612         All callers updated.
7613         (table-entry:make): Record insn value as insn object, not name.
7614         All uses updated.
7615
7616         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7617         collision with C function.
7618         (path_dirname): Similarily.
7619         * hobbit.c,hobbit.h: Rebuild.
7620
7621 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7622
7623         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7624
7625 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7626
7627         * fr30.cpu: Implement more instruction stubs.
7628
7629 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7630
7631         * fr30.cpu: Implement more instruction stubs.
7632
7633 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7634
7635         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7636
7637         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7638
7639         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7640         (op:std-attrs): Ditto.
7641         * opcodes.scm (gen-operand-instance): Ditto.
7642         (gen-switch): Ditto.
7643         * m32r.cpu (condbit,accum): Update.
7644         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7645
7646 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7647
7648         * enum.scm (-enum-read): Fix typo.
7649
7650         * iformat.scm (-ifmt-search-key): Simplify a little.
7651
7652 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7653
7654         * doc/porting: semantics.c -> sem.c.
7655         * Makefile.in: Regenerate.
7656         * fr30.cpu (add): Change ADD to add. Add more registers and set
7657         status bits on 'add' instruction.
7658
7659 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7660
7661         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7662         of 0.
7663
7664 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7665
7666         * minsn.scm (minsn:enum): Update, call current-arch-name.
7667
7668         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7669
7670         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7671         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7672         (ARCH,CGEN,CGENFLAGS): New variables.
7673         (gas-test,sim-test): New rules.
7674         * Makefile.in: Rebuild.
7675         * configure.in (arch): Define.
7676         * configure: Rebuild.
7677
7678         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7679         * All .scm files: Ditto.
7680
7681         * dev.scm: Fix gas-test call to cpu-load.
7682         * gas-test.scm: Clean up pass to remove bit-rot.
7683         * sim-test.scm: Ditto.
7684
7685         * enum.scm (read-enum): Fix typo in `vals' handling.
7686
7687         * hardware.scm (-parse-hw-type): Fix typo.
7688         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7689         (def-hardware,define-normal-hardware): Ditto.
7690
7691         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7692         (display-var): Use it.
7693         * hobbit.c: Rebuild.
7694         * hobbit.h: Rebuild.
7695
7696         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7697         avoid hobbit problem.
7698         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7699         `parallel-insns-' to avoid hobbit problem.
7700
7701 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7702
7703         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7704         (parse_slo16,parse_ulo16): Ditto.
7705         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7706
7707 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7708
7709         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7710         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7711         * Makefile.in: Rebuild.
7712         * insn.scm (define-normal-insn): Expand pmacros.
7713         * mode.scm (<mode>): New member `host?'.  All uses updated.
7714         (mode:host?): New proc.
7715         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7716         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7717         (define-rtx-dual-mode): Ditto.
7718         (s-index-of): New proc.
7719         (s-unop): Use plain C for host mode operations.
7720         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7721         * rtx-funcs.scm (index-of): New rtx function.
7722         * sim.scm (<hw-index>): New method cxmake-get.
7723
7724 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7725
7726         * sim-cpu.scm (-gen-engine-decls): Delete.
7727
7728 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7729
7730         * doc/rtl (Example): Correct Typo.
7731         * doc/porting: Add 'make dep' step to opcodes port instructions.
7732         * fr30.opc: New file.
7733         * fr30.cpu: New file.
7734
7735 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7736
7737         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7738         * Makefile.am (GUILEINCDIR): New variable.
7739         (INCLUDES): Use it.
7740         * configure: Regenerate.
7741         * Makefile.in: Ditto.
7742         * aclocal.m4: Ditto.
7743
7744 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7745
7746         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7747         (cgen-semantics.c): Ditto.
7748         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7749         * sim-model.scm (cgen-model.c): Ditto.
7750         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7751         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7752
7753         * opcodes.scm (read-cpu.opc): Handle empty file.
7754
7755         * cos.scm (-elm-make-method-setter): Fix typo.
7756
7757         * cpu.scm (-init-parse-cpu!): Call types-init!.
7758         (-finish-parse-cpu!): Call types-finish!.
7759         * ifield.scm (<ifield>): Delete members start,length.
7760         New member bitrange.
7761         (<ifield>, methods field-start,field-length): Update.
7762         (fld:start): New arg insn-len.  All callers updated.
7763         (<ifield>, methods field-mask,field-value): Update.
7764         (-ifield-parse): Update.
7765         (ifield-init!): Update.
7766         * iformat.scm (compute-insn-length): Simplify.
7767         (compute-insn-mask): Update.
7768         * insn.scm (insn:value): Update.
7769         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7770         (current-arch-default-insn-bitsize): New proc.
7771         (current-arch-insn-lsb0?): New proc.
7772         (-arch-parse,-arch-read): Update.
7773         (<cpu>): New member file-transform.
7774         (-cpu-parse,-cpu-read): Update.
7775         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7776         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7777         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7778         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7779         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7780         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7781         * operand.scm (op:start): Update call to field-start method.
7782         * sim-decode.scm (opcode-slots): New arg lsb0?.
7783         (fill-slot!,build-slots): Ditto.
7784         (build-decode-table-entry,build-decode-table-guts): Ditto.
7785         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7786         (gen-decode-fn): Ditto.
7787         (cgen-decode.c): Update call to gen-decode-fn.
7788         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7789         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7790         (cgen-cpuall.h): Call -gen-cpuall-includes.
7791         * types.scm (<bitrange>): New class.
7792         (types-init!,types-finish!): New procs.
7793         * utils-cgen.scm (parse-number): New proc.
7794         (parse-boolean): New proc.
7795         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7796         (word-mask): Rewrite.
7797         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7798         (m32rxf): New field `file-transform'.
7799         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7800
7801         * hobbit.h: Fix include file name.
7802
7803 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7804
7805         * slib: New directory of slib files used by cgen/hobbit.
7806         * hobbit.scm: New file.
7807         * hobbit.c: New file.
7808         * hobbit.h: New file.
7809         * hobscmif.h: New file.
7810         * hob-main.c: New file.
7811         * hobslib.scm: New file.
7812         * hob.sh: New file.
7813         * Makefile.am: Add support for compiling hobbit, and using compiled
7814         version of hobbit to compile cgen.
7815         * Makefile.in: Regenerate.
7816         * configure.in: Support --with-hobbit.
7817         * configure: Regenerate.
7818         * acconfig.h (WITH_HOBBIT): Add.
7819         * config.in: Regenerate.
7820
7821         * rtl.scm: New file, was cdl-c.scm.
7822         Definition of rtx funcs moved to rtx-funcs.scm.
7823         (semantic-in-out-operands): Rewrite to compute object form of
7824         semantic code.
7825         * rtx-funcs.scm: New file.
7826
7827         * cgen-gh.c: #include "config.h".
7828         (gh_cadddr,gh_cddddr): New fns.
7829         (cgh_vector_to_list): New fn.
7830         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7831         (cgh_init): Prefix qsort procs with "cgh-".
7832         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7833         * cgen.c: #include "config.h".
7834
7835         * attr.scm (bitset-attr?): New proc.
7836         (<bitset-attribute>, method parse-value): Value syntax changed from
7837         (val1 val2 ...) to val1,val2,....
7838         (<bitset-attribute>): New method gen-value.
7839         (<integer-attribute>): New method gen-value.
7840         (<enum-attribute>): New method gen-value.
7841         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7842         (<reader>): New class.
7843         (CURRENT-ARCH,CURRENT-READER): New globals.
7844         (keep-mach?): Move here from mach.scm.
7845         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7846         (<arch>): New class.
7847         (<arch-data>): New class.
7848         (<cpu>): Make subclass of <ident>.
7849         (*ENDIAN* variables): Delete.
7850         (process-state-vars): Delete.
7851         (mach-finish!): Add `base' value to MACH attribute.
7852         * hardware.scm (<hardware>): Make subclass of <ident>.
7853         (hw:std-attrs): New global.
7854         (hw-profilable?): New proc.
7855         * ifield.scm (<ifield>): Make subclass of <ident>.
7856         (sort-ifield-list): Move here from iformat.scm.
7857         * iformat.scm (<iformat>): Renamed from <insn-format>.
7858         Make subclass of <ident>.
7859         (-ifmt-search-key): Include cti? in categorization of formats.
7860         (ifmt-analyze): Compile semantics (turn to object form).
7861         * insn.scm (<insn>): Make subclass of <ident>.
7862         New member compiled-semantics.
7863         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7864         * mode.scm (<mode>): Make subclass of <ident>.
7865         (UBI): Delete.
7866         * model.scm (<unit>): Make subclass of <ident>.
7867         New members inputs,outputs.
7868         (<model>): Make subclass of <ident>.  New member state.
7869         (-unit-parse): Parse inputs,outputs.
7870         (<iunit>): New class.
7871         (-insn-timing-parse-model): New proc.
7872         (parse-insn-timing): Function unit spec rewritten.
7873         * operand.scm (<operand>): Make subclass of <ident>.
7874         New members sem-name,num,cond?  New method gen-pretty-name.
7875         (hw-index-scalar): New global.
7876         (op-nub-hw): Move here from rtl.scm.
7877         (op:lookup-sem-name,op-profilable?): New procs.
7878         * pmacros.scm: Rewrite to pass through hobbit.
7879         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7880         * utils.scm (logit): Make a macro.
7881         (bit-set?): Rewrite.
7882         (high-part): Rewrite.
7883
7884         * m32r.cpu (define-arch): Move to top of file.
7885         (cpu family m32rbf): Renamed from m32rb.
7886         (model m32r/d): Function unit spec rewritten.
7887         (all insns): Ditto.  Replace UBI with BI.
7888
7889         * opcodes.scm (gen-attr-table-decls): Declare
7890         @arch@_cgen_hw_attr_table.
7891         (gen-attr-table-defns): Generate hw attribute table.
7892
7893         * sim-cpu.scm (-gen-engine-decls): New proc.
7894         (-gen-model-decls): New proc.
7895         (gen-parallel-exec-type): Add new member `written' to struct parexec.
7896         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7897         (-gen-record-profile-args): Simplify.
7898         (-gen-parallel-sem-case): Delete.
7899         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7900         New local `written'.  Delete profiling code.
7901         (-gen-sem-case): Ditto.
7902         (-uncond-written-mask,-any-cond-written?): New procs.
7903         (cgen-sem-switch.c): Include duplicates of insns that can be executed
7904         parallelly or serially, and write-back handlers for all parallel insns.
7905         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7906         support to initialization of struct insn_sem.
7907         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7908         (-gen-insn-sem-type): Add parallel write-back support to struct
7909         insn_sem.
7910         (-gen-idesc-init-fn): Add support for virtual insns.
7911         Add parallel write-back support.
7912         * sim-model.scm (gen-model-profile-fn): Delete
7913         (-gen-model-fn-decls): New proc.
7914         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7915         (-gen-model-init-fn): New proc.
7916         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7917         members in @mach@_init_cpu.
7918         (cgen-model.c): Generate model handlers for each insn.
7919         * sim.scm (gen-define-field-macro): Cti insns handled differently.
7920         (<hw-pc>): New method gen-write.
7921         (<hw-register>, method gen-write): New arg `mode'.
7922         (<hw-register>): Delete method gen-record-profile!.
7923         New method gen-profile-index-type.
7924         (<hw-memory>, method gen-write): New arg `mode'.
7925         (<hw-address>, method gen-extract): Delete.
7926         (<hw-address>, method gen-write): New arg `mode'.
7927         (<hw-index>, method get-write-index): Rewrite.
7928         (<pc>, method cxmake-get-direct): Delete.
7929         (<pc>): New method cxmake-get.  Comment out methods
7930         gen-set-quiet,gen-set-trace.
7931         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7932         gen-profile-index-type,gen-profile-code.
7933         Delete method gen-pretty-name.  Rewrite method gen-write.
7934         Delete method cxmake-get-direct.
7935         (-op-gen-set-trace): Update `written'.
7936         (-op-gen-set-trace-parallel): Ditto.
7937         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7938         (gen-cpu-insn-enum-decl): Add extra entries for parallel
7939         insns and their write-back handlers.
7940         (insn-op-lookup): New proc.
7941         (<unit>): New method gen-profile-code.
7942         (<iunit>): New method gen-profile-code.
7943         (gen-argbuf-elm): Add profiling elements.
7944         (gen-argbuf-type): Define cti insns separately in their own struct.
7945         Add member `addr_cache' to this struct.  Add entries for pbb virtual
7946         insns.  Move semantic entries here from struct scache.
7947         Delete everything from struct scache except argbuf.
7948         (<insn>, method gen-profile-locals): Rewrite.
7949         (<insn>, method gen-profile-code): Rewrite.
7950         (sim-finish!): Create virtual pbb insns.
7951
7952 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7953
7954         * m32r.cpu (h-cr): Add bbpc,bbpsw.
7955         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7956         (h-psw,h-bpsw,h-bbpsw): Define.
7957         (rte,trap): Handle bbpc,bbpsw.
7958         * opcodes.scm (max-operand-instances): Fix typo.
7959         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7960         hardware elements to be fun-access.
7961         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7962
7963 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7964
7965         * m32r.cpu (trap): Pass `pc' to m32r_trap.
7966
7967 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
7968
7969         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7970
7971 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
7972
7973         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7974         architecture name.
7975         (mach m32r): Update.
7976
7977         * mach.scm (mach:supports?): New proc.
7978         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7979         gen-reg-access-{decls,defns}.
7980         * sim.scm (gen-reg-access-{decl,defn}): New procs.
7981         (gen-mach-bfd-name): New proc.
7982         (gen-arch-reg-access-{decls,defns}): New procs.
7983         (cgen-arch.[ch]): Output register access cover fns.
7984
7985         * hardware.scm (hardware-builtin!): Set print handlers for
7986         h-addr,h-iaddr.
7987         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7988         `od'.
7989         (CGEN_PRINT_NORMAL,print_hash): Ditto.
7990         (my_print_insn): Ditto.  Delete args buf, buflen.
7991         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7992         (-hw-asm-specs): Add `handlers' spec.
7993         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
7994         `normal-hw-asm'.
7995         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
7996         print.
7997         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7998         (<hw-asm>, parse!): New method.
7999         (gen-insn-table-entry): Print semantics.
8000         (gen-opcode-open): Renamed from gen-opcode-table.
8001
8002         * utils.scm (string-write): No longer a macro.
8003         (-string-write): Handle procedure args.
8004         * opcodes.scm: Update all calls to string-write.
8005         * sim-cpu.scm: Ditto.
8006         * sim-decode.scm: Ditto.
8007         * sim-model.scm: Ditto.
8008         * sim.scm: Ditto.
8009
8010 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8011
8012         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8013         (-gen-insn-builders,-gen-insn-builder): New procs.
8014
8015 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8016
8017         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8018         (gen-opcode-table): Properly terminate comment.
8019
8020 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8021
8022         * Version 0.6.0.
8023         Clean up pass over everything, so starting fresh.