OSDN Git Service

* cos.scm (object-assign!): New function.
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-10-28  Doug Evans  <dje@sebabeach.org>
2
3         * cos.scm (object-assign!): New function.
4         * mode.scm (/mode-set-word-params!): Call it.
5
6 2009-10-25  Doug Evans  <dje@sebabeach.org>
7
8         Record bitset attributes internally as a list.
9         Record rtx attribute values internally as ((rtx-expr)).
10         * attr.scm (bitset-attr?): Delete, unused.
11         (<bitset-attribute> parse-value): Rewrite.
12         (/attr-parse): Rewrite bitset default value processing.
13         (/attr-read): Pick out values of scalar attributes to distinguish
14         them from bitset values which are a list.
15         Fix spelling errors for processing of default values.
16         Handle string attributes.
17         (bitset-attr->list): Delete, all callers updated.
18         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
19         All callers updated.
20         (atlist-source-form): Rewrite.
21         * hardware.scm (<hardware-base> 'get-isas): Update recognition
22         of all isas.
23         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
24         -> (ISA foo bar).
25         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
26         values are now lists.
27         * mach.scm (def-isa-attr!): Update, bitset attribute values,
28         including the default, are now lists.
29         (all-isas-attr-value): Result is now a list.
30         * doc/rtl.texi: Clean up pass over attribute docs.
31
32         Change internal representation of rtx attribute values.
33         * attr.scm (/attr-val-is-rtx?): New function.
34         (attr-value): Call it.
35         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
36         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
37         Disallow rtx values for bitset attributes.
38         (/attr-read): Record rtx in default value as ((rtx-expr)).
39         (/attr-eval): Update.
40
41 2009-10-24  Doug Evans  <dje@sebabeach.org>
42
43         * gen-all-doc: Add sh.cpu.
44         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
45         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
46
47         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
48         (/gen-sfrag-case): Ditto.
49         * sim-cpu.scm (/gen-sem-case): Ditto.
50
51         * doc/rtl.texi: Add note that different ifields, operands, insns,
52         and minsns may occur with the same name in different isas.
53         Add note on the canonical form of rtl expressions.
54
55 2009-10-23  Doug Evans  <dje@sebabeach.org>
56
57         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
58         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
59
60         * decode.scm: Tweak various comments.
61         (/opcode-slots): Add FIXME.
62         (/build-decode-table-guts): Add assert.
63         * utils-sim.scm (/gen-set-itype-and-extract): New function.
64         (/gen-bracketed-set-itype-and-extract): New function.
65         (/gen-decode-default-entry): Rewrite.
66         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
67         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
68         updated.  Don't unnecessarily emit check for whether all opcode bits
69         have been examined.
70         (/gen-decode-expr-set-itype): Delete.
71         (/gen-decode-expr-entry): Update.
72         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
73         updated.  Keep track of decoder tables used thus far.
74         (/gen-decoder-switch): Ditto.
75         * utils.scm (word-bit-value): New function.
76
77 2009-10-14  Doug Evans  <dje@sebabeach.org>
78
79         * ifield.scm (<ifield>, value): Provide default initial value.
80         (ifield-encode-mode): Delete
81         (ifield-decode-mode): Delete duplicate definition.
82         (<derived-ifield>, 'make!): Initialize members encode, decode.
83         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
84         ifld-encode-mode.
85         (<multi-ifield>, 'gen-insert): Ditto.
86         
87 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
88
89         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
90         for @foo@_init_idesc_table.
91
92 2009-09-30  Doug Evans  <dje@sebabeach.org>
93
94         * doc/intro.texi: Mention SID.
95         * doc/sim.texi: Ditto.
96         * doc/porting.text (Doing a simulator port): Add some text.
97
98 2009-09-27  Doug Evans  <dje@sebabeach.org>
99
100         * cos.scm (/class-table): New global.
101         (/class-uid, /class-set-uid!): New functions.
102         (/class-parent-name): Renamed from /class-parents.
103         (/class-make!): Change parents arg to parent-name, all callers updated.
104         Assign uid to class.
105         (/class-lookup-uid): New function.
106         (/class-parent-classes): Rewrite.
107         (/class-mi?): Delete.
108         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
109         Delete.
110         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
111         (/class-compute-class-desc, class-desc-dump): Update.
112         (/object-make!): Update.
113         (/object-make-with-values!): Delete arg class-desc, all callers
114         updated.
115         (/object-copy): Delete arg top?, all callers updated.
116         (/object-specialize): Delete.
117         (/object-elements, /object-top-class): Delete.
118         (/object-class-name, /object-class-desc): Update.
119         (/object-class-uid): New function.
120         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
121         class-make, /class-subclass? /class-lookup-element,
122         Update.
123         (/elm-delta, elm-list): Delete.
124         (/elm-make-method-getter, elm-get, elm-xget): Update.
125         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
126         (elm-make-getter, elm-make-setter): Update.
127         (/method-lookup-next): Update.
128         (send): Don't specialize class passed to method.
129         (send-next): New arg class-name, all callers updated.
130         (/class-parent, /class-parent-via-path, object-parent): Delete.
131         (class-cons-parent!, class-append-parent!): Delete.
132         (object-reset!): Init /class-table.
133
134         * cos.scm (/object-debug-classes): Delete.
135         (/object-debug-elements, /object-debug-methods): Delete.
136
137         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
138         (method-proc): Delete.
139         (method-make-virtual!, method-make-virtual-forward!): Delete.
140         * ifield.scm (<ifield> field-start): Update.
141         (<ifield> field-length, pretty-print): Update.
142         (<multi-ifield> field-length, field-start, pretty-print): Update.
143         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
144         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
145         (<array> gen-sym-defn): Ditto.
146         (<hardware-base> gen-defn): Renamed from gen-defn.
147         (<hw-register> gen-type): Update.
148         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
149         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
150         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
151         (<hw-immediate> gen-type): Update.
152         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
153         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
154         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
155         (<array> gen-sym-defn): Ditto.
156         (<hardware-base> gen-defn): Renamed from gen-defn.
157         (<hw-register> gen-type): Update.
158         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
159         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
160         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
161         (<hw-immediate> gen-type): Update.
162         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
163
164 2009-09-25  Doug Evans  <dje@sebabeach.org>
165
166         * operand.scm (/anyof-merge-setter): Handle set-quiet.
167         * rtl.scm (rtx-single-set?): Handle set-quiet.
168
169         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
170         rtl-cover-fns?, macro?.  All callers updated.
171         (estate-make-for-normal-rtl-c): Delete, have all callers call
172         estate-make-for-rtl-c directly.
173         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
174         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
175
176         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
177         replaces /par-replace-set-dests.
178         (/par-replace-set-src-expr-fn): New function, replaces
179         /par-replace-set-srcs.
180         (s-parallel): Rewrite.
181
182         * rtl.scm (rtx-pretty-strdump): New function.
183         * rtl-traverse.scm (/rtx-canon-error): Use it.
184         (<eval-state>): New member outer-expr.
185         (estate-error): Include outer expression in error message if present.
186
187 2009-09-23  Doug Evans  <dje@sebabeach.org>
188
189         * xc16x.cpu (h-cr): New hardware.
190         (muls): Comment out parts that won't compile, add fixme.
191         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
192         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
193         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
194
195         Rewrite rtl processing to require it to be "canonicalized" first,
196         and write a full canonicalizer / expression checker.
197         Remove all appearances of DFLT in canonical rtl.
198         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
199         then rtx-simplify.
200         * iformat.scm (ifmt-analyze) Use canonical semantics.
201         * insn (<insn>): New member canonical-semantics.
202         * mach.scm (<arch>): New member multi-insns-instantiated?.
203         (/instantiate-multi-insns!): New function.
204         (/canonicalize-insns!): New function.
205         (arch-analyze-insns!): Canonicalize insn semantics before processing
206         them.
207         * mode.scm (/mode-set-word-params!): New function.
208         (mode-void?): New function.
209         (mode-compatible?): VOID is compatible with VOID.
210         (/mode-word-sizes-defined?): New global.
211         (mode-set-word-modes!): Use/set it.
212         (mode-ensure-word-sizes-defined): Update.
213         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
214         Redo WI/UWI/AI/IAI handling.
215         (op:new-mode): No longer accept DFLT.
216         (<derived-operand> constructor): Ensure all fields are initialized.
217         (<anyof-operand> constructor): Ditto.
218         (/derived-parse-ifield-assertion): Delete arg `args'.
219         All callers updated.
220         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
221         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
222         (rtl-c-expr, rtl-c++): Ditto.
223         (/rtl-c-get): Use mode of operand, not containing expression.
224         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
225         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
226         estate-for-insn? instead.
227         (s-unop): Use mode of expression, not first operand.
228         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
229         (s-sequence): Remove DFLT support.
230         (ifield): Use mode of expression, not UINT.
231         (pc): Comment out, unused.
232         (int-attr): New rtx kind.
233         (attr): Deprecate.
234         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
235         * rtl-traverse.scm (/rtx-canon-debug?): New global.
236         (/make-cstate): New function.
237         (/cstate-context, /cstate-outer-expr): New functions.
238         (/rtx-canon-error): New function.
239         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
240         /rtx-get-last-cond-case-rtx): New functions.
241         (/rtx-canon-*): New functions.
242         (/rtx-canner-table, /rtx-operand-canoners): New globals.
243         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
244         (/rtx-option, /rtx-option-list?): Rewrite.
245         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
246         Rewritten, all callers updated.
247         (/rtx-canon-expr, /rtx-canon): New functions.
248         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
249         (rtx-canonicalize-stmt): New function.
250         (tstate-make): Remove arg `set?'.  All callers updated.
251         (tstate-new-set?): Delete.
252         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
253         moved to /rtx-canon-*.
254         (/rtx-traverse-normal-operand): New function.
255         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
256         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
257         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
258         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
259         Ditto.
260         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
261         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
262         (/rtx-make-traverser-table): Update.
263         (/rtx-traverse-operands): Remove mode processing, now done during
264         canonicalization.
265         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
266         (/rtx-traverse): Ditto.
267         (rtx-init-traverser-tables!): New function.
268         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
269         (rtx-verify-no-dflt-modes): New function.
270         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
271         (rtx-simplify-insn): Use insn-canonical-semantics.
272         (rtx-canonicalize): Moved to rtl-traverse.scm.
273         (/compile-expr-fn, rtx-compile): Delete.
274         (/rtx-trim-rtx-list): New function.
275         (/rtx-trim-for-doc): Handle set, if.
276         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
277         (/rtx-valid-mode-types): Update.
278         (/rtx-valid-matches): Update.
279         (/rtx-find-matchexpr-index): New function.
280         (rtx-lookup): Require rtx-kind to be the rtx name.
281         (def-rtx-node): New arg result-mode, all callers updated.
282         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
283         (rtx-lazy-sem-mode): Delete.
284         (/rtx-closure-make): New arg `mode', all callers updated.
285         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
286         (rtx-operand-obj): Rewrite.
287         (rtx-make-xop): New functions.
288         (/hw): Renamed from `hw', all callers updated.
289         Use the correct mode instead of DFLT for the index.
290         (rtl-builtin!): Call rtx-init-traversal-tables!.
291         (rtl-finish!): Update.
292         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
293         Update mode arg-type.
294         (pc): Comment out.
295         (int-attr): New rtx kind.
296         (attr): Deprecate.
297         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
298         (/frag-cost-compute!): Ditto.
299         * semantics.scm (/build-operand!): Delete args op-name, op.
300         New arg op-expr.  All callers updated.
301         (/build-mem-operand!): Remove DFLT support.
302         (semantic-compile): Update process-expr!, mode arg deleted.
303         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
304         rtl-c++ calls.
305         (/gen-sem-case, /gen-sfrag-code): Ditto.
306         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
307         (/op-gen-set-trace): New function.  If not doing profiling, or using
308         the pbb engine, call /op-gen-set-quiet.
309         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
310         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
311         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
312         * utils.scm (find-first-index): New function.
313         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
314
315         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
316         to COMPARE.
317         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
318
319 2009-09-21  Doug Evans  <dje@sebabeach.org>
320
321         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
322         All callers updated.  Add FIXME.
323         (all rtx functions): Rename local estate to *estate*.  It's an
324         artificial argument added to the rtx, so make it stand out.
325
326         * openrisc.cpu (or32 isa): Fix setup-semantics.
327
328         * rtl.scm (rtx-class-*?): Delete, unused.
329         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
330
331         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
332         (init-reader!): Set /CGEN-RTL-VERSION to default.
333
334         * read.scm (cpu-load): Print load parameters.
335
336         * dev.scm (load-doc): Set verbose-level to 2.
337
338 2009-09-20  Doug Evans  <dje@sebabeach.org>
339
340         * rtl.scm (rtx-strdump): Use write instead of display.
341
342 2009-09-17  Doug Evans  <dje@sebabeach.org>
343
344         * utils-cgen.scm (obj-csv-names): New function.
345         * utils-sim.scm (/sfmt-contents): Use it in logging message.
346
347 2009-09-12  Doug Evans  <dje@sebabeach.org>
348
349         Clean up pass of mode handling.
350         Make use of mode name vs <mode> object more consistent and clear.
351         * hardware.scm (/keyword-read): Default mode to the mode name,
352         not the <mode> object.
353         (/hw-parse-indices): Parse mode name and pass mode object to
354         <hw-asm> constructor.
355         (/hw-parse-values): Ditto.
356         (<hw-register> parse!): Pass mode name to /hw-parse-indices
357         and /hw-parse-values.
358         (<hw-memory> parse!): Ditto.
359         (<hw-address> parse!): Ditto.
360         * mode.scm (/mode-table): New global, replaces mode-list.
361         Modes stored in hashtable instead of list.
362         (/mode-class-table): New global.
363         (mode-list-non-alias-values): Update.
364         (mode:eq?, mode-compatible?, mode:add!): Update.
365         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
366         (mode-maybe-lookup): New function.
367         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
368         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
369         (mode-find, mode-set-word-modes!): Update
370         (mode-ensure-word-sizes-defined): Update.
371         (/sort-mode-classes!): New function.
372         (mode-builtin!): Update.  Sort mode classes here.
373         (mode-finish!): Sort mode classes here too.
374         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
375         All callers updated.
376         (rtl-c-set-quiet): Allow mode to be name of object.
377         (rtl-c-set-trace): Ditto.
378         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
379         <mode> object.  All callers updated.
380         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
381         (rtx-lazy-sem-mode): Ditto.
382         (<rtx-temp> make!): Assert mode arg is a <mode> object.
383         (rtx-env-make): Allow var-list modes to be name or object.
384         * sem-frags.scm (/frag-expr-assq-locals): New function.
385         (/frag-compute-locals!): Call it.
386         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
387         All callers updated.
388         * semantics.scm (/build-mem-operand!): Handle mode aliases.
389
390         * sim-test.scm (*): Symbols no longer can be passed to string-append.
391
392 2009-09-10  Doug Evans  <dje@sebabeach.org>
393
394         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
395         Improve error message for missing or too many bits.
396         (/insn-parse): Don't verify iformat for virtual insns.
397         
398         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
399         non-multi-insns.
400         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
401         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
402         * sid.scm (pbb-engine-insns): Ditto.
403         * sim-decode.scm (cgen-decode.c): Ditto.
404
405 2009-09-09  Doug Evans  <dje@sebabeach.org>
406
407         * rtl-traverse.scm: Comment tweaks.
408         * rtl-xform.scm: Comment and reformatting tweaks.
409         * doc/rtl.texi: Add text to docs on ifield-assertions.
410
411         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
412         saving.
413
414         Add support for controlling warnings/errors.
415         Add tests for iformat description errors.
416         * dev.scm (cload): New option #:diag.
417         * read.scm (<reader>): New member verify-iformat?.
418         (/parse-diagnostic, parse-warning): New functions.
419         (parse-error): Guts moved to /parse-diagnostic.
420         (/set-diagnostic-options!): New function.
421         (cpu-load): New arg diagnostic-options, all callers updated.
422         Recognize -w diagnostic-option-list.
423         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
424         (ifld-simple-ifields, ifields-simple-ifields): New function.
425         * insn.scm (/parse-insn-format-iflds): New function.
426         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
427         New arg isa, all callers updated.  Do some basic validation of the
428         ifield list if requested.
429         * mach.scm (/sanity-check-insns): Improve error message text.
430         * doc/running.texi: Document -w option.
431         * doc/porting.texi: Document #:trace, #:diag options to cload.
432
433         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
434
435         * dev.scm (*): Change default verbosity level to 2.
436
437         * ifield.scm (<ifield> pretty-print): New method.
438         (ifld-pretty-print): New function.
439         (<multi-ifield> pretty-print): New method.
440
441         * ifield.scm (<ifield> field-start): Delete word-len arg.
442         All callers updated.
443         (ifld-start): Ditto.
444         (<multi-ifield> field-start): Ditto.
445         * operand.scm (<hw-index> field-start): Ditto.
446
447         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
448         total-bitsize.  All callers updated.
449         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
450         New member /insn-base-value.
451         (insn-base-value): New function.
452         * mach.scm (/sanity-check-insns): New function.
453         (arch-analyze-insns!): Call it.
454
455 2009-09-08  Doug Evans  <dje@sebabeach.org>
456
457         * iformat.scm (ifields-base-ifields): Simplify.
458         (compute-insn-length): Simplify, call ifields-base-ifields.
459         (compute-insn-base-mask): Ditto.
460         * ifield.scm (ifld-known-values): Ditto.
461         (ifld-base-ifields): Ditto.
462         * insn.scm (insn-value): Ditto.
463         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
464
465 2009-09-08  DJ Delorie  <dj@redhat.com>
466
467         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
468         preprocessor macro, not an enum.
469
470 2009-09-08  Doug Evans  <dje@sebabeach.org>
471
472         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
473         to string-append.
474         (*): Remove trailing ":" from error messages passed to estate-error.
475
476 2009-09-07  Doug Evans  <dje@sebabeach.org>
477
478         * types.scm (<struct>): Delete.
479
480         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
481         updated.
482         (/pmacro-loc-error): New function.
483
484         * mach.scm (/isa-parse-decode-assist): New function.
485         (/isa-parse): Call it.
486
487         * decode.scm (/get-subopcode-value): New function.
488         (/opcode-slots): Call it.
489         (/fill-slot!): Add logging message.
490
491         * cos.scm (/object-error): Convert symbols to strings before passing
492         to string-append.
493
494         * read.scm (rtl-version-equal?): New function.
495         (rtl-version-at-least?, rtl-version-older?): New functions.
496
497         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
498         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
499         rtl versions >= 0.9.
500         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
501
502 2009-09-03  Doug Evans  <dje@sebabeach.org>
503
504         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
505         is simple.
506
507 2009-09-01  DJ Delorie  <dj@redhat.com>
508
509         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
510         (parse_unsigned16_range): Likewise.
511         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
512         isa.
513
514 2009-09-01  Doug Evans  <dje@sebabeach.org>
515
516         Pmacro .equals -> .equal?
517         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
518         -pmacro-builtin-equals.  All callers updated.
519         (pmacros-init!): Rename .equals to .equal?.
520         * doc/pmacros.texi: Update.
521         * testsuite/pmacros-1.test: Update.
522
523         * doc/porting.texi: Work around texi2html bug where it doesn't
524         properly escape <> inside double-quotes inside @code.
525
526         * doc/porting.texi (Doing an opcodes port): Add step to specify
527         the .opc file.
528
529 2009-08-29  Doug Evans  <dje@sebabeach.org>
530
531         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
532         rtl version 0.7.
533         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
534
535 2009-08-27  Doug Evans  <dje@sebabeach.org>
536
537         Add do-count rtl function.
538         * rtl-c.scm (s-do-count): New function.
539         (do-count): New rtl handler.
540         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
541         (-rtx-make-traverser-table): Add ITERATION.
542         * rtl.scm (rtx-make-iteration-limit-var): New function.
543         (rtx-env-make-iteration-locals): New function.
544         * rtx-funcs.scm (do-count): New rtl function.
545         * cpu/play.cpu: Add do-count-test insn.
546         * doc/rtl.texi: Add docs on do-count.
547
548 2009-08-26  Doug Evans  <dje@sebabeach.org>
549
550         * read.scm (parse-error): Change error message output format
551         to match context-owner-error.
552         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
553         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
554         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
555         (operand): Call estate-error instead of context-error.
556         (local, delay): Ditto.
557         (ref, attr): Call estate-error instead of error.
558         * rtl-traverse.scm (tstate-error): New function.
559         (-rtx-traverse-error): Call tstate-error instead of context-error.
560         (-rtx-traverse-operands, -rtx-traverse): Ditto.
561         (estate-error): New function.
562         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
563         instead of error.
564         (e-if): Call estate-error instead of error.
565         * rtx-funcs.scm (error): Call estate-error instead of context-error.
566         (member): Ditto.
567         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
568         Rewrite to call context-owner-error.
569         (context-owner-error): New function.
570
571         * ifield.scm (<ifield> constructor): New arg `location',
572         all callers updated.
573         * insn.scm (<insn> constructor): Ditto.
574         (<multi-insn> constructor): Ditto.
575         * minsn.scm (<macro-insn> constructor): Ditto.
576         * operand.scm (<operand> constructor): Ditto.
577         * utils-cgen.scm (builtin-location): New function.
578         (<source-ident>): Fix default value of member `location'.
579         (source-ident?): New function.
580
581         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
582         (estate-push-env, estate-with-modifiers): Ditto.
583         (estate-deepen): New function.
584
585 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
586
587         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
588         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
589         routines.
590
591 2009-08-25  Doug Evans  <dje@sebabeach.org>
592
593         * doc/pmacros.texi (pmacro default argument values): Add text.
594
595 2009-08-23  Doug Evans  <dje@sebabeach.org>
596
597         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
598         Rename member prefix -> name-prefix.
599         (<keyword> getters): Update.
600         (-keyword-parse): Update.  Default enum-prefix to NAME-.
601         (-keyword-read): Update.  Don't compute default value for
602         enum-prefix here.
603         (define-keyword): Update.
604         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
605         * read.scm (cgen-rtl-version): New function.
606         (-supported-rtl-versions): Add (0 8).
607         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
608         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
609         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
610         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
611         Update, print-name -> enum-prefix, make uppercase.
612         Remove unnecessary name-prefix spec.
613         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
614         * cpu/ip2k.cpu (register-names): Ditto.
615         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
616         * cpu/sparc.cpu (gr-names): Ditto.
617         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
618         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
619         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
620         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
621         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
622         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
623         prefix -> name-prefix.
624         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
625         Update, print-name -> enum-prefix, make uppercase.
626         (drc-names, xf-names): Ditto.
627         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
628         * doc/rtl.texi (Keywords): New section.
629         (hardware indices): Update text.
630         (rtl versions): Add 0.8.
631
632         Add define-rtl-version.
633         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
634         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
635         (cgen-lang-fixlevel): Delete.
636         (-supported-rtl-versions): New variable.
637         (-cmd-define-rtl-version): New function.
638         (init-reader!): New command define-rtl-version.
639         (-cgen): Add rtl version to --version output.
640         * doc/rtl.texi: Document rtl version support.
641         * cpu/play.cpu: Add define-rtl-version.
642
643 2009-08-22  Doug Evans  <dje@sebabeach.org>
644
645         * Makefile.am (OPTIONS): Define.
646         (desc): Just generate <arch>-desc.[ch] files.
647         * Makefile.in: Regenerate.
648         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
649         no .opc file.
650         (cgen-desc.c): Similarly.
651         * gen-all-desc: New file.
652         * opcodes.scm (opc-file-provided?): New function.
653
654         * mach.scm (current-*-add!): Update calls to parse-error.
655         * operand.scm (op:new-mode): Update call to parse-error.
656         * utils-cgen.scm (make-obj-context): New function.
657
658         * NEWS: Copy over entries from 1.1 branch.
659
660 2009-08-20  Doug Evans  <dje@sebabeach.org>
661
662         * gas-test.scm (<keyword> test-data): Catch invalid requests,
663         flag a warning and compensate.
664         (<hw-address test-data): Tweak for readability.
665         (<hw-iaddress test-data): Ditto.
666         (cgen-build.sh): Convert symbols to strings before passing to
667         string-append.
668         (cgen-allinsn.exp): Ditto.
669
670         * doc/pmacros.texi (.splice): Add more text.
671
672 2009-08-19  Doug Evans  <dje@sebabeach.org>
673
674         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
675         distinguish from 1.1.
676         * configure: Regenerate.
677         * read.scm (-CGEN-VERSION): Update.
678         * doc/version.texi: Update.
679
680         New builtin .pmacro?.
681         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
682         (pmacros-init!): Add .pmacro?.
683         * doc/pmacros.text: Document .pmacro?.
684         * testsuite/pmacros-1.test: Test .pmacro?.
685
686         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
687         of a pmacro begins before its arguments are evaluated, improves
688         readability.
689
690         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
691         * testsuite/pmacros-1.test: Ditto.  Add better tests.
692
693         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
694         in assembler syntax.
695         (Operands): Similarly.
696
697 2009-08-18  Doug Evans  <dje@sebabeach.org>
698
699         * ifield.scm (ifld-encode-mode): Add FIXME.
700         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
701         modes.
702         (<ifield> gen-extract): Similarly.
703
704         * read.scm (parse-error): Handle #f for context-location.
705         * utils-cgen.scm (unspecified-location): Fix building of
706         single-location.
707
708         * doc/rtl.texi: Document how to write hex and boolean values.
709
710         * gas-test.scm (<hw-asm> test-data): Handle () values.
711         (<keyword> test-data): Convert symbols to strings before passing
712         to string-append.
713         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
714         result for scalars.
715
716         * operand.scm (hw-index-scalar): Set `name'.
717         (hw-index-anyof, hw-index-derived): Ditto.
718
719 2009-08-17  Doug Evans  <dje@sebabeach.org>
720
721         * pmacros.scm (-pmacro-builtin-internal-test): New function.
722         (pmacros-init!): Add .internal-test.
723         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
724         * testsuite/testsuite.cpu (internal-verify): New pmacro.
725         * doc/pmacros.text: Document .internal-test.
726
727         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
728         (parse-comment): Allow numbers.
729         * doc/porting.texi: Document that names and comments may be lists.
730
731         * insn.scm (-insn-parse): Fix typo.
732
733         Rename .eval -> .exec.  Add new .eval.
734         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
735         (-pmacro-builtin-eval): New function.
736         (pmacros-init!): Add .exec.
737         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
738         * testsuite/location-1.test: Update.
739         * testsuite/pmacros-1.test: Add test for .eval.
740
741 2009-08-16  Doug Evans  <dje@sebabeach.org>
742
743         * doc/porting.texi: Remove support for Guile 1.4.
744
745         * read.scm (current-reader-location): Return unspecified location
746         if reader hasn't been initialized yet.
747
748 2009-08-13  Doug Evans  <dje@sebabeach.org>
749
750         * dev.scm: Document tracing options.
751
752         * pmacros.scm (pmacro-dump): New function.
753         (check-pmacro): Tweak debugging output.
754         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
755         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
756
757         Add .let* pmacro builtin.
758         * pmacros.scm (-pmacro-builtin-let*): New function.
759         (pmacros-init!): Add .let*.
760         * doc/pmacros.texi: Document .let*.
761         * testsuite/pmacros-1.test: Test .let*.
762
763 2009-08-12  Doug Evans  <dje@sebabeach.org>
764
765         Clean up cpu file parsing, pass context consistently instead of the
766         old "errtxt" argument.
767         NOTE: ACU == "All Callers Updated".
768         * attr.scm (-parse-simple-attribute): Renamed from
769         parse-simple-attribute, ACU.
770         (-attr-parse): Change errtxt argument to context, ACU.
771         (-attr-read): Ditto.
772         (atlist-parse): Ditto.  Put context arg first.
773         (attr-parse): Use parse-error instead of context-error.
774         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
775         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
776         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
777         `context' arg is now a <context> object.  ACU.
778         (-keyword-read): `context' arg is now a <context> object.  ACU.
779         (-hw-parse-indices): Change errtxt argument to context, ACU.
780         (-hw-parse-values, -hw-parse-handlers): Ditto.
781         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
782         (-hw-validate-layout, -hw-create-getter-from-layout,
783         -hw-create-setter-from-layout): Ditto.
784         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
785         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
786         (<hw-address>:parse!): Ditto.
787         * ifield.scm (-ifield-parse, ifield-read): Ditto.
788         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
789         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
790         (-multi-ifield-parse, -multi-ifield-read): Ditto.
791         * insn.scm (-insn-parse, -insn-read): Ditto.
792         (parse-syntax): Ditto.  Put context arg first.
793         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
794         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
795         (-parse-insn-format): Ditto.
796         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
797         (-arch-parse-isas): Ditto.
798         (-isa-read): Add context arg, ACU.
799         (-cpu-parse, -cpu-read, -mach-read): Ditto.
800         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
801         context, ACU.
802         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
803         (minsn-make-alias): Ditto.
804         * mode.scm (-mode-parse): Ditto.
805         (parse-mode-name): Ditto.  Put context arg first.
806         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
807         errtxt argument to context, ACU.
808         (-unit-parse, -model-parse, -model-read): Ditto.
809         * operand.scm (-operand-parse-getter): Use parse-error instead of
810         context-error.
811         (-operand-parse-setter): Ditto.
812         (-operand-parse): Change errtxt argument to context, ACU.
813         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
814         (-anyof-operand-parse, -anyof-operand-read): Ditto.
815         * read.scm (reader-error): Delete.  Use parse-error instead.
816         (parse-error): Change errtxt argument to context, ACU.  Split args
817         argument into expr and maybe-help-text.
818         (-reader-process-expanded-1!): Reorganize.
819         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
820         * types.scm (parse-type): Ditto.
821         * utils-cgen.scm (single-location->simple-string): New function.
822         (<context>): Replace members file,lineno with location.
823         (make-prefix-context): Renamed from context-make-prefix, ACU.
824         (make-current-context): New function.
825         (context-append, context-append-name): New functions.
826         (context-make-reader): Delete.
827         (parse-name): Change errtxt argument to context, ACU.
828         Put context arg first.
829         (parse-comment): Ditto.
830         (parse-number): Change errtxt argument to context, ACU.
831         (arg-list-validate-name, arg-list-check-no-args,
832         arg-list-symbol-arg): Ditto.
833
834         * read.scm (-cmd-if): Don't assume test is a list.
835
836         * html.scm (get-insn-properties): Delete errtxt, unused.
837
838 2009-08-11  Doug Evans  <dje@sebabeach.org>
839
840         * doc/rtl.texi (hardware types): Add pc.
841
842 2009-08-07  Doug Evans  <dje@sebabeach.org>
843
844         Add -t option for tracing things like commands, pmacro expansion.
845         * dev.scm (cload): New arg #:trace.
846         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
847         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
848         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
849         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
850         (-reader-process-expanded-1!): Trace commands if requested.
851         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
852         (-set-trace-options!): New function.
853         (-init-reader!): New function.
854         (cpu-load): New arg trace-options, all callers updated.
855         Call -init-reader! and -set-trace-options!.
856         (cgen-usage): Improve output formatting.
857         (common-arguments): New option -t.
858         (-cgen): Process -t.
859         * utils-cgen.scm (single-location->string): Renamed from
860         pretty-print-single-location.  All callers updated.
861         (location->string): Renamed from pretty-print-location.
862         All callers updated.
863         (source-properties-location->string): New function.
864         * doc/running.texi: Document -t.
865
866 2009-08-06  Doug Evans  <dje@sebabeach.org>
867
868         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
869         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
870         * utils.scm: ... here.
871
872 2009-08-05  Doug Evans  <dje@sebabeach.org>
873
874         Track source location better, for better error messages.
875         * pmacros.scm (-pmacro-eval): Delete, unused.
876         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
877         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
878         (scan-list, scan): Ditto.
879         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
880         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
881         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
882         (scan-list1): New function.
883         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
884         * read.scm (<reader>): New member `location'.
885         (-reader-lookup-command): Renamed from reader-lookup-command,
886         all callers updated.
887         (reader-error): Rewrite to produce better source location info.
888         (current-reader-location): New function.
889         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
890         All callers updated.  Record source location of expression.
891         (reader-process-expanded!): Renamed from reader-process-expanded.
892         All callers updated.
893         (-reader-process!): Renamed from reader-process.  New arg `loc'.
894         All callers updated.  Record source location of define-pmacro.
895         * utils-cgen.scm (<location>): New class.
896         (single-location): New (pseudo) class.
897         (pretty-print-single-location, pretty-print-location): New functions.
898         (location-top, location-push-single, location-push): New functions.
899         (unspecified-location, current-input-location): New functions.
900         (location-property): New object property.
901         (location-property-set!): New function.
902         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
903         All uses updated.
904         * testsuite/location-1.test: New testcase.
905         * testsuite/run-tests.sh: Fix fail count handling.
906         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
907         to expect cgen to fail.
908
909         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
910
911         * read.scm (-cmd-include): Renamed from include.  All callers updated.
912         (-cmd-if): Renamed from cmd-if.  All callers updated.
913         Use reader-process-expanded! on then/else clauses instead of eval1.
914
915 2009-07-22  Doug Evans  <dje@sebabeach.org>
916
917         * modes.scm (TI,OI): New modes.
918         * types.scm (parse-type): Improve error checking.  Don't hardwire
919         mode names here.
920         * utils.scm (non-negative-integer?): New function.
921
922         * pmacros.scm (-pmacro-builtin-find): New predicate.
923         (pmacros-init!): Add .find.
924         * doc/pmacros.tex: Document .find.
925         * testsuite/pmacros-1.test: Test .find.
926
927 2009-07-20  Doug Evans  <dje@sebabeach.org>
928
929         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
930         commented out printfs.
931         * rtl.scm (rtl-finish!): Whitespace tweaks.
932         * model.scm (parse-insn-timing): Tweak logging message.
933         * operand.scm: Comment and whitespace tweaks.
934         (op:type): Tweak error message.
935         (op-ifield): Tweak logging message.
936         (-derived-operand-parse, anyof-merge-semantics): Ditto.
937         * read.scm: Whitespace cleanup.
938         * utils.scm: Whitespace cleanup.
939
940 2009-07-19  Doug Evans  <dje@sebabeach.org>
941
942         Fix binding of nested pmacro parameters.
943         * pmacros.scm (-pmacro-env-make): New arg prev-env.
944         All callers updated.
945         (-pmacro-bulid-lambda): Ditto.
946         * doc/pmacros.texi: Update.
947         * testsuite/pmacros-1.test: Add testcase.
948
949         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
950         calculation.
951         (-multi-ifield-make-default-extract): Ditto.
952
953         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
954         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
955         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
956         Define.
957         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
958         * doc/rtl.texi: Update.
959
960         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
961
962         Rename builtin boolean pmacros, for consistency with rtl.
963         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
964         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
965         * doc/pmacros.texi: Update.
966         * testsuite/pmacros-1.test: Update.
967
968 2009-07-17  Doug Evans  <dje@sebabeach.org>
969
970         Use hash tables to record ifields, operands, insns, macro-insns.
971         * attr.scm (attr-builtin!): Tweak some comments.
972         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
973         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
974         <ident>.
975         (<multi-ifield>): New constructor.
976         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
977         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
978         <ident>.
979         (-sub-insn-make!): Add hack to avoid differences in generated code.
980         (multi-insn-instantiate!): Add total number of multi-insns to
981         logging message.
982         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
983         minsn-list to foo-table.  New member next-ordinal.
984         Update getters/setters.
985         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
986         New functions.
987         (-get-next-ordinal!, -get-lowest-ordinal): New function.
988         (-make-ident-object-table, -ident-object-table->list,
989         -ident-object-table-add!, -ident-object-table-lookup): New functions.
990         (current-ifld-list, current-ifld-add! current-ifld-lookup,
991         -ifld-already-defined?): Rewrite.
992         (current-op-list, current-op-add! current-op-lookup,
993         -op-already-defined?): Rewrite.
994         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
995         (current-insn-list, current-insn-add! current-insn-lookup,
996         -insn-already-defined?): Rewrite.
997         (current-minsn-list, current-minsn-add! current-minsn-lookup,
998         -minsn-already-defined?): Rewrite.
999         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1000         (MAX-VIRTUAL-INSNS): Define.
1001         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1002         Update use of arch-insn-list.
1003         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1004         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1005         minsn-list.
1006         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1007         <ident>.  New constructor.
1008         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1009         <ident>.
1010         * sid.scm (-virtual-insn-add!): New function.
1011         (-create-virtual-insns!): Call it.
1012         (-fill-sim-insn-list!): Rewrite.
1013         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1014         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1015         * utils-cgen.scm (<ordered-ident>): New class.
1016         (obj-ordinal, obj-set-ordinal!): New functions.
1017         (add-ident-methods!): Delete.
1018
1019         * model.scm (parse-insn-timing): Change logging message to level 3.
1020
1021 2009-07-16  Doug Evans  <dje@sebabeach.org>
1022
1023         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1024         add a link to define-normal-insn-enum.
1025
1026         * doc/porting.texi (Conventions): Add docs on writing integers.
1027
1028         * cpu/simplify.inc (*): One line doc strings don't need \n.
1029         (df): Invoke define-full-ifield instead of claiming it's an alias.
1030         (dno): Define.
1031         (dnop): Mark as deprecated.
1032
1033         * cpu/play.cpu: Add example of hardware `layout'.
1034         * doc/porting.tex: Add docs on simplify.inc.
1035         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1036         and other things.
1037
1038         * ifield.scm: Whitespace/formatting cleanup.
1039
1040         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1041
1042         * read.scm (parse-error): Don't print single entry args as a list.
1043         (-reader-process-expanded-1): Convert symbol to string for
1044         string-append.
1045
1046         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1047
1048 2009-07-15  Doug Evans  <dje@sebabeach.org>
1049
1050         * cpu/simplify.inc (dno): New pmacro.
1051         * doc/porting.texi: Add section on simplify.inc.
1052         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1053
1054 2009-07-15  Doug Evans  <devans@sourceware.org>
1055
1056         * gen-all-doc: Generate index.html.
1057
1058 2009-07-13  Doug Evans  <dje@sebabeach.org>
1059
1060         Extend pmacro language, add testsuite.
1061         * Makefile.am (SUBDIRS): Add testsuite.
1062         * Makefile.in: Regenerate.
1063         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1064         testsuite/test-utils.sh.
1065         * configure: Regenerate.
1066         * dev.scm (cload): Handle testsuite app.
1067         (load-testsuite): New function.
1068         * pmacros.scm: (-pmacro-debug?): New global.
1069         (-smacro-table): New global.
1070         (-smacro-lookup, -smacro-set!): New functions.
1071         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1072         (-pmacro-syntactic-form?): New function.
1073         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1074         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1075         (-pmacro-expected-non-negative-integer): New function.
1076         (-pmacro-verify-non-negative-integer): New function.
1077         (-pmacro-expand-expr-list): New function.
1078         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1079         (-pmacro-process-args): Renamed from -pmacro-invoke.
1080         (-pmacro-apply, -smacro-apply): New functions.
1081         (-pmacro-expand): Rewrite syntactic form processing.
1082         (-pmacro-build-lambda): Reformat.
1083         (define-pmacro): Watch for more errors in definition.
1084         (pmacro-debug): New function.
1085         (pmacro-trace): Set/reset -pmacro-debug?.
1086         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1087         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1088         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1089         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1090         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1091         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1092         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1093         (pmacros-init!): Initialize -smacro-table.
1094         Rewrite pmacro initialization.
1095         * read.scm (reader-process-expanded): Renamed from
1096         -reader-process-expanded.  All callers updated.
1097         Recognize () as a no-op.
1098         (cpu-load): Tweak logging messages.
1099         * utils.scm (message): Add comment.
1100         * cpu/play.cpu: Add some instructions to play with .let.
1101         * doc/cgenint.texi: Move some debugging related docs to here from
1102         cgen.texi.
1103         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1104         * testsuite/Makefile.am: New file.
1105         * testsuite/Makefile.in: New file.
1106         * testsuite/test-utils.sh.in: New file.
1107         * testsuite/run-tests.sh: New file.
1108         * testsuite/testsuite.cpu: New file.
1109         * testsuite/pmacros-1.test: New file.
1110
1111         * decode.scm: Comment and formatting tweaks.
1112         (-build-decode-table-guts): Add more data to logging message.
1113
1114 2009-07-12  Doug Evans  <dje@sebabeach.org>
1115
1116         Delete files that now live in ../cpu.
1117         * cpu/iq10.cpu: Delete.
1118         * cpu/iq2000.cpu: Delete.
1119         * cpu/iq2000.opc: Delete.
1120         * cpu/iq2000m.cpu: Delete.
1121         * cpu/m32r.cpu: Delete.
1122         * cpu/m32r.opc: Delete.
1123
1124 2009-07-09  Doug Evans  <dje@sebabeach.org>
1125
1126         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1127         All callers updated.  Work around -ve shifts by referencing the
1128         entire value.
1129
1130         * utils.scm (message): Handle pairs.
1131
1132 2009-07-08  DJ Delorie  <dj@redhat.com>
1133
1134         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1135         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1136         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1137         written to.
1138
1139 2009-07-07  Doug Evans  <dje@sebabeach.org>
1140
1141         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1142         * cpu/play.opc: New file.
1143
1144         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1145         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1146         * doc/rtl.texi (Instructions): Update.
1147
1148         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1149         (opc-arguments, -OPC): Call set-opc-file-path!.
1150         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1151         (set-opc-file-path!): New function.
1152         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1153
1154         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1155         before passing to gen-c-args.
1156
1157 2009-07-06  DJ Delorie  <dj@redhat.com>
1158
1159         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1160         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1161         unspecified accesses to control registers.
1162
1163 2009-07-01  DJ Delorie  <dj@redhat.com>
1164
1165         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1166         unspecified accesses to control registers.
1167
1168         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1169         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1170
1171 2009-06-27  Doug Evans  <dje@sebabeach.org>
1172
1173         * gen-all-intrinsics: New file.
1174
1175 2009-06-24  Doug Evans  <dje@sebabeach.org>
1176
1177         * All *.scm files: Update copyright year.
1178         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1179
1180 2009-06-23  DJ Delorie  <dj@redhat.com>
1181
1182         * intrinsics.scm: Updates to support IVC2.
1183         (belongs-to-group?): Check IVC2 slots.
1184         (-slots-attribute): New.
1185         (targets::attributes): Add SLOTS.
1186         (target:add-well-known-intrinsics): Add CPMOV.
1187         (md-insn): Add CPTYPE and CRET?.
1188         (add-md-insn): Likewise.
1189         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1190         duplicate insns with different bit patterns.
1191         (write-cgen-insn?): Add cret? support.
1192         (intrinsics.h): Add vector types.
1193         (runtime-op): Add vector support.
1194         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1195
1196         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1197         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1198         (h-cr-ivc2): Default to typeless.
1199         (h-ccr-ivc2): Fix register width.
1200         (SLOTS): Fix values and default.
1201         (ivc2_*): Add control register names.
1202         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1203
1204         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1205         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1206
1207 2009-06-22  Doug Evans  <dje@sebabeach.org>
1208
1209         * semantics.scm (insn-build-known-values): Fix typo in comment.
1210
1211 2009-06-21  Doug Evans  <dje@sebabeach.org>
1212
1213         * rtl-xform.scm (rtx-simplify-insn): New function.
1214         * html.scm (gen-insn-docs): Call it.
1215         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1216         * iformat.scm (ifmt-analyze): Minor simplification.
1217
1218         * semantics.scm (semantic-compile): Change arg sem-code-list to
1219         sem-code.
1220         (semantic-attrs): Ditto.
1221         * iformat.scm (ifmt-analyze): Update.
1222         (ifmt-compute!): Update.
1223         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1224         rtl-xform.scm.
1225         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1226         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1227         * semantics.scm (rtx-simplify): Ditto.
1228         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1229         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1230         (-simplify-expr-fn): Move to rtl-xform.scm.
1231         (-solve-expr-fn, rtx-solve): Ditto.
1232         * rtl-xform.c: New file.
1233         * read.scm: Load it.
1234
1235         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1236         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1237         (-rtx-traverse, rtx-traverse): Ditto.
1238
1239 2009-06-20  Doug Evans  <dje@sebabeach.org>
1240
1241         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1242
1243         * configure.in: Update version to 1.1.
1244         * configure: Regenerate.
1245         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1246
1247 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1248             Doug Evans  <dje@sebabeach.org>
1249
1250         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1251         (cgen-desc.c): Ditto.
1252         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1253         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1254         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1255         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1256         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1257         (cgen-cpuall.h, cgen-ops.c): Ditto.
1258         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1259         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1260         (cgen-sem-switch.c): Ditto.
1261         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1262         * sim-model.c (cgen-model.c): Ditto.
1263
1264 2009-06-18  Doug Evans  <dje@sebabeach.org>
1265
1266         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1267
1268         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1269
1270         * dev.scm (cload): Change #:arch argument to take the path to the
1271         .cpu file instead of just the name of the architecture.
1272         * read.scm (arch-path): Remove trailing '/'.
1273         (cpu-load): Set `arch-path' to directory of .cpu file.
1274         (-cgen): Don't set `arch-path' here.
1275         (include): Update.
1276         * doc/porting.texi: Update.
1277
1278 2009-06-14  Doug Evans  <dje@sebabeach.org>
1279
1280         * gen-all-doc: Use files in ../cpu where possible.
1281
1282         * Makefile.am (ARCHFILE): Fix path.
1283         * Makefile.in: Regenerate.
1284         * html.scm: Use "pre" instead of "plaintext".
1285
1286         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1287         * doc/app.texi: Cleanup pass.
1288         * doc/cgen.texi: Cleanup pass.
1289         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1290         * doc/intro.texi: Cleanup pass.
1291         * doc/mdate-sh: New file.
1292         * doc/opcodes.texi: Cleanup pass.
1293         * doc/pmacros.texi: Cleanup pass.
1294         * doc/porting.texi: Cleanup pass.
1295         * doc/rtl.texi: Cleanup pass.
1296         * doc/running.texi: Cleanup pass.  Document more runtime options.
1297         * doc/stamp-vti: Update.
1298         * doc/version.texi: Update.
1299
1300         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1301         (GUILE): Fix definition.
1302         * Makefile.in: Regenerate with automake 1.9.6.
1303         * aclocal.m4: Regenerate with aclocal 1.9.6.
1304         * configure.in (AC_PREREQ): Set to 2.59.
1305         (GENINSRC_NEVER): Define.
1306         * configure: Regenerate with autoconf 2.59.
1307         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1308         (cgen.info,cgen.dvi): Delete.
1309         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1310         (noinst_TEXINFOS): Add cgenint.texi.
1311         (DOCFILES): Add missing files.
1312         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1313         * doc/Makefile.in: Regenerate with automake 1.9.6.
1314
1315         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1316
1317         * attr.scm: Removing trailing whitespace.
1318         * cgen-intrinsics.scm: Ditto.
1319         * cgen-sim.scm: Ditto.
1320         * cos.scm: Ditto.
1321         * enum.scm: Ditto.
1322         * guile.scm: Ditto.
1323         * sim.scm: Ditto.
1324
1325 2009-05-28  DJ Delorie  <dj@redhat.com>
1326
1327         * cpu/mep.opc (parse_signed16_range): New.
1328         (parse_unsigned16_range): New.
1329         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1330
1331 2009-05-26  DJ Delorie  <dj@redhat.com>
1332
1333         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1334         accumulator names.
1335         (f-ivc2-ccrn-c3hi): New.
1336         (f-ivc2-ccrn-c3lo): New.
1337         (f-ivc2-ccrn-c3): New.
1338         (ivc2c3ccrn): Use it.
1339
1340 2009-05-22  DJ Delorie  <dj@redhat.com>
1341
1342         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1343         (mep_config_map): Regenerate.
1344
1345         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1346         ivc2-specific names.
1347         (simm8p20): New.
1348         (cmovc): move to after field definitions, use ivc2-specific
1349         register names.
1350         (cpmovi_b_P0S_P1): New.
1351         
1352 2009-05-19  DJ Delorie  <dj@redhat.com>
1353
1354         * cpu/mep.opc: Regenerate configuration.
1355         (parse_cdisp10): Only check CPU flags, not COP flags.
1356         (check_configured_mach): Likewise.
1357
1358 2009-05-13  DJ Delorie  <dj@redhat.com>
1359
1360         * intrinsics.scm (insns.md): Add RTL predicates.
1361         (intrinsics.h): Remove old C intrinsics.
1362
1363 2009-04-29  DJ Delorie  <dj@redhat.com>
1364
1365         * mep-ivc2.cpu: New.
1366         * mep-core.cpu: Regenerated.  Add support for deferred register
1367         writes.
1368         (SLOT): Add IVC2 slot types.
1369         (sim-syscall): Rename to something more appropriate.
1370         * mep-ext-cop.cpu: Regenerate.
1371         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1372         (print_slot_insn): New.
1373         (mep_examine_ivc2_insns): New.
1374         (mep_print_insn_set_ivc2_mode): New.
1375         (mep_print_insn): Support IVC2 slotting.
1376         
1377 2009-04-20  DJ Delorie  <dj@redhat.com>
1378
1379         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1380         (guess-mode): Drop COP* syntax.
1381         (need-insn): Add "--syscall--" to the list.
1382         (enum-type): Drop COP* syntax.
1383         (intrinsics.h): Likewise.
1384         (intrinsic-protos.h): Change file header to allow it to be
1385         included.
1386
1387 2009-04-17  DJ Delorie  <dj@redhat.com>
1388
1389         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1390         (lhucpm1): Limit to C5 mach.
1391         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1392         * cpu/mep-core.cpu (extend-cdisp10): New.
1393         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1394         
1395 2009-04-08  DJ Delorie  <dj@redhat.com>
1396
1397         * cpu/mep-c5.cpu: New.
1398         * cpu/mep-core.cpu: Add C5 support.
1399         * cpu/mep.opc: Likewise.
1400
1401 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1402
1403         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1404         about calling memset with a zero length.
1405
1406 2009-02-03  DJ Delorie  <dj@redhat.com>
1407
1408         * cpu/mep-core.cpu: Update to new MeP configuration.
1409         * cpu/mep-ext-cop.cpu: Likewise.
1410         * cpu/mep.opc: Likewise.
1411
1412 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1413
1414         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1415
1416 2008-06-17  Dave Brolley  <brolley@redhat.com>
1417
1418         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1419         (h-gr): Likewise.
1420
1421 2007-11-13  Dave Brolley  <brolley@redhat.com>
1422
1423         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1424
1425 2007-11-05  Dave Brolley  <brolley@redhat.com>
1426
1427         * intrinsics.scm,cgen-intrinsics.scm: New application which
1428         generates code to support intrinsic functions for insns in the
1429         mep architecture in gcc.
1430
1431 2007-09-21  Dave Brolley  <brolley@redhat.com>
1432
1433         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1434         (rn3us): CDATA attribute now LONG.
1435         
1436 2007-08-21  Dave Brolley  <brolley@redhat.com>
1437
1438         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1439         than 32 bits.
1440
1441 2007-07-05  Nick Clifton  <nickc@redhat.com>
1442
1443         * utils.scm (copyright-fsf): Update copyright notice to refer to
1444         the GPL version 3.
1445
1446 2007-05-22  Nick Clifton  <nickc@redhat.com>
1447
1448         * doc/cgen.texi: Use @copying around the copyright notice.
1449         * doc/internals.texi: Likewise.
1450
1451 2007-02-05  Dave Brolley  <brolley@redhat.com>
1452
1453         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1454
1455 2007-02-05  Dave Brolley  <brolley@redhat.com>
1456
1457         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1458         in the generated code for @arch@_cgen_init_asm if it is defined.
1459
1460         * Contribute the following changes:
1461         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1462
1463         * attr.scm (<string-attribute>): New attribute class.
1464         (attr-kind): Handle <string-attribute>.
1465         (parse-simple-attribute): New function.
1466         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1467         (<bitset-attribute> 'parse-value): Likewise.
1468         (<boolean-attribute> 'parse-value): Likewise.
1469         (<enum-attribute> 'parse-value): Likewise.
1470         (<string-attribute> 'parse-value): New function.
1471         (-attr-parse): Handle <string-attribute>.
1472         (-attr-read): Likewise.
1473         (<string-attribute> 'gen-value-for-defn-raw): New function.
1474         (<string-attribute> 'gen-value-for-defn): New function.
1475
1476 2006-11-07  Dave Brolley  <brolley@redhat.com>
1477
1478         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1479         necessary.
1480
1481 2006-10-18  Dave Brolley  <brolley@redhat.com>
1482
1483         * Contribute the following changes:
1484
1485         2006-07-11  Dave Brolley  <brolley@redhat.com>
1486
1487         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1488         (movcol): New insn.
1489         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1490         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1491         hardware or memory mode which was used.
1492         * sid-cpu.scm (hw-need-write-stack?): New function.
1493         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1494         identify hardware which uses write stacks.
1495         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1496         Initialized to an empty list.
1497         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1498         hw-need-write-stack?.
1499         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1500         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1501         (used-in-delay-rtl?): New method of <hardware-base>.
1502         (hw-used-in-delay-rtl?): New function.
1503
1504         2006-06-20  Dave Brolley  <brolley@redhat.com>
1505
1506         * sid.scm (gen-attr-type): Removed.
1507         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1508         (SH2a-MACH): Add sh5.
1509         (sh2a-nofpu-models): Add units for sh5.
1510         (sh2a-fpu-models): Likewise.
1511
1512         2006-06-15  Dave Brolley  <brolley@redhat.com>
1513
1514         * cpu/sh-sim.cpu: New file.
1515         * cpu/sh-sid.cpu: New file.
1516         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1517         (All fields): Remap for (insn-lsb0? #f)
1518         (All insns): Add timing specs.
1519         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1520         'xattrs' and .splice it in.
1521         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1522         (h-frc,h-drc): Add PROFILE attribute.
1523         (h-fpccr): Removed.
1524         (h-vbr): New hardware.
1525         (All fields): Remap for (insn-lsb0? #f)
1526         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1527         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1528         (fpscr): Use h-fpscr.
1529         (fsdm,fsdn): Use h-fsd.
1530         (dshci): Add xtiming argument and splice it in.
1531         (dr,xd): pmacros removed.
1532         (All insns): Add timing specs, *-MACH attribibutes,
1533         SH4{A}-GROUP attributes.
1534         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1535         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1536         we're being processed for sim or sid.
1537         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1538         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1539         (define-isa compact): Add (isa-parallel-insns 2).
1540         (define-isa media): Add (isa-parallel-insns 2). Add
1541         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1542         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1543         sh4a, sh4al
1544         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1545         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1546         (SH4al-MACH, SH5-MACH): New pmacros.
1547         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1548         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1549         (sh5-media-fp-units, common-model, common-model-with-fp) 
1550         (sh3-model, sh3e-model): New pmacros.
1551         (define-model sh2): New model.
1552         (define-model sh2e): New model.
1553         (define-model sh3): New model.
1554         (define-model sh3e): New model.
1555         (define-model sh2a-nofpu): New model.
1556         (define-model sh2a-fpu): New model.
1557         (define-model sh4-nofpu): New model.
1558         (define-model sh4): New model.
1559         (define-model sh4a-nofpu): New model.
1560         (define-model sh4a): New model.
1561         (define-model sh4al): New model.
1562         (define-model sh5-media): New model.
1563         (define-model sh5): Add all units.
1564         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1565         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1566         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1567         (h-pc): Add PROFILE attribute.
1568         (h-fr): Likewise.
1569         (h-tr): Likewise.
1570         (h-gr,h-grc): Likewise.
1571         (h-cr): Set h-sr in setter.
1572         (h-frbit): Get/Set h-fpscr.
1573         (h-szbit,h-prbit): Likewise.
1574         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1575         Add getter and setter.
1576         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1577         Adjust getter and setter.
1578         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1579         Adjust getter and setter.
1580         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1581         (h-fsd,h-fmov): New hardware.
1582
1583 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1584
1585         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1586         doc/notes.texi, doc/porting.texi, doc/running.texi,
1587         doc/sim.texi: Fix some typos.
1588
1589 2006-07-14  Dave Brolley  <brolley@redhat.com>
1590
1591         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1592         hardware or memory mode which was used.
1593         * sid-cpu.scm (hw-need-write-stack?): New function.
1594         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1595         identify hardware which uses write stacks.
1596         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1597         Initialized to an empty list.
1598         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1599         hw-need-write-stack?.
1600         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1601         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1602         (used-in-delay-rtl?): New method of <hardware-base>.
1603         (hw-used-in-delay-rtl?): New function.
1604
1605 2006-06-20  Dave Brolley  <brolley@redhat.com>
1606
1607         * sid.scm (gen-attr-type): Removed.
1608
1609 2006-05-10  Dave Brolley  <brolley@redhat.com>
1610
1611         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1612         support for (if (application-is? <appname>) (...) (...)).
1613         (-cgen): Add trailing "/" to arch-path.
1614         * utils.scm (dirname): Removed. dirname is a primitive function.
1615
1616 2006-05-09  Dave Brolley  <brolley@redhat.com>
1617
1618         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1619         'entire_insn' not 'base_insn'.
1620         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1621         is null.
1622         * sim.scm (-gen-arch-model-decls): Likewise.
1623         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1624         abuf->written if profiling.
1625         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1626         object->string om the mode.
1627         (-hw-gen-write-stack-decl): Likewise.
1628         * read.scm (include): Use arch-path as file location.
1629         (arch-path): Define it with a default setting.
1630         (-cgen): Update arch-path when "-a" option is specified.
1631         * utils.scm (dirname): New function.
1632
1633 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1634
1635         * configure.in: Remove AC_ARG_PROGRAM.
1636         * configure: Regenerate with autoconf 2.59.
1637
1638 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1639
1640         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1641         SIMULATOR.
1642
1643 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1644
1645         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1646         or an error message otherwise.
1647         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1648         Fix up comments to correctly describe the functions.
1649
1650 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1651             Anil Paranjape   <anilp1@kpitcummins.com>
1652             Shilin Shakti    <shilins@kpitcummins.com>
1653
1654         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1655         CPU description.
1656         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1657
1658 2006-02-10  Nick Clifton  <nickc@redhat.com>
1659
1660         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1661
1662 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1663
1664         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1665         for concatenation.
1666         (-hw-gen-write-stack-decl): Likewise.
1667
1668 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1669
1670         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1671         non-(adata-integral-insn? CURRENT-ARCH) case.
1672
1673 2005-10-28  Dave Brolley  <brolley@redhat.com>
1674
1675         Contribute the following changes:
1676         2005-09-19  Dave Brolley  <brolley@redhat.com>
1677
1678         * attr.scm (gen-value-for-defn-raw): New methods.
1679         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1680         gen-value-for-defn-raw.
1681         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1682
1683         2002-12-13  Dave Brolley  <brolley@redhat.com>
1684
1685         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1686         (-gen-attr-accessors): New function.
1687         (gen-obj-attr-defn): Update terminating initializer.
1688         (gen-obj-attr-end-defn): New function.
1689         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1690         * sid-cpu.scm (cgen-desc.h): Generate code to include
1691         "opcode/cgen-bitset.h"
1692         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1693         name.
1694         * desc.scm ('gen-defn): Update terminating initializer.
1695         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1696         terminatinig initializer.
1697         (gen-hw-decls): Ditto.
1698         (gen-operand-decls): Ditto.
1699         (gen-insn-decls): Ditto.
1700         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1701         (gen-insn-table): Update terminating initializer.
1702         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1703         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1704         * attr.scm (charmask-bytes): New function.
1705         (bitset-attr->charmask): New function.
1706         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1707         differences for SID-SIMULATOR.
1708         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1709         (<enum-attribute>): Ditto.
1710
1711 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1712
1713         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1714
1715 2005-10-24  DJ Delorie  <dj@redhat.com>
1716
1717         * operand.scm (-anyof-merge-syntax): Print a more useful error
1718         message.
1719
1720 2005-10-19  Nick Clifton  <nickc@redhat.com>
1721
1722         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1723         patch.
1724
1725 2005-10-18  Andreas Schwab  <schwab@suse.de>
1726
1727         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1728
1729 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1730
1731         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1732         size.
1733
1734 2005-08-02  Dave Brolley  <brolley@redhat.com>
1735
1736         * rtl-c.scm (s-unop): Don't dereference
1737         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1738         (s-binop, s-convop, s-cmpop): Likewise.
1739
1740 2005-07-29  Dave Brolley  <brolley@redhat.com>
1741
1742         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1743         if with-profile or with-parallel-write.
1744         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1745         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1746         string-append.
1747
1748 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1749
1750         * cpu/fr30.opc (print_register_list): Correct format strings.
1751         * cpu/ip2k.opc: Likewise.
1752
1753 2005-07-05  Nick Clifton  <nickc@redhat.com>
1754
1755         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1756         unsigned in order to avoid compile time warnings about sign
1757         conflicts.
1758
1759 2005-07-01  Nick Clifton  <nickc@redhat.com>
1760
1761         * desc-cpu.scm: Update to ISO C90 function declaration style.
1762         * opc-asmdis.scm: Likewise.
1763         * opc-ibld.scm: Likewise.
1764         * opc-itab.scm: Likewise.
1765         * cpu/fr30.opc: Likewise.
1766         * cpu/i960.opc: Likewise.
1767         * cpu/ip2k.opc: Likewise.
1768         * cpu/iq2000.opc: Likewise.
1769         * cpu/m32r.opc: Likewise.
1770         * cpu/openrisc.opc: Likewise.
1771         * cpu/sh.opc: Likewise.
1772         * cpu/sparc.opc: Likewise.
1773         * cpu/xstormy16.opc: Likewise.
1774
1775 2005-06-15  Dave Brolley  <brolley@redhat.com>
1776
1777         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1778         (cgen-cpu.h): Call it.
1779
1780         Contributed on behalf of Graydon Hoare
1781         2001-06-05  graydon hoare  <graydon@redhat.com>
1782
1783         * utils.scm (foldl): Define.
1784         (foldr): Define.
1785         (filter): Define.
1786         (union): Define.
1787         (intersection): Simplify.
1788         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1789         (-op-gen-delayed-set-maybe-trace): Define.
1790         (<operand> 'gen-set-{quiet,trace}): Delegate to
1791         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1792         up and needs cleaning.
1793         (-with-parallel?): Hardwire with-parallel to #t.
1794         (<operand> 'cxmake-get): Replace with lookahead-aware code
1795         * sid-decode.scm: Remove per-insn writeback fns.
1796         (-gen-idesc-decls): Redefine sem_fn type.
1797         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1798         with write stack stuff.
1799         (cgen-write.cxx): Replace per-insn writebacks with single write
1800         stack writeback. Add write stack reset function.
1801         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1802         stack stuff.
1803         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1804         estate attribute set.
1805         (delay): Set #:delayed attribute to calculated delay, update
1806         maximum delay of cpu, check (delay ...) usage.
1807         * operand.scm (<operand>): Add delayed slot to <operand>.
1808         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1809         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1810         * doc/rtl.texi (Expressions): Add section on (delay ...).
1811
1812 2005-06-13  Jim Blandy  <jimb@redhat.com>
1813
1814         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1815         as well as strings.
1816
1817 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1818
1819         * doc/porting.texi: Change all mention of md_apply_fix3 and
1820         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1821         respectively.
1822
1823 2005-05-18  Dave Brolley  <brolley@redhat.com>
1824
1825         * utils-sim.scm (-gen-decode-default-entry): New function.
1826         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1827         code to check that all opcodes bits match.
1828         (-gen-decoder-switch): Use -gen-decode-default-entry.
1829
1830 2005-05-16  Jim Blandy  <jimb@redhat.com>
1831
1832         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1833         fetched by one of our GETIMEM* methods.
1834         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1835         base-insn-sized chunks.
1836
1837 2005-05-10  Nick Clifton  <nickc@redhat.com>
1838
1839         * Update the address and phone number of the FSF organization in
1840         the GPL notices in the following files:
1841         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1842         cpu/powerpc.cpu, slib/random.scm
1843
1844 2005-05-06  Jim Blandy  <jimb@redhat.com>
1845
1846         * pprint.scm, cos-pprint.scm: Add documentation.
1847
1848         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1849
1850         * pprint.scm, cos-pprint.scm: New files.
1851
1852 2005-04-04  Nick Clifton  <nickc@redhat.com>
1853
1854         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1855         avoid a compile time warning.
1856
1857 2005-03-18  Nick Clifton  <nickc@redhat.com>
1858
1859         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1860         "percent-operand" from "%operand" as the latter confuses xgettext
1861         into thinking that it is a C printf formating directive, which
1862         prevents proper translation.
1863
1864 2005-02-23  Nick Clifton  <nickc@redhat.com>
1865
1866         * opcodes.scm (gen-parse-number): Add a cast to the desired
1867         pointer signed'ness in order to prevent compile time warnings.
1868         * cpu/ip2k.opc: Fixed compile time warnings about differing
1869         signed'ness of pointers passed to functions.
1870         * cpu/iq2000.opc: Likewise.
1871         * cpu/m32r.opc: Likewise.
1872         * cpu/openrisc.opc: Likewise.
1873         * cpu/xstormy16.opc: Likewise.
1874
1875 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1876
1877         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1878         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1879
1880 2005-02-16  Dave Brolley  <brolley@redhat.com>
1881
1882         * utils.scm: Update copyright years.
1883         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1884         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1885         * operand.scm (-derived-operand-parse): Move logit message from level 1
1886         to level 2.
1887
1888 2005-02-15  Nick Clifton  <nickc@redhat.com>
1889
1890         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1891         prevent compile time warning messages.
1892         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1893         * utils-gen.scm (attr-int-gen-defn): Likewise.
1894         (attr-gen-defn): Likewise.
1895         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1896         (print_dollarhex16): Remove unused function.
1897
1898 2005-02-15  Jim Blandy  <jimb@redhat.com>
1899
1900         * guile.scm (cgen-call-with-debugging): Doc fix.
1901
1902         Make backtraces work more reliably.
1903         * guile.scm: Set up debugging parameters, and enable debugging and
1904         source positions while loading.
1905         (cgen-call-with-debugging, cgen-debugging-stack-start): New
1906         functions.
1907         * read.scm: Don't set debugging parameters here.
1908         (catch-with-backtrace): Function deleted.
1909         (-cgen): Simply note the presence or absence of the -b option.
1910         Pass the flag to cgen-call-with-debugging, so debugging is turned
1911         off here if the user didn't request it, for faster computation.
1912         (cgen): Call cgen-debugging-stack-start here, instead of
1913         catch-with-backtrace.
1914
1915         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1916         trailing -s.
1917         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1918         Don't write out the trailing -s here.
1919         * Makefile.in: Regenerated.
1920         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1921         fixup.scm here; let the caller decide which Scheme's customization
1922         file to preload.
1923         * dev.scm: Load guile.scm, not fixup.scm.
1924         * fixup.scm: Deleted; contents have all moved to guile.scm.
1925         * README: Doc fix.
1926
1927         * guile.scm (debug-write): New function.
1928
1929 2005-02-14  Jim Blandy  <jimb@redhat.com>
1930
1931         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1932         transformer procedure, not eval.  Transformer procedures take one
1933         argument.
1934
1935 2005-02-11  Nick Clifton  <nickc@redhat.com>
1936
1937         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1938         to 'bfd_vma *' in order avoid compile time warning message.
1939
1940 2005-02-09  Jim Blandy  <jimb@redhat.com>
1941
1942         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
1943         corresponding change in the sim/common directory.)
1944
1945 2005-02-07  Jim Blandy  <jimb@redhat.com>
1946
1947         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
1948         changes in the opcodes directory.)
1949
1950         * guile.scm: New file, containing Guile-specific definitions and
1951         adaptations.  This is loaded by the app-specific shell scripts.
1952         Initially identical to fixup.scm.
1953         * cgen-sid.scm: Don't load fixup.scm here.
1954
1955         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1956         latter is a macro.
1957
1958 2005-01-27  Jim Blandy  <jimb@redhat.com>
1959
1960         * utils.scm (string/symbol->append): Renamed from 'concat'.
1961         * opcodes.scm (gen-switch): Use new name.
1962         * insn.scm (-sub-insn-make!): Same.
1963         * rtl.scm (rtx-dump): Same.
1964         * semantics.scm (semantic-compile): Same.
1965
1966 2005-01-20  Jim Blandy  <jimb@redhat.com>
1967
1968         * opcodes.scm (gen-switch): Use concat instead of string-map.
1969
1970         * utils.scm (concat): New function.
1971         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1972         * rtl.scm (rtx-dump): Same.
1973         * semantics.scm (semantic-compile): Same.
1974
1975 2004-12-16  Jim Blandy  <jimb@redhat.com>
1976
1977         * utils-cgen.scm (parse-name): Don't assume that string-map can be
1978         applied to symbols.  Process everything as strings, and then
1979         convert to a symbol at the end.
1980
1981         * read.scm (debug-repl): Temporarily redirect input and output to
1982         /dev/tty while we debug, so we don't interfere with whatever CGEN
1983         is reading or writing.
1984         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1985         New functions.
1986
1987 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
1988
1989         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1990         will work with newer versions of guile.
1991
1992 2004-10-27  Nick Clifton  <nickc@redhat.com>
1993
1994         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1995         * cpu/iq2000.cpu: Likewise.
1996
1997 2004-07-21  DJ Delorie  <dj@redhat.com>
1998
1999         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2000
2001 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2002
2003         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2004         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2005
2006 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2007
2008         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2009
2010 2004-03-22  Dave Brolley  <brolley@redhat.com>
2011
2012         * utils.scm (copyright-fsf): Update copyright years.
2013         (copyright-red-hat): Ditto.
2014         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2015         code.
2016         (-op-gen-set-trace-parallel): Ditto.
2017
2018 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2019
2020         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2021         disassembling codes for 0x*2 addresses.
2022
2023 2004-01-29  Dave Brolley  <brolley@redhat.com>
2024
2025         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2026         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2027         in the extra bit positions.
2028
2029 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2030
2031         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2032
2033 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2034
2035         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2036         "short" being 16 bit.
2037         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2038         internationalize error message.
2039         (parse_lo16): Likewise.  Remove useless code.
2040
2041 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2042
2043         * cpu/m32r.cpu : Add new model m32r2.
2044         Add new instructions.
2045         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2046         Changed PIPE attr of push from O to OS.
2047         Care for Little-endian of M32R.
2048         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2049         Care for Little-endian of M32R.
2050         (parse_slo16): signed extension for value.
2051
2052 2003-10-26  Dave Brolley  <brolley@redhat.com>
2053
2054         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2055         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2056         (-gen-extract-fn): Call -gen-record-profile-args.
2057
2058 2003-10-21  Dave Brolley  <brolley@redhat.com>
2059
2060         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2061         a static const int.
2062         * decode.scm (-opcode-slots): Correct typo in logit call.
2063
2064 2003-10-09  Jim Blandy  <jimb@redhat.com>
2065
2066         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2067         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2068
2069         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2070
2071 2003-10-06  Dave Brolley  <brolley@redhat.com>
2072
2073         * gen-all-doc: Add fr550.
2074
2075 2003-09-11  Doug Evans  <dje@sebabeach.org>
2076
2077         * Makefile.am (ARCHFILE): New var.
2078         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2079         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2080         * Makefile.in: Regenerate.
2081
2082 2003-09-08  Dave Brolley  <brolley@redhat.com>
2083
2084         On behalf of Doug Evans <dje@sebabeach.org>
2085         Pass in paths to input files, instead of assuming they live in
2086         $srcdir/cpu.  Plus misc. option processing cleanup.
2087         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2088         Add pre-process pass to all options.
2089         * cgen-gas.scm (gas-arguments): Ditto.
2090         * cgen-sid.scm (sim-arguments): Ditto.
2091         * cgen-sim.scm (sim-arguments): Ditto.
2092         * cgen-stest.scm (stest-arguments): Ditto.
2093         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2094         (-opc-file-path): New global.
2095         (opc-file-path): New fn.
2096         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2097         All callers updated.
2098         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2099         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2100         Replace srcdir arg with opc-file.  All callers updated.
2101         * read.scm (-opt-spec-update): Delete.
2102         (opt-get-first-pass,opt-get-second-pass): New fns.
2103         (-cgen): Process application-specific arguments in two passes.
2104
2105 2003-08-29  Dave Brolley  <brolley@redhat.com>
2106
2107         * cpu/frv.cpu: Removed.
2108         * cpu/frv.opc: Removed.
2109
2110 2003-08-21  Nick Clifton  <nickc@redhat.com>
2111
2112         * cpu/frv.cpu (mbtoh): Replace input parameter to
2113         u-media-dual-expand and u-media-dual-btoh with output parameter.
2114         (cmbtoh): Add profiling hack.
2115
2116 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2117
2118         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2119
2120 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2121
2122         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2123         the elements for the END record of CGEN_OPINST, silencing warnings.
2124
2125 2003-07-15  Doug Evans  <dje@sebabeach.org>
2126
2127         Add guile 1.6.4 support.
2128         - empty list must be quoted
2129         - string functions have stricter type checking
2130         - eval now takes a second argument
2131         - symbol-bound? is deprecated
2132         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2133         (bitset-attr->list): Ensure arg to string-cut is a string.
2134         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2135         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2136         * cos.scm (-class-list): Must quote empty list.
2137         (-class-parent-classes,-class-compute-class-desc): Ditto.
2138         (class-make,make,object-reset!): Ditto.
2139         (method-make-make!): Call eval1 instead of eval.
2140         (method-make-forward!,method-make-virtual-forward!): Ditto.
2141         * decode.scm (subdtable-add): Use stringsym-append instead of
2142         string-append.
2143         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2144         (-build-decode-table-entry): Fetch string name of insn.
2145         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2146         (-gen-mach-table-defns): Ditto for mach.
2147         (gen-ifld-defns): Ditto for ifld.
2148         (gen-hw-table-defns): Ditto for hw.
2149         (gen-operand-table): Ditto for op.
2150         (gen-insn-table-entry): Ditto for insn.
2151         * desc.scm (gen-attr-table-defn): Ditto for attr.
2152         (<keyword>,gen-defn): Don't pass symbols to string-append.
2153         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2154         symbol-append.
2155         (enum-vals-upcase): Use symbol-upcase to build result.
2156         (-enum-parse): Use stringsym-append to build errtxt.
2157         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2158         (eval1): New function.
2159         (symbol-bound?): Provide own version if >= guile 1.6.
2160         * hardware.scm (define-keyword): Use string-append instead of
2161         symbol-append.
2162         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2163         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2164         before using.
2165         (gen-list-entry): Handle either symbol or string `name' arg.
2166         (gen-obj-doc-header): Fetch string name of `o' arg.
2167         (define-cpu-intro): Ditto for cpu.
2168         (gen-mach-intro): Ditto for mach.
2169         (gen-model-intro): Ditto for model.
2170         (gen-isa-intro): Ditto for isa.
2171         (gen-machine-doc-1): Ditto for isa.
2172         (gen-reg-doc-1): Convert mach to string first.
2173         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2174         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2175         to string first.
2176         (gen-insn-categories): Fetch string name of mach.  Convert
2177         enum-val-name to string first.
2178         (gen-insn-docs): Fetch string name of mach.
2179         * ifield.scm (ifld-ilk): Result is a string.
2180         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2181         Fetch string name of ifld.
2182         (-sfmt-search-key): Similarily for ifld and op.
2183         * insn.scm (syntax-make): Fetch string name of syntax element.
2184         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2185         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2186         * mode.scm (mode:c-type): Result is a string.
2187         (mode:enum): Fetch string name of mode.
2188         (-mode-parse): Use stringsym-append to build errtxt.
2189         * model.scm (model:enum): Fetch string name of model.
2190         (-model-parse): Use stringsym-append to build errtxt.
2191         (parse-insn-timing): Must quote empty list.
2192         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2193         (-gen-minsn-opcode-entry): Ditto.
2194         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2195         convert to string.
2196         (read-cpu.opc): Convert current-arch-name to a string before using.
2197         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2198         (<derived-operand>): Must quote empty list.
2199         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2200         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2201         of ifld.
2202         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2203         (-pmacro-sym): Must convert symbols to strings before passing to
2204         string-append.
2205         (-pmacro-str): Ditto.
2206         (pmacros-init!): Use eval1 instead of eval.
2207         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2208         (keep-isa-atlist?): Ditto.
2209         (cmd-if): Use eval1 instead of eval.
2210         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2211         (-rtl-c-get): Fetch string name of src.
2212         (s-unop): Ditto for mode.
2213         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2214         (-gen-par-temp-defns,subword): Ditto.
2215         (join): Use stringsym-append instead of string-append.
2216         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2217         (rtx-traverse-debug): Fetch string name of rtx-obj.
2218         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2219         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2220         (rtx-pretty-name): Result is a string.
2221         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2222         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2223         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2224         before using.
2225         (-gen-sfrag-case): Fetch string name of user.
2226         * sid-model.scm (unit:enum): Fetch string name of unit.
2227         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2228         (<hw-memory>,gen-set-quiet): Ditto.
2229         (gen-mode-defs): Ditto.
2230         (sim-finish!): Convert current-arch-name to a string before using.
2231         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2232         (-gen-no-scache-semantic-fn): Ditto.
2233         (cgen-defs.h): Fetch string name of isa.
2234         (cgen-read.c): Convert current-arch-name to a string before using.
2235         (cgen-write.c): Ditto.
2236         * sim-model.scm (unit:enum): Fetch string name of unit.
2237         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2238         (-gen-model-timing-table): Fetch string name of model.
2239         (-gen-mach-model-table): Ditto.
2240         (-gen-mach-defns): Fetch string name of mach.
2241         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2242         (<hw-memory>,cxmake-get): Fetch string name of mode.
2243         (<hw-memory>,gen-set-quiet): Ditto.
2244         (gen-mode-defs): Ditto.
2245         (sim-finish!): Must quote empty list.
2246         * utils-cgen.scm (<ident>): Must quote empty list.
2247         (obj:str-name): New fn.
2248         (parse-comment): Result is a string.
2249         (parse-symbol): Result is a symbol.
2250         (parse-string): Result is a string.
2251         (keyword-list?): Convert arg to string before calling string-ref.
2252         (keyword-list->arg-list): Ditto.
2253         (gen-attr-name): Convert attr-name to string first.
2254         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2255         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2256         (gen-define-ifmt-ifields): Ditto for fld.
2257         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2258         map-over-string.
2259         (gen-file-name): Ditto.
2260         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2261         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2262         (reduce): Call eval1 instead of eval.
2263         * cpu/m32r.cpu (addi): Don't use `#.'.
2264
2265         * gen-all-sim: Fix some typos.
2266
2267 2003-07-08  Doug Evans  <dje@sebabeach.org>
2268
2269         * gen-all-doc: Ensure run from cgen src dir.
2270         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2271         * gen-all-sid: Similarily, in ./tmp-sid.
2272         * gen-all-sim: Similarily, in ./tmp-sim.
2273
2274 2003-06-20  Doug Evans  <dje@sebabeach.org>
2275
2276         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2277
2278 2003-06-19  Doug Evans  <dje@sebabeach.org>
2279
2280         * mach.scm (-ifld-already-defined?): New proc.
2281         (current-ifld-add!): Use it.
2282         (-op-already-defined?): New proc.
2283         (current-op-add!): Use it.
2284         (-insn-already-defined?): New proc.
2285         (current-insn-add!): Use it.
2286         (-minsn-already-defined?): New proc.
2287         (current-minsn-add!): Use it.
2288         (obj-isa-list): New proc.
2289         (isa-supports?): Use it.
2290
2291 2003-06-10  Doug Evans  <dje@sebabeach.org>
2292
2293         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2294         * cpu/m32r.cpu (all insns): Ditto.
2295
2296         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2297         "unspecified".
2298
2299         * gen-all-doc: Split arm and frv docs up a bit.
2300
2301         * cpu/arm.cpu: Add IDOC attribute.
2302         * cpu/frv.cpu: Ditto.
2303         * cpu/i960.cpu: Ditto.
2304         * cpu/openrisc.cpu: Ditto.
2305         * cpu/xstormy16.cpu: Ditto.
2306         * cpu/m32r.cpu: Ditto.
2307         (all insns): Explicitly specify IDOC attribute.
2308
2309         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2310         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2311         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2312         * Makefile.in: Regenerate.
2313         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2314         (-attr-read): Defer computing default value until we know the type.
2315         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2316         (<attr-list>:attr-present?): New method.
2317         (atlist-attr-present?,obj-attr-present?): New fns.
2318         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2319         (attr-builtin!): New insn attr IDOC.
2320         * cgen-doc.scm (doc-arguments): New args -I,-N.
2321         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2322         Support comment as fourth element of enum value.
2323         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2324         * html.scm (gen-html-header): New arg kind, all callers updated.
2325         (gen-table-of-contents): New arg insn-file, all callers updated.
2326         (gen-list-entry,gen-doc-header): New fn.
2327         (get-operands): Delete.
2328         (gen-iformat-table): Rewrite.
2329         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2330         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2331         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2332         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2333         (get-insns-for-category,gen-categories-insn-lists): New fns.
2334         (gen-insn-docs): Simplify each insn's semantics first.
2335         Print insn tables sorted by IDOC categories.
2336         (*insn-html-file-name*): New global.
2337         (cgen-insn.html): New fn.
2338         (cgen-all): Update.
2339         * insn.scm (<insn>): Create a setter for the `tmp' member.
2340         * semantics.scm (insn-build-known-values): Renamed from
2341         -build-known-values.  All callers updated.
2342
2343         * rtl.scm: Move traveral/evaluation support to ...
2344         * rtl-traverse.scm: New file.
2345         * read.scm: Maybe-load rtl-traverse.scm.
2346
2347         * rtl.scm (-rtx-valid-types): Add SETRTX.
2348
2349         * rtx-funcs.scm (nop,parallel): Fix mode.
2350
2351         * utils.scm (eqv-lookup-index): New fn.
2352         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2353
2354         * dev.scm (load-doc): Set APPLICATION.
2355
2356 2003-06-10  Dave Brolley  <brolley@redhat.com>
2357
2358         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2359         * sid-decode.scm: Generate #include of config.h into
2360         @prefix@-decode.cxx.
2361         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2362
2363 2003-06-07  Doug Evans  <dje@sebabeach.org>
2364
2365         * gen-all-sid: New file.
2366         * gen-all-opcodes: New file.
2367
2368 2003-06-05  Nick Clifton  <nickc@redhat.com>
2369
2370         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2371         version of the FRinti operand.
2372         (FRintjeven): Likewise for FRintj.
2373         (FRintkeven): Likewise for FRintk.
2374         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2375         media-quad-arith-sat-semantics, media-quad-arith-sat,
2376         conditional-media-quad-arith-sat, mdunpackh,
2377         media-quad-multiply-semantics, media-quad-multiply,
2378         conditional-media-quad-multiply, media-quad-complex-i,
2379         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2380         conditional-media-quad-multiply-acc, munpackh,
2381         media-quad-multiply-cross-acc-semantics, mdpackh,
2382         media-quad-multiply-cross-acc, mbtoh-semantics,
2383         media-quad-cross-multiply-cross-acc-semantics,
2384         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2385         media-quad-cross-multiply-acc-semantics, cmbtoh,
2386         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2387         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2388         cmhtob): Use new operands.
2389         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2390         (parse_even_register): New function.
2391
2392 2003-06-04  Doug Evans  <dje@sebabeach.org>
2393
2394         Better handling of 64 bit and mixed 32/64 bit architectures.
2395         * hardware.scm (hw-update-word-modes!): New fn.
2396         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2397         hw-update-word-modes!.
2398         (state-word-bitsize): Replace FIXME with requested check.
2399         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2400         * mode.scm (mode-find): Ignore INT,UINT.
2401         (-mode-word-sizes-kind): New global.
2402         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2403         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2404         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2405         of mode-list to ...
2406         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2407         unusable, correct values set later.
2408         (mode-finish!): Remove cruft.
2409         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2410         * opcodes.scm (opcodes-init!): Ditto.
2411         * rtx-funcs.scm (annul): Fix mode of pc.
2412         * cpu/ia64.cpu: Remove cruft that sets word modes.
2413         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2414
2415 2003-06-03  Nick Clifton  <nickc@redhat.com>
2416
2417         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2418         immediate value not unsigned.
2419
2420 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2421
2422         * cpu/sh.cpu: Amend comments to refer to SuperH.
2423         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2424         * cpu/sh64-media.cpu: Likewise.
2425         (Saturation): Update manual reference.
2426
2427 2003-05-15  Doug Evans  <dje@sebabeach.org>
2428
2429         * Makefile.am (srcroot): New var.
2430         (html): New rule.
2431         * Makefile.in: Regenerate.
2432         * cgen-doc.scm: New file.
2433         * html.scm: New file.
2434         * gen-all-doc: New file.
2435         * dev.scm (cload): Handle DOC application.
2436         (load-doc): New fn.
2437         * machs.scm (machs-for-cpu): New fn.
2438         * model.scm (models-for-cpu): New fn.
2439         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2440         All uses updated.
2441         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2442         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2443
2444         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2445         (-gen-decode-bits): Instead put in better fix here.
2446
2447         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2448
2449 2003-05-01  DJ Delorie  <dj@redhat.com>
2450
2451         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2452         word accesses.
2453         (set-alignfix-mem): Likewise.
2454
2455 2003-04-16  Dave Brolley  <brolley@redhat.com>
2456
2457         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2458         * utils.scm (copyright-fsf): Update generate copyright years.
2459         (copyright-cygnus): Ditto.
2460         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2461         operands.
2462         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2463         here.
2464         (<operand>'gen-profile-code): New parameter 'when'.
2465         (<iunit>'gen-profile-code): Ditto.
2466         (<insn>'gen-profile-code): Ditto.
2467         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2468         'insn_reference' for the 'after' function.
2469         * model.scm (unit:enum): Moved to sim-model.scm.
2470         * sim-model.scm (unit:enum): Moved from model.scm.
2471         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2472         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2473         * sid-model.scm (unit:enum): New version for sid.
2474         (gen-model-class-name): New function.
2475         (gen-model-unit-fn-decl): New function.
2476         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2477         (gen-model-unit-fn-name): New parameter 'when'.
2478         (-gen-model-insn-fn-name): Ditto.
2479         (-gen-model-insn-qualified-fn-name): New function.
2480         (-gen-model-insn-fn-decl): New function.
2481         (-gen-model-insn-fn-decls): New function.
2482         (-gen-model-insn-fn): New parameter 'when'. Call
2483         -gen-model-insn-qualified-fn-name.
2484         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2485         functions for modelling insn before and after execution.
2486         (-gen-model-class-decls): New function.
2487         (" (gen-model-class-name model) "): New function.
2488         (gen-model-classes): New function.
2489         (-gen-insn-timing): Generate functions for modelling insn before and after
2490         execution.
2491         (-gen-insn-unit-timing): Generate class-qualified names.
2492         (-gen-model-timing-table): Ditto.
2493         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2494         not needed (yet) by sid.
2495         (cgen-model.h): New function.
2496
2497 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2498
2499         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2500         * cpu/sh64-compact.cpu: Likewise.
2501         * cpu/sh64-media.cpu: Likewise.
2502
2503 2003-03-21  DJ Delorie  <dj@redhat.com>
2504
2505         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2506         which indicates if the sign flag is set from bit 15 or 7.
2507         Adjust all callers.
2508         (set-psw): New argument ws, propogate it.
2509         (set-psw-nowrite): Likewise.
2510         (set-mem-psw): Likewise.
2511         (set-psw-carry): Likewise.  Use temporaries to prevent
2512         prematurely overwriting needed inputs.
2513         (set-psw-rrotate17): Fix logic.
2514         (shrgrgr): Preserve carry for zero-bit shifts.
2515         (shrgrimm): Likewise.
2516         (shlgrgr): Likewise.
2517         (shlgrimm): Likewise.
2518         (asrgrgr): Likewise.
2519         (asrgrimm): Likewise.
2520         (reset): New.
2521
2522 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2523
2524         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2525
2526 2002-03-05  DJ Delorie  <dj@redhat.com>
2527
2528         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2529         prematurely overwriting needed inputs.
2530         (set-psw-sub): Likewise.
2531
2532 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2533
2534         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2535
2536 2003-02-18  DJ Delorie  <dj@redhat.com>
2537
2538         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2539         (movlmemimm): Just mask the address.
2540         (movhmemimm): Likewise.
2541         (movlmemgr): Likewise.
2542         (movhmemgr): Likewise.
2543         (set-psw): Always set the psw last.
2544         (set-psw-carry): Likewise.
2545         (set-psw-add): Likewise.
2546         (set-psw-sub): Likewise.
2547
2548         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2549         of 16 patterns from the set-psw-rotate17 function.
2550         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2551         movgriipostincgr, movgriipredecgr): Set psw correctly.
2552         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2553         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2554         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2555
2556 2003-02-11  Dave Brolley  <brolley@redhat.com>
2557
2558         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2559         @arch@_cgen-ifld_table.
2560         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2561         @arch@_cgen-ifld_table.
2562
2563 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2564
2565         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2566
2567 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2568
2569         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2570         empty ISAs.
2571
2572 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2573
2574         * utils-gen.scm (attr-int-gen-defn): Define.
2575
2576 2002-12-21  Doug Evans  <dje@sebabeach.org>
2577
2578         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2579         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2580
2581         * dev.scm (cload): Update location of .cpu files.
2582
2583 2002-12-19  Doug Evans  <dje@sebabeach.org>
2584
2585         * utils-sim.scm (gen-profile-sym): New fn.
2586         (<operand>,sbuf-profile-sym): New method.
2587         (<operand>,sbuf-profile-elm): Use it.
2588         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2589         of hardcoding symbol name.
2590         (<operand>,gen-profile-code): Ditto.
2591         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2592         symbol name.
2593
2594         * mode.scm (mode-sem-mode): New fn.
2595         * operand.scm (op:new-mode): Update. mode-name.
2596         (op-natural-mode?) New fn.
2597         * rtl.scm (hw): Set hw-name,mode-name.
2598
2599         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2600         Instead do:
2601         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2602         as size of IDESC-TABLE-VAR.
2603         (@prefix@_init_idesc_table): Ditto.
2604         * sim-model.scm (-gen-mach-defns): Ditto.
2605         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2606
2607         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2608
2609         * insn.scm (-parse-insn-format-symbol): Improve error message.
2610         (-parse-insn-format): Ditto.
2611
2612         * gen-all-sim: New script.
2613
2614 2002-12-16  DJ Delorie  <dj@delorie.com>
2615
2616         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2617
2618 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2619
2620         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2621         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2622         (parse_immediate16): Handle immediate16 values, which now include
2623         @hi(label) and @lo(label)
2624
2625 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2626
2627         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2628         Add braces and cast for union field.
2629         (gen-multi-ifield-nodes): Add braces and cast for union field.
2630         (cgen_operand_table): Similarly fix sentinel.
2631         (cgen_cpu_close): Constify "insns".  Formatting.
2632         (cgen-desc.c): Include xregex.h.
2633         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2634         Prototype.
2635         <opc.c>: Include safe-ctype.h.
2636         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2637         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2638         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2639         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2640         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2641         (parse_addr16): Correct type of "value".  Formatting.
2642         (parse_addr16_p): Likewise.
2643         (parse_addr16_cjp): Likewise.
2644         (parse_lit8): Likewise.
2645         (parse_bit3): Formatting.
2646         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2647         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2648         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2649         print_decimal.
2650         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2651         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2652         (print_dollarhex8): Likewise.
2653         (print_dollarhex16): Likewise.
2654         (print_dollarhex_addr16h): Likewise.
2655         (print_dollarhex_addr16l): Likewise.
2656         (print_dollarhex_p): Likewise.
2657         (print_dollarhex_cj): Likewise.
2658         (print_decimal): Likewise.
2659         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2660
2661 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2662
2663         * doc/rtl.texi (Model variants): Mention current limitations for
2664         unit inputs and outputs.
2665         (Hardware elements) <attribute PROFILE>: Be slightly more
2666         verbose.
2667         (Instructions) <timing>: input/output overrides have a direction
2668         operand.
2669
2670 2002-11-25  DJ Delorie  <dj@redhat.com>
2671
2672         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2673
2674 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2675
2676         * cpu/iq10.cpu: New file.
2677         * cpu/iq2000.cpu: Likewise.
2678         * cpu/iq2000.opc: Likewise.
2679         * cpu/iq2000m.cpu: Likewise.
2680
2681 2002-11-19  DJ Delorie  <dj@redhat.com>
2682
2683         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2684
2685 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2686
2687         * dev.scm: Call getenv with a string, not a symbol.
2688
2689 2002-10-08  Doug Evans  <dje@transmeta.com>
2690             Hans-Peter Nilsson  <hp@axis.com>
2691
2692         * types.scm (bitrange-overlap?): Handle lsb0?.
2693
2694 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2695
2696         From Robert Cragie <rcc@jennic.com>:
2697         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2698
2699 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2700             Ben Elliston  <bje@redhat.com>
2701             John Healy  <jhealy@redhat.com>
2702             Jeff Johnston  <jjohnstn@redhat.com>
2703             Alan Lehotsky  <alehotsky@redhat.com>
2704             Ubicom Inc. <SupportDesk@ubicom.com>
2705
2706         * cpu/ip2k.cpu: New file.
2707         * cpu/ip2k.opc: Likewise.
2708
2709 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2710
2711         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2712
2713 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2714
2715         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2716         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2717         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2718         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2719         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2720         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2721         (-sthi-byte): If there is a single byte to store, store it at
2722         proper address.
2723         (sthil, sthiq): Fix big-endian behaviour.
2724         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2725         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2726         (saturate): Use Dimode to check if saturation operation is required.
2727         (usaturate): Likewise.
2728         (mpermw): Fix mask.
2729         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2730         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2731         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2732         (msadubq): Fix subword index in second operand of first subtraction.
2733
2734 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2735
2736         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2737         code.
2738
2739 2002-06-18  Dave Brolley  <brolley@redhat.com>
2740
2741         * cpu/frv.cpu: New cpu description.
2742         * cpu/frv.opc: New cpu support code.
2743
2744 2002-05-21  Dave Brolley  <brolley@redhat.com>
2745
2746         * decode.scm (-opcode-slots): Don't consider bits beyond the
2747         length of the insn.
2748
2749 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2750
2751         * cpu/powerpc.cpu: New file.
2752
2753 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2754
2755         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2756
2757 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2758
2759         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2760         results are expanded recursively.
2761
2762 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2763
2764         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2765         call scan-symbol on it, to enable recursive macro-expansion.
2766
2767 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2768
2769         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2770         for multiple-isa configurations.
2771         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2772
2773 2002-02-04  Ben Elliston  <bje@redhat.com>
2774
2775         * cpu/sh.cpu, cpu/sh.opc: New files.
2776         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2777
2778 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2779
2780         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2781         (Enumerated constants): Mention that an ifield must not specify a
2782         multi-ifield.
2783         (Instruction operands): Ditto for index.
2784         (Expressions) <parallel>: Remove misplaced mention of local
2785         variables.
2786         <if>: Mention that mode must be specified and non-VOID when the
2787         result is used.
2788
2789 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2790
2791         * doc/porting.texi: When referring to *.opc, mention they are in
2792         the cpu subdir.  Call top-level directory toplevel, not devo.
2793         Close string in define-normal-insn example.
2794
2795         * doc/pmacros.texi: Fix .substr typo to .substring.
2796         Mention that .sym expansions are not further expanded.
2797
2798 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2799
2800         * desc-cpu.scm (ifld-number-cache): Add.
2801         (ifld-number): Add.
2802         (gen-maybe-multi-ifld-of-op): Add.
2803         (gen-maybe-multi-ifld): Add.
2804         (gen-multi-ifield-nodes): Add.
2805         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2806
2807 2002-01-10  matthew green  <mrg@redhat.com>
2808
2809         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2810         (gr-Rb-names): ... to this.
2811         (h-Rb): New hardware piece.
2812         (h-Rbj): Use gr-Rb-names.
2813         (Rb): Use h-Rb.
2814         (holdx): New instruction.
2815
2816 2002-01-07  Ben Elliston  <bje@redhat.com>
2817
2818         * utils.scm (package-cygnus-simulators): Rename from this ..
2819         (package-red-hat-simulators): .. to this.
2820         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2821         * sid-cpu.scm (cgen-desc.h): Likewise.
2822         (cgen-cpu.h): Likewise.
2823         (cgen-defs.h): Likewise.
2824         (cgen-write.cxx): Likewise.
2825         (cgen-semantics.cxx): Likewise.
2826         (cgen-sem-switch.cxx): Likewise.
2827         * sid-decode.scm (cgen-decode.h): Likewise.
2828         (cgen-decode.cxx): Likewise.
2829         * sid-model.scm (cgen-model.cxx): Likewise.
2830         * sid.scm (option-set!): Likewise.
2831         * sim.scm (option-set!): Likewise.
2832
2833 2002-01-07  Ben Elliston  <bje@redhat.com>
2834
2835         * utils.scm (copyright-fsf): Add 2002.
2836         (copyright-cygnus): Rename to copyright-red-hat.
2837         (copyright-red-hat): Add 2002.
2838         (CURRENT-COPYRIGHT): Update comment.
2839         * opcodes.scm (option-set!): Update callers.
2840         * sid-model.scm (cgen-model.cxx): Likewise.
2841         * sid-cpu.scm: Likewise.
2842         * sid-decode.scm: Likewise.
2843         * sid.scm (option-set!): Handle "redhat" as an option for
2844         "copyright"; use copyright-red-hat.
2845         * sim.scm (option-set!): Likewise.
2846
2847 2002-01-03  Dave Brolley  <brolley@redhat.com>
2848
2849         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2850         number of insns in the list.  Update the population count function to
2851         identify and prioritize 3 catgories of useful bits.
2852         (-population-top-few): Don't consider bits with a population count of
2853         zero.
2854         (-build-decode-table-entry): Don't call
2855         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2856         identical insns at the next tree level.
2857         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2858         this function is no longer used.
2859         (filter-non-specialized-ambiguous-insns): New function.
2860         (filter-identical-ambiguous-insns): New function.
2861         (find-identical-insn): New function.
2862         (filter-harmlessly-ambiguous-insns): Removed.
2863
2864 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2865             matthew green  <mrg@redhat.com>
2866             Frank Ch. Eigler  <fche@redhat.com>
2867             Nick Clifton  <nickc@cambridge.redhat.com>
2868
2869         * cpu/xstormy16.cpu: New file.
2870         * cpu/xstormy16.opc: New file.
2871
2872 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2873
2874         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2875
2876 2001-11-14  Dave Brolley  <brolley@redhat.com>
2877
2878         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2879         of the field being extracted.
2880
2881 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2882
2883         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2884         (cos ...) and (sin ..) rtx.
2885
2886 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2887
2888         * desc-cpu.scm: Do not include ctype.h in generated desc
2889         files.  They will inherit safe-ctype.h instead.
2890
2891 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2892
2893         * desc-cpu.scm: Add missing function prototypes (for generated
2894         C files).  Fix compile time warning messages about unused
2895         parameters (for generated C files).
2896         * opc-asmdis.scm: The same.
2897         * opc-ibld.c: The same.
2898         * opc-itab.scm: The same.
2899         * cpu/fr30.opc: The same.
2900         * cpu/m32r.opc: The same.
2901         * cpu/openrisc.opc: The same.
2902
2903 2001-09-17  graydon hoare  <graydon@redhat.com>
2904
2905         * insn.scm (syntax-break-out): Correct logic in handling escaped
2906         syntax characters.
2907
2908 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
2909
2910         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2911         call @arch@_cgen_build_insn_regex now that regex support is in
2912         libiberty.
2913
2914 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
2915
2916         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2917         (mask-superset?): Look for strict supersets to allow rejection of
2918         duplicate insns.
2919
2920 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2921
2922         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2923         (cgen-desc.h): Call it.
2924         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2925         decode-size.
2926         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2927         entire_insn for extraction, if it's shorter than base-insn-bitsize.
2928
2929 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2930
2931         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2932         mach->cpu insn-chunk-bitsize.
2933         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2934         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2935         * mach.scm (<cpu>): New field insn-chunk-bitsize.
2936         (-cpu-parse, -cpu-read): Parse/initialize it.
2937         * doc/rtl.texi (define-cpu): Document it.
2938
2939 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
2940
2941         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2942
2943 2001-07-06  Ben Elliston  <bje@redhat.com>
2944
2945         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2946
2947 2001-07-05  Ben Elliston  <bje@redhat.com>
2948
2949         * README: Update.
2950
2951         * read.scm (include): Include files from srcdir/cpu.
2952         (-cgen): Likewise for loading .cpu files.
2953         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2954         * *.cpu: Move all cpu descriptions into cpu subdirectory.
2955         * *.opc: Likewise.
2956         * simplify.inc: Likewise.
2957
2958 2001-07-04  Ben Elliston  <bje@redhat.com>
2959
2960         * read.scm (include): Log "Including file" message at level 1,
2961         rather than outputting it with (display).
2962         (cpu-load): Log "Loading cpu description" and "Processing cpu
2963         description" messages at levels 1 and 2, respectively, rather than
2964         using (display).
2965
2966 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
2967
2968         * desc.scm (<keyword> 'gen-defn): Add extra zero into
2969         CGEN_KEYWORD_ENTRY initializers.
2970
2971         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2972         (<operand> 'test-data): Involve both the index and the hardware
2973         in testcase generation.
2974         (<hw-indx> 'test-data): Generate test data from the underlying
2975         object.
2976         (<ifield> 'test-data): Generate test data by computing bit
2977         patterns for the field, then decoding them.
2978         (<hw-address> 'test-data): Allow for new calling convention.
2979         (<hw-iaddress> 'test-data): Likewise.
2980         (<keyword> 'test-data): Convert index values into keywords.
2981         (<hw-asm> 'test-data): Convert index values into integer strings.
2982
2983         * gas-test.scm (cgen-build.sh): Escape '.' as well.
2984
2985 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
2986
2987         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2988         is required for multi-mode hw types (memory).
2989
2990 2001-05-11  Ben Elliston  <bje@redhat.com>
2991
2992         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2993         when generating allinsn.d from objdump output. Without it, the
2994         testsuite will treat $ as the regular expression for end of line.
2995
2996 2001-05-09  Ben Elliston  <bje@redhat.com>
2997
2998         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2999         with `cgen_cpu_open'; documentation had become out of date.
3000         * doc/rtl.texi (Instruction operands): Likewise.
3001
3002 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3003
3004         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3005         various-base-length instruction sets.
3006
3007 2001-04-02  Ben Elliston  <bje@redhat.com>
3008
3009         * sid-cpu.scm (-last-insn): New function.
3010         (-gen-sem-switch-engine): Loop through idesc while less than or
3011         equal to the last instruction enum, not less than the MAX enum.
3012         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3013         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3014         table's size to be the last instruction enum plus one, not
3015         @PREFIX@_INSN_MAX.
3016         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3017         instruction onto the instruction list.
3018
3019         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3020         using the size of the table and its elements.
3021         (-gen-decode-insn-globals): Define the idesc table's size to be
3022         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3023         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3024         last instruction enum plus one, not @CPU@_INSN_MAX.
3025
3026 2001-03-28  Ben Elliston  <bje@redhat.com>
3027
3028         * doc/version.texi (UPDATED, EDITION): Update.
3029         * doc/stamp-vti: Likewise.
3030
3031 2001-03-26  Ben Elliston  <bje@redhat.com>
3032
3033         * doc/credits.texi (Credits): Update.
3034
3035         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3036         specified prefix and, if necessary, escape `$' in gas-build.sh to
3037         prevent unwanted shell variable expansion.
3038
3039 2001-03-24  Ben Elliston  <bje@redhat.com>
3040
3041         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3042         (<keyword>,test-data): Likewise.
3043         (<hw-address>,test-data): Likewise.
3044         (<hw-iaddress>,test-data): Likewise.
3045         (-collate-test-set): New function.
3046         (build-test-set): Use it.
3047         (gen-gas-test): Generate five test cases per instruction.
3048         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3049
3050         * read.scm: Load "slib/random" if random is not defined.
3051         * slib/random.scm: New file.
3052
3053         * utils.scm: Remove comments about the Hobbit compiler.
3054         (copyright-cygnus): Add 2001.
3055         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3056         (package-gnu-simulators): Tidy.
3057
3058 2001-03-23  Ben Elliston  <bje@redhat.com>
3059
3060         * cgen-gas.scm: Inline documentation improvements.
3061
3062 2001-03-21  Ben Elliston  <bje@redhat.com>
3063
3064         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3065         given in a syntax string is undefined.
3066
3067         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3068         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3069
3070 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3071
3072         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3073         for arg_type CGEN_CPU_OPEN_BFDMACH.
3074
3075 2001-03-20  Ben Elliston  <bje@redhat.com>
3076
3077         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3078         instruction onto the instruction list. Define MAX_INSNS to be the
3079         value of the last instruction enum plus one.
3080
3081 2001-03-14  Nick Clifton  <nickc@redhat.com>
3082
3083         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3084
3085 2001-03-05  Dave Brolley  <brolley@redhat.com>
3086
3087         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3088         if the number of ifields is greater than zero.
3089
3090 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3091
3092         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3093         Emit LIKELY/UNLIKELY branch probability hints.
3094         * sid-decode.cpu (-gen-record-args): Ditto.
3095
3096 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3097
3098         * desc-cpu.scm (-gen-hash-defines): Rename
3099         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3100
3101 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3102
3103         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3104         writeback tracking.
3105         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3106         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3107         if unnecessary.
3108         * sid.scm (<operand> gen-write): Use unsigned long long expression
3109         for writeback.
3110         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3111         (<unit> gen-profile-code): Ditto.
3112
3113 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3114
3115         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3116         (regno ...) rtx.
3117
3118 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3119
3120         * operand.scm (<operand> pretty-sem-name): New field.
3121         (<operand> make): Initialize it from hw-name.
3122         (op:set-pretty-sem-name!): New function.
3123         (<operand> gen-pretty-name): Default to fetching new field.
3124         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3125         sem-name setting from -rtx-hw-name.
3126
3127 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3128
3129         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3130         its subsequent gen-pretty-name.
3131
3132         * read.scm: Increase thread working stack limit and backtrace
3133         depth limits.
3134
3135 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3136
3137         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3138
3139 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3140
3141         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3142         current insn plus 4.
3143         (h-delay-insn): New hardware register.
3144         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3145         (l-jalr): Likewise.
3146         (l-bal): Likewise.
3147
3148         * openrisc.opc (parse_hi16): Sign extend value.
3149         (parse_lo16): Likewise.
3150
3151 2001-01-06  Ben Elliston  <bje@redhat.com>
3152
3153         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3154         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3155         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3156         (-gen-semantic-fn-table): Likewise.
3157         (-gen-scache-semantic-fn): Likewise.
3158         (-gen-no-scache-semantic-fn): Likewise.
3159         (cgen-read.c): Likewise.
3160         (cgen-sem-switch.c): Likewise.
3161         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3162         is a filename prefix.
3163         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3164         (-gen-decode-insn-globals): Likewise.
3165         (-gen-idesc-decls): Likewise.
3166         (cgen-decode.h): Likewise.
3167         (cgen-decode.c): Likewise.
3168         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3169         (gen-cpu-insn-enum): Likewise.
3170         (sim-finish!): Likewise.
3171
3172 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3173
3174         * openrisc.cpu: New file.
3175         * openrisc.opc: Likewise.
3176
3177 2000-12-12  Ben Elliston  <bje@redhat.com>
3178
3179         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3180
3181 2000-12-07  Ben Elliston  <bje@redhat.com>
3182
3183         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3184         "insn" when there are zero ifields to extract.
3185
3186 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3187
3188         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3189         used by simple/non-scache simulators.
3190         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3191         regardless of with-scache?.
3192         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3193
3194 2000-12-03  Ben Elliston  <bje@redhat.com>
3195
3196         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3197         (cgen-desc.c): Likewise.
3198
3199 2000-12-01  Greg McGary  <greg@mcgary.org>
3200
3201         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3202
3203 2000-12-01  Ben Elliston  <bje@redhat.com>
3204
3205         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3206         definitions if run without with-multipla-isa?.
3207         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3208         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3209
3210 2000-11-24  Ben Elliston  <bje@redhat.com>
3211
3212         * sim-cpu.scm (-gen-hardware-struct): New function.
3213         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3214         hardware elements wich have share one or more ISAs with the ISAs
3215         being kept.
3216
3217         * sim.scm (-with-multiple-isa?): New symbol.
3218         (with-multiple-isa?): New function.
3219         (option-init!): Initialise -with-multiple-isa?.
3220         (option-set!): Handle with-multiple-isa option.
3221
3222 2000-11-21  Ben Elliston  <bje@redhat.com>
3223
3224         * utils.scm (copyright-fsf): Add the year 2000.
3225
3226 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3227
3228         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3229         unneeded "\n\n" from F() macro definition.
3230
3231 2000-11-15  Greg McGary  <greg@mcgary.org>
3232
3233         * utils-cgen.scm (gen-define-with-symcat): New function.
3234         * desc-cpu.scm (gen-ifld-defns): Use it.
3235         (gen-hw-table-defns): Use it.
3236         (-gen-hash-defines): Use it.
3237         (gen-operand-table): Use it.
3238         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3239         * opc-itab.scm (-gen-ifmt-table): Use it.
3240         (-gen-insn-opcode-table): Use it.
3241         (-gen-macro-insn-table): Use it.
3242         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3243         * sim-cpu.scm (cgen-semantics.c): Use it.
3244         (cgen-sem-switch.c): Use it.
3245
3246 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3247
3248         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3249         request to emit calls to insn extractors as functions rather than
3250         branches to inline blocks.
3251         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3252         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3253
3254         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3255         to extractor clauses.
3256
3257 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3258
3259         * decode.scm (-distinguishing-bit-population): Significantly
3260         improve popularity heuristic.  Renamed from
3261         (-mask-bit-population): Gone.
3262         (-population-above-threshold): Sort new bit numbers in order of
3263         popularity.
3264         (-population-top-few): Allow up to three more bits to be selected
3265         than requested.  Correct selection order to prefer better bits.
3266         Correct bug in fewer-than-requested case.  Keep threshold as
3267         floating-point.
3268         (decode-best-get-bits): Pass also the insn-values.
3269
3270         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3271         future optimization.
3272
3273         * utils.scm (message): Format nested lists better.
3274
3275 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3276
3277         * dev.scm: Add srcdir to %load-path.
3278
3279         * rtx-funcs.scm (subword): Mode of argument can be different
3280         than mode of result, so don't use OP0 to specify argument's mode.
3281
3282 2000-11-02  Ben Elliston  <bje@redhat.com>
3283
3284         * doc/porting.texi (Building a GAS test suite): Document my change
3285         to gas-build.sh.
3286
3287 2000-11-01  Ben Elliston  <bje@redhat.com>
3288
3289         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3290
3291 2000-10-31  Ben Elliston  <bje@redhat.com>
3292
3293         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3294         with no command line arguments if the gas build directory can be
3295         determined.
3296
3297 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3298
3299         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3300         op-ifld -> op-ifield.
3301
3302 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3303
3304         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3305
3306 2000-10-13  matthew green  <mrg@cygnus.com>
3307
3308         * utils-cgen.scm (get-ifetch): Move from here ...
3309         * sim.scm (get-ifetch): ... to here.
3310         * sid.scm (get-ifetch): Copy and port to c++.
3311
3312 2000-10-06  Dave Brolley  <brolley@redhat.com>
3313
3314         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3315         ifld-start + ifld-word-offset.
3316         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3317         the field is beyond the base number of bits.
3318         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3319         (gen-extract-ifields): Ditto.
3320         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3321         characters in the regular expression.
3322
3323 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3324
3325         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3326         preprocessor constant.
3327
3328 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3329
3330         * slib/logical.scm: New file from slib.  Provides robust bitwise
3331         logical operations for large integers.
3332         * read.scm: maybe-load it.
3333
3334 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3335
3336         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3337         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3338         single-isa predicate, but support keep-isa filtering.
3339
3340 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3341
3342         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3343         statement-expression and comma-expression contexts.
3344         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3345
3346 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3347
3348         * decode.scm (-population-top-few): Signal error gracefully if
3349         decoding is about to become ambiguous.
3350
3351 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3352
3353         * doc/rtl.texi (decode-assist): Describe this field as optional.
3354
3355 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3356
3357         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3358         with decode proc.
3359
3360 2000-09-05  Dave Brolley  <brolley@redhat.com>
3361
3362         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3363         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3364
3365 2000-08-29  Dave Brolley  <brolley@redhat.com>
3366
3367         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3368         adata-integral-insn is true for this architecture.
3369
3370 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3371
3372         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3373         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3374         * rtl-c.scm (-c-rtl-get): Improve an error message.
3375         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3376
3377 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3378
3379         * Makefile.in (DIST_COMMON): Regenerated.
3380         * ifield.scm (<derived-ifield> needed-iflds): New method.
3381         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3382         sfmts built from <derived-ifield>s.
3383         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3384         type symbol 'derived-ifield, not an unparseable string.
3385         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3386         (-sfmt-contents): Add tracing.
3387
3388         From Doug Evans <dje@transmeta.com>:
3389         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3390         C code.
3391
3392 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3393
3394         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3395         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3396         (-rtl-c-get): Rename from rtl-c-get.
3397         (rtl-c-get): New fn for getter logging.
3398
3399 2000-07-28  Ben Elliston  <bje@redhat.com>
3400
3401         * NEWS: Update.
3402
3403 2000-07-25  Ben Elliston  <bje@redhat.com>
3404
3405         * doc/credits.texi (Credits): Add Frank Eigler.
3406
3407 2000-07-24  Dave Brolley  <brolley@redhat.com>
3408
3409         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3410         fully.
3411         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3412         (<keyword>): Initialize all elements fully.
3413         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3414         fully.
3415         (-gen-mach-table-defns): Ditto.
3416         (-gen-ifld-defns): Ditto.
3417         (-gen-operand-table): Ditto.
3418         (-gen-insn-table): Ditto.
3419         (-gen-cpu-open): Nothing to do for the mach table.
3420
3421 2000-07-13  Ben Elliston  <bje@redhat.com>
3422
3423         * doc/version.texi (UPDATED): Update.
3424
3425 2000-07-05  Ben Elliston  <bje@redhat.com>
3426
3427         * configure.in (AC_PATH_PROG): Remove.
3428         * configure: Regenerate.
3429         * Makefile.am (GUILE): Locate guile dynamically.
3430         * Makefile.in: Regenerate.
3431         * doc/Makefile.in: Likewise.
3432
3433 2000-07-03  Ben Elliston  <bje@redhat.com>
3434
3435         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3436         * opc-itab.scm (cgen-opc.c): Likewise.
3437
3438 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3439
3440         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3441         guile 1.4 compatibility.
3442         (rtx-env-dump): Comment out buggy display calls.
3443
3444 2000-06-15  matthew green  <mrg@redhat.com>
3445
3446         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3447
3448 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3449
3450         * Makefile.in: Regenerated.
3451
3452         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3453         (gen-ifld-defns): Ditto.
3454         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3455         * rtl.c (rtl-finish!): Ditto.
3456         * opc-itab.scm (-gen-ifield-decls): Ditto.
3457         * opcodes.scm (gen-switch): Exclude derived operands.
3458         * operand.scm (op-iflds-used): Expand derived operands.
3459         (hw-index-derived): New dummy function to create dummy object.
3460         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3461         constructor.  Set object's hw-name and index fields.
3462         (-anyof-merge-subchoices): Set instance object's index also.
3463         (-anyof-name): New helper function.
3464         (anyof-merge-semantics): Correct replacement of operand names in
3465         anyof instance.
3466         (op-ifield): Tolerate derived-operands and their funny indices better.
3467         * ifield.scm (ifld-known-values): Expand derived ifields.
3468         (non-multi-ifields, non-derived-ifields): New utility functions.
3469         (ifld-decode-mode): Tolerate objects with unbound decode field.
3470         * iformat.scm (compute-insn-length): Expand derived ifields.
3471         (compute-insn-base-mask): Ditto.
3472         * insn.scm (insn-base-ifields): Remove.
3473         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3474         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3475         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3476         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3477         (-frag-test-data): Ditto.
3478         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3479         (-gen-sem-switch-engine); Ditto.
3480         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3481         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3482         (-gen-record-args): Tolerate unbound op-ifield.
3483         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3484         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3485         Exclude multi-insns.
3486         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3487         * utils-sim.scm (op-extract?): Handle derived operands.
3488
3489         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3490         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3491         * hardware.scm (hardware-for-mode): New function.
3492
3493         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3494         cleaning up decode tables.
3495         (mask-superset?): Little helper function for above.
3496         * decode.scm (-build-decode-table-entry): Call it.
3497         (-opcode-slots): Add some more tracing.
3498         * arm.cpu: Disable decode-splits construct due to implementation
3499         conflict with `filter-harmlessly-ambiguous-insns'
3500
3501         * decode.scm (-population-top-few): New function for better decode
3502         bit generation.  Includes minor helper functions.
3503         (decode-get-best-bits): Call it instead.
3504         (OLDdecode-get-best-bits): Renamed previous version of above.
3505
3506
3507 2000-06-13  Ben Elliston  <bje@redhat.com>
3508
3509         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3510         for the Guile library directory.
3511         * configure: Regenerate.
3512         * Makefile.in, doc/Makefile.in: Regenerate.
3513
3514         * Makefile.in, doc/Makefile.in: Regenerate.
3515         * configure.in: Remove unnecessary tests. Move to version 1.0.
3516         * acconfig.h, config.in: Remove.
3517         * configure, aclocal.m4: Regenerate.
3518         * doc/stamp-vti, doc/version.texi: Likewise.
3519         * AUTHORS: New file.
3520
3521 2000-06-07 Ben Elliston  <bje@redhat.com>
3522
3523         * fixup.scm (symbol-bound?): Reduce debugging output.
3524
3525 2000-06-02  matthew green  <mrg@redhat.com>
3526
3527         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3528         a given instruction, replacing derived fields with their subfields.
3529         (insn-value): Use `insn-base-ifields' to find all constant values.
3530         (multi-insn-instantiate!): Comment some debug messages.
3531
3532 2000-06-01  Ben Elliston  <bje@redhat.com>
3533
3534         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3535         symbol names used in a (c-call ..) rtx.
3536
3537         * sim-test.scm (build-test-set): Return (()) for an instruction
3538         with no operands, so it too is included in the generated test set.
3539
3540 2000-05-31  Ben Elliston  <bje@redhat.com>
3541
3542         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3543         (sim-test): Likewise.
3544         * Makefile.in: Regenerate.
3545
3546 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3547
3548         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3549         stack traceback, in an order that resembles gdb's `bt'.
3550
3551 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3552
3553         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3554         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3555         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3556         multi insns.
3557         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3558         virtual functions.
3559         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3560         * iformat.scm (ifmt-expanded-ifields): Gone.
3561         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3562         work.
3563         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3564         ifmt entries.
3565
3566         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3567         code.
3568
3569 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3570
3571         * sid.scm (with-any-profile?): New function clone.
3572
3573 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3574
3575         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3576
3577 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3578
3579         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3580         (-multi-ifield-read): Parse them.
3581         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3582         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3583         (multi-ifield gen-extract): Add decode hook.
3584         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3585
3586         * insn.scm (syntax-break-out): More correctly handle \-escaped
3587         syntax characters.
3588         (syntax-make-elements): Ditto.
3589         * opc-itab.scm (compute-syntax): Ditto.
3590
3591 2000-05-17  Ben Elliston  <bje@redhat.com>
3592
3593         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3594
3595 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3596
3597         * gas-test.scm (build-test-set): Return (()) for an instruction
3598         with no operands, so it too is included in the generated test set.
3599
3600 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3601
3602         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3603         IFMT_OPERANDS and SYNTAX_BYTES.
3604
3605 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3606
3607         * sim.scm (with-any-profile?): New function.
3608         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3609         to decide whether or not to include profiling counters.
3610
3611 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3612
3613         Fuller derived-operand support for opcodes.
3614         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3615         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3616         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3617         (gen-operand-table): Omit derived- and anyof- operands from table.
3618         (gen-insn-table): Omit multi-insns from table.
3619         * iformat.scm (ifmt-expanded-fields): New function to expand
3620         subfields of derived-ifields.
3621         (ifmt-compute!): Ignore remaining multi-insns.
3622         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3623         multi-insns.
3624         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3625         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3626         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3627         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3628         (gen-switch): Omit anyof-operands.
3629         * operand.scm (-anyof-syntax): New function.
3630         (-anyof-merge-syntax): Call it.
3631         * utils.scm (collect): New idiomatic function.
3632
3633 2000-05-10  Ben Elliston  <bje@redhat.com>
3634
3635         * m68k.cpu: New file (work in progress).
3636
3637 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3638
3639         * Makefile.am (all-local): New target.  Create stamp-cgen.
3640         * Makefile.in: Regenerated.
3641         * doc/Makefile.in: Regenerated.
3642
3643 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3644
3645         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3646         (-operand-parse-setter): Ditto.
3647         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3648         for CACHE-ADDR operands.
3649         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3650         trace entries.  Widen byte-wide values for printing.
3651         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3652         Widen byte-wide values for printing.  Hexify memory addresses.
3653
3654 2000-04-23  matthew green  <mrg@redhat.com>
3655
3656         * m32r.cpu: Fix a typo.
3657
3658 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3659
3660         * ia64.cpu (define-model): Change merced to Itanium.
3661         (f-qp): Change quilifying to qualifying.
3662         (movbr_ph, movbr_pvec): Delete.
3663         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3664
3665 2000-04-07  Ben Elliston  <bje@redhat.com>
3666
3667         * doc/porting.texi (Building a simulator test suite): Clarify
3668         where generated test cases are placed.
3669
3670 2000-04-07  Ben Elliston  <bje@redhat.com>
3671
3672         * Makefile.am (gas-test): Remove dependency on `cgen'.
3673         (sim-test): Ditto.
3674         * Makefile.in: Regenerate.
3675
3676 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3677
3678         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3679         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3680         type reconfiguration.
3681         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3682         with-profile?.
3683
3684 2000-03-30  Ben Elliston  <bje@redhat.com>
3685
3686         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3687
3688 2000-03-24  Ben Elliston  <bje@redhat.com>
3689
3690         * Makefile.am (stamp-cgen): Reinstate target.
3691         * Makefile.in: Regenerate.
3692
3693 2000-03-22  Ben Elliston  <bje@redhat.com>
3694
3695         * slib/ppfile.scm: Remove; unused.
3696         * slib/defmacex.scm: Likewise.
3697
3698 2000-03-21  Ben Elliston  <bje@redhat.com>
3699
3700         * doc/internals.texi (Source file overview): Document.
3701
3702         * Makefile.am (GUILEDIR): Remove.
3703         (CGEN): Ditto. Callers use $(GUILE) instead.
3704         (GUILEFLAGS): Ditto.
3705         (CGENFILES): Ditto.
3706         (APPDESCFILES): Ditto.
3707         (OPCODESFILES): Ditto.
3708         (SIMFILES): Ditto.
3709         (pkgdata_SCRIPTS): Ditto.
3710         (stamp-cgen): Remove target.
3711         * Makefile.in: Regenerate.
3712
3713         * configure.in: Remove header and library tests.
3714         * configure: Regenerate.
3715         * config.in: Likewise.
3716
3717 2000-03-20  Ben Elliston  <bje@redhat.com>
3718
3719         * read.scm: Cease loading "hob-sup.scm".
3720         * utils.scm: Inherit the fastcall family of procedures (for now).
3721         * hob-sup.scm: Remove.
3722
3723 2000-03-20  Ben Elliston  <bje@redhat.com>
3724
3725         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3726         * configure: Regenerate.
3727         * gdbinit.in: Remove.
3728
3729 2000-03-17  Ben Elliston  <bje@redhat.com>
3730
3731         * Makefile.am (CGEN): Use guile, not cgen.
3732         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3733         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3734         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3735         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3736         (HOB_OBJS): Likewise.
3737         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3738         (CGENOBJS): Likewise.
3739         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3740         (hobbit, hobbit.o, hobbit.c): Remove targets.
3741         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3742         (CLEANFILES): Update.
3743         * acconfig.h (WITH_HOBBIT): Remove.
3744         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3745         option --with-cgen-hobbit.
3746         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3747         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3748         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3749         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3750         * Makefile.in: Regenerate.
3751         * config.in: Likewise.
3752         * aclocal.m4: Likewise.
3753         * configure: Likewise.
3754         * README (Hobbit support): Remove.
3755         * doc/internals.texi (Conventions): Do not mention Hobbit.
3756         * doc/porting.texi (Supported Guile versions): Likewise.
3757
3758 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3759
3760         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3761         callback convention to new sid sidutil::basic_cpu code.
3762         (-gen-sfrag-engine-fn): Ditto.
3763         * sid.scm (-create-virtual-insns!): Ditto.
3764         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3765         mode.
3766         (cxmake-skip): Implement properly for pbb mode.
3767
3768 2000-03-03  Ben Elliston  <bje@redhat.com>
3769
3770         * doc/internals.texi: New file.
3771
3772 2000-02-29  Ben Elliston  <bje@redhat.com>
3773
3774         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3775         * doc/porting.texi: Formatting tweaks.
3776
3777 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3778
3779         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3780         field.
3781
3782 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3783
3784         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3785         mode.
3786
3787 2000-02-23  Andrew Haley  <aph@cygnus.com>
3788
3789         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3790         instruction.
3791
3792 2000-02-24  Ben Elliston  <bje@redhat.com>
3793
3794         * doc/rtl.texi (Derived operands): Add some cindex entries.
3795
3796 2000-02-23  Ben Elliston  <bje@redhat.com>
3797
3798         * ia32.cpu (dndo): Move general purpose macro from here ..
3799         * simplify.inc (dndo): .. to here.
3800
3801 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3802
3803         * arm.cpu (h-tbit): Add c-call setter function.
3804         (h-mbits): Ditto.
3805
3806 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3807
3808         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3809         (-frag-cost-compute!): Ditto.
3810         * utils.scm (copyright-cygnus): Add Y2K.
3811         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3812
3813 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3814
3815         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3816         flags field of the CGEN_CPU_TABLE structure.
3817
3818 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3819
3820         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3821         All references updated.
3822
3823 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3824
3825         * ia32.cpu: Rewrite addressing mode support.
3826
3827         * ifield.scm (<ifield>): New member `follows'.
3828         (ifld-known-values): New proc.
3829         (<ifield>): New method set-word-offset!.
3830         (ifld-set-word-offset!): New proc.
3831         (ifld-new-word-offset): New proc.
3832         (<ifield>): New method next-word.
3833         (<multi-ifield>): New method next-word.
3834         (ifld-next-word): New proc.
3835         (ifld-precedes?): New proc.
3836         (-ifield-parse): New args word-offset,word-length,follows.
3837         All callers updated.  Handle CISC-style vs RISC-style ifields.
3838         (-ifield-read): Recognize word-offset,word-length,follows specs.
3839         (-ifld-parse-follows): New proc.
3840         (-multi-ifield-make-default-insert): New proc.
3841         (-multi-ifield-make-default-extract): New proc.
3842         (-multi-ifield-parse): Provide default values for insert,extract
3843         handlers if not specified.
3844         (<derived-ifield>): New class.
3845         (derived-ifield?): New predicate.
3846         (ifld-derived-operand?): New predicate.
3847         (f-anyof): New global.
3848         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3849         (f-derived,ifld-derived?): Delete.
3850         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3851         * insn.scm (-sub-insn-ifields): New proc.
3852         (-sub-insn-make!): New proc.
3853         (multi-insn-instantiate!): Provide initial implementation.
3854         (-insn-parse): If insn contains "anyof" operands, create a
3855         <multi-insn> object instead of a plain <insn>.
3856         (-parse-insn-format-symbol): Rewrite derived operand handling.
3857         Add anyof operand handling.
3858         (-parse-insn-format-ifield-spec): Rewrite.
3859         (-parse-insn-format-operand-spec): Delete.
3860         (-parse-insn-format-list): Delete support for `(operand value)'.
3861         (anyof-operand-format?): Replaces derived-operand-format?.
3862         * operand.scm (-operand-parse-getter): Improve error messages.
3863         (-operand-parse-setter): Ditto.
3864         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3865         ifield-assertion.
3866         (<anyof-operand>): Change baseclass from <derived-operand> to
3867         <operand>.  Delete member values.  New members base-ifield,choices.
3868         (anyof-operand?): New predicate.
3869         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3870         (-derived-operand-parse): Rewrite.
3871         (-derived-operand-read): Rewrite.
3872         (-anyof-parse-choice): New proc.
3873         (-anyof-operand-parse): Rewrite.
3874         (-anyof-operand-read,define-anyof-operand): New procs.
3875         (<anyof-value>): Rewrite.
3876         (-anyof-initial-known): New proc.
3877         (anyof-satisfies-assertions?): New proc.
3878         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3879         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3880         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3881         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3882         (-anyof-value-from-derived): New proc.
3883         (-anyof-all-choices-1,anyof-all-choices): New procs.
3884         (operand-init!): Create define-anyof-operand reader command.
3885
3886         * insn (syntax-break-out): Take syntax as argument instead of insn.
3887         All callers updated.
3888         (syntax-make): Move here, from ???.
3889
3890         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3891         bitrange-foo. All uses updated.
3892         (bitrange-next-word): New proc.
3893
3894         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3895
3896         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3897         (rtx-make-const,rtx-make-enum): New procs.
3898         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3899         (rtx-mem-addr,rtx-mem-sel): New procs.
3900         (rtx-change-address): New proc.
3901         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3902         (rtx-make-set,rtx-single-set?): New procs.
3903         (rtx-combine): New proc.
3904
3905         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
3906         (rtx-traverse-with-locals): Ditto.
3907         (-rtx-traverse,-rtx-traverse-*): Ditto.
3908
3909         * rtl.scm (define-subr): New proc.
3910         (rtl-init!): Create reader command `define-subr'.
3911
3912         * cos.c (_object_mi_p): Ensure argument is an object.
3913         (indent): New function.
3914         (_object_print_elms): Add pretty-printing support.
3915         (_object_print): Ditto.
3916
3917         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3918         (*floats-s->c-fun-table*): Ditto.
3919         * hobbit.c,hobbit.h: Rebuild.
3920         * hob-sup.c (fastcall7): New proc.
3921         * hob-sup.h (fastcall7): Declare.
3922         * hob-sup.scm (fastcall7): New macro.
3923
3924         * mach.scm (<arch>): New member subr-list.
3925         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3926         (arch-finish!): Reverse recorded subr list.
3927
3928         * read.scm (debug-env): New global.
3929         (debug-var-names,debug-var,debug-repl-env): New procs.
3930         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
3931         (debug-quit): Renamed from `continue'.
3932
3933         * simplify.inc (dsmf): New pmacro.
3934
3935         * utils.scm (plus-scan): New proc.
3936         (split-bits): Rewrite.
3937         (split-value): New proc.
3938
3939 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
3940
3941         * doc/Makefile.am (DOCFILES): Add notes.texi.
3942         * doc/Makefile.in: Rebuild.
3943
3944 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
3945
3946         * ifield.scm (ifld-derived?): New proc.
3947         (f-derived): New global.
3948         (ifield-builtin!): Create ifield f-derived.
3949         (<multi-insn>): New class.
3950         (multi-insn?): New predicate.
3951         (multi-insn-instantiate!): New proc.
3952         (-insn-parse): Create <multi-insn> objects for insns with derived
3953         ifields.
3954         (-parse-insn-format-symbol): Handle derived ifields.
3955         (-parse-insn-format-ifield-spec): New proc.
3956         (-parse-insn-format-operand-spec): New proc.
3957         (-parse-insn-format-list): Simplify.
3958         (-parse-insn-format): No longer allow (ifield-object value) spec.
3959         (derived-operand-format?): New proc.
3960         (insn-alias?): New proc.
3961         (non-alias-insns): Rewrite.
3962         (insn-real?): Renamed from real-insn?, all callers updated.
3963         (virutal-insns): Rewrite.
3964         (multi-insns): New proc.
3965         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3966         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3967         Return #f if operand doesn't have an index or if index is not an
3968         ifield.
3969         (hw-index-anyof): New proc.
3970         (-operand-parse): Allow integer indices.
3971         (<derived-operand>): New class.
3972         (derived-operand?): New predicate.
3973         (<anyof-operand>): New class.
3974         (<anyof-value>): New class.
3975         (-anyof-parse-value,-anyof-operand-parse): New procs.
3976         (-derived-operand-parse,-derived-operand-read): New procs.
3977         (define-derived-operand,define-full-derived-operand): New procs.
3978         (operand-init!): New reader command define-derived-operand.
3979
3980         * utils.scm (list-take): Handle negative amount.
3981         (element?): Rewrite.
3982
3983 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
3984
3985         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3986
3987 1999-10-04  Richard Henderson  <rth@cygnus.com>
3988
3989         * ia64.cpu: Checkpoint.
3990
3991 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
3992
3993         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3994
3995         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
3996         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
3997
3998 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
3999
4000         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4001         PC returned by sim_engine_invalid_insn.
4002
4003 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4004
4005         * ia32.cpu: New file.
4006
4007 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4008
4009         * utils.scm (bit-set?): Fix off by one error.
4010
4011         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4012
4013         * rtl.scm (hw): Check for valid hardware element before trying to
4014         get its mode.
4015
4016         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4017         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4018         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4019         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4020         compute_operand2_foo.
4021
4022         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4023         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4024         Call delayed_branch/branch methods instead of assigning to `vpc'.
4025         (<hw-pc>,cxmake-skip): Call skip method.
4026         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4027         (<pc>,cxmake-skip): Ditto.
4028         (-create-virtual-insns!): Ditto.
4029         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4030         (op:write): Ditto.
4031         (op:record-profile): Specify #:output-language "c++".
4032         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4033         @arch@_insn_attr.
4034         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4035         Define enums here.
4036         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4037         (gen-semantic-code): Ditto.
4038         (-gen-sem-case,-gen-sfrag-code): Ditto.
4039         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4040         (cgen-cpu.h): File is now #included by main cpu class, rather than
4041         subclassing.
4042         (cgen-defs.h): New proc.
4043         (-gen-scache-semantic-fn): Change result type to sem_status.
4044         New local `status'.  Call done_cti_insn/done_insn method at end.
4045         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4046         cgen-ops.h.
4047         (cgen-sem-switch.cxx): Ditto.
4048         * sid-decode.scm (-gen-idesc-decls): Update return type of
4049         @prefix@_sem_fn.
4050         (cgen-decode.h): Add using namespace @arch@.
4051         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4052
4053         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4054         (estate-output-language-c?,estate-output-language-c++?): New procs.
4055         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4056         (estate-make-for-normal-rtl-c++): New proc.
4057         (rtl-c++-parsed,rtl-c++): New proc.
4058         (s-c-call): Invoke cpu class method if c++.
4059         (join): Use s-c-raw-call.
4060
4061         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4062         (nop): Rewrite.
4063
4064         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4065         * rtl.scm (<eval-state>): New member `modifiers'.
4066         (<eval-state>,vmake!): Handle #:modifiers.
4067         (estate-with-modifiers): New proc.
4068
4069         * rtl.scm (rtx-side-effects?): New proc.
4070         (rtx-canonical-bool): Don't change expr if it has side effects.
4071         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4072         better.
4073
4074 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4075
4076         * sim.scm (gen-scache-type): Fix typo in last patch.
4077
4078 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4079
4080         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4081
4082 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4083
4084         * sid.scm (<hw-pc>,cxmake-skip): New method.
4085         (<pc>,cxmake-skip): New method.
4086
4087         * decode.scm (decode-build-table): Delete args startbit,index-list.
4088         All callers updated.
4089         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4090         All callers updated.
4091         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4092         to decode-get-best-bits.
4093         * sid-decode.scm (-gen-decode-fn): Ditto.
4094
4095         * hardware.scm (hw-bits): New proc.
4096         (-hw-parse): New arg layout.  All callers updated.
4097         (define-full-hardware): New arg layout.  All callers updated.
4098         (-hw-validate-layout): New proc.
4099         (-hw-create-[gs]etter-from-layout): New procs.
4100         (<hw-register>,parse!): Handle layout spec.
4101         * types.scm (type-bits): New proc.
4102
4103         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4104         UNARY, BINARY, TRINARY rtxs.
4105
4106         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4107         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4108         Support '- as "unused spot" indicator.
4109
4110 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4111
4112         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4113
4114 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4115
4116         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4117
4118         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4119         construction.
4120         (tstate-make): New arg `depth'.  All callers updated.
4121         (tstate-depth,tstate-set-depth!): New procs.
4122         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4123         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4124         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4125
4126 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4127
4128         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4129         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4130         * utils-sim.scm: Decoder generator support moved here.
4131         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4132         (-gen-decoder-switch): Sort entries for more fall-throughs.
4133
4134         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4135         * Makefile.in: Rebuild.
4136         * sim-test.scm (build-sim-testcase): Add logging message.
4137         * dev.scm (cload): Recognize SIM-TEST application.
4138         (load-stest): Set APPLICATION to SIM-TEST.
4139
4140         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4141
4142         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4143         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4144         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4145
4146         * insn.scm (syntax-break-out): Handle ${foo}.
4147
4148 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4149
4150         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4151         (bin_PROGRAMS): Define.
4152         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4153         (cgen-hob.c): Prepend $(srcdir)/ here.
4154         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4155         (libcpu_a_SOURCES): Delete.
4156         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4157         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4158         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4159         Add AC_CHECK_LIB(guile,main).
4160         * Makefile.in: Rebuild.
4161         * doc/Makefile.in: Rebuild.
4162         * aclocal.m4: Rebuild.
4163         * config.in: Rebuild.
4164         * configure: Rebuild.
4165
4166 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4167
4168         Rename rtx functions from name: to name, accept optional leading
4169         modifier and mode.
4170         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4171         * attr.scm (-attr-eval): Update.
4172         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4173         (<hw-register>,mode-ok?): Disallow VOID.
4174         (<hw-immediate>,mode-ok?): Disallow VOID.
4175         (<hw-address>,mode-ok?): Disallow VOID.
4176         * mode.scm (mode-name?): New proc.
4177         (VOID): Renamed from VM.
4178         (DFLT): Renamed from DM.
4179         (mode-builtin!): Update.
4180         * opcodes.scm (<ifield>,gen-insert): Update.
4181         (<ifield>,gen-extract): Update.
4182         (<multi-ifield>,gen-insert,gen-extract): Update.
4183         * operand.scm (op:mode): Update.
4184         (<pc>,make!): Update.
4185         (op:new-mode): Update.
4186         (-operand-read): Update.
4187         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4188         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4189         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4190         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4191         (rtx-make): Call -rtx-munge-mode&options.
4192         (rtx accessors): Rewrite.
4193         (rtx-pretty-name): Update.
4194         (-rtx-traverse-*): Update.
4195         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4196         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4197         (-rtx-make-traverse-table): Update.
4198         (-rtx-traverse-operands): Update.
4199         (-rtx-option?,-rtx-option-list?): New procs.
4200         (-rtx-munge-mode&options): New proc.
4201         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4202         (-rtx-traverse): Update.
4203         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4204         (rtx-compile-time-constant?): Update.
4205         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4206         (rtx-value): Update.
4207         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4208         * rtx-funcs.scm (*): Update.
4209         * rtl-c.scm (rtl-c-get): Update.
4210         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4211         (s-c-call,s-c-raw-call): Update.
4212         (s-boolifop,s-convop,s-if,s-cond): Update.
4213         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4214         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4215         (s-parallel,s-sequence): Update.
4216         (rtl-c-build-table): Update.
4217         * sem-frags.scm (-frag-hash-compute!): Update.
4218         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4219         for temporary bug compatibility with previous version.
4220         (-frag-expr-locals,-frag-expr-stmts): Update.
4221         (-frag-compute-desired-frags,-frag-pick-best): Update.
4222         * semantics.scm (-simplify-expr-fn): Update.
4223         (rtx-simplify): Update.
4224         (-rtx-ref-type): Update.  Account for modifiers.
4225         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4226         (-build-ifield-operand!): Update.
4227         (-build-known-values): Update.
4228         (semantic-compile): Update.
4229         (-gen-reg-access-defns): Update.
4230         (gen-semantic-code,-gen-sem-case): Update.
4231         (-gen-sfrag-code,-gen-sfrag-case): Update.
4232         * sim-cpu (gen-semantic-code): Update.
4233         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4234         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4235         (-hw-cxmake-get): Update.
4236         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4237         (<hw-index>,cxmake-get): Update.
4238         (<operand>,gen-type,gen-read,cxmake-get): Update.
4239         (<operand>,gen-set-quiet,gen-set-trace): Update.
4240         (<pc>,cxmake-get): Update.
4241         (sim-finish!): Update.
4242         * utils-gen.scm (-gen-ifld-extract-base): Update.
4243         (-gen-ifld-extract-beyond): Update.
4244         (gen-multi-ifld-extract): Update.
4245         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4246         * sid.scm (<hw-pc>,gen-write): Update.
4247         (-gen-decode-insn-globals): Update.
4248         (-hw-cxmake-get): Update.
4249         (<hw-register>,cxmake-get-raw): Update.
4250         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4251         (<hw-index>,cxmake-get): Update.
4252         (<operand>,gen-type,gen-read,cxmake-get): Update.
4253         (<operand>,gen-set-quiet,gen-set-trace): Update.
4254         (<pc>,cxmake-get): Update.
4255         (-create-virtual-insns!): Update.
4256         (-decode-split-build-assertion): Update.
4257         * *.cpu: Update.
4258         * simplify.inc: Update.
4259
4260 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4261
4262         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4263         Prefix queue function name with sim_ instead of @cpu@_.
4264
4265         * sim.scm (-with-parallel-only?): New global.
4266         (option-init!): Initialize it.
4267         (option-set!): Set it.
4268         (with-parallel-only?): New proc.
4269         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4270         and writeback markers if with-parallel-only.
4271         (-gen-idesc-init-fn): Update.
4272         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4273         with-generic-write.
4274
4275 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4276
4277         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4278         with the invalid insn handler.
4279
4280         * utils.scm (list-maybe-ref): New proc.
4281
4282         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4283         define-arch.
4284         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4285
4286         * i960.cpu (test*-*): Delete `expr' arg.
4287         (test-op,branch-op): Update.
4288
4289 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4290
4291         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4292         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4293         updated.
4294         (gen-reg-access-defn): Ditto.
4295         (-gen-hw-addr): Rewrite.
4296         (-op-gen-queued-write): Rewrite.
4297         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4298         (-gen-scache-semantic-fn): Handle with-generic-write.
4299         (-gen-no-scache-semantic-fn): Ditto.
4300
4301 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4302
4303         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4304
4305         * sim.scm (-with-generic-write?): New global.
4306         (option-init!): Initialize it.
4307         (option-set!): Set it.
4308         (with-generic-write?): New proc.
4309         (-gen-hw-addr): New proc.
4310         (-op-gen-queued-write): New proc.
4311         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4312
4313         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4314         turned off.
4315         (-gen-sem-switch): Preserve existing with-parallel? value.
4316         (-gen-sem-parallel-switch): Ditto.
4317         (-gen-write-case): Add /indent support.
4318         (cgen-write.c): Rewrite.
4319
4320         * utils.scm (-current-print-state): New global.
4321         (make-print-state): New proc.
4322         (pstate-indent,pstate-set-indent!): New procs.
4323         (pstate-cmd?,pstate-cmd-do): New procs.
4324         (/indent): New global.
4325         (/indent-set,/indent-add): New procs.
4326         (string-write): Set -current-print-state.
4327         (-string-write): New arg pstate, all callers updated.
4328         Handle print-state commands.
4329         (-string-list-flatten): New proc.
4330         (string-list->string): Use it.
4331
4332         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4333         (-gen-sem-fn-table-entry): New proc.
4334         (-gen-semantic-fn-table): New proc.
4335         (-gen-scache-semantic-fn): Make fn static.
4336         (-gen-no-scache-semantic-fn): Ditto.
4337         (cgen-semantics.c): Define macro SEM_FN_NAME.
4338         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4339         FAST,FULL.  Update @cpu@_insn_sem contents.
4340         (-gen-semf-fn-name): Delete.
4341         (-gen-sem-fn-decls): Delete.
4342         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4343         @cpu@_semf_init_idesc_table.
4344         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4345         handlers here.
4346         (cgen-decode.h): Print sfmt enum.
4347         * sid-decode.scm (-gen-semf-fn-name): Delete.
4348         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4349
4350         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4351         (ifmt-compute!): Ditto.
4352         * sim-decode.scm (-gen-decoder-switch): Ditto.
4353         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4354         (-gen-decoder-switch): Ditto.
4355
4356         * insn.scm (insn-virtual?): New proc.
4357
4358         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4359         convert to string.
4360         * mach.scm (<arch>): attr-list is now a pair of lists.
4361         (current-attr-list): Rewrite.
4362         (current-attr-add!,current-attr-lookup): Rewrite.
4363         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4364
4365 1999-08-06  Richard Henderson  <rth@cygnus.com>
4366
4367         * ia64.cpu: Initial checkpoint.
4368
4369 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4370
4371         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4372         (pmacros-init!): Update .apply help string.
4373
4374 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4375
4376         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4377         (<hw-pc>,cxmake-skip): New method.
4378         (<pc>,cxmake-skip): New method.
4379         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4380         (gen-argbuf-type): New member `skip_count'.
4381         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4382         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4383
4384         * utils-sim.scm: New file.
4385         * dev.scm (load-sim): Load it.
4386         (load-sid): Load it.
4387         * cgen-sid.scm: Load it.
4388         * cgen-sim.scm: Load it.
4389         * iformat.scm (<sformat>): New member sbuf, not initialized by
4390         default make.
4391         * rtx-funcs.scm (skip): Rewrite.
4392         * rtl-c.scm (skip): Rewrite.
4393         * m32r.cpu (sc,snc): Update `skip' usage.
4394         * mode.scm (mode-real-mode): New proc.
4395         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4396         Distinguish fragments by the <sformat-abuf> they use.
4397         * sim.scm (gen-profile-index-type): Delete.
4398         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4399         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4400         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4401         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4402         (-gen-argbuf-elm): Rewrite.
4403         (-gen-argbuf-hw-elm): Delete.
4404         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4405         of each sfmt.
4406         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4407         (sim-init!): Initialize them.
4408         (sim-analyze-insns!): Set them.
4409         (current-sbuf-list): New proc.
4410         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4411         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4412         * sim-model.scm (-gen-model-insn-fn): Ditto.
4413         * sim-decode.scm (-gen-extract-decls): Delete.
4414         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4415         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4416         sim.scm.
4417         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4418         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4419         (-gen-op-extract,-gen-op-trace-extract): New procs.
4420         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4421         gen-sfmt-argvars-foo and rewrite.
4422         (-gen-record-args): Rewrite.
4423         (-gen-extract-case): Tweak.
4424         * sid.scm (gen-profile-index-type): Delete.
4425         (ifield argbuf support): Move to utils-sim.scm.
4426         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4427         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4428         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4429         (-sim-sformat-argbuf-list): New global.
4430         (sim-init!): Initialize it.
4431         (sim-analyze-insns!): Set it.
4432         (current-sbuf-list): New proc.
4433         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4434         (-gen-argbuf-hw-elm): Delete.
4435         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4436         of each sfmt.
4437         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4438         (-gen-extract-decls): Delete.
4439         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4440         sid.scm.
4441         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4442         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4443         (-gen-op-extract,-gen-op-trace-extract): New procs.
4444         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4445         gen-sfmt-argvars-foo and rewrite.
4446         (-gen-record-args): Rewrite.
4447         (-gen-extract-case): Tweak.
4448
4449         * cgen-gh.c (gh_putc,gh_puts): New functions.
4450         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4451         * cos.c (_object_print_elms,_object_print): Use them.
4452         * hob-sup.c (fastcall_print): Use them.
4453         * configure.in: Check for scm_gen_puts, scm_puts.
4454         * config.in: Rebuild.
4455         * configure: Rebuild.
4456         * aclocal.m4: Rebuild.
4457         * Makefile.in: Rebuild.
4458
4459         * dev.scm (load-opc): Use load instead of maybe-load.
4460         (load-gtest,load-sim,load-stest): Ditto.
4461         (load-sid): Ditto.
4462
4463 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4464
4465         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4466         up to avoid g++ 'goto crosses initialization' warning.
4467         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4468         (-gen-sfrag-case): Update use of NEXT_FRAG.
4469
4470 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4471
4472         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4473
4474         * read.scm: Load sem-frags.scm.
4475         * sem-frags.scm (*): Lots rewritten.
4476         * sid.scm (-with-sem-frags?): New global
4477         (with-sem-frags?): New proc.
4478         (option-init!): Initialize -with-sem-frags?.
4479         (option-set!): Recognize with-sem-frags.
4480         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4481         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4482         if asked to.
4483         (-gen-sfrag-engine-decls): New proc.
4484         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4485         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4486         (-gen-sfrag-engine): New proc.
4487         (-gen-sem-case): Emit setup-semantics if specified.
4488         (-gen-sem-switch-engine): Update init/use of computed goto label.
4489         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4490         from local vars.
4491         (-gen-idesc-decls): Replace sem_address with cgoto.
4492         (-gen-scache-decls): Rewrite definition of `execute' member.
4493         * arm.cpu (arm isa): Enable decode-splits.
4494         * arm7.cpu (multiply insns): Rename result to mul-result.
4495
4496         Rename decode-specialize to decode-split.
4497         * decode.scm (*): Update.
4498         * insn.scm (*): Update.
4499         * mach.scm (*): Update.
4500         * sid.scm (*): Update.
4501
4502 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4503
4504         Record objects as a smob.
4505         * cos.c (scm_tc16_object): New static global.
4506         (cos_init): Initialize it.
4507         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4508         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4509         (_object_tag): Delete.
4510         (_object_make_smob): New function.
4511         (_object_make_x,_object_make_with_values_x): Rewrite.
4512         (_object_elements,_object_class_desc): Rewrite.
4513         (_object_copy,object_p): Rewrite.
4514         (_object_specialize): Rewrite.
4515         (_object_print_elms,_object_print): New functions.
4516         (object_smob): New static global.
4517         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4518
4519         * cos.c (_make_x_symbol): New static global.
4520         (object_make): Use it.
4521         (cos_init): Initialize it.
4522
4523 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4524
4525         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4526         instead to determine whether to use FLD macro.
4527         (<rtl-c-eval-state>): New member ifield-var?.
4528         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4529         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4530         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4531
4532         * rtl.scm (rtx-sequence-assq-locals): New proc.
4533
4534         * cos.scm (-object-error): Don't crash on non-objects.
4535
4536         * Makefile.am (CLEANFILES): Add hobbit.
4537         * Makefile.in: Rebuild.
4538
4539         * rtl-c.scm (s-c-call): Delete unnecessary code.
4540
4541 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4542
4543         * rtl-c.scm (ifield): Always reference value via `FLD'.
4544
4545         * cos.c (elm_bound_p): Return problem SCM boolean values.
4546
4547         * utils-cgen.scm (display-argv): New proc.
4548         * cgen-opc.scm (cgen): Call it.
4549         * cgen-sim.scm (cgen): Ditto.
4550         * cgen-gas.scm (cgen): Ditto.
4551         * cgen-stest.scm (cgen): Ditto.
4552         * cgen-sid.scm (cgen): Ditto.
4553
4554 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4555
4556         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4557         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4558         (-gen-extract-switch): Initialize result to 1.
4559         * opcodes.scm (gen-ifield-default-type): New proc.
4560         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4561         updated.
4562         (<hw-index>,gen-insert): Handle non-ifield indices.
4563         (<hw-index>,gen-extract): Ditto.
4564         (<hw-asm>,gen-parse): Ditto.
4565         (<hw-asm>,gen-print): Ditto.
4566         (<keyword>,gen-parse): Ditto.
4567         (<keyword>,gen-print): Ditto.
4568         (<operand>,gen-fget): Ditto.
4569         (<operand>,gen-fset): Ditto.
4570
4571         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4572         (-gen-hw-index): Ditto.
4573         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4574         (-gen-hw-index): Ditto.
4575
4576         * sem-frags.scm: New file.
4577
4578         * attr.scm (attr-parse): Add better checking of input.
4579
4580         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4581         All uses updated.
4582         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4583
4584         * ifield.scm (ifld-nil?): New proc.
4585
4586         * operand.scm (<operand>): New members getter,setter.
4587         (<operand>,make!): New args getter,setter.  All uses updated.
4588         (op:getter,op:setter): New procs.
4589         (<hw-index>,field-start): Return 0 for non-ifield indices.
4590         (<hw-index>,field-length): Return 0 for non-ifield indices.
4591         (-operand-parse-getter,-operand-parse-setter): New procs.
4592         (-operand-parse): New args getter,setter.  All callers updated.
4593         Always use hw-index-scalar for scalar operands.
4594         (-operand-read): Handle getter,setter.
4595         (define-full-operand): New args getter,setter.  All uses updated.
4596         * semantics.scm (-build-ifield-operand!): Update.
4597         (-build-index-of-operand!): Update.
4598         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4599         * simplify.inc (define-normal-operand): Update.
4600
4601         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4602         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4603         (s-binop,s-cmpop,s-convop): Ditto.
4604         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4605         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4606         (fcc-tests): New insn-enum.
4607         (fcc-value): Rename from fcc-type.
4608         * sparcfpu.cpu: New file.  All fp support moved here.
4609
4610         * rtl.scm (<rtx-func>): New member class.
4611         (rtx-class-*?): New procs.
4612         (def-rtx-node): New arg class.  All callers updated.
4613         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4614         * rtx-funcs.scm (*): Specify class.
4615
4616         * utils-cgen.scm (context-make-reader): New proc.
4617
4618         * utils.scm (assert-fail-msg): New variable.
4619         (assert): Use it.
4620         (list-drop,list-tail-drop): New procs.
4621
4622 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4623
4624         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4625         CGEN_MIN_INSN_SIZE deleted on March 22.
4626
4627         * ifield.scm (<ifield>,needed-iflds): New method.
4628         (<multi-ifield>,needed-iflds): New method.
4629         (ifld-needed-iflds): New proc.
4630         (multi-ifield?): New proc.
4631         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4632         (-sfmt-search-key): Include insn length in key.
4633         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4634         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4635         (-ifmt-lookup-ifmt!): Compute key here.
4636         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4637         All callers updated.
4638         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4639         All callers updated.
4640         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4641         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4642         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4643         to ifmt-build.
4644         * operand.scm (op-iflds-used): New proc.
4645         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4646         and sim-cpu.scm.
4647         And from sid.scm,sid-cpu.scm as well.
4648         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4649         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4650         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4651         (gen-extracted-ifld-value): Ditto.
4652         (-extract-chunk-specs): Ditto.
4653         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4654         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4655         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4656         (-extract-insert-subfields): New function.
4657         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4658         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4659         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4660         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4661         gen-extract-foo.
4662         (-gen-no-scache-semantic-fn): Ditto.
4663         (-gen-sem-case): Ditto.
4664         (-gen-read-case): Update calls to gen-define-ifields,
4665         gen-extract-ifields.
4666         * sim-decode.scm (-gen-record-args): Update.
4667         (-gen-sfmt-argvars-assigns): Update.
4668         (-gen-extract-case): Update.
4669         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4670         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4671         gen-extract-foo.
4672         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4673         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4674         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4675         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4676         gen-define-ifields, gen-extract-ifields.
4677         (-gen-record-args): Update.
4678         (gen-sfmt-argvars-assigns): Update.
4679         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4680         with gen-define-ifields.  Ditto for gen-extract-foo.
4681         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4682         procs rather than method calls.
4683
4684 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4685
4686         * sid.scm (-create-virtual-insns!): New local `context', pass it
4687         to insn-read.
4688
4689         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4690         (operand name) not (operand object), (local name) not (local object).
4691         (rtx-traverse-with-locals): New proc.
4692         (-compile-expr-fn): New proc.
4693         (rtx-compile): Rewrite.
4694         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4695         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4696         (rtl-c-set-trace): Ditto.
4697         (operand define-fn): Recognize operand name argument.
4698         (local define-fn): Recognize sequence temp name argument.
4699         * rtx-funcs.scm (operand): Argument is operand name, not object,
4700         so call current-op-lookup.
4701         (local): Similarily, so call rtx-temp-lookup.
4702
4703         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4704         (rtx-operand?): Ditto.
4705         (rtx-pretty-name): Ditto.
4706         (rtx-local-obj): Flag symbol argument as an error.
4707         (rtx-local-name): New proc.
4708         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4709
4710         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4711
4712         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4713         updated.
4714
4715         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4716         (and: QI rd #xff).
4717
4718         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4719         (*floats-s->c-fun-table*): Ditto.
4720         * hobbit.c,hobbit.h: Rebuild.
4721         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4722         * semantics.scm (rtx-simplify): Use /fastcall-make.
4723
4724         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4725
4726         * insn.scm (<insn>): Delete members condition, compiled-condition.
4727         (<insn>,make!): Update
4728         (<insn> getters,setters): Update.
4729         (-insn-parse,insn-read,define-full-insn): Update.
4730         * minsn.scm (minsn-make-alias): Update.
4731         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4732         (ifmt-compute!): Ditto.
4733         * sim.scm (sim-finish!): Update.
4734         * simplify.inc: (define-normal-insn): Update.
4735         * sid-cpu.scm (gen-semantic-code): Update.
4736
4737         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4738         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4739         (ifmt-compute!): Ditto.
4740
4741 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4742
4743         * minsn.scm (minsn-compute-iflds): Print better error message for
4744         missing ifields.
4745
4746 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4747
4748         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4749
4750         * Makefile.am (HOBFLAGS): New variable.
4751         (cgen-hob.c): Use it.
4752         (hobbit.c): Use it.
4753         (libcpu_a_SOURCES): Add hob-sup.c.
4754         (hob-sup.o): New rule.
4755         * Makefile.in: Rebuild.
4756         * cgen.c: #include hob-sup.h.
4757         (cgen_init_c): Call hobbit_init_support.
4758         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4759         (*special-scm->c-functions*): Add them.
4760         (display-c-expression): Handle *c-symbol*.
4761         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4762         (*floats-s->c-fun-table*): Ditto.
4763         (normalize): Recognize /fastcall-make.
4764         (normalize-fastcall-make): New proc.
4765         * hobbit.c,hobbit.h: Rebuild.
4766         * hob-sup.scm: New file.
4767         * hob-sup.c: New file.
4768         * hob-sup.h: New file.
4769         * read.scm: Load hob-sup.scm.
4770         * rtl.scm (-rtx-name-list): New variable.
4771         (rtx-name-list): New proc.
4772         (rtx-lookup): Try symbol first.
4773         (def-rtx-node): Add name to -rtx-name-list.
4774         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4775         (-rtx-traverse-anymode): New proc.
4776         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4777         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4778         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4779         (-rtx-traverse-{symornum,object}): New procs.
4780         (-rtx-make-traverse-table): Rewrite.
4781         (-rtx-traverse-operands): Rewrite arg-types handling.
4782         Handle #f result of traverser.
4783         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4784         Move debug handling here.
4785         (-rtx-traverse-debug): Delete.
4786         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4787         for each rtx.
4788         * semantics.scm (semantic-compile:process-expr!): Fix call to
4789         -rtx-traverse.
4790         * utils.scm (map1-improper): New proc.
4791
4792 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4793
4794         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4795         (h-mbits): Ditto.
4796         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4797         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4798         (<operand>,cxmake-get): Tweak.
4799         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4800
4801 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4802
4803         * thumb.cpu (dnti): Delete timing spec.
4804         (all insn): Update.
4805
4806         * arm.cpu (arm isa): New fields condition, setup-semantics.
4807         (thumb isa): New field setup-semantics.
4808         (h-gr): Add attribute CACHE-ADDR.
4809         * arm7.cpu (dnai): Delete condition.
4810         (eval-cond): Delete.
4811
4812         * mach.scm (<isa>): New member setup-semantics.
4813         (-isa-parse-setup-semantics): New proc.
4814         (-isa-parse): New arg setup-semantics.
4815         (-isa-read): Recognize setup-semantics.
4816
4817         * sid-cpu.scm (gen-extract-fields): Split into two:
4818         gen-extract-ifields, gen-extract-ifmt-ifields.
4819         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4820         tracing begin/end messages (done by caller now).
4821         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4822         tracing begin/end messages (done by x-before,x-after virtual insns).
4823         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4824         end so don't have to look it up again next time.
4825         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4826         (-decode-expr-ifield-tracking-key): New proc.
4827         (-decode-expr-ifield-tracking): New proc.
4828         (-decode-expr-ifield-values-used): New proc.
4829         (-decode-expr-ifield-mark-used!): New proc.
4830         (-gen-decode-expr-set-itype): New proc.
4831         (-gen-decode-expr-entry): Rewrite.
4832         (-gen-decode-table-entry): New proc.
4833         (-gen-decoder-switch): Use it.
4834         (-gen-virtual-insn-finder): New proc.
4835         (-gen-argbuf-elm): Move here from sid.scm.
4836         (-gen-argbuf-hw-elm): Ditto.
4837         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4838         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4839         conditional-execution isas.
4840         (-gen-decode-fn): Record conditional-exec ifield.
4841         * sid.scm (-current-pbb-engine?): New global.
4842         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4843         (<ifield>,gen-ifld-extract): New arg `indent'.
4844         (<multi-ifield>,gen-ifld-extract): Ditto.
4845         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4846         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4847         (-gen-arch-model-decls): Only scan real insns.
4848         (scache-engine-insns,pbb-engine-insns): New procs.
4849         (-create-virtual-insns!): New proc.
4850         (sim-finish!): Call it.
4851         (-decode-specialize-insn?): New proc.
4852         (-decode-specialize-build-assertion): New proc.
4853         (-decode-specialize-insn-1): New proc.
4854         (-decode-specialize-insn): New proc.
4855         (-fill-sim-insn-list!): New proc.
4856         (sim-analyze!): Create copies of insns to be specialized.
4857         * utils-cgen.scm (obj-set-name!): New proc.
4858
4859         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4860         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4861         semantic-attrs.
4862         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4863         sformats.
4864         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4865         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4866         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4867         (attr): Rewrite test for insn owner.
4868         (member): New rtx function.
4869         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4870         as separate function.
4871         (rtx-ifield?,rtx-ifield-name): New procs.
4872         (rtx-operand-obj): Rewrite.
4873         (rtx-operand-name): New proc.
4874         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4875         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4876         (tstate-make): New args owner, known.  All callers updated.
4877         (tstate-known-lookup): New proc.
4878         (rtx-traverse): New arg owner.  All callers updated.
4879         (rtx-make-bool): New proc.
4880         (rtl-find-ifields): Rewrite.
4881         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4882         * semantics.scm: ... here.
4883         (rtx-const-equal,rtx-const-list-equal): New procs.
4884         (-build-known-values): New proc.
4885         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4886         (semantic-attrs): Ditto.
4887         * rtx-funcs.scm (member,number-list): New rtx functions.
4888
4889         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4890         Rewrite.  Delete arg `all-attrs'. All callers updated.
4891         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4892         updated.
4893         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4894
4895         * decode.scm (subdtable-add): Handle `expr' entries.
4896         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4897         (exprtable-entry-*): Update.
4898         (exprtable-entry-iflds): New proc.
4899         (exprentry-cost): New proc.
4900         (exprtable-sort,-gen-exprtable-name): New procs.
4901         (exprtable-make): New arg `name'.  All callers updated.  use vector.
4902         (exprtable-*): Update.
4903         (-build-decode-table-entry): Don't issue collision warning if all are
4904         specialized insns.  Sort exprtable entries before building table.
4905
4906         * read.scm (-reader-process-expanded-1): Move pretty printing of
4907         input to logging level 4.
4908
4909         * utils.scm (string-list->string): New proc.
4910
4911         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4912         semantics.
4913         (insn-read): Delete leading '-' in name.  All callers updated.
4914         (real-insn?): New proc.
4915         (real-insns): Rewrite.
4916         (insn-has-ifield?): New proc.
4917         (insn-builtin!): Create insn attribute SPECIALIZED.
4918
4919         * mach.scm (<arch>): Delete member app-data.
4920         (current-raw-insn-list): New proc.
4921         (insn-list-car,insn-list-splice!): New procs.
4922         (<decode-specialize>): New class.
4923         (-isa-parse-decode-specialize): New proc.
4924         (-isa-parse-decode-specializes): New proc.
4925         (<isa>): New members `condition', `decode-specializes'.
4926         (-isa-parse-condition): New proc.
4927         (-isa-parse): New args condition, decode-specializes.
4928         (-isa-read): Recognize condition, decode-specializes.
4929         (-isa-add-decode-specialize!): New proc.
4930         (modify-isa): New proc.
4931         (isa-conditional-exec?,state-conditional-exec?): New procs.
4932         (arch-init!): New reader command `modify-isa'.
4933
4934         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4935         (mode-signed,mode-unsigned?): New procs.
4936
4937 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
4938
4939         * types.scm (<array>): New method get-shape.
4940         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4941         onto type.
4942         (hw-shape,hw-num-elms): New procs.
4943         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4944         if there's more than 255 registers.
4945         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4946
4947         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4948         with get/set specs.
4949
4950 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
4951
4952         * cgen-sid.scm (sim-arguments): Add -X.
4953         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4954         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4955         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
4956         Simplify by supporting pbb engine only.
4957         (-gen-sem-switch-init): New proc.
4958         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4959         (cgen-sem-switch.cxx): New proc.
4960         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4961         with with-pbb?.  Support dual scache/pbb engines.
4962         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4963         Support dual scache/pbb engines.
4964         (cgen-decode.h): Generate semantic fn decls if with-scache?.
4965         * sid.scm (*) with-pbb? replaces with-sem-switch?.
4966         (sim-finish!): Create pbb support virtual insns if with-pbb?.
4967
4968 1999-05-10  Ben Elliston  <bje@cygnus.com>
4969
4970         * arm7.cpu: Remove coprocessor related fields, operands and insn
4971         definitions for now. Take the undefined instruction trap instead.
4972         (ldmda-wb): New instruction.
4973         (ldmib-wb): Likewise.
4974         (ldmdb-wb): Likewise.
4975         (stmdb-wb): Likewise.
4976         (stmib-wb): Likewise.
4977         (stmda-wb): Likewise.
4978
4979 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
4980
4981         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4982         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4983
4984         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4985         hobbit can't handle optional third arg.
4986
4987 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
4988
4989         * arm.cpu (h-tbit): Delete set spec.
4990         (h-mbits): Don't call arm_mbits_set in set spec.
4991         * arm.sim: New file.
4992         * hardware.scm (modify-hardware): New proc.
4993         (hardware-init!): Add modify-hardware command.
4994         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4995         (-hw-gen-set-quiet): Ditto.
4996         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
4997         hardware attribute.  Load $arch.sim file if present.
4998         * utils-cgen.scm (keyword-list?): New proc.
4999         (keyword-list->arg-list,arg-list-validate-name): New procs.
5000         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5001
5002         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5003
5004         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5005         @cpu@_cpu_cgen.
5006
5007         * attr.scm (obj-prepend-atlist!): New proc.
5008
5009         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5010
5011         * sid.scm (<operand>,profilable?): Use op:type.
5012         * sim.scm (<operand>,profilable?): Use op:type.
5013
5014 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5015
5016         * utils.scm (find-index,find): Be more stack friendly.
5017
5018         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5019         (bic-imm): Ditto.
5020
5021 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5022
5023         * arm.cpu (h-gr-usr): New hardware element.
5024         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5025         (arm-mode): New keyword.
5026         (h-mbits): Add set spec.
5027         (h-spsr): Implement get/set specs.
5028
5029         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5030         (-reader-process-expanded-1): Pretty print logging output.
5031
5032         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5033         (cgen-cpu.h): Print enums before hardware elements.
5034         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5035         * sid-decode.scm (cgen-decode.cxx): Ditto.
5036         * sid-model.scm (cgen-model.cxx): Ditto.
5037
5038         * utils-cgen.scm (context-error): Accept variable number of
5039         trailing args.
5040
5041         * rtx-funcs.scm (error:): New rtx function.
5042         * rtl-c.scm (s-case-vm): New proc.
5043         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5044         (s-case): Simplify, handle non-VM result.
5045         (error:): New rtx function.
5046
5047 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5048
5049         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5050         (test-hi,test-ls): Fix cbit handling.
5051         (shift-type,h-operand2-shifttype): Move here ...
5052         * arm7.cpu: ... from here.
5053         (set-cond,set-cond-maybe,dnix): Delete, unused.
5054         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5055         * arm.cpu: ... to here.
5056         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5057         (alu-cmn): Use set-add-flags.
5058         (alu-tst): Use set-zn-flags.
5059         (alu-cmp): Use set-sub-flags.
5060         (lsl,lsr,asr): Set condition codes.
5061         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5062         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5063         alu-shift-op.
5064         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5065         All callers updated.
5066         (sub-sp): Rename from add-sp-neg.
5067         (f-lbwl-offset): Delete.
5068         (f-lbwl-hi,f-lbwl-lo): New ifields.
5069         (lbwl-hi,lbwl-lo): Update.
5070         (bl-hi): Add 4 to pc.
5071         (push-reg,pop-reg): Simplify.
5072         (push,push-lr): Push registers in correct order.
5073         (pop,pop-pc): Pop registers in correct order.
5074         (save-reg-inc,load-reg-inc): Simplify.
5075         (ldmia): Save registers in correct order.
5076
5077 1999-04-30  Ben Elliston  <bje@cygnus.com>
5078
5079         * arm7.cpu (f-op-hdt): Remove; unused.
5080         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5081         (f-ror-imm8): New multi-ifield.
5082         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5083         callers updated.
5084         (f-uimm12): New field.
5085         (ror-imm8): New operand.
5086         (uimm12): Likewise.
5087         (hdt-offset8): Reinstate operand.
5088         (offset4-hi,offset4-lo): Remove.
5089         (set-cond): Remove macro; unused.
5090         (set-cond-maybe): Likewise.
5091         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5092         (store-word/byte): Likewise.
5093         (load-halfword): Use hdt-offset8 multifield operand instead of two
5094         4-bit operands that are explicitly combined by semantic code.
5095         (do-halfword-store): Bug fix. Set address when not preindexing.
5096         (store-halfword): Also use hdt-offset8 operand.
5097         (arith-op): Avoid clobbering source registers when one of them is
5098         the destination register.
5099         (arith-imm-op): Likewise.
5100         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5101         (teq-imm): Likewise.
5102         (ldm-p): Rename to ldmdb.
5103         (stm-pw): Rename to stmdb-wb.
5104         (multi-action): New macro; test reg-list bits and execute a
5105         semantic fn if the bit is set.
5106         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5107         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5108         (all insns): Use dnai entries for simplicity rather than dni.
5109         (*): Use short-form of (const ..).
5110
5111 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5112
5113         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5114         member eval to evaluator.
5115         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5116         (tstate-make): Delete arg op-fn.  All callers updated.
5117         (tstate-op-fn,tstate-set-op-fn!): Delete.
5118         (rtx-traverse): Delete op-fn arg.  All callers updated.
5119         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5120         split out of -simplify-for-compilation.
5121
5122         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5123         (cgen_DEPENDENCIES): Add stamp-cgen.
5124         (stamp-cgen): New rule.
5125         * Makefile.in: Rebuild.
5126
5127         * rtl-c.scm (enum:): Define emitter for.
5128         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5129         enums as well.
5130         (rtx-constant-value,rtx-enum-value): New procs.
5131         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5132         (rtx-compile-time-constant?): Return #t for enums.
5133         (rtx-true?,rtx-false?): Handle enums.
5134         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5135         building result by hand.
5136         (rtx-simplify-eq-attr-insn): Ditto.
5137         * rtx-funcs.scm (enum:,enum): New rtx functions.
5138
5139         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5140         aliases-analyzed?.
5141         (arch-analyze-insns!): New proc.
5142         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5143         of calling ifmt-compute! directly.
5144         * sid.scm (-sim-insns-analyzed?): Delete.
5145         (sim-analyze!): Call arch-analyze-insns! instead of calling
5146         ifmt-compute! directly.
5147         * sim.scm (-sim-insns-analyzed?): Delete.
5148         (sim-analyze!): Call arch-analyze-insns! instead of calling
5149         ifmt-compute! directly.
5150
5151         * utils.scm (string-take-with-filler): New proc.
5152         (string-take): Use it.
5153
5154         * pgmr-tools.scm: New file.
5155         * read.scm: Load it.
5156         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5157
5158         * insn.scm (insn-base-mask): Renamed from insn:mask.
5159         All callers updated.
5160         (insn-base-mask-length): Renamed from insn:mask-length.
5161         All callers updated.
5162         (insn-foo): Renamed from insn:foo.  All callers updated.
5163         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5164         * iformat.scm (compute-insn-base-mask-length): Renamed from
5165         compute-insn-mask-length.  All callers updated.
5166         (compute-insn-base-mask): Renamed from compute-insn-mask.
5167         All callers updated.
5168
5169         * enum.scm (-enum-parse-prefix): New proc.
5170         (<enum>,make!): Don't parse enum values here.
5171         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5172         (define-full-insn-enum): Ditto.
5173         (enum-vals-upcase): New proc.
5174         * hardware.scm (define-keyword): Make enum prefix uppercase.
5175         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5176
5177         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5178         (<ifield>,field-extract): New method.
5179         (<multi-ifield>,field-extract): New method.
5180         (ifld-extract): New proc.
5181         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5182         (ifld-extract-fn-name): Renamed from ifld-extract.
5183
5184         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5185         All callers updated.
5186
5187         * ifield.scm (ifld-lsb0?): New proc.
5188         (sort-ifield-list): New arg up?.  All callers updated.
5189         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5190         rather than global state.
5191
5192 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5193
5194         * insn.scm (pretty-print-insn-format): New proc.
5195
5196         * Makefile.in: Rebuild.
5197         * aclocal.m4: Rebuild
5198         * configure: Rebuild.
5199
5200 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5201
5202         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5203         * configure: Rebuild.
5204         * aclocal.m4: Rebuild.
5205         * Makefile.in: Rebuild.
5206         * doc/Makefile.in: Rebuild.
5207         * doc/version.texi: Rebuild.
5208
5209 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5210
5211         * utils.scm (bits->bools): New proc.
5212
5213 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5214
5215         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5216         subfield's gen-ifld-extract-decl method.
5217
5218 1999-04-23  Ben Elliston  <bje@cygnus.com>
5219
5220         * arm7.cpu (ldrsh-pu): Remove.
5221         (do-halfword-load): New pmacro.
5222         (load-halfword): Likewise.
5223         (do-halfword-store): Likewise.
5224         (store-halfword): Likewise.
5225         (strh-*): New instructions.
5226         (ldrsb-*): Likewise.
5227         (ldrh-*): Likewise.
5228         (ldrsh-*): Likewise.
5229
5230 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5231
5232         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5233         fields.
5234
5235         * arm7.cpu (do-word/byte-store): Fix typo.
5236
5237 1999-04-22  Ben Elliston  <bje@cygnus.com>
5238
5239         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5240         register is the program counter (R15).
5241
5242         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5243         (str-*): Implement using store-word-byte. Remove older versions.
5244         (bic): Use the `inv' rtx for obtaining bitwise complements.
5245         (bic-imm): Likewise.
5246         (mvn): Likewise.
5247         (mvn-imm): Likewise.
5248         (store-indev-reg): Remove crufty pmacro.
5249         (load-indiv-reg): Likewise.
5250         (ldm-p): Reverse the order of register processing for decrement.
5251         (stm-p): Likewise.
5252         (stbi): Remove; handled by the str-* insns.
5253
5254 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5255
5256         * thumb.cpu (cmp): Fix carry bit computation.
5257         (alu-cmp): Ditto.
5258
5259 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5260
5261         * arm.cpu (h-tbit): Specify set spec.
5262         (h-cpsr): Ditto.
5263         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5264         (set-sub-flags): Interpret "carry bit" as a borrow.
5265         (all sub/cmp insns): Carry bit is actually a borrow bit.
5266         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5267         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5268         .pmacro instead.
5269         (hireg-add,hireg-cmp,hireg-move): Ditto.
5270
5271         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5272         (-CGEN-LANG-VERSION): Ditto.
5273
5274 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5275
5276         * pmacros.scm (-pmacro-make): New arg `default-values',
5277         all callers updated.
5278         (-pmacro-default-values): New proc.
5279         (-pmacro-process-keyworded-args): New proc.
5280         (-pmacro-process-args): New proc.
5281         (-pmacro-invoke): Process arguments before expanding macro.
5282         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5283         (define-pmacro): Handle default values specified in arg list.
5284         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5285         (rtx-boolif-op-arg[01]): New procs.
5286         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5287         (rtx-simplify): Handle not,orif,andif.
5288         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5289         * utils.scm (alist-copy): New proc.
5290         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5291         (ldr*): Rewrite.
5292         (swi): Explicitly set pc.
5293
5294         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5295
5296 1999-04-17  Ben Elliston  <bje@cygnus.com>
5297
5298         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5299         correctly adjusts the program counter now.
5300
5301         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5302         (f-signed?): Rename from `f-hdt-signed?'.
5303         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5304         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5305         (f-hdt-offset8): Use new field names.
5306         (ldr): Use `imm12' field, not `offset12', since we do our own
5307         address arithmetic.
5308         (str, str-*): Likewise.
5309         (ldu-*): Remove most; better not implemented than broken.
5310         (ldrh*): Likewise.
5311         (ldrsh-pu): New insn.
5312         (stri): Likewise.
5313         (stri-p): Likewise.
5314         (stbi): Likewise.
5315         (ldm-p): Likewise; replace (load-indiv-reg) version.
5316
5317 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5318
5319         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5320         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5321         (*): Explicitly specify mode in c-call.
5322         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5323         (arith-op): Ditto.
5324         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5325         (arith-imm-op): New pmacro.
5326         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5327         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5328
5329 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5330
5331         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5332
5333         * rtl.scm (rtl-find-ifields): Implement.
5334
5335         * utils-gen.scm: New file.
5336         * read.scm: Load it.
5337         * desc.scm: Move generic attribute code to utils-gen.scm.
5338         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5339         * Makefile.in: Rebuild.
5340
5341         * arm7.cpu (R15-OFFSET): New attribute.
5342         (dnai): New pmacro.
5343         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5344         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5345         for reg-shift version.
5346         (arith-op): Ditto.
5347         (data processing insns): Reorganize.  Use dnai.
5348
5349         * attr.scm (attr-kind): New proc.
5350         (attr-list-enum-list): Rewrite.
5351         (-attr-sort): Split result into two lists, bools and non-bools.
5352         (current-attr-list-for): Update.
5353
5354         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5355         * sid-cpu.scm (-gen-attr-decls): New proc.
5356         (-gen-insn-attr-decls): New proc.
5357         (cgen-desc.h): New proc.
5358         (cgen-cpu.h): Put everything in @cpu@ namespace.
5359         (gen-parallel-exec-type): Change prefix of parexec struct from
5360         @cpu@ to @prefix@.
5361         (-gen-trace-record-type): Ditto for trace_record struct.
5362         (-gen-write-case): Update.
5363         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5364         @prefix@.  Update scache struct references.
5365         (-gen-sem-case): Update scache struct references.
5366         (-gen-sem-switch-fn): Update idesc struct reference.
5367         Update insn_type enum reference.
5368         (cgen-write.cxx): Update scache,argbuf references.
5369         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5370         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5371         from @cpu@ to @prefix@.
5372         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5373         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5374         from @CPU@ to @PREFIX@.
5375         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5376         from @CPU@ to @PREFIX@.
5377         (-gen-decode-insn-globals): Generate insn attributes.
5378         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5379         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5380         semantic fn typedef.
5381         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5382         Change prefix of scache struct from @cpu@ to @prefix@.
5383         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5384         Change prefix of idesc struct from @cpu@ to @prefix@.
5385         Change prefix of insn_type enum from @cpu@ to @prefix@.
5386         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5387         from @cpu@ to @prefix@.
5388         (-gen-scache-decls): Change prefix of scache struct from
5389         @cpu@ to @prefix@.  Update idesc struct name.
5390         Update decode,execute methods.
5391         (-gen-extract-case): Update to type name changes.
5392         (-gen-decode-fn): Ditto.
5393         (cgen-decode.h): Put everything in @cpu@ namespace (except
5394         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5395         (cgen-decode.cxx): Add using namespace @cpu@.
5396         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5397         model_mark_get/set from @cpu@ to @prefix@.
5398         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5399         @prefix@.
5400         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5401         of model_insn_before/after from @cpu@ to @prefix@.
5402         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5403         Update insn_word type name.
5404         (-gen-model-timing-table): Update INSN_TIMING struct name.
5405         (-gen-model-init-fn): Update MODEL_DATA struct name.
5406         (-gen-mach-defns): Update name of init_idesc_table fn.
5407         (cgen-model.cxx): Add using namespace @cpu@.
5408         * sid.scm (gen-cpu-class): Delete.
5409         (gen-attr-type): New proc.
5410         (gen-obj-attr-sid-defn): New proc.
5411         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5412         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5413         @CPU@ to @PREFIX@.
5414         (gen-cpu-insn-enum): Update name of insn enum.
5415         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5416         (bx-hs): Ditto.
5417         (swi): Rename @cpu@_swi to @prefix@_swi.
5418
5419         * decode.scm (-build-decode-table-entry): Remove heuristic for
5420         distinguishing insns, and use insn ifield-assertion specs.
5421
5422         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5423         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5424         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5425         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5426         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5427         all callers updated.
5428         (gen-attr-name): New proc
5429         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5430         (gen-obj-attr-defn): Delete num_nonbools count.
5431
5432         * iformat.scm (ifmt-analyze): Handle insn-condition.
5433         (ifmt-compute!): Ditto.
5434         * insn.scm (<insn>): Specify default value for condition,
5435         post-cond-trap,compiled-condition,compiled-semantics.
5436         (<insn>,make!): New arg condition.
5437         (<insn>): Add getters for condition,compiled-condition.
5438         (-insn-parse): New arg condition, all callers updated.
5439         (-insn-read): Recognize condition spec.
5440         (define-full-insn): New arg condition.
5441         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5442         * semantics.scm (semantic-compile): Change arg sem-code to
5443         sem-code-list.
5444         (semantic-attrs): Ditto.
5445         * sim.scm (sim-finish!): Update calls to define-full-insn.
5446         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5447         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5448         * sid.scm (sim-finish!): Update call to define-full-insn.
5449
5450 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5451
5452         * Makefile.am (sim-cpu): Allow specification of ISA.
5453         * Makefile.in: Rebuild.
5454
5455 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5456
5457         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5458
5459 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5460
5461         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5462
5463         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5464
5465         * attr.scm (atlist?): New proc.
5466         (-attr-eval): Rewrite.
5467         (attr-parse): New proc.
5468         (atlist-parse): Use it.
5469
5470         * decode.scm (exprtable-entry-make): New proc.
5471         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5472         (exprtable-make,exprtable-insns): New procs.
5473
5474         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5475         All uses updated.
5476         (hardware-builtin!): Make h-memory a vector.
5477
5478         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5479         All callers updated.
5480         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5481
5482         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5483         All uses updated.
5484         (-insn-parse): Set semantics to #f if not specified.
5485         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5486         if simulator.
5487         (-parse-insn-format): Recognize `=' iformat spec.
5488
5489         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5490         (isa-max-insn-bitsize): Ditto.
5491
5492         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5493         rtl-c-with-alist.
5494         (<ifield>,gen-extract): Ditto.
5495         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5496         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5497         (gen-define-ifmt-ifields): New proc.
5498         (gen-semantic-code): Rewrite.
5499         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5500         (-gen-decoder-switch): Handle expression tables.
5501         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5502         gen-define-fields.
5503         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5504         instead of gen-define-fields.
5505         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5506         callers updated.
5507         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5508         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5509         (-gen-ifld-extract-beyond): Ditto.
5510         (<multi-ifield>,gen-ifld-extract): Ditto.
5511         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5512         rtl evaluation code.
5513         (op:read): Build an <eval-state> to pass to gen-read.
5514         (op:write): Build an <eval-state> to pass to gen-write.
5515         (op:record-profile): Build an <eval-state> to pass to
5516         gen-record-profile.
5517         * sim-cpu.scm (gen-semantic-code): Rewrite.
5518         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5519         rtl-c-with-alist.
5520         (-gen-ifld-extract-beyond): Ditto.
5521         (<multi-ifield>,gen-ifld-extract): Ditto.
5522         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5523         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5524         rtl evaluation code.
5525         (op:read): Build an <eval-state> to pass to gen-read.
5526         (op:write): Build an <eval-state> to pass to gen-write.
5527         (op:record-profile): Build an <eval-state> to pass to
5528         gen-record-profile.
5529
5530         * operand.scm (<operand>): Give `selector' default value of #f.
5531         Give `num' default value of -1.  Give `cond?' default value of #f.
5532         (op:new-mode): Delete arg `set?', all uses updated.
5533
5534         * read.scm (reader-error): Handle #f return from port-filename.
5535         (-init-parse-cpu!): Call rtl-c-init!.
5536         (reader-install-builtin!): Call rtl-builtin!.
5537
5538         * rtl-c.scm: New file.
5539         * semantics.scm: New file.
5540         * read.scm: Load them.
5541         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5542         to semantics.scm.
5543         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5544         type,eval,num.
5545         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5546         (-rtx-num-text,-rtx-max-num): New globals.
5547         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5548         (-rtx-macro-lookup): New proc.
5549         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5550         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5551         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5552         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5553         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5554         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5555         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5556         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5557         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5558         (rtx-pretty-name): New proc.
5559         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5560         (rtx-traverse-*): Rewrite rtx traversing.
5561         (rtx-eval-*): Rewrite rtx evaluation.
5562         (rtx-compile): New proc.
5563         (rtx-simplify): New proc.
5564         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5565         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5566         (ifield,index-of): Rewrite.
5567         (name): Renamed from `operand:'.
5568         (operand,xop,local): New rtx's.
5569         (current-insn): Rewrite.
5570         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5571         (cgen-hob.h): Remove rule for.
5572         (cgen-hob.o): Depend on cgen-hob.c only.
5573         * Makefile.in: Rebuild.
5574
5575         * utils-cgen.scm (vmake): New proc.
5576         (<context>): New class.
5577         (context-make-prefix,context-error): New procs.
5578
5579 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5580
5581         * i960.cpu: Add some ??? comments.
5582         (xnor, ornot): New instructions.
5583         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5584
5585 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5586
5587         * cos.scm (-object-error): Print better error message.
5588
5589         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5590         (-pmacro-env-ref): Renamed from -env-ref.
5591
5592 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5593
5594         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5595         (h-pc): Delete.
5596         (hardware-builtin!): Delete h-pc builtin.
5597         * arm.cpu (h-pc): Define.
5598         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5599         * arm7.cpu (set-logical-cc-maybe): Delete.
5600         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5601         (data processing insns): Rewrite.
5602         * m32r.cpu (h-pc): Define.
5603         * fr30.cpu (h-pc): Define.
5604         * i960.cpu (h-pc): Define.
5605         * sparc.cpu (h-pc): Define.
5606
5607         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5608         (s-parallel): Replace do {...} while (0) with {...}.
5609         (s-sequence): Ditto.
5610
5611         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5612         consistent.
5613         (-gen-write-case,-gen-sem-case): Ditto.
5614         (-gen-sem-case): Only specify `written' if profiling or
5615         parallel-write-back.
5616         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5617         (-gen-sem-switch-fn): New proc.
5618         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5619         based on with-sem-switch option.
5620         * sid-decode.scm (-gen-decode-insn-globals): Only define
5621         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5622         addresses in idesc_table if !with-sem-switch.
5623         (-gen-sem-fn-decls): Rewrite.
5624         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5625         member based on with-sem-switch.  Only define
5626         `idesc_table_initialized_p' member if with-sem-switch.
5627         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5628         * sid.scm (-with-sem-switch?): New variable.
5629         (option-init!): Initialize it.
5630         (option-set!): Set it.
5631         (with-sem-switch?): New proc.
5632         (-op-gen-set-trace): Only emit `written' reference if profiling.
5633         (sim-finish!): Use h_pc_set to set pc.
5634
5635 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5636
5637         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5638         All callers updated.
5639         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5640
5641         * sid.scm (gen-argbuf-type): Delete.
5642         (-gen-argbuf-fields-union): Move to ...
5643         * sid-decode.scm: ... here.
5644
5645         * read.scm (-reader-process-expanded-1): New proc.
5646         (-reader-process-expanded): Call it to catch nested begin's.
5647         (reader-process): Move `begin' handling to -reader-process-expanded.
5648
5649         * insn.scm (-insn-read): Fix name of `format' spec.
5650
5651         * pmacros.scm (.pmacro): New builtin.
5652         (scan-symbol): If procedure macro, return macro rather than its symbol.
5653         (check-macro): Don't do lookup, instead check if (car expr) is
5654         macro object.
5655         (scan-list): Handle .pmacro.
5656         (scan): No longer re-examine text for another macro invocation.
5657         (-pmacro-build-lambda): New proc.
5658         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5659         another, fetch the other's value (rather than doing it during
5660         expansion).
5661
5662 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5663
5664         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5665         * Makefile.in: Rebuild.
5666
5667         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5668         (-fill-slot!): Simplify.
5669         (-build-slots): Simplify.
5670
5671         * dev.scm (load-sid): Don't load sid-arch.scm.
5672
5673         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5674         switch's.
5675         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5676         switch's.
5677
5678 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5679
5680         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5681         * decode.scm: ... here.  New file.
5682         * sid-decode.scm: Use decoder computation code in decode.scm.
5683         * read.scm: Load decode.scm.
5684
5685         * arm.cpu (arm710 model): Add u-exec function unit.
5686         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5687         Add get/set specs to redirect reg 15 to h-pc.
5688         (h-*): Indicate for both ARM and THUMB isas.
5689         (cbit,nbit,vbit,zbit): Ditto.
5690         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5691         (h-cpsr): Make virtual.  Add get/set specs.
5692         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5693         (h-spsr): New virtual reg.
5694         * arm7.cpu (shift-type): New explicitly defined keyword.
5695         (h-operand2-shifttype): Use it.
5696         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5697         All callers updated.  Don't set cbit.
5698         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5699         shift-type enum as case choices.  Set cbit.
5700         (and,orr,eor,add-imm): Uncomment out.
5701         (undefined): Temporarily comment out.
5702         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5703         (lda-pc,lda-sp): Ditto.
5704         (ldr-pc): Rename from ldr.
5705         (cbranch): Mark insns as being thumb insns.
5706
5707         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5708
5709         * cgen-sid.scm: Don't load sid-arch.scm.
5710         (sim-arguments): Delete unused entries.
5711         * sid-arch.scm: Delete.
5712
5713         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5714         (<insn>,ifld-assertions): New member.
5715         (<insn>,make!): New arg ifld-assertions, all callers updated.
5716         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5717         (insn:fields): Delete.
5718         (-insn-parse): New arg ifld-assertions.  All callers updated.
5719         (-insn-read,define-insn): New procs.
5720         (define-full-insn): New arg ifld-assertions.  All callers updated.
5721         (insn-init!): New comment define-insn.
5722
5723         * model.scm (-model-parse): Ensure at least one unit specified.
5724
5725         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5726         (<c-expr-temp>,get-name): New method.
5727         (-rtx-make-current-closure,s-closure): New proc.
5728         (hw:): Wrap rtx indices in a closure.
5729         (-gen-case-prefix): New proc.
5730         (s-case): Simplify.
5731         * rtx-funcs.scm (case:): Fix call to s-case.
5732         (closure): New rtx func.
5733
5734         * hardware.scm (<hardware-base>): New member isas-cache.
5735         (<hardware-base>,get-isas): New method.
5736         (hardware-builtin): Indicate for all isas.
5737         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5738         * mach.scm (current-arch-mach-name-list): Return list of names.
5739         (current-isa-mach-name-list): Ditto.
5740         (define-arch): Install builtin objects here.
5741         * read.scm (keep-atlist?): Only keep if both mach and isa are
5742         being kept.
5743         (keep-mach-atlist?): New proc.
5744         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5745         (reader-install-builtin!): Renamed from -install-builtin!.
5746         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5747         -gen-cpu-reg-access-defns.  Rewrite.
5748         (gen-reg-access-defn): Delete.
5749         (-gen-hardware-struct): New proc.
5750         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5751         (gen-semantic-fn,-gen-all-semantics): Delete.
5752         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5753         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5754         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5755         Call sem-analyze-insns!.
5756         (cgen-semantics.cxx): Add multiple-isa support.
5757         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5758         (-gen-scache-decls,-gen-decode-fn): Ditto.
5759         (cgen-decode.h): Call sem-analyze-insns!.
5760         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5761         * sid.scm (-with-multiple-isa?): New variable.
5762         (option-init!): Initialize it.
5763         (option-set!): Set it.
5764         (with-multiple-isa?): New proc.
5765         (gen-cpu-ref): New arg isas.  All callers updated.
5766         (gen-cpu-class): New proc.
5767         (*-get-macro,*-set-macro): Delete.
5768         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5769         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5770         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5771         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5772         (-sim-insns-analyzed): New global variable.
5773         (sim-init!): Reset it.
5774         (sim-analyze-insns!): New proc.
5775         (sim-analyze!): Don't do instruction analysis here.
5776         (sim-finish!): Specify isa of x-invalid insn.
5777         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5778
5779 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5780
5781         * thumb.cpu (cpu,mach,model): Delete.
5782         (dntf): New pmacro.  Use it for all field definitions.
5783         (dntop): New pmacro.  Use it for all operand definitions.
5784         (asr): Correct field list.
5785         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5786
5787         * utils-cgen.scm (define-getters): New macro to simplify
5788         writing class accessors.
5789         (define-setters): Ditto.
5790         (sanitize): Recognize isa elements.
5791
5792         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5793         state-parallel-exec?.
5794         * sid-model.scm (*): Ditto.
5795         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5796         state-decode-assist.
5797
5798         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5799         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5800         * sim-decode.scm (-gen-decode-switch): Ditto.
5801
5802         * sim-arch.scm (-regs-for-access-fns): Delete.
5803         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5804         (-gen-arch-reg-access-defns): Delete.
5805
5806         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5807         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5808         with state-parallel=exec?.
5809         (cgen-*): Call sim-analyze-insns! here.
5810         * sim-decode.scm (cgen-*): Ditto.
5811         * sim-model.scm (cgen-*): Ditto.
5812         * sim.scm (-sim-insns-analyzed): New global variable.
5813         (sim-init!): Reset it.
5814         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5815         already done the analysis.
5816
5817         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5818         MACH struct.
5819
5820         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5821         (arm arch): Update isa spec.
5822         (arm,thumb isas): Define.
5823         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5824         (arm7tdmi mach): Add isa spec.
5825         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5826         `const' on word number.
5827         * fr30.cpu (fr30 arch): Update isa spec.
5828         (fr30 isa): Define.
5829         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5830         moved to isa spec.
5831         * i960.cpu (i960 arch): Update isa spec.
5832         (i960 isa): Define.
5833         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5834         liw-insns,parallel-insns moved to isas spec.
5835         * m32r.cpu (m32r arch): Update isas spec.
5836         (m32r isa): Define.
5837         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5838         liw-insns,parallel-insns moved to isa spec.
5839         * sparc.cpu (sparc arch): Update isas spec.
5840         (sparc isa): Define.
5841         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5842         decode-assist moved to isa spec.
5843         * sparc64.cpu (sparc64 cpu): Ditto.
5844         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5845         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5846         (-gen-mach-table-defns): Output mach table.
5847         (-gen-hash-defines): Delete insn size macros, except for
5848         CGEN_MAX_INSN_SIZE.
5849         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5850         (cgen-desc.h): Define MAX_ISAS.
5851         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5852         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5853         (arch-* accessors): Renamed from arch:*.  All callers updated.
5854         (current-arch-isa-name-list): New proc.
5855         (-arch-parse-isas): Renamed from -arch-parse-isa.
5856         (def-isa-attr!): Rewrite.
5857         (<iframe>): New class.
5858         (<itype>): New class.
5859         (<isa>): Rewrite.
5860         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5861         (isa-integral-insn?,isa-parallel-exec?): New procs.
5862         (-isa-parse,-isa-read,define-isa): New proc.
5863         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5864         liw-insns moved to <isa>.
5865         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5866         (-cpu-parse,-cpu-read): Update.
5867         (state-*): Renamed from state:*.  All callers updated.
5868         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5869         not cpu.
5870         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5871         (state-decode-assist): New proc.
5872         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5873         (-adata-set-derived!): Rewrite.
5874         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5875         callers updated.
5876         (arch-init!): Add define-isa command.
5877         * read.scm (<reader>): Default keep-isa member to (all).
5878         (reader-* accessors): Renamed from reader:*.  All callers updated.
5879         (-keep-isa-set!): Call string->symbol on isa name list.
5880         (keep-isa-validate!): Rewrite.
5881         (current-isa): New proc.
5882         (keep-isa?): Recognize "all".
5883         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5884         Call -keep-isa-set!.
5885         (cmd-if): Recognize keep-isa?.
5886         (cpu-load): New arg keep-isa.  All callers updated.
5887         (-opt-spec-update): New proc.
5888         (common-arguments): First arg is string, not symbol.
5889         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5890
5891         * rtl.scm (rtx-get): Default mode of string arg is INT.
5892
5893         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5894
5895         * rtx-funcs.scm (join:): Pass cpu to handler.
5896
5897         * configure.in (guile_include_dir): Delete.
5898         * configure: Rebuild.
5899         * Makefile.in: Rebuild.
5900         * doc/Makefile.in: Rebuild.
5901
5902         * sid-cpu.scm (-extract-chunk-specs): New proc.
5903         (gen-define-fields): Use it.
5904         (-extract-chunk): New proc.
5905         (-gen-extract-beyond-var-list): Use it.
5906         (gen-extract-fields): Simplify.
5907
5908 1999-03-22  Ben Elliston  <bje@cygnus.com>
5909
5910         * arm7.cpu (ldri-p): New instruction.
5911         (swi): Do not vector through 0x8 yet--there is nothing there.
5912         (addi): Reinstate.
5913         (movi): Likewise.
5914         (all): Use (const x) in subreg expressions.
5915
5916 1999-03-19  Ben Elliston  <bje@cygnus.com>
5917
5918         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5919         (smlal): Likewise.
5920
5921 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
5922
5923         * fr30.cpu (define-arch): Specify "forced" default-alignment.
5924         * mach.scm (-parse-alignment): Recognize "forced" alignment.
5925         * sim-cpu.scm (-extract-chunk-specs): New proc.
5926         (gen-define-fields): Use it.
5927         (-extract-chunk): New proc.
5928         (-gen-extract-beyond-var-list): Use it.
5929         (gen-extract-fields): Simplify.
5930
5931         Port to guile 1.3.1.
5932         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5933         (LIBIBERTY): New var.
5934         (HOB_OBJS): Add cgen-gh.o.
5935         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5936         * Makefile.in: Rebuild.
5937         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5938         * config.in: Rebuild.
5939         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5940         libncurses, libtermcap.
5941         Add checks for needed functions in guile 1.2 not in guile 1.3,
5942         and vice versa.  Add test for 3 argument scm_make_vector.
5943         * configure: Rebuild.
5944         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5945         definitions if guile doesn't have them.
5946         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5947         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
5948         with gh_vector_set_x.
5949         (cgh_qsort): Replace gh_list_length with gh_length.
5950         * cgen-gh.h: Add decls for added functions.
5951         (cgh_qsort): Don't declare if IN_HOBBIT.
5952         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
5953         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5954         scm_make_vector with gh_make_vector.
5955         * cos.scm: Use vector-length instead of length on vectors.
5956         * dev.scm (cload): Make varargs proc with keyword/value args.
5957         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
5958         provide version that works with guile 1.2 or 1.3.
5959         Include private copy of scmhob.h.
5960         * scmhob.h: New file.  Keep our own copy for now.
5961
5962 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
5963
5964         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5965         plain text.
5966         (-rtx-traverse-operands): Dump cx temp stack if debugging.
5967         (-cx-temp-dump-stack): Pretty up output.
5968
5969         * arm.cpu: comment out thumb.cpu until isa support ready.
5970         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5971         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5972         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5973
5974         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5975
5976 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5977
5978         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5979         (<hw-address>,mode-ok?): unsigned/signed are compatible.
5980
5981         * operand (op:new-mode): Improve error message.
5982
5983         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
5984         * arm7.cpu: New file.
5985
5986 1999-03-12  Ben Elliston  <bje@cygnus.com>
5987
5988         * arm.cpu: Lots of minor fixes after desk checking.
5989
5990 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5991
5992         * thumb.cpu: snapshot of current work
5993
5994         * rtl.scm (rtx-get): Tweak error message.
5995
5996 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
5997
5998         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5999         * Makefile.in: Rebuild.
6000
6001         * cos.c (cos_vector_copy): New function.
6002         (_object_copy): Use it.
6003
6004         * mode.scm (mode:eq?): Clean up.
6005         * rtl.scm (cx-new-mode): Copy attributes.
6006         (rtx-get): Don't make copy if <c-expr> with identical mode.
6007
6008         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6009         add new isas spec.
6010         (gr-names): h-gr register names moved here.
6011         (h-gr): Update.
6012         (cr-names): h-cr register names moved here.
6013         (h-cr): update.
6014         (dr-names): h-dr register names moved here.
6015         (h-dr): update.
6016         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6017         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6018         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6019         add new isas spec.
6020         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6021         add new isas spec.
6022         (gr-names): h-gr register names moved here.
6023         (h-gr): Update.
6024         (cr-names): h-cr register names moved here.
6025         (h-cr): update.
6026         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6027         (h-accums,h-psw): Ditto.
6028         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6029         add new isas spec.
6030         (gr-names): h-gr register names moved here.
6031         (h-gr-indices): Delete.
6032         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6033         (sparc64 h-gr): Ditto.
6034         (h-y): Add get/set specs.
6035         (fp regs): Rewrite.
6036         (fp operands): Rewrite.
6037         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6038         (h-tbr,h-cwp,h-wim): Ditto.
6039         * sparc64.cpu (h-fpsr): Add get/set specs.
6040         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6041         (fp-ld-op): New arg `dest', all callers updated.
6042         (*): Replace `make-di' with `join'.
6043
6044         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6045         present.
6046         (gen-semantic-code): Save/restore rtl generator state.
6047         (cgen-cpu.h): Call rtl-gen-init!.
6048         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6049         (-gen-ifld-extract-beyond): Ditto.
6050         (<multi-ifield>,gen-ifld-extract): Ditto.
6051         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6052         `gstate'.
6053         (-hw-gen-set-quiet-pc): Ditto.
6054         (<hw-pc>,gen-write): Ditto.
6055         (-hw-cxmake-get): Ditto.  Call getter function if present.
6056         (<hw-register>,cxmake-get-raw): New method.
6057         (<hw-register>,gen-set-quiet-raw): New method.
6058         (-hw-gen-set-quiet): New arg `gstate'.
6059         (hw-fun-access?): Delete.
6060         (gen-reg-access-defn): Output function contents.
6061         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6062         invocation.
6063         (-gen-hw-index): Ditto.
6064         (op:read): Update gen-read invocation.
6065         (op:write): Update gen-write invocation.
6066         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6067         operands.
6068         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6069         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6070         (<unit>,gen-profile-code): Update to sim.scm version.
6071
6072         * sim-arch.scm (-regs-for-access-fns): New proc.
6073         (-biggest-reg-mode): New proc.
6074         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6075         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6076         virtual regs separately.
6077         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6078         get/set specs.
6079         (gen-semantic-code): Save/restore rtl generator state.
6080         (cgen-cpu.h): Call rtl-gen-init!.
6081         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6082         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6083         renamed to mach-bfd-name.
6084         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6085         (-gen-ifld-extract-beyond): Ditto.
6086         (<multi-ifield>,gen-ifld-extract): Ditto.
6087         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6088         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6089         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6090         `gstate'.
6091         (hw-fun-access?): Delete.
6092         (-hw-gen-set-quiet-pc): New arg `gstate'.
6093         (<hw-register>,gen-get-macro): Rewrite.
6094         (<hw-register>,gen-set-macro): Rewrite.
6095         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6096         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6097         (<hw-register>,cxmake-get-raw): New method.
6098         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6099         (<hw-register>,gen-set-quiet-raw): New method.
6100         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6101         invocation.
6102         (-gen-hw-index): Ditto.
6103         (<hw-index>): New arg `gstate'.
6104         (-gen-hw-selector): Update call to rtx-c.
6105         (<pc>): New arg `gstate'.
6106         (op:read): Update gen-read invocation.
6107         (op:write): Update gen-write invocation.
6108         (<operand>,cxmake-get): Handle raw-reg.
6109         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6110         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6111         (<operand>,gen-set-quiet): Handle raw-reg.
6112         (<operand>,gen-set-trace): Handle raw-reg.
6113         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6114
6115         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6116         cgen_operand_type enum.
6117         (gen-operand-table): Add operand type enum.  Replace pointer to
6118         hardware element with its enum.  Null terminate table.
6119         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6120         Build operand table.
6121         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6122         * mach.scm (<arch-data>): New member `isas'.
6123         (adata-isas): New accessor.
6124         (<isa>): New class.
6125         (isa-default-insn-word-bitsize): New accessor.
6126         (isa-enum): New proc.
6127         (current-arch-default-insn-word-bitsize): Delete.
6128         (current-isa-list,current-isa-lookup): New procs.
6129         (-arch-parse-isa): New proc.
6130         (-arch-parse): Rewrite.
6131         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6132         (define-arch): Define ISA attribute.
6133         (def-isa-attr!,isa-supports?): New procs.
6134         (<mach>): New member `isas'.
6135         (mach-isas): New accessor.
6136         (-mach-parse): New arg `isas', all callers updated.
6137         (-mach-read): Recognize `isas'.
6138         (arch-finish!): Rewrite.
6139         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6140         @arch@_cgen_get_{int,vma}_operand.
6141         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6142         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6143         of pointer to table entry.
6144         * opcodes.scm (gen-switch): Handle multiply defined operands.
6145         * operand.scm (op-sort): New proc.
6146
6147         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6148         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6149         (hw-enum): Accept symbol argument.
6150         (hardware-builtin!): Delete attribute FUN-ACCESS.
6151         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6152
6153         * attr.scm (atlist-source-form): New proc.
6154         (attr-builtin!): New attr `PRIVATE'.
6155         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6156         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6157         if they have `PRIVATE' attribute.
6158         (gen-hw-table-defns): Output definitions of explicitly defined
6159         keyword tables.
6160         * hardware.scm (<keyword>): New member print-name.  Rename member
6161         `value' to `values', all uses updated.
6162         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6163         (keyword-parse): Rewrite.
6164         (-keyword-read): New proc.
6165         (define-keyword): New proc.
6166         (-hw-parse-keyword): New proc.
6167         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6168         `extern-keyword'.
6169         (-hw-parse-values): Ditto.
6170         (-hw-parse-get,-hw-parse-set): Rewrite.
6171         (hardware-init!): Add new comment define-keyword.
6172         * mach.scm (<arch>): New member `kw-list'.
6173         (arch:kw-list,arch_set-kw-list!): New accessors.
6174         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6175
6176         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6177         * mode.scm (mode-class-integral?): New proc.
6178         (mode-class-float?,mode-class-numeric?): New procs.
6179         (mode-integral?,mode-float?,mode-numeric?): New procs.
6180         (mode-compatible?): New proc.
6181         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6182         rtx-c-with-alist.
6183         (<ifield>,gen-extract): Ditto.
6184         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6185         (<gstate>): New class.
6186         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6187         (gstate-context,gstate-set-context!): New accessors.
6188         (gstate-macro?,gstate-set-macro?!): New accessors.
6189         (gstate-make,gstate-copy): New procs.
6190         (-rtl-current-gstate): New global.
6191         (current-gstate-simulator?): New proc.
6192         (current-gstate-context,current-gstate-macro?): New procs.
6193         (current-gstate,current-gstate-set!): New procs.
6194         (rtl-gen-init!): Rewrite.
6195         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6196         (tstate-make): New arg `gstate', all callers updated.
6197         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6198         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6199         (tstate-gstate,tstate-set-gstate!): New accessors.
6200         (tstate-copy): New proc.
6201         (tstate-new-cond?,tstate-new-set?): Rewrite.
6202         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6203         (rtx-traverse): New arg `gstate', all callers updated.
6204         (rtx-strdump): New proc.
6205         (-simplify-for-compilation): New arg `gstate', all callers updated.
6206         (semantic-in-out-operands): Ditto.
6207         (semantic-attrs): Ditto.
6208         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6209         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6210         (rtx-value): Rewrite.
6211         (<c-expr>,gen-name): New method.
6212         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6213         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6214         (cx-new-mode): New proc.
6215         (-rtx-c-with-tstate): New proc.
6216         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6217         callers updated.
6218         (-rtx-mode): Rewrite.
6219         (-rtx-mode-compatible?): New proc.
6220         (<c-expr-temp>): New member `value'.
6221         (cx-temp:value): New accessor.
6222         (<c-expr-temp>,make!): Override default method.
6223         (<c-expr-temp>,cxmake-get): Rewrite.
6224         (<c-expr-temp>,gen-set-quiet): Rewrite.
6225         (<c-expr-temp>,gen-set-trace): Rewrite.
6226         (gen-temp-defs): Use cx-temp:value.
6227         (record-temp!): New arg value, all callers updated.
6228         (cx-temp:cx:make): Delete.
6229         (-cx-temp-dump-stack): New proc.
6230         (rtx-get): New arg `gstate', all callers updated.  Do mode
6231         compatibility checks.  Ensure result has specified mode.
6232         (rtx-set-quiet): New arg `gstate', all callers updated.
6233         (rtx-set-trace): Ditto.
6234         (s-c-call): New arg `tstate', all callers updated.
6235         (s-c-raw-call): Ditto.
6236         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6237         (s-cmpop,s-if,e-if): Ditto.
6238         (s-subreg): New proc.
6239         (-par-new-temp!): New proc.
6240         (-par-next-temp!): Rewrite.
6241         (-par-replace-set-dests): Use -par-new-temp!.
6242         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6243         (s-sequence): Use -rtx-c-with-state.
6244         * rtx-funcs.scm (*): Update.
6245         (raw-reg:): New rtx function.
6246         (make-di): Delete.
6247         (join:,subreg:): New rtx functions.
6248
6249         * insn.scm (<insn>): New members pre-cond-trap, condition,
6250         post-cond-trap, compiled-condition.
6251
6252         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6253
6254         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6255
6256         * utils-cgen.scm (parse-symbol): New proc.
6257         (parse-string): New proc.
6258         (gen-get-macro,gen-set-macro): New arg `index-args'.
6259         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6260         Prepend \ to newlines.
6261
6262         * utils.scm (alist-remove-duplicates): Delete.
6263
6264         * sid.scm (sim-init!): Delete private debugging code.
6265
6266 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6267
6268         * cgen-sid.scm: New file for C++ simulator application.
6269         * sid-arch.scm: Ditto.
6270         * sid-cpu.scm: Ditto.
6271         * sid-decode.scm: Ditto.
6272         * sid-model.scm: Ditto.
6273         * sid.scm: Ditto.
6274         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6275
6276 1999-03-05  Ben Elliston  <bje@cygnus.com>
6277
6278         * arm.cpu: New file.
6279
6280 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6281
6282         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6283         * Makefile.in: Rebuild.
6284
6285         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6286         (-attr-parse): Validate default value.
6287
6288         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6289         (-CGEN-LANG-VERSION): Ditto.
6290         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6291         (<reader>): New member keep-isa plus accessors.
6292         (-keep-isa-set!,keep-isa-validate!): New procs.
6293         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6294         (common-arguments): New variable.
6295         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6296         (-debug-repl,continue): New procs.
6297         (-cgen,cgen): New procs.
6298         * cgen-gas.scm: Rewrite.
6299         * cgen-opc.scm: Rewrite.
6300         * cgen-sim.scm: Rewrite.
6301         * cgen-stest.scm: Rewrite.
6302
6303         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6304         (gas-test-finish!): Call opcodes-finish!.
6305         (gas-test-analyze!): Call opcodes-analyze!.
6306         (<hw-asm>): New method test-data.
6307         (<operand>,testdata): Rewrite.
6308         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6309         (sim-test-finish!): Call opcodes-finish!.
6310         (sim-test-analyze!): Call opcodes-analyze!.
6311         (<hw-asm>): New method test-data.
6312         (<operand>,testdata): Rewrite.
6313
6314 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6315
6316         * fixup.scm (reverse!): Define if missing.
6317         * *.scm: Use reverse! instead of list-reverse!.
6318
6319         * utils.scm (leading-id-char?): New proc.
6320         (id-char?): Rewrite.
6321         (chars-until-delimiter): New proc.
6322         * opc-itab.scm (extract-syntax-operands): Rewrite.
6323         (strip-mnemonic): Rewrite.
6324         (compute-syntax): Rewrite.
6325
6326         * pmacros.scm (-pmacro-substr): New proc.
6327         (pmacros-init!): Add builtin .substr.
6328
6329 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6330
6331         * thumb.cpu: New file.
6332
6333 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6334
6335         * Makefile.am (CGENCFLAGS): New variable.
6336         (WITH_HOBBIT): Use automake conditional.
6337         (CGEN_HOB_SRC): New variable.
6338         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6339         (*.o): Compile with CGENCFLAGS.
6340         (cgen-hob.c): Simplify.
6341         (cgen-nohob.c): New rule.
6342         (hobbit): Renamed from hob.x.
6343         (CLEANFILES): Add cgen-nohob.c.
6344         * Makefile.in: Rebuild.
6345         * doc/Makefile.in: Rebuild.
6346         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6347         (WITH_HOBBIT): Use AM_CONDITIONAL.
6348         * configure: Rebuild.
6349         * aclocal.m4: Rebuild.
6350
6351         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6352         with string-write-map.
6353
6354         * sim-cpu.scm (hw-need-storage?): New proc.
6355         (-gen-hardware-types): Use it.
6356         (gen-parallel-exec-elm): Call op-save-index?.
6357
6358         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6359
6360         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6361         UNSIGNED attribute.
6362         (-gen-ifld-extract-beyond): Ditto.
6363         (<integer>): Delete all references.
6364         (<sim-hardware>): Delete.
6365         (hw-profilable?): New proc.
6366         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6367         (<hw-register>): Rename method get-index-mode to save-index?.
6368         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6369         (<hw-register>,gen-sym-decl): Make virtual.
6370         (<hw-memory>,gen-sym-decl): Make virtual.
6371         (<hw-memory>): Rename method get-index-mode to save-index?.
6372         (<hw-address>,gen-sym-decl): Make virtual.
6373         (<operand>): New method save-index?.
6374         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6375
6376         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6377         prefix added.  All uses updated.
6378
6379         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6380         rather than pointer to table entry.
6381
6382         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6383         Remove all hw-asm,op-asm support.
6384         (-gen-parse-number,-gen-parse-address): New procs.
6385         (<keyword>,gen-parse): Redo function name computation.
6386         (<keyword>,gen-print): Ditto.
6387         (<operand>,gen-function-name): Rewrite.
6388         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6389         (opcodes-init!): Delete call to add-parser!.
6390
6391         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6392         Define enum using hardware semantic name.
6393         (-gen-hw-decl,-gen-hw-defn): New procs.
6394         (gen-hw-table-decls): Use -gen-hw-decl.
6395         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6396         CGEN_HW_ENTRY structs.
6397         (gen-operand-table): Output hw's enum, not pointer to table entry.
6398         (-gen-cpu-open): Build table of selected hardware elements.
6399
6400         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6401         (<hardware> support): Delete.
6402         (<hw-asm>): Delete, moved to hardware.scm.
6403         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6404         (<hw-asm>,gen-table-entry): New method.
6405         (<hw-asm>,parse!): Delete.
6406         (<keyword>,gen-table-entry): New method.
6407         (<keyword>,parse!): Delete.
6408         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6409         for gen-decl,gen-defn,gen-ref,gen-init.
6410         (desc-init!): Don't create parser for operand asm specs.
6411
6412         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6413         * ifield.scm (<ifield>): New member `mode'.
6414         (<ifield>,make!): New arg `mode'.
6415         (ifld-mode): Rewrite.
6416         (ifld-hw-type): Rewrite.
6417         (<ifield>,min-value): Rewrite.
6418         (<ifield>,max-value): Rewrite.
6419         (-ifield-parse): New arg `mode'.
6420         (-ifield-read): Update.
6421         (define-full-ifield): New arg `mode'.
6422         (define-full-multi-ifield): Ditto.
6423         (-multi-ifield-parse): Ditto.
6424         (-multi-ifield-read): Update.
6425         (define-full-multi-ifield): New arg `mode'.
6426         (ifield-builtin!): Update definition of f-nil.
6427         * simplify.inc (define-normal-ifield): Update call to
6428         define-full-ifield.
6429         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6430         (define-normal-hardware): Delete arg asm.  New args indices, values,
6431         handlers.  Update call to define-full-hardware.
6432         (define-simple-hardware,dsh): New pmacros.
6433         (define-normal-operand): Update call to define-full-operand.
6434         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6435         Specify INT/UINT mode instead.
6436         (h-gr,h-cr): Use "indices" instead of "asm".
6437         (h-dr,h-ps): Update keyword syntax.
6438         (h-r13,h-r14,h-r15): Ditto.
6439         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6440         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6441         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6442         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6443         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6444         Specify INT/UINT mode instead.
6445         (h-gr): Use "indices" instead of "asm".
6446         (h-cc): Update keyword syntax.
6447         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6448         Specify INT/UINT mode instead.
6449         (h-hi16,h-slo16,h-ulo16): Update.
6450         (h-gr,h-cr): Use "indices" instead of "asm".
6451         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6452         (h-accums): Update keyword syntax.
6453         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6454         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6455         Specify INT/UINT mode instead.
6456         (h-gr-indices): New pmacro.
6457         (h-gr32,h-gr64): Split up from h-gr.
6458         (h-a): Update type spec.  Use values instead of asm spec.
6459         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6460         (h-y,h-annul-p): Ditto.
6461         (h-asr): Update keyword spec.
6462         (h-lo10,h-lo13,h-hi22): Update.
6463         (get-freg-spec,set-freg-spec): New pmacros.
6464         (h-fr32,h-fr64): Split up from h-fr.
6465         (rdd): Comment out get/set specs.
6466         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6467         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6468         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6469         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6470         UNSIGNED.  Specify INT/UINT mode instead.
6471         (h-*): Use dsh instead of dnh where appropriate.
6472         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6473         (h-p,h-membarmask): Ditto.
6474         (membarmask): Use "handlers" instead of "asm".
6475
6476         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6477         values,handlers,getters,setters plus accessors.
6478         (hw-mode-ok?,hw-default-mode): New procs.
6479         (<hardware-base>): Rename method new-mode to mode-ok?
6480         (<hardware-base>): New method get-index-mode.
6481         (hw-index-mode): New proc.
6482         (pc?): Delete, moved to operand.scm.
6483         (address?): New proc.
6484         (<hardware>): Delete.
6485         (<hw-asm>): Definition moved here from desc.scm.
6486         (keyword-parse): New proc.
6487         (hardware-parsers): Delete.
6488         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6489         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6490         (-hw-parse-get,-hw-parse-set): New procs.
6491         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6492         indices,values,handlers,get,set.  Rewrite.
6493         (-hw-read-extra): Delete.
6494         (-hw-read): Update.
6495         (define-hardware): Don't add object if not selected.
6496         (define-full-hardware): Ditto.
6497         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6498         (<hw-register>): Member `type' moved to baseclass.  Delete member
6499         hw-asm.
6500         (<hw-register>,parse!): Rewrite.
6501         (<hw-register>): Delete methods get-rank,get-mode.
6502         (<hw-register>): Method new-mode renamed to mode-ok?
6503         (<hw-register>): New method get-index-mode.
6504         (<hw-pc>,parse!): Rewrite.
6505         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6506         (<hw-memory>,parse!): Rewrite.
6507         (<hw-memory>): Delete methods get-rank,get-mode.
6508         (<hw-memory>): Method new-mode renamed to mode-ok?
6509         (<hw-memory>): New method get-index-mode.
6510         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6511         hw-asm.
6512         (<hw-immediate>,parse!): Rewrite.
6513         (<hw-immediate>): Delete methods get-rank,get-mode.
6514         (<hw-immediate>): Method new-mode renamed to mode-ok?
6515         (<hw-address>): Delete member hw-asm.
6516         (<hw-address>,parse!): Rewrite.
6517         (<hw-address>): Delete methods get-rank,get-mode.
6518         (<hw-address>): Method new-mode renamed to mode-ok?
6519         (hw-profilable?): Delete.
6520         (hardware-init!): Delete hardware-parsers reference.
6521         Update argument specs of command define-full-hardware.
6522         (hardware-builtin!): Update definitions of hardware builtins.
6523         * operand.scm (<operand>): New members hw-name,mode-name.
6524         Delete member op-asm.  New member handlers.
6525         (<operand>,make!): Update.
6526         (op:hw-name,op:mode-name,op:handlers): New procs.
6527         (op:type): Rewrite.
6528         (op:mode): Rewrite.
6529         (<operand>): New method get-index-mode.
6530         (<pc>,make!): Update.
6531         (op:new-mode): Rewrite.
6532         (operand-parsers): Delete.
6533         (-operand-parse): Rewrite.  Return #f if insn not selected.
6534         (-op-read-extra): Delete.
6535         (-operand-read): Update.
6536         (define-operand,define-full-operand): Update.
6537         (operand-init!): Delete operand-parsers reference.
6538         Update syntax of define-full-operand command.
6539
6540         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6541         (define-full-insn): Update.
6542         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6543         (define-full-minsn): Update.
6544
6545         * mode.scm (<mode>): New member class.
6546         (mode:class): New proc.
6547         (mode?): Rewrite.
6548         (-mode-parse): New arg class.
6549         (define-full-mode): Update.
6550         (mode-find): Rewrite.
6551         (mode-make-int,mode-make-uint): New procs.
6552         (mode-init!): Update syntax of define-full-mode command.
6553         (mode-builtin!): Update definitions of builtin modes.
6554
6555         * model.scm (<profile>): Delete.
6556
6557         * read.scm (keep-atlist?): New proc.
6558         (keep-multiple?): New proc.
6559         (<parser-list>): Delete.
6560         (add-parser!,parse-spec!): Delete.
6561
6562         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6563         (def-rtx-syntax-node): Ditto.
6564         (-rtx-traverse-debug?): New variable.
6565         (tstate-make): New proc.
6566         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6567         (tstate-new-cond?,tstate-new-set?): New procs.
6568         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6569         tstate.  All callers updated.
6570         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6571         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6572         (-build-operand!): Replace arg cond? with tstate.
6573         (-build-reg-operand!,-build-mem-operand!): Ditto.
6574         (-build-index-of-operand!): Update making of <operand> object.
6575         (s-ifield): New arg tstate.  All callers updated.
6576         (hw:): New arg tstate.  All callers updated.  Replace call to
6577         current-hw-lookup with current-hw-sem-lookup-1.
6578         (s-index-of): New arg tstate.  All callers updated.
6579         (reg:,mem:): Ditto.
6580         (-rtx-use-sem-fn?): New proc.
6581         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6582         semantic cover fns.
6583         (s-convop): Only use semantic mode when using semantic cover fns.
6584         (s-cmpop): Call -rtx-use-sem-fn?.
6585         (s-cond,s-case): New arg tstate.  All callers updated.
6586         (s-parallel,s-sequence): Ditto.
6587
6588         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6589
6590         * types.scm (<scalar>): Rewrite implementation.
6591         (<integer>): Delete.
6592         (parse-type): Rewrite.
6593
6594         * utils-cgen.scm (parse-handlers): New proc.
6595
6596         * utils.scm (!=): New proc.
6597
6598 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6599
6600         * pmacros.scm (-pmacro-expand): Fix typo.
6601
6602 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6603
6604         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6605         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6606         * i960.cpu (build-hex2): New pmacro.
6607         (insn-opcode): Simplify.
6608         (insn-opcode2): Ditto.
6609
6610         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6611         * cgen-stest.scm (catch-with-backtrace): Ditto.
6612
6613 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6614
6615         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6616         All callers updated.
6617         (-pmacro-invoke): New proc.
6618         (-pmacro-sym,-pmacro-str): New procs.
6619         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6620         (pmacros-init!): Install builtins .iota, .map, .apply.
6621         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6622         (h-fr): Simplify register name spec.
6623         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6624         * utils.scm (num-args-ok?): New proc.
6625
6626 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6627
6628         * pmacros.scm (-pmacro-error): New proc.
6629         (-pmacro-expand): Use it.
6630         (-pmacro-splice): New proc.
6631         (pmacros-init!): Install new builtin .splice.
6632
6633         * sparc.cpu: Include sparc64.cpu when appropriate.
6634         (f-mmask,f-simm11): Moved to sparc64.cpu.
6635         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6636         (ANNUL attribute): Delete.
6637         (test-* pmacros): New arg cc, all callers updated.
6638         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6639         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6640         atomic-opc.
6641         (ldstub,swap): Moved to sparccom.cpu.
6642         * sparc64.cpu: Add more insns.
6643
6644 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6645
6646         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6647         CGEN_ATTR_VALUE.
6648         (cgen-sem-switch.c): Ditto.
6649         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6650         moved to cgen-engine.h.
6651         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6652         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6653         global.  Cache attributes and insn length in IDESC.
6654         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6655         @cpu@_opcode renamed to @cpu@_get_idata.
6656         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6657         done later underneath sim_resume.
6658         (@mach@_mach): Record @cpu@_prepare_run.
6659         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6660         updated.
6661         (-hw-gen-set-quiet-pc): Ditto.
6662         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6663         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6664         (<hw-addr>,cxmake-get): Ditto.
6665         (<hw-iaddr>,cxmake-get): Ditto.
6666         (<pc>,cxmake-get): Ditto.
6667         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6668         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6669         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6670         (<hw-pc>,gen-write): Use hw-selector-default.
6671         (<hw-register>,gen-write): Ditto.
6672         (<hw-memory>,gen-write): Ditto.
6673         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6674         (-gen-hw-selector): New proc.
6675
6676         * desc.scm: New file.
6677         * desc-cpu.scm: New file.
6678         * opcodes.scm: Split up into several smaller files.
6679         * opc-asmdis.scm: New file.
6680         * opc-ibld.scm: New file.
6681         * opc-itab.scm: New file.
6682         * opc-opinst.scm: New file.
6683         * Makefile.am (desc): New target.
6684         (opcodes): Update args to cgen-opc.scm.
6685         * Makefile.in: Rebuild.
6686         * aclocal.m4: Rebuild.
6687         * config.in: Rebuild.
6688         * configure.in: Update arg to AC_INIT.
6689         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6690         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6691         AC_PROG_INSTALL.
6692         * configure: Rebuild.
6693         * cgen-gas.scm: Update files to load.
6694         * cgen-opc.scm: Ditto.  Reorganize option letters.
6695         * cgen-sim.scm: Update files to load.
6696         * cgen-stest.scm: Ditto.
6697         * dev.scm (cload): New app "DESC".
6698         (load-opc): Update files to load.
6699         (load-gtest,load-sim,load-stest): Ditto.
6700
6701         * attr.scm (bool-attr?): New proc.
6702         (attr-list-enum-list): New proc.
6703         (-attr-sort): Rewrite.
6704         (attr-builtin!): Give ALIAS attribute a fixed index.
6705         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6706         calculate attribute enum list.
6707         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6708
6709         * insn.scm (-insn-parse): Renamed from parse-insn.
6710
6711         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6712         (-hw-read): Ditto.
6713
6714         * mode.scm (-mode-parse): Renamed from parse-mode.
6715
6716         * operand.scm (<operand>): New member `selector'.
6717         (<operand>,make!): Use default selector.
6718         (hw-selector-default): New variable.
6719         (hw-selector-default?): New proc.
6720
6721         * pmacros.scm (pmacros-init!): New proc.
6722         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6723         (-env-set!): Delete.
6724         (-pmacro-expand): New proc apply-macro.
6725         Use it in scan-list,scan.  Scan list first, then see if macro
6726         invocation.
6727         (define-pmacro): Rewrite.
6728         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6729
6730         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6731         selected if (current-mach) seen.
6732         (rtx?): Renamed from rtx-uneval?, all callers updated.
6733         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6734         updated.
6735         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6736         selector, all callers updated.
6737         (hw:): New arg selector, all callers updated.  Delete old comments
6738         and code.
6739         (reg:,mem:): Handle selectors
6740         * rtx-funcs.scm (reg:): Handle selectors.
6741
6742         * read.scm: Renamed from cpu.scm.
6743         (<command>): New class.
6744         (<reader>): New member commands.
6745         (reader-add-command!): New proc.
6746         (reader-lookup-command): New proc.
6747         (reader-error,-reader-process-expanded,reader-process): New procs.
6748         (reader-read-file!): New proc.
6749         (include): Call reader-read-file!.
6750         (cmd-if): New proc.
6751         (cpu-load): Call reader-read-file!.
6752         * utils.scm (num-args): New proc.
6753         * simplify.inc: New file.
6754         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6755         procs.  Move define-normal-foo procs (and abbreviated forms) to
6756         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6757         routines.
6758         * fr30.cpu: Include simplify.inc.
6759         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6760         * i960.cpu: Include simplify.inc.
6761         * m32r.cpu: Include simplify.inc.
6762         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6763         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6764         * sparc.cpu: Include simplify.inc.
6765         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6766         * utils-cgen.scm (parse-error): Moved to read.scm.
6767         (sanitize): Rewrite.
6768         (utils-init!): New proc.
6769
6770 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6771
6772         * sparc.cpu: New file.
6773         * sparc32.cpu: New file.
6774         * sparc64.cpu: New file.
6775         * sparccom.cpu: New file.
6776         * sparc.opc: New file.
6777
6778 1999-01-27  Frank Eigler  <fche@cygnus.com>
6779
6780         * utils.scm (gen-copyright): New proc.
6781
6782 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6783
6784         Parameterize rtl parsing, rather than having lots of little handlers.
6785         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6786         Delete member traverse.
6787         (rtx:set-traverse!): Delete.
6788         (-rtx-valid-types,-rtx-valid-matches): New variables.
6789         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6790         instead of expression.  All callers updated.
6791         (def-rtx-node): New args arg-types,arg-modes.
6792         (def-rtx-syntax-node): Ditto.
6793         (def-rtx-dual-mode): Ditto.
6794         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6795         All callers updated.
6796         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6797         All callers updated.
6798         (rtx-macro-expand): New proc.
6799         (-rtx-traverse-check-args): Delete.
6800         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6801         an rtx specific traverser.
6802         (-rtx-any-mode?,-rtx-symornum?): New procs.
6803         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6804         (-rtx-traverse-no-mode): Delete.
6805         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6806         (-rtx-traverse-operands): Rewrite.
6807         (-rtx-traverse-expr): Rewrite.
6808         (rtx-traverse): Don't expand macros here, leave for caller to do.
6809         (rtx-simplify): Delete.
6810         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6811         attributes.
6812         (rtx-true?,rtx-false?): Ditto.
6813         (-rtx-ref-type): Set dest is operand 1 now.
6814         (-simplify-for-compilation): New proc.
6815         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6816         Expand macros before calling rtx-traverse.  Sort operands by name
6817         to avoid unnecessary semantic formats.
6818         (semantic-attrs): New proc.
6819         (rtx-uneval?): Handle (<rtx-func> ...).
6820         (s-boolifop): Delete arg mode.  All callers updated.
6821         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6822         (eq-attr): New arg obj.
6823         (eq-attr:): Delete.
6824         * m32r.cpu (rach): Update calls to andif.
6825
6826         * minsn.scm (-minsn-parse-expansion): Renamed from
6827         parse-minsn-expansion.
6828         (-minsn-parse): Renamed from parse-minsn.
6829         (-minsn-read): Renamed from read-minsn.
6830         (def-minsn): Don't check APPLICATION here.
6831         (def-full-minsn): New proc.
6832         (define-macro-insn): Check APPLICATION here.  Expand macros.
6833         (define-normal-macro-insn): Ditto.
6834
6835         * utils.scm (word-value): New arg start-lsb?.
6836         (word-mask,word-extract): Ditto.
6837         (split-bits,powers-of-2): Use integer-expt instead of expt.
6838         (bit-set?): Handle 32 bit values (which are bignums).
6839         (cg-logand,cg-logxor): New functions.
6840         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6841         (<ifield>,field-value): Update call to word-value.
6842         (<ifield>,min-value): Use integer-expt instead of expt.
6843         (<ifield>,max-value): Ditto.
6844
6845         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6846
6847         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6848
6849         Compute raw instruction format in addition to semantic based format.
6850         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6851         (<iformat> accessors): Rename accessors to ifmt-*.
6852         (<sformat>): New class.
6853         (fmt-enum): Renamed from fmt:enum.
6854         (-ifmt-search-key): Rewrite.
6855         (-sfmt-search-key): New proc.
6856         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6857         Compute iformat and sformat search keys.
6858         (ifmt-build): Update.
6859         (sfmt-build): New proc.
6860         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6861         (ifmt-compute!): Compute instruction format <iformat> based on
6862         instruction fields alone.  Compute new semantic format <sformat>
6863         based on instruction fields and semantic information.
6864         (ifmt:lookup): Delete.
6865         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6866         (current-sfmt-list): New proc.
6867         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6868         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6869         (insn-length,insn-length-bytes): Update.
6870         (insn:mask-length,insn:mask): Update.
6871         (insn-lookup-op): Update.
6872         * gas-test.scm (gas-test-analyze!): Update.
6873         (gen-gas-test): Ditto.
6874         * sim-test.scm (sim-test-analyze!): Update.
6875         (gen-sim-test): Ditto.
6876         * opcodes.scm (gen-operand-instance-table): Update.
6877         (gen-operand-instance-ref): Ditto.
6878         (max-operand-instances): Use heuristic if semantics not parsed.
6879         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6880         (opcodes-analyze!): Only scan semantics of building operand instance
6881         tables.
6882         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6883         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6884         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6885         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6886         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6887         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6888         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6889
6890         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6891         New arg lsb0?  All callers updated.
6892         (decode-bits): New arg lsb0?.  All callers updated.
6893         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6894         of expt.
6895         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6896         (build-slots): Call integer-expt instead of expt.
6897         (build-decode-table-entry): Handle crossing word boundaries better.
6898         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6899         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6900
6901         * enum.scm (define-enum): Rewrite.
6902         (define-normal-enum): Ditto.
6903         (def-full-insn-enum): New proc.
6904         (define-normal-insn-enum): Rewrite.
6905
6906         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6907         valid C.
6908         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6909
6910         * dev.scm: Add sid support.
6911
6912         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6913         (CLEANFILES): Add tmp-*.
6914         * Makefile.in: Rebuild.
6915
6916         * doc/Makefile.am: New file.
6917         * doc/Makefile.in: New file.
6918         * doc/cgen.texi: New file.
6919         * Makefile.am (SUBDIRS): Define.
6920         * Makefile.in: Rebuild.
6921         * configure.in: Create doc/Makefile.
6922         * configure: Rebuild.
6923
6924 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
6925
6926         * insn.scm (insn:syn): Delete.
6927
6928 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
6929
6930         * fr30.cpu (model fr30-1): Add state variables load-regs,
6931         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
6932         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6933         (model m32rx): Ditto.
6934         (addi): Simplify function unit usage spec.
6935         (ld-plus): Rewrite operand names in function unit usage spec.
6936         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6937         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6938         overridden.  Allow operand to appear in input and output spec.
6939         (<insn>,gen-profile-code): string-append -> string-list.
6940
6941         * ifield.scm (define-ifield): Call pmacro-expand.
6942         (define-full-ifield,define-normal-ifield): Ditto.
6943         (define-multi-ifield,define-normal-multi-ifield): Ditto.
6944
6945         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6946         with-scache and without-scache cases.
6947
6948 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
6949
6950         * fr30.cpu (fr30-1): Add state variable h-gr.
6951         Add units u-cti, u-load, u-store, u-ldm, u-stm.
6952         (all insns): First pass at providing cycle counts.
6953         * sim.scm (<unit>,gen-profile-code): Only check for output operands
6954         when initializing unit output operands, ditto for input operands.
6955
6956         * insn.scm (insn-length,insn-length-bytes): New procs.
6957         * mach.scm (-adata-set-derived!): Use them.
6958         * sim-cpu.scm (-gen-sem-case): Ditto.
6959
6960         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6961         (-gen-write-case): Ditto.
6962         (gen-semantic-fn): Ditto.  Split into two:
6963         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
6964         in non-scache case.
6965         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
6966         scache/no-scache appropriately.  All callers updated.
6967         (-gen-sem-case): PCADDR->IADDR.
6968         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6969
6970         * sim-decode.scm (*): Replace string-append,string-map with
6971         string-list,string-list-map where the result is sufficiently large.
6972         (-gen-decode-insn-table): Go back to simple version for non-scache
6973         case: just record IDESC in decoder tables and leave field extraction
6974         to the caller.
6975         (-gen-decode-switch): Ditto.
6976         (-gen-decode-fn): Ditto.
6977         (-gen-extract-decls): Only emit format enum if with-scache?.
6978         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6979         non-scache case.
6980         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6981         (-gen-insn-timing): Ditto.
6982         * sim.scm (gen-argbuf-type): Only output sem_fields union in
6983         with-scache case.
6984
6985         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6986         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6987
6988 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
6989
6990         * cpu.scm (keep-mach-validate!): New proc.
6991         (include): New proc.
6992
6993         * mach.scm (current-arch-mach-name-list): New proc.
6994         (-parse-arch-machs): Always return canonical form.
6995         (def-arch): Validate user specified machs to be kept.
6996         (def-mach-attr!): Simplify.
6997
6998         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6999         (option-init!): Initialize it.
7000         (option-set!): Set it.
7001         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7002         output operand instance tables.
7003         (cgen-opc.in): Only output operand instance tables if asked to.
7004
7005         * sim.scm (option-init!,option-set!): Clarify returned value.
7006
7007         * sim.scm (gen-mach-bfd-name): Move from here.
7008         * utils-cgen.scm: To here.
7009
7010 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7011
7012         * fr30.cpu (ilm): Fix comment field.
7013         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7014         compute it.
7015
7016         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7017         (rtx-true?, rtx-false?): New procs.
7018         * rtx-funcs.scm (annul): Rename vpc to pc.
7019         (-rtx-traverse-if): Improve determination of whether then/else parts
7020         are conditionally executed.
7021
7022         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7023         outer level.
7024         (gen-argbuf-type): Simplify generated definition (big sem_fields
7025         union moved outside).
7026
7027 1999-01-11  Ben Elliston  <bje@cygnus.com>
7028
7029         * doc/porting.texi: New file.
7030
7031         * doc/intro.texi: New file.
7032         (Layout): Use @example to insert preformatted ASCII text (such as
7033         diagrams). @code is inappropriate here.
7034
7035 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7036
7037         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7038
7039         * m32r.opc (print_hash): Cast dis_info.
7040
7041         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7042         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7043         get/set macros.
7044
7045 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7046
7047         * i960.cpu (f-br-disp): Remove RELOC attribute.
7048         (f-ctrl-disp): Ditto.
7049         (callx-disp): set-quiet -> set for (reg h-gr 2).
7050         (callx-indirect,callx-indirect-offset): Ditto.
7051
7052         * Makefile.am (gas-test): Fix dependencies.
7053         * Makefile.in: Rebuild.
7054         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7055         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7056         (gas-test-analyze!): Use syntax-break-out.
7057         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7058         (sim-test-analyze!): Use syntax-break-out.
7059         (cgen-build.sh): Use gen-file-name.
7060         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7061         * insn.scm (syntax-break-out): New proc.
7062         * utils.scm (gen-file-name): New proc.
7063
7064         * fixup.scm (nil,<?,<=?,>?): Delete.
7065
7066         * utils.scm (count-true): Rewrite.
7067
7068         * slib/sort.scm: Move sort.scm to slib directory.
7069         * cpu.scm: Update.
7070
7071         * iformat.scm (ifmt-compute!): Record empty format.
7072
7073         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7074         internal procs outside.  Handle expression register numbers.
7075         Handle index-of.
7076
7077         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7078
7079         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7080         every register.
7081         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7082         (gen-semantic-fn,-gen-sem-case): Ditto.
7083         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7084         (cgen-semantics.c): Ditto.
7085         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7086         (gen-ifmt-argvars-defns): New proc.
7087         (gen-ifmt-argvars-assigns): New proc.
7088         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7089         (-gen-decode-fn): Handle non-with-scache case.
7090         (cgen-decode.c): Define WANT_CPU to @cpu@.
7091         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7092         (cgen-model.c): Define WANT_CPU to @cpu@.
7093         * sim.scm (gen-ifld-extract-argvar): New proc.
7094         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7095         with FUN-ACCESS specified.
7096         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7097         (<hw-register>,gen-extract): New arg local?.
7098         (<hw-address>,gen-extract): Ditto.
7099         (-hw-cxmake-get): Handle non-with-scache case.
7100         (-hw-gen-set-quiet): Ditto.
7101         (<hw-address>,cxmake-get): Handle non-with-scache case.
7102         (gen-op-extract-argvar): New proc.
7103         (<operand>,gen-record-profile): Rewrite.
7104         (<operand>,gen-profile-code): Rewrite.
7105         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7106         (gen-argbuf-fields-union): New proc.
7107         (gen-argbuf-type): Use it.  Handle non-scache case.
7108
7109         * *.scm: class:foo procs renamed to class-foo.
7110         * attr.scm (<attribute>): New member `for'.
7111         (-attr-parse): New first value in list for default if
7112         none specified.
7113         (non-bool-attr-list,attr:add!): Delete.
7114         (def-attr): Use current-attr-add!.
7115         (atlist-attr-value-no-default): New proc.
7116         (attr-lookup-default): Handle boolean attributes.
7117         (gen-attr-enum): New proc.
7118         (-attr-remove-meta-attrs-alist): New proc.
7119         (attr-nub): New proc.
7120         (current-attr-list-for): New proc.
7121         (current-{ifld,hw,op,insn}-attr-list): New procs.
7122         (attr-builtin!): New proc.
7123         * cpu.scm (keep-obj?): Rewrite.
7124         (-init-parse-cpu!): Call arch-init!.
7125         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7126         (-finish-parse-cpu!): Call arch-finish!.
7127         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7128         (def-enum,def-full-enum): Use current-enum-add!.
7129         (gen-obj-list-enums): New proc.
7130         * hardware.scm (hw:add!,hw:lookup): Delete.
7131         (def-hardware,def-hardware-ext): Use current-hw-add!.
7132         (hw:std-attrs,hw:attr-list): Delete.
7133         (hardware-builtin!): Define builtin hardware attributes.
7134         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7135         (def-ifield,def-full-ifield): Use current-ifld-add!.
7136         (ifld:std-attrs,ifld:attr-list): Delete.
7137         (ifield-builtin!): New proc.
7138         * insn.scm (insn:add!,insn:lookup): Delete.
7139         (def-full-insn): Use current-insn-add!.
7140         (insn:std-attrs): Delete.
7141         (insn-builtin!): New proc.
7142         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7143         minsn-list.
7144         (<arch-data>): New member machs.
7145         (current-attr-list,current-enum-list): New procs.
7146         (current-op-list,current-minsn-list): New procs.
7147         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7148         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7149         Ditto.
7150         (-parse-arch-machs): New proc.
7151         (-arch-parse): New arg machs, all callers updated.
7152         (-arch-read): Handle machs spec.
7153         (def-arch): Define MACH attribute here.
7154         (mach-init!,mach-finish!): Not here.
7155         (cpu:add!,cpu:lookup): Delete.
7156         (def-cpu): Use current-cpu-add!.
7157         (<mach>): New member bfd-name.
7158         (-mach-parse): New arg bfd-name, all callers updated.
7159         (-mach-read): Handle bfd-name spec.
7160         (mach:add!,mach:lookup): Delete.
7161         (def-mach): Use current-mach-add!.
7162         (def-mach-attr!): New proc.
7163         (arch-init!): New proc.
7164         (arch-finish!): New proc.  Reverse all object lists here.
7165         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7166         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7167         (define-normal-macro-insn): Ignore minsn if mach not kept.
7168         * mode.scm (mode-builtin!): New proc.
7169         * model.scm (model:add!,model:lookup): Delete.
7170         (def-model): Use current-model-add!.
7171         * opcodes.scm (insn:attr-list): Delete.
7172         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7173         (gen-attr-table-defn): Emit value for default.
7174         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7175         (op:attr-list): Delete.
7176         (gen-operand-decls,gen-insn-decls): New proc.
7177         (compute-insn-attr-list): Delete.
7178         (cgen-opc.h): Reorganize and simplify.
7179         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7180         (def-operand,def-full-operand): Use current-op-add!.
7181         (op:std-attrs): Delete.
7182         (operand-enum): Delete.
7183         (operand-builtin!): Define builtin operand attrs.
7184         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7185         (gen-attr-enum-decl): Use gen-obj-list-enums.
7186         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7187         Rewrite.
7188         * fr30.cpu (define-arch): Add machs spec.
7189         (f-i4): SIGNED attribute -> !UNSIGNED.
7190         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7191         (HASH-PREFIX): Define operand attribute.
7192         (NOT-IN-DELAY-SLOT): Define insn attribute.
7193         * i960.cpu (define-arch): Add machs spec.
7194         * m32r.cpu (define-arch): Add machs spec.
7195         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7196         (HASH-PREFIX): Define operand attribute.
7197         (FILL-SLOT): Define insn attribute.
7198
7199 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7200
7201         * fr30.cpu (stilm): Correct mask for and operation.
7202
7203 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7204
7205         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7206         Replace START/EXIT with start/pass.
7207         (gen-sim-test): Delete ".text".
7208
7209 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7210
7211         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7212
7213 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7214
7215         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7216         (h-sbit): Make it FUN-ACCESS.
7217         (h-gr): Reorder so that general regs are always printed by number.
7218
7219 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7220
7221         * i960.cpu (flushreg): Use nop.
7222
7223 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7224
7225         * m32r.cpu (default-alignment): Specify.
7226         * mach.scm (<arch-data>): New member default-alignment.
7227         (adata:default-alignment): New proc.
7228         (current-arch-default-alignment): New proc.
7229         (-arch-parse): New arg default-alignment.
7230         (parse-alignment): New proc.
7231         (-arch-read): Handle default-alignment spec.
7232
7233         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7234
7235         * insn.scm (f-%): Delete.
7236         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7237         be readded if proved useful.
7238         (gen-extract-fields): Ditto.  Use gen-ifetch.
7239         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7240         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7241
7242 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7243
7244         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7245
7246 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7247
7248         * fr30.cpu: Remove stub macros.
7249         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7250         (div2): Don't use addc/subc.
7251
7252 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7253
7254         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7255         if opcodes.
7256
7257 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7258
7259         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7260
7261 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7262
7263         * cpu.scm (keep-all?): New proc.
7264         (assert-keep-all): Use it.
7265         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7266         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7267         Check for spelling errors.
7268
7269 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7270
7271         * rtl.scm (s-convop): Call -rtx-sem-mode.
7272
7273 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7274
7275         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7276         (-parse-hw-profile): Ditto.
7277         (<hw-register>, parse!): Return `void' result.
7278         (<hw-pc>, parse!): Ditto.
7279         (<hw-memory>, parse!): Ditto.
7280         (<hw-immediate>, parse!): Ditto.
7281         (<hw-address>, parse!): Ditto.
7282
7283         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7284         (-ifld-parse-encode-decode): New proc.
7285         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7286         (-multi-ifield-parse): Set encode/decode to #f.
7287         (ifld:decode-mode): New proc.
7288         * utils.scm (nub): Rewrite.
7289         * operand.scm (op-nub): Rewrite.
7290         * sim.scm (<ifield>, gen-type): Rewrite.
7291         (-gen-ifld-argbuf-defn): New proc.
7292         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7293         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7294         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7295         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7296         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7297         New method gen-trace-extract.
7298         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7299         from gen-argbuf-elm, return "" if not caching register address.
7300         Rewrite gen-extract.  New method gen-trace-extract.
7301         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7302         gen-extract, gen-trace-extract, cxmake-get.
7303         (<hw-iaddress>): New method cxmake-get.
7304         (op-needed-iflds): New proc.
7305         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7306         (-gen-op-argbuf-defn): New proc.
7307         (gen-op-extract): Renamed from op:extract.
7308         (gen-op-trace-extract): Renamed from op:trace-extract.
7309         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7310         and rewritten.
7311         (gen-argbuf-elm): Rewrite.
7312         * sim-decode.scm (-gen-record-args): Update.
7313
7314         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7315
7316         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7317         argument position.  Flag symbolic macros in function position as
7318         an error.
7319         (define-pmacro): Handle quoting in definition of symbolic macros.
7320         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7321
7322 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7323
7324         * fr30.opc (parse_register_list): Account for reverse masks
7325         for load and store.
7326         (print_register_list): Ditto.
7327         (parse_low_register_list_ld): New function.
7328         (parse_hi_register_list_ld): New function.
7329         (parse_low_register_list_st): New function.
7330         (parse_hi_register_list_st): New function.
7331         (print_hi_register_list_ld): New function.
7332         (print_hi_register_list_st): New function.
7333         (print_low_register_list_ld): New function.
7334         (print_low_register_list_st): New function.
7335         * fr30.cpu (ldr15dr): Implement workaround.
7336         (ldm0,ldm1,stm0,stm1): Implemented.
7337
7338 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7339
7340         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7341         * configure: Regenerate.
7342         * Makefile.am (WITH_HOBBIT): Update.
7343         (cgen-hob.c): Remove Makefile dependency.
7344         (cgen.o): Depend on cgen-gh.h, config.h.
7345         * Makefile.in: Regenerate.
7346         * aclocal.m4: Regenerate.
7347
7348 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7349
7350         * i960.cpu, i960.opc: New files.
7351
7352 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7353
7354         * fr30.opc (parse_register_number): New function.
7355         (parse_register_list): New function.
7356         (parse_low_register_list): Use parse_register_list.
7357         (parse_hi_register_list): Use parse_register_list.
7358         * fr30.cpu (sth): Fix assembler syntax. Implement more
7359         insns.
7360
7361 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7362
7363         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7364         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7365         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7366         (-op-gen-set-trace-parallel): Ditto.
7367         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7368
7369         * fr30.cpu (call,calld): Fix setting of pc.
7370         (f-op5): Fix start bit number.
7371
7372 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7373
7374         * fr30.cpu (st): Fix operand ordering. Implement more
7375         insns.
7376
7377 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7378
7379         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7380         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7381         (fmt-semantic-operands): Move to sim.scm.
7382         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7383         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7384         (<hw-index>): New method get-name.
7385         (op-profilable?): Moved to sim.scm.
7386         (op-nub): New proc.
7387         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7388         (op-profilable?): Moved here from operand.scm.
7389         (gen-extract-type): Delete.
7390         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7391         (-gen-argfld-ref): New proc.
7392         (-gen-ifld-argfld-name): New proc.
7393         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7394         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7395         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7396         (<hardware-base>): Delete method gen-extract-type.  New method
7397         gen-argbuf-elm.
7398         (<hw-register): Ditto.  Update method gen-extract.
7399         (<operand>, method gen-argbuf-elm): Rewrite.
7400         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7401         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7402         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7403
7404         * sim-decode.scm (-gen-record-args): Tweak.
7405
7406         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7407
7408 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7409
7410         * doc/porting: Fix typo: gas->sim.
7411         * fr30.opc (print_m4): New function.
7412         * fr30.cpu: Implemented many insns.
7413
7414 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7415
7416         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7417
7418         * fr30.cpu (f-rel9): Delete RELOC attribute.
7419         (f-rel12): Add PCREL-ADDR attribute.
7420         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7421         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7422         * fr30.opc (print_label9): Delete.
7423
7424         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7425         code for CTI indicators.
7426         * insn.scm (insn-cti?): Simplify.
7427         * utils-cgen.scm (atlist:cti?): New proc.
7428
7429 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7430
7431         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7432         (f-i20-4,f-i20-16,f-i20): New fields.
7433         (i20): New operand.
7434         (ldi8): Implement.
7435         (ldi20): New insn.
7436         (ldi32m): Delete.
7437         (jmpd): Implement.
7438         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7439         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7440         * mach.scm (arch-data): Ditto.
7441         (current-arch-default-insn-word-bitsize): Renamed from
7442         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7443         (-arch-read): Update.
7444
7445         * hardware.scm (hw:attr-list): Move here ...
7446         * opcodes.scm: ... from here.
7447
7448         * ifield.scm (fld:bitrange): Delete.
7449         (fld:word-offset,fld:word-length): New procs.
7450         (ifield?): Use class-instance.
7451         (<ifield>, method field-start): Rewrite.
7452         (ifld:enum): New proc.
7453         (<ifield>, methods field-mask,field-value): Rewrite.
7454         (-ifield-parse): Rewrite.
7455         (<multi-ifield> support): Rewrite.
7456         (ifld-beyond-base?): Rewrite.
7457         (ifld:std-attrs): New variable.
7458         (ifld:attr-list): New proc.
7459         * iformat.scm (-compute-insn-mask): Rewrite.
7460         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7461         Simplify.
7462         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7463         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7464         onto type.
7465         (<operand>): Ditto.  Forward onto index instead.
7466         (gen-ifld-decls,gen-ifld-defns): New procs.
7467         (ifld:insert,ifld:extract): New procs.
7468         (<ifield>): New methods gen-insert, gen-extract.
7469         (<multi-ifield>): Ditto.
7470         (<hw-index>): Forward gen-insert,gen-extract onto value.
7471         (<hw-asm>): Delete insert/extract support.
7472         (<hw-register,hw-memory,hw-immediate>): Ditto.
7473         (gen-hash-defines): Use string-list.
7474         Define CGEN_MAX_IFMT_OPERANDS.
7475         (gen-switch): Use string-list,string-list-map.
7476         (gen-fget-switch,gen-fset-switch): Use string-list.
7477         (gen-parse-switch,gen-insert-switch): Ditto.
7478         (gen-extract-switch,gen-print-switch): Ditto.
7479         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7480         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7481         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7482         (gen-ivalue-entry): New proc.
7483         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7484         computation.  Use 0 for operand ref table if ALIAS insn.
7485         (gen-minsn-table-entry): Use string-list.
7486         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7487         (gen-opcode-open): Record address of ifield table.
7488         (cgen-opc.h): Call gen-ifld-decls.
7489         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7490         * types.scm (<bitrange>): New members word-offset,word-length.
7491         Delete member total-length.  Delete methods start,mask,value.
7492         (bitrange:word-offset,bitrange:word-length): New procs.
7493         * sim-cpu.scm (gen-define-fields): Simplify.
7494         (gen-extract-fields): Simplify.
7495         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7496         (<ifield>): New methods gen-ifld-extract-decl.
7497         Delete method gen-ifld-extract-beyond.
7498         (<multi-ifield>): New methods gen-ifld-extract-decl.
7499         (<multi-ifield>, method gen-ifld-extract): Implement.
7500         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7501         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7502
7503         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7504         (-rtx-traverse-syntax-no-mode): New proc.
7505         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7506         (s-ifield): New proc.
7507         (s-shop): Don't prepend `unsigned' for unsigned modes.
7508         * rtx-funcs.scm (ifield): New rtx function.
7509         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7510         (delay): New rtx function.
7511         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7512
7513         * cos.scm (-elm-make-method-getter): Fix typo.
7514
7515         * utils.scm (backslash): Handle lists of strings.
7516
7517 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7518
7519         * fr30.cpu (f-rel9): Correct for pc+2.
7520         (label9): Use print_label9.
7521         * fr30.opc (print_label9): New function.
7522
7523 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7524
7525         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7526         * fr30.opc (parse_low_register_list): Renamed.
7527         (parse_hi_register_list): Renamed.
7528         (print_hi_register_list): Renamed.
7529         (print_low_register_list): Renamed.
7530
7531 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7532
7533         * fr30.cpu (f-rel9): Now a pc relative offset.
7534
7535 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7536
7537         * opcodes.scm (op-asm): Move to here, from operands.scm.
7538         (<op-asm>, method parse!): Validate arguments.
7539         (<operand>, method gen-function-name): Fix thinko.
7540         * operand.scm (<operand>, method make!): Don't set op-asm here.
7541         * utils.scm (list-elements-ok?): New proc.
7542
7543         * opcodes.scm: Clean up pass.
7544
7545 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7546
7547         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7548         the fr30_int function.
7549         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7550         (h-dr): Add FUN-ACCESS attribute.
7551
7552 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7553
7554         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7555         for C symbol for models array.
7556
7557 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7558
7559         * fr30.opc (parse_reglist_low): New function.
7560         (parse_reglist_hi): New function.
7561         (print_reglist_low): New function.
7562         (print_reglist_hi): New function.
7563         * fr30.cpu: Finish remaining insn stubs.
7564
7565 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7566
7567         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7568
7569         * fr30.cpu (ldi32m): Don't use for disassembly.
7570
7571 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7572
7573         * fr30.cpu (int): Implement it.
7574
7575 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7576
7577         * rtx-funcs.scm (nop): Fix C code.
7578
7579         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7580
7581         * fr30.cpu (f-i32): New ifield.
7582         (i32): New operand.
7583         (ldi32): New insn.
7584         (ldi32m): New macro insn.
7585         (inte): Provide simple version for now.
7586
7587         * sim-arch.scm: New file.
7588         * sim.scm: Move architecture support generation to sim-arch.scm.
7589         * cgen-sim.scm: Load sim-arch.scm.
7590         * dev.scm: Ditto.
7591
7592         * hardware.scm (pc?) New proc.
7593         (class <hardware-base>): Rewrite method 'pc?.
7594         (class <hardware>): Forward 'pc? to the hardware type.
7595         (class <hw-pc>): New method 'pc?.
7596
7597         Add support for variable length ISAs.
7598         * ifield.scm (ifld-beyond-base?): New proc.
7599         * m32r.cpu: Remove integral-insn? spec.
7600         * mach.scm (arch:derived,arch:set-derived!): New procs.
7601         (arch:app-data,arch:set-app-data!): New procs.
7602         (class <arch>): New members derived, app-data.
7603         (class <cpu>): Delete member integral-insn?.
7604         (cpu:integral-insn?): Delete.
7605         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7606         (-cpu-read): Delete integral-insn? support.
7607         (state:decode-assist): Delete.
7608         (state:int-insn?): Delete.
7609         (<derived-arch-data>): New class.
7610         (-adata-set-derived!): New proc.
7611         (mach-finish!): Call it.
7612         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7613         (gen-operand-instance): Add COND_REF support.
7614         (gen-operand-instance-table): Ditto.
7615         (gen-hash-defines): Update.
7616         (gen-extract-switch): Update type of `insn_value' arg.
7617         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7618         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7619         updated.
7620         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7621         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7622         beyond the base insn (for large insns).
7623         (-gen-extract-beyond-var-list): New proc.
7624         (gen-extract-fields): Handle large insns.
7625         (-gen-write-case): Update sem_arg computation.
7626         Update initial vpc computation.
7627         (gen-semantic-fn): Ditto.  Update type of `insn'.
7628         (-gen-sem-case): Update sem_arg computation.
7629         Update initial vpc computation.
7630         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7631         (-gen-extract-word): New proc.
7632         (<ifield>): New method gen-ifld-extract-beyond.
7633         (gen-ifld-extract-beyond): New proc.
7634         * types.scm (bitrange-overlap?): New proc.
7635
7636         * utils.scm (bits->bytes): New proc.
7637         (bytes->bits): New proc.
7638
7639         Move extraction support into decoder.
7640         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7641         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7642         support to sim-decode.scm.
7643         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7644         be array of IDESC,FMT entries.  Make the array const.
7645         (-gen-gcc-label-table): Make array const.
7646         (-gen-decode-switch): Branch to extraction code after insn has been
7647         identified.
7648         (-gen-decode-insn-globals): Delete extract handler from
7649         @cpu@_insn_sem.
7650         (gen-decode-fn): Add extraction support.
7651         (-gen-sem-fn-decls): Delete extraction fn decls.
7652         (-gen-idesc-decls): Update @cpu@_decode decl.
7653         (-gen-idesc-init-fn): Delete extraction support.
7654         (-gen-extract-decls): New proc.
7655
7656         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7657         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7658
7659         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7660         All callers updated.
7661         (table-entry:make): Record insn value as insn object, not name.
7662         All uses updated.
7663
7664         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7665         collision with C function.
7666         (path_dirname): Similarily.
7667         * hobbit.c,hobbit.h: Rebuild.
7668
7669 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7670
7671         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7672
7673 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7674
7675         * fr30.cpu: Implement more instruction stubs.
7676
7677 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7678
7679         * fr30.cpu: Implement more instruction stubs.
7680
7681 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7682
7683         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7684
7685         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7686
7687         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7688         (op:std-attrs): Ditto.
7689         * opcodes.scm (gen-operand-instance): Ditto.
7690         (gen-switch): Ditto.
7691         * m32r.cpu (condbit,accum): Update.
7692         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7693
7694 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7695
7696         * enum.scm (-enum-read): Fix typo.
7697
7698         * iformat.scm (-ifmt-search-key): Simplify a little.
7699
7700 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7701
7702         * doc/porting: semantics.c -> sem.c.
7703         * Makefile.in: Regenerate.
7704         * fr30.cpu (add): Change ADD to add. Add more registers and set
7705         status bits on 'add' instruction.
7706
7707 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7708
7709         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7710         of 0.
7711
7712 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7713
7714         * minsn.scm (minsn:enum): Update, call current-arch-name.
7715
7716         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7717
7718         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7719         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7720         (ARCH,CGEN,CGENFLAGS): New variables.
7721         (gas-test,sim-test): New rules.
7722         * Makefile.in: Rebuild.
7723         * configure.in (arch): Define.
7724         * configure: Rebuild.
7725
7726         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7727         * All .scm files: Ditto.
7728
7729         * dev.scm: Fix gas-test call to cpu-load.
7730         * gas-test.scm: Clean up pass to remove bit-rot.
7731         * sim-test.scm: Ditto.
7732
7733         * enum.scm (read-enum): Fix typo in `vals' handling.
7734
7735         * hardware.scm (-parse-hw-type): Fix typo.
7736         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7737         (def-hardware,define-normal-hardware): Ditto.
7738
7739         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7740         (display-var): Use it.
7741         * hobbit.c: Rebuild.
7742         * hobbit.h: Rebuild.
7743
7744         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7745         avoid hobbit problem.
7746         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7747         `parallel-insns-' to avoid hobbit problem.
7748
7749 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7750
7751         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7752         (parse_slo16,parse_ulo16): Ditto.
7753         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7754
7755 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7756
7757         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7758         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7759         * Makefile.in: Rebuild.
7760         * insn.scm (define-normal-insn): Expand pmacros.
7761         * mode.scm (<mode>): New member `host?'.  All uses updated.
7762         (mode:host?): New proc.
7763         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7764         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7765         (define-rtx-dual-mode): Ditto.
7766         (s-index-of): New proc.
7767         (s-unop): Use plain C for host mode operations.
7768         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7769         * rtx-funcs.scm (index-of): New rtx function.
7770         * sim.scm (<hw-index>): New method cxmake-get.
7771
7772 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7773
7774         * sim-cpu.scm (-gen-engine-decls): Delete.
7775
7776 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7777
7778         * doc/rtl (Example): Correct Typo.
7779         * doc/porting: Add 'make dep' step to opcodes port instructions.
7780         * fr30.opc: New file.
7781         * fr30.cpu: New file.
7782
7783 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7784
7785         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7786         * Makefile.am (GUILEINCDIR): New variable.
7787         (INCLUDES): Use it.
7788         * configure: Regenerate.
7789         * Makefile.in: Ditto.
7790         * aclocal.m4: Ditto.
7791
7792 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7793
7794         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7795         (cgen-semantics.c): Ditto.
7796         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7797         * sim-model.scm (cgen-model.c): Ditto.
7798         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7799         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7800
7801         * opcodes.scm (read-cpu.opc): Handle empty file.
7802
7803         * cos.scm (-elm-make-method-setter): Fix typo.
7804
7805         * cpu.scm (-init-parse-cpu!): Call types-init!.
7806         (-finish-parse-cpu!): Call types-finish!.
7807         * ifield.scm (<ifield>): Delete members start,length.
7808         New member bitrange.
7809         (<ifield>, methods field-start,field-length): Update.
7810         (fld:start): New arg insn-len.  All callers updated.
7811         (<ifield>, methods field-mask,field-value): Update.
7812         (-ifield-parse): Update.
7813         (ifield-init!): Update.
7814         * iformat.scm (compute-insn-length): Simplify.
7815         (compute-insn-mask): Update.
7816         * insn.scm (insn:value): Update.
7817         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7818         (current-arch-default-insn-bitsize): New proc.
7819         (current-arch-insn-lsb0?): New proc.
7820         (-arch-parse,-arch-read): Update.
7821         (<cpu>): New member file-transform.
7822         (-cpu-parse,-cpu-read): Update.
7823         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7824         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7825         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7826         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7827         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7828         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7829         * operand.scm (op:start): Update call to field-start method.
7830         * sim-decode.scm (opcode-slots): New arg lsb0?.
7831         (fill-slot!,build-slots): Ditto.
7832         (build-decode-table-entry,build-decode-table-guts): Ditto.
7833         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7834         (gen-decode-fn): Ditto.
7835         (cgen-decode.c): Update call to gen-decode-fn.
7836         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7837         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7838         (cgen-cpuall.h): Call -gen-cpuall-includes.
7839         * types.scm (<bitrange>): New class.
7840         (types-init!,types-finish!): New procs.
7841         * utils-cgen.scm (parse-number): New proc.
7842         (parse-boolean): New proc.
7843         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7844         (word-mask): Rewrite.
7845         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7846         (m32rxf): New field `file-transform'.
7847         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7848
7849         * hobbit.h: Fix include file name.
7850
7851 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7852
7853         * slib: New directory of slib files used by cgen/hobbit.
7854         * hobbit.scm: New file.
7855         * hobbit.c: New file.
7856         * hobbit.h: New file.
7857         * hobscmif.h: New file.
7858         * hob-main.c: New file.
7859         * hobslib.scm: New file.
7860         * hob.sh: New file.
7861         * Makefile.am: Add support for compiling hobbit, and using compiled
7862         version of hobbit to compile cgen.
7863         * Makefile.in: Regenerate.
7864         * configure.in: Support --with-hobbit.
7865         * configure: Regenerate.
7866         * acconfig.h (WITH_HOBBIT): Add.
7867         * config.in: Regenerate.
7868
7869         * rtl.scm: New file, was cdl-c.scm.
7870         Definition of rtx funcs moved to rtx-funcs.scm.
7871         (semantic-in-out-operands): Rewrite to compute object form of
7872         semantic code.
7873         * rtx-funcs.scm: New file.
7874
7875         * cgen-gh.c: #include "config.h".
7876         (gh_cadddr,gh_cddddr): New fns.
7877         (cgh_vector_to_list): New fn.
7878         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7879         (cgh_init): Prefix qsort procs with "cgh-".
7880         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7881         * cgen.c: #include "config.h".
7882
7883         * attr.scm (bitset-attr?): New proc.
7884         (<bitset-attribute>, method parse-value): Value syntax changed from
7885         (val1 val2 ...) to val1,val2,....
7886         (<bitset-attribute>): New method gen-value.
7887         (<integer-attribute>): New method gen-value.
7888         (<enum-attribute>): New method gen-value.
7889         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7890         (<reader>): New class.
7891         (CURRENT-ARCH,CURRENT-READER): New globals.
7892         (keep-mach?): Move here from mach.scm.
7893         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7894         (<arch>): New class.
7895         (<arch-data>): New class.
7896         (<cpu>): Make subclass of <ident>.
7897         (*ENDIAN* variables): Delete.
7898         (process-state-vars): Delete.
7899         (mach-finish!): Add `base' value to MACH attribute.
7900         * hardware.scm (<hardware>): Make subclass of <ident>.
7901         (hw:std-attrs): New global.
7902         (hw-profilable?): New proc.
7903         * ifield.scm (<ifield>): Make subclass of <ident>.
7904         (sort-ifield-list): Move here from iformat.scm.
7905         * iformat.scm (<iformat>): Renamed from <insn-format>.
7906         Make subclass of <ident>.
7907         (-ifmt-search-key): Include cti? in categorization of formats.
7908         (ifmt-analyze): Compile semantics (turn to object form).
7909         * insn.scm (<insn>): Make subclass of <ident>.
7910         New member compiled-semantics.
7911         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7912         * mode.scm (<mode>): Make subclass of <ident>.
7913         (UBI): Delete.
7914         * model.scm (<unit>): Make subclass of <ident>.
7915         New members inputs,outputs.
7916         (<model>): Make subclass of <ident>.  New member state.
7917         (-unit-parse): Parse inputs,outputs.
7918         (<iunit>): New class.
7919         (-insn-timing-parse-model): New proc.
7920         (parse-insn-timing): Function unit spec rewritten.
7921         * operand.scm (<operand>): Make subclass of <ident>.
7922         New members sem-name,num,cond?  New method gen-pretty-name.
7923         (hw-index-scalar): New global.
7924         (op-nub-hw): Move here from rtl.scm.
7925         (op:lookup-sem-name,op-profilable?): New procs.
7926         * pmacros.scm: Rewrite to pass through hobbit.
7927         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7928         * utils.scm (logit): Make a macro.
7929         (bit-set?): Rewrite.
7930         (high-part): Rewrite.
7931
7932         * m32r.cpu (define-arch): Move to top of file.
7933         (cpu family m32rbf): Renamed from m32rb.
7934         (model m32r/d): Function unit spec rewritten.
7935         (all insns): Ditto.  Replace UBI with BI.
7936
7937         * opcodes.scm (gen-attr-table-decls): Declare
7938         @arch@_cgen_hw_attr_table.
7939         (gen-attr-table-defns): Generate hw attribute table.
7940
7941         * sim-cpu.scm (-gen-engine-decls): New proc.
7942         (-gen-model-decls): New proc.
7943         (gen-parallel-exec-type): Add new member `written' to struct parexec.
7944         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7945         (-gen-record-profile-args): Simplify.
7946         (-gen-parallel-sem-case): Delete.
7947         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7948         New local `written'.  Delete profiling code.
7949         (-gen-sem-case): Ditto.
7950         (-uncond-written-mask,-any-cond-written?): New procs.
7951         (cgen-sem-switch.c): Include duplicates of insns that can be executed
7952         parallelly or serially, and write-back handlers for all parallel insns.
7953         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7954         support to initialization of struct insn_sem.
7955         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7956         (-gen-insn-sem-type): Add parallel write-back support to struct
7957         insn_sem.
7958         (-gen-idesc-init-fn): Add support for virtual insns.
7959         Add parallel write-back support.
7960         * sim-model.scm (gen-model-profile-fn): Delete
7961         (-gen-model-fn-decls): New proc.
7962         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7963         (-gen-model-init-fn): New proc.
7964         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7965         members in @mach@_init_cpu.
7966         (cgen-model.c): Generate model handlers for each insn.
7967         * sim.scm (gen-define-field-macro): Cti insns handled differently.
7968         (<hw-pc>): New method gen-write.
7969         (<hw-register>, method gen-write): New arg `mode'.
7970         (<hw-register>): Delete method gen-record-profile!.
7971         New method gen-profile-index-type.
7972         (<hw-memory>, method gen-write): New arg `mode'.
7973         (<hw-address>, method gen-extract): Delete.
7974         (<hw-address>, method gen-write): New arg `mode'.
7975         (<hw-index>, method get-write-index): Rewrite.
7976         (<pc>, method cxmake-get-direct): Delete.
7977         (<pc>): New method cxmake-get.  Comment out methods
7978         gen-set-quiet,gen-set-trace.
7979         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7980         gen-profile-index-type,gen-profile-code.
7981         Delete method gen-pretty-name.  Rewrite method gen-write.
7982         Delete method cxmake-get-direct.
7983         (-op-gen-set-trace): Update `written'.
7984         (-op-gen-set-trace-parallel): Ditto.
7985         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7986         (gen-cpu-insn-enum-decl): Add extra entries for parallel
7987         insns and their write-back handlers.
7988         (insn-op-lookup): New proc.
7989         (<unit>): New method gen-profile-code.
7990         (<iunit>): New method gen-profile-code.
7991         (gen-argbuf-elm): Add profiling elements.
7992         (gen-argbuf-type): Define cti insns separately in their own struct.
7993         Add member `addr_cache' to this struct.  Add entries for pbb virtual
7994         insns.  Move semantic entries here from struct scache.
7995         Delete everything from struct scache except argbuf.
7996         (<insn>, method gen-profile-locals): Rewrite.
7997         (<insn>, method gen-profile-code): Rewrite.
7998         (sim-finish!): Create virtual pbb insns.
7999
8000 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8001
8002         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8003         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8004         (h-psw,h-bpsw,h-bbpsw): Define.
8005         (rte,trap): Handle bbpc,bbpsw.
8006         * opcodes.scm (max-operand-instances): Fix typo.
8007         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8008         hardware elements to be fun-access.
8009         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8010
8011 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8012
8013         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8014
8015 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8016
8017         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8018
8019 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8020
8021         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8022         architecture name.
8023         (mach m32r): Update.
8024
8025         * mach.scm (mach:supports?): New proc.
8026         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8027         gen-reg-access-{decls,defns}.
8028         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8029         (gen-mach-bfd-name): New proc.
8030         (gen-arch-reg-access-{decls,defns}): New procs.
8031         (cgen-arch.[ch]): Output register access cover fns.
8032
8033         * hardware.scm (hardware-builtin!): Set print handlers for
8034         h-addr,h-iaddr.
8035         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8036         `od'.
8037         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8038         (my_print_insn): Ditto.  Delete args buf, buflen.
8039         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8040         (-hw-asm-specs): Add `handlers' spec.
8041         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8042         `normal-hw-asm'.
8043         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8044         print.
8045         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8046         (<hw-asm>, parse!): New method.
8047         (gen-insn-table-entry): Print semantics.
8048         (gen-opcode-open): Renamed from gen-opcode-table.
8049
8050         * utils.scm (string-write): No longer a macro.
8051         (-string-write): Handle procedure args.
8052         * opcodes.scm: Update all calls to string-write.
8053         * sim-cpu.scm: Ditto.
8054         * sim-decode.scm: Ditto.
8055         * sim-model.scm: Ditto.
8056         * sim.scm: Ditto.
8057
8058 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8059
8060         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8061         (-gen-insn-builders,-gen-insn-builder): New procs.
8062
8063 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8064
8065         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8066         (gen-opcode-table): Properly terminate comment.
8067
8068 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8069
8070         * Version 0.6.0.
8071         Clean up pass over everything, so starting fresh.