OSDN Git Service

Merge branch 'master' of github.com:monaka/binutils
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2010-01-04  Doug Evans  <dje@sebabeach.org>
2
3         * gen-all (all_cgen_cpus): Add sh.
4
5 2010-01-02  Doug Evans  <dje@sebabeach.org>
6
7         * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
8
9 2009-12-17  Doug Evans  <dje@sebabeach.org>
10
11         * mep.opc: Apply patches from opcodes to compile with -Wshadow.
12         mep-asm.c now regenerates correctly again.
13         
14         * gen-all: Add support for building gcc/newlib.
15         Specify --prefix and install all built tools.
16
17 2009-12-16  Doug Evans  <dje@sebabeach.org>
18
19         * sim.scm (/op-gen-written-update): Disable operand number is too
20         large warning, for now.
21
22 2009-12-11  Nick Clifton  <nickc@redhat.com>
23
24         * cpu/fr30.opc: Fix shadowed variable warnings.
25
26 2009-12-10  Doug Evans  <dje@sebabeach.org>
27
28         * gen-all: Rewrite.  Build more ports.  Split out building of sid.
29
30 2009-11-23  Doug Evans  <dje@sebabeach.org>
31
32         * hardware.scm (hw-pc?): New function.
33         * ifield.scm (ifld-signed?): New function.
34         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
35         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
36         (insn-cti?): New function.
37         * rtl.scm (/hw): Create <pc> object for pcs.
38         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
39         All callers updated.  Watch for sets to the pc.
40         (semantic-attrs): Watch for sets to the pc.
41         * sid.scm (<pc> cxmake-get): Handle raw-reg.
42         * sim.scm (<pc> cxmake-get): Handle raw-reg.
43         (<operand> cxmake-get): Add debugging printf.
44         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
45         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
46         (/gen-extract-word): Ditto.
47
48         * utils.scm (gen-c-hex-constant): New function.
49         * utils-sim.scm (/gen-decode-insn-entry): Call it.
50
51 2009-11-22  Doug Evans  <dje@sebabeach.org>
52
53         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
54         * read.scm (parse-error-continuable): New function.
55         (define /continuable-error-found?): New variable.
56         (/init-reader!): Initialize it.
57         (/finish-reader!): New function.
58         (cpu-load): Call it.
59         * utils-cgen.scm (obj-list-nub): New function.
60
61         * mach.scm (<derived-arch-data>): New member large-insn-word?.
62         (/adata-set-derived!): Set it.
63         (adata-large-insn-word?): New function.
64         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
65         here.
66         * sim-cpu.scm (cgen-cpu.h): #include it here.
67         (/gen-cpu-defines): Define CGEN_INSN_WORD.
68         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
69         CGEN_INSN_INT.
70         * sim-decode.scm (/gen-idesc-decls): Ditto.
71         (/gen-extract-case, /gen-decode-fn): Ditto.
72         * sim-model.scm (/gen-model-insn-fn): Ditto.
73         * sim.scm (gen-argbuf-type): Ditto.
74
75         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
76         (s-sequence): Call it.
77
78 2009-11-21  Doug Evans  <dje@sebabeach.org>
79
80         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
81         non-VOID-mode expressions with multiple statements.
82
83         * sim.scm (/operand-number-elaboration-written?): New variable.
84         (/op-gen-written-update op): New function.
85         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
86
87         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
88
89         * operand.scm (op-nub): Delete.
90
91         * dev-utils.scm: New file.
92         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
93         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
94         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
95         /loaded-file-record!, maybe-load): Delete.
96         Load cgen files directly instead of via maybe-load.
97
98 2009-11-14  Doug Evans  <dje@sebabeach.org>
99
100         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
101         expressions used in a void context.
102
103         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
104
105         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
106         * cpu/xc16x.opc: Ditto.
107
108 2009-11-12  Doug Evans  <dje@sebabeach.org>
109
110         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
111
112         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
113         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
114
115 2009-11-11  Doug Evans  <dje@sebabeach.org>
116
117         * html.scm (gen-insn-docs): Add logging message.
118
119 2009-11-05  Doug Evans  <dje@sebabeach.org>
120
121         * utils-cgen.scm (gen-set-macro2): New function.
122         * sim.scm (<hw-register> gen-get-macro): Call it.
123
124         * co-for-gen-all: New file.
125
126         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
127
128         * utils.scm (reduce): Delete.
129
130         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
131
132         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
133         regarding PREFIX attribute handling.
134
135         * operand.scm (<hw-index>): Add enum to possible types, all uses
136         updated.
137         (hw-index-constant?, hw-index-constant-value): New functions.
138         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
139         hw-index-enum-obj): New functions.
140         (/operand-parse): Handle enum indices.
141         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
142         hw-index-constant-value.
143         * rtl.scm (rtx-constant-value): Fix handling of enums.
144         * rtx-funcs.scm (enum): Ditto.
145         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
146         currently supported here.
147
148 2009-11-02  Doug Evans  <dje@sebabeach.org>
149
150         Specify isa(s) when doing ifield, operand, insn lookups.
151         ACU = all callers updated.
152         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
153         * enum.scm (define-full-insn-enum): Pass isa-name-list to
154         current-ifld-lookup.
155         * html.scm (get-insn-properties): Pass isa-name-list to
156         current-op-lookup.
157         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
158         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
159         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
160         (/parse-insn-format, syntax-break-out): Ditto.
161         * mach.scm (obj-filter-by-isa): New function.
162         (current-ifld-lookup): New optional arg maybe-isa-name-list.
163         (/ifld-already-defined?, /op-already-defined?): Simplify.
164         (current-op-lookup): New optional arg maybe-isa-name-list.
165         (current-insn-lookup): New arg isa-name-list, ACU.
166         (/insn-already-defined?, /minsn-already-defined?): Simplify.
167         (current-minsn-lookup): New arg isa-name-list, ACU.
168         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
169         current-op-lookup.
170         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
171         (gen-syntax-entry): Ditto.
172         * operand.scm (/operand-parse): Pass isa-name-list to
173         current-ifld-lookup.
174         (/derived-parse-encoding): New arg isa-name-list, ACU.
175         (/derived-parse-ifield-assertion): Ditto.
176         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
177         (/anyof-parse-choice): Ditto.
178         (anyof-satisfies-assertions?): Pass context to rtx-solve.
179         (/anyof-merge-syntax): New arg container, ACU.
180         (operand-builtin!): Add pc to all isas.
181         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
182         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
183         (rtl-c-parsed, rtl-c++-parsed): Ditto.
184         (rtl-c): New arg isa-name-list, ACU.
185         (rtl-c-expr, rtl-c++): Ditto.
186         (closure): New arg isa-name-list, ACU.
187         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
188         (/cstate-isas): New function.
189         (/rtx-canon-symbol-list): New function.
190         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
191         updated.
192         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
193         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
194         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
195         (rtx-canonicalize): New arg isa-name-list, ACU.
196         (rtx-canonicalize-stmt): Delete.
197         (tstate-make): New arg isas, ACU.
198         (tstate-isas, tstate--set-isas!): New functions.
199         (tstate-env-stack): Renamed from tstate-env, ACU.
200         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
201         (tstate-make-closure): Renamed from tstate-new-env, new arg
202         isa-name-list, ACU.
203         (/rtx-traverse-env): Delete.
204         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
205         SUMBOLLIST.
206         (/rtx-traverse): Include conditional flag in dump output.
207         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
208         (<eval-state>): New member isas.  Rename env to env-stack.
209         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
210         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
211         to env-stack.
212         (estate-make-for-eval): Provide #:isas.
213         (estate-make-closure): Renamed from estate-new-env.  New arg
214         isa-name-list, ACU.
215         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
216         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
217         (/rtx-trim-for-doc): Handle closures.
218         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
219         SYMBOLLIST.
220         (rtx-env-var-list): Delete.
221         (rtx-env-make): Handle already-compiled environments.
222         (rtx-var-alist-to-env): New function.
223         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
224         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
225         (rtx-operand-obj): New arg isa-name-list, ACU.
226         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
227         functions.
228         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
229         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
230         (/frag-compute-desired-frags): Minor simplification.
231         (/frag-pick-best): Ditto.
232         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
233         (/gen-sfrag-code): Update.
234         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
235         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
236         * utils.scm (non-null-intersection?): New function.
237
238         * gen-all (do_src): Manually run cgen-all for sid.
239
240 2009-11-01  Doug Evans  <dje@sebabeach.org>
241
242         * gen-all: New file.
243
244         * rtl-traverse.scm (/rtx-canon): Issue better error message for
245         invalid rtx function names.
246
247 2009-10-28  Doug Evans  <dje@sebabeach.org>
248
249         * cos.scm (object-assign!): New function.
250         * mode.scm (/mode-set-word-params!): Call it.
251
252 2009-10-25  Doug Evans  <dje@sebabeach.org>
253
254         Record bitset attributes internally as a list.
255         Record rtx attribute values internally as ((rtx-expr)).
256         * attr.scm (bitset-attr?): Delete, unused.
257         (<bitset-attribute> parse-value): Rewrite.
258         (/attr-parse): Rewrite bitset default value processing.
259         (/attr-read): Pick out values of scalar attributes to distinguish
260         them from bitset values which are a list.
261         Fix spelling errors for processing of default values.
262         Handle string attributes.
263         (bitset-attr->list): Delete, all callers updated.
264         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
265         All callers updated.
266         (atlist-source-form): Rewrite.
267         * hardware.scm (<hardware-base> 'get-isas): Update recognition
268         of all isas.
269         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
270         -> (ISA foo bar).
271         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
272         values are now lists.
273         * mach.scm (def-isa-attr!): Update, bitset attribute values,
274         including the default, are now lists.
275         (all-isas-attr-value): Result is now a list.
276         * doc/rtl.texi: Clean up pass over attribute docs.
277
278         Change internal representation of rtx attribute values.
279         * attr.scm (/attr-val-is-rtx?): New function.
280         (attr-value): Call it.
281         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
282         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
283         Disallow rtx values for bitset attributes.
284         (/attr-read): Record rtx in default value as ((rtx-expr)).
285         (/attr-eval): Update.
286
287 2009-10-24  Doug Evans  <dje@sebabeach.org>
288
289         * gen-all-doc: Add sh.cpu.
290         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
291         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
292
293         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
294         (/gen-sfrag-case): Ditto.
295         * sim-cpu.scm (/gen-sem-case): Ditto.
296
297         * doc/rtl.texi: Add note that different ifields, operands, insns,
298         and minsns may occur with the same name in different isas.
299         Add note on the canonical form of rtl expressions.
300
301 2009-10-23  Doug Evans  <dje@sebabeach.org>
302
303         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
304         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
305
306         * decode.scm: Tweak various comments.
307         (/opcode-slots): Add FIXME.
308         (/build-decode-table-guts): Add assert.
309         * utils-sim.scm (/gen-set-itype-and-extract): New function.
310         (/gen-bracketed-set-itype-and-extract): New function.
311         (/gen-decode-default-entry): Rewrite.
312         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
313         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
314         updated.  Don't unnecessarily emit check for whether all opcode bits
315         have been examined.
316         (/gen-decode-expr-set-itype): Delete.
317         (/gen-decode-expr-entry): Update.
318         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
319         updated.  Keep track of decoder tables used thus far.
320         (/gen-decoder-switch): Ditto.
321         * utils.scm (word-bit-value): New function.
322
323 2009-10-14  Doug Evans  <dje@sebabeach.org>
324
325         * ifield.scm (<ifield>, value): Provide default initial value.
326         (ifield-encode-mode): Delete
327         (ifield-decode-mode): Delete duplicate definition.
328         (<derived-ifield>, 'make!): Initialize members encode, decode.
329         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
330         ifld-encode-mode.
331         (<multi-ifield>, 'gen-insert): Ditto.
332         
333 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
334
335         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
336         for @foo@_init_idesc_table.
337
338 2009-09-30  Doug Evans  <dje@sebabeach.org>
339
340         * doc/intro.texi: Mention SID.
341         * doc/sim.texi: Ditto.
342         * doc/porting.text (Doing a simulator port): Add some text.
343
344 2009-09-27  Doug Evans  <dje@sebabeach.org>
345
346         * cos.scm (/class-table): New global.
347         (/class-uid, /class-set-uid!): New functions.
348         (/class-parent-name): Renamed from /class-parents.
349         (/class-make!): Change parents arg to parent-name, all callers updated.
350         Assign uid to class.
351         (/class-lookup-uid): New function.
352         (/class-parent-classes): Rewrite.
353         (/class-mi?): Delete.
354         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
355         Delete.
356         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
357         (/class-compute-class-desc, class-desc-dump): Update.
358         (/object-make!): Update.
359         (/object-make-with-values!): Delete arg class-desc, all callers
360         updated.
361         (/object-copy): Delete arg top?, all callers updated.
362         (/object-specialize): Delete.
363         (/object-elements, /object-top-class): Delete.
364         (/object-class-name, /object-class-desc): Update.
365         (/object-class-uid): New function.
366         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
367         class-make, /class-subclass? /class-lookup-element,
368         Update.
369         (/elm-delta, elm-list): Delete.
370         (/elm-make-method-getter, elm-get, elm-xget): Update.
371         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
372         (elm-make-getter, elm-make-setter): Update.
373         (/method-lookup-next): Update.
374         (send): Don't specialize class passed to method.
375         (send-next): New arg class-name, all callers updated.
376         (/class-parent, /class-parent-via-path, object-parent): Delete.
377         (class-cons-parent!, class-append-parent!): Delete.
378         (object-reset!): Init /class-table.
379
380         * cos.scm (/object-debug-classes): Delete.
381         (/object-debug-elements, /object-debug-methods): Delete.
382
383         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
384         (method-proc): Delete.
385         (method-make-virtual!, method-make-virtual-forward!): Delete.
386         * ifield.scm (<ifield> field-start): Update.
387         (<ifield> field-length, pretty-print): Update.
388         (<multi-ifield> field-length, field-start, pretty-print): Update.
389         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
390         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
391         (<array> gen-sym-defn): Ditto.
392         (<hardware-base> gen-defn): Renamed from gen-defn.
393         (<hw-register> gen-type): Update.
394         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
395         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
396         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
397         (<hw-immediate> gen-type): Update.
398         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
399         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
400         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
401         (<array> gen-sym-defn): Ditto.
402         (<hardware-base> gen-defn): Renamed from gen-defn.
403         (<hw-register> gen-type): Update.
404         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
405         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
406         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
407         (<hw-immediate> gen-type): Update.
408         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
409
410 2009-09-25  Doug Evans  <dje@sebabeach.org>
411
412         * operand.scm (/anyof-merge-setter): Handle set-quiet.
413         * rtl.scm (rtx-single-set?): Handle set-quiet.
414
415         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
416         rtl-cover-fns?, macro?.  All callers updated.
417         (estate-make-for-normal-rtl-c): Delete, have all callers call
418         estate-make-for-rtl-c directly.
419         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
420         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
421
422         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
423         replaces /par-replace-set-dests.
424         (/par-replace-set-src-expr-fn): New function, replaces
425         /par-replace-set-srcs.
426         (s-parallel): Rewrite.
427
428         * rtl.scm (rtx-pretty-strdump): New function.
429         * rtl-traverse.scm (/rtx-canon-error): Use it.
430         (<eval-state>): New member outer-expr.
431         (estate-error): Include outer expression in error message if present.
432
433 2009-09-23  Doug Evans  <dje@sebabeach.org>
434
435         * xc16x.cpu (h-cr): New hardware.
436         (muls): Comment out parts that won't compile, add fixme.
437         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
438         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
439         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
440
441         Rewrite rtl processing to require it to be "canonicalized" first,
442         and write a full canonicalizer / expression checker.
443         Remove all appearances of DFLT in canonical rtl.
444         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
445         then rtx-simplify.
446         * iformat.scm (ifmt-analyze) Use canonical semantics.
447         * insn (<insn>): New member canonical-semantics.
448         * mach.scm (<arch>): New member multi-insns-instantiated?.
449         (/instantiate-multi-insns!): New function.
450         (/canonicalize-insns!): New function.
451         (arch-analyze-insns!): Canonicalize insn semantics before processing
452         them.
453         * mode.scm (/mode-set-word-params!): New function.
454         (mode-void?): New function.
455         (mode-compatible?): VOID is compatible with VOID.
456         (/mode-word-sizes-defined?): New global.
457         (mode-set-word-modes!): Use/set it.
458         (mode-ensure-word-sizes-defined): Update.
459         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
460         Redo WI/UWI/AI/IAI handling.
461         (op:new-mode): No longer accept DFLT.
462         (<derived-operand> constructor): Ensure all fields are initialized.
463         (<anyof-operand> constructor): Ditto.
464         (/derived-parse-ifield-assertion): Delete arg `args'.
465         All callers updated.
466         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
467         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
468         (rtl-c-expr, rtl-c++): Ditto.
469         (/rtl-c-get): Use mode of operand, not containing expression.
470         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
471         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
472         estate-for-insn? instead.
473         (s-unop): Use mode of expression, not first operand.
474         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
475         (s-sequence): Remove DFLT support.
476         (ifield): Use mode of expression, not UINT.
477         (pc): Comment out, unused.
478         (int-attr): New rtx kind.
479         (attr): Deprecate.
480         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
481         * rtl-traverse.scm (/rtx-canon-debug?): New global.
482         (/make-cstate): New function.
483         (/cstate-context, /cstate-outer-expr): New functions.
484         (/rtx-canon-error): New function.
485         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
486         /rtx-get-last-cond-case-rtx): New functions.
487         (/rtx-canon-*): New functions.
488         (/rtx-canner-table, /rtx-operand-canoners): New globals.
489         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
490         (/rtx-option, /rtx-option-list?): Rewrite.
491         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
492         Rewritten, all callers updated.
493         (/rtx-canon-expr, /rtx-canon): New functions.
494         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
495         (rtx-canonicalize-stmt): New function.
496         (tstate-make): Remove arg `set?'.  All callers updated.
497         (tstate-new-set?): Delete.
498         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
499         moved to /rtx-canon-*.
500         (/rtx-traverse-normal-operand): New function.
501         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
502         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
503         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
504         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
505         Ditto.
506         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
507         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
508         (/rtx-make-traverser-table): Update.
509         (/rtx-traverse-operands): Remove mode processing, now done during
510         canonicalization.
511         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
512         (/rtx-traverse): Ditto.
513         (rtx-init-traverser-tables!): New function.
514         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
515         (rtx-verify-no-dflt-modes): New function.
516         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
517         (rtx-simplify-insn): Use insn-canonical-semantics.
518         (rtx-canonicalize): Moved to rtl-traverse.scm.
519         (/compile-expr-fn, rtx-compile): Delete.
520         (/rtx-trim-rtx-list): New function.
521         (/rtx-trim-for-doc): Handle set, if.
522         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
523         (/rtx-valid-mode-types): Update.
524         (/rtx-valid-matches): Update.
525         (/rtx-find-matchexpr-index): New function.
526         (rtx-lookup): Require rtx-kind to be the rtx name.
527         (def-rtx-node): New arg result-mode, all callers updated.
528         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
529         (rtx-lazy-sem-mode): Delete.
530         (/rtx-closure-make): New arg `mode', all callers updated.
531         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
532         (rtx-operand-obj): Rewrite.
533         (rtx-make-xop): New functions.
534         (/hw): Renamed from `hw', all callers updated.
535         Use the correct mode instead of DFLT for the index.
536         (rtl-builtin!): Call rtx-init-traversal-tables!.
537         (rtl-finish!): Update.
538         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
539         Update mode arg-type.
540         (pc): Comment out.
541         (int-attr): New rtx kind.
542         (attr): Deprecate.
543         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
544         (/frag-cost-compute!): Ditto.
545         * semantics.scm (/build-operand!): Delete args op-name, op.
546         New arg op-expr.  All callers updated.
547         (/build-mem-operand!): Remove DFLT support.
548         (semantic-compile): Update process-expr!, mode arg deleted.
549         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
550         rtl-c++ calls.
551         (/gen-sem-case, /gen-sfrag-code): Ditto.
552         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
553         (/op-gen-set-trace): New function.  If not doing profiling, or using
554         the pbb engine, call /op-gen-set-quiet.
555         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
556         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
557         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
558         * utils.scm (find-first-index): New function.
559         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
560
561         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
562         to COMPARE.
563         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
564
565 2009-09-21  Doug Evans  <dje@sebabeach.org>
566
567         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
568         All callers updated.  Add FIXME.
569         (all rtx functions): Rename local estate to *estate*.  It's an
570         artificial argument added to the rtx, so make it stand out.
571
572         * openrisc.cpu (or32 isa): Fix setup-semantics.
573
574         * rtl.scm (rtx-class-*?): Delete, unused.
575         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
576
577         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
578         (init-reader!): Set /CGEN-RTL-VERSION to default.
579
580         * read.scm (cpu-load): Print load parameters.
581
582         * dev.scm (load-doc): Set verbose-level to 2.
583
584 2009-09-20  Doug Evans  <dje@sebabeach.org>
585
586         * rtl.scm (rtx-strdump): Use write instead of display.
587
588 2009-09-17  Doug Evans  <dje@sebabeach.org>
589
590         * utils-cgen.scm (obj-csv-names): New function.
591         * utils-sim.scm (/sfmt-contents): Use it in logging message.
592
593 2009-09-12  Doug Evans  <dje@sebabeach.org>
594
595         Clean up pass of mode handling.
596         Make use of mode name vs <mode> object more consistent and clear.
597         * hardware.scm (/keyword-read): Default mode to the mode name,
598         not the <mode> object.
599         (/hw-parse-indices): Parse mode name and pass mode object to
600         <hw-asm> constructor.
601         (/hw-parse-values): Ditto.
602         (<hw-register> parse!): Pass mode name to /hw-parse-indices
603         and /hw-parse-values.
604         (<hw-memory> parse!): Ditto.
605         (<hw-address> parse!): Ditto.
606         * mode.scm (/mode-table): New global, replaces mode-list.
607         Modes stored in hashtable instead of list.
608         (/mode-class-table): New global.
609         (mode-list-non-alias-values): Update.
610         (mode:eq?, mode-compatible?, mode:add!): Update.
611         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
612         (mode-maybe-lookup): New function.
613         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
614         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
615         (mode-find, mode-set-word-modes!): Update
616         (mode-ensure-word-sizes-defined): Update.
617         (/sort-mode-classes!): New function.
618         (mode-builtin!): Update.  Sort mode classes here.
619         (mode-finish!): Sort mode classes here too.
620         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
621         All callers updated.
622         (rtl-c-set-quiet): Allow mode to be name of object.
623         (rtl-c-set-trace): Ditto.
624         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
625         <mode> object.  All callers updated.
626         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
627         (rtx-lazy-sem-mode): Ditto.
628         (<rtx-temp> make!): Assert mode arg is a <mode> object.
629         (rtx-env-make): Allow var-list modes to be name or object.
630         * sem-frags.scm (/frag-expr-assq-locals): New function.
631         (/frag-compute-locals!): Call it.
632         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
633         All callers updated.
634         * semantics.scm (/build-mem-operand!): Handle mode aliases.
635
636         * sim-test.scm (*): Symbols no longer can be passed to string-append.
637
638 2009-09-10  Doug Evans  <dje@sebabeach.org>
639
640         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
641         Improve error message for missing or too many bits.
642         (/insn-parse): Don't verify iformat for virtual insns.
643         
644         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
645         non-multi-insns.
646         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
647         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
648         * sid.scm (pbb-engine-insns): Ditto.
649         * sim-decode.scm (cgen-decode.c): Ditto.
650
651 2009-09-09  Doug Evans  <dje@sebabeach.org>
652
653         * rtl-traverse.scm: Comment tweaks.
654         * rtl-xform.scm: Comment and reformatting tweaks.
655         * doc/rtl.texi: Add text to docs on ifield-assertions.
656
657         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
658         saving.
659
660         Add support for controlling warnings/errors.
661         Add tests for iformat description errors.
662         * dev.scm (cload): New option #:diag.
663         * read.scm (<reader>): New member verify-iformat?.
664         (/parse-diagnostic, parse-warning): New functions.
665         (parse-error): Guts moved to /parse-diagnostic.
666         (/set-diagnostic-options!): New function.
667         (cpu-load): New arg diagnostic-options, all callers updated.
668         Recognize -w diagnostic-option-list.
669         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
670         (ifld-simple-ifields, ifields-simple-ifields): New function.
671         * insn.scm (/parse-insn-format-iflds): New function.
672         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
673         New arg isa, all callers updated.  Do some basic validation of the
674         ifield list if requested.
675         * mach.scm (/sanity-check-insns): Improve error message text.
676         * doc/running.texi: Document -w option.
677         * doc/porting.texi: Document #:trace, #:diag options to cload.
678
679         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
680
681         * dev.scm (*): Change default verbosity level to 2.
682
683         * ifield.scm (<ifield> pretty-print): New method.
684         (ifld-pretty-print): New function.
685         (<multi-ifield> pretty-print): New method.
686
687         * ifield.scm (<ifield> field-start): Delete word-len arg.
688         All callers updated.
689         (ifld-start): Ditto.
690         (<multi-ifield> field-start): Ditto.
691         * operand.scm (<hw-index> field-start): Ditto.
692
693         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
694         total-bitsize.  All callers updated.
695         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
696         New member /insn-base-value.
697         (insn-base-value): New function.
698         * mach.scm (/sanity-check-insns): New function.
699         (arch-analyze-insns!): Call it.
700
701 2009-09-08  Doug Evans  <dje@sebabeach.org>
702
703         * iformat.scm (ifields-base-ifields): Simplify.
704         (compute-insn-length): Simplify, call ifields-base-ifields.
705         (compute-insn-base-mask): Ditto.
706         * ifield.scm (ifld-known-values): Ditto.
707         (ifld-base-ifields): Ditto.
708         * insn.scm (insn-value): Ditto.
709         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
710
711 2009-09-08  DJ Delorie  <dj@redhat.com>
712
713         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
714         preprocessor macro, not an enum.
715
716 2009-09-08  Doug Evans  <dje@sebabeach.org>
717
718         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
719         to string-append.
720         (*): Remove trailing ":" from error messages passed to estate-error.
721
722 2009-09-07  Doug Evans  <dje@sebabeach.org>
723
724         * types.scm (<struct>): Delete.
725
726         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
727         updated.
728         (/pmacro-loc-error): New function.
729
730         * mach.scm (/isa-parse-decode-assist): New function.
731         (/isa-parse): Call it.
732
733         * decode.scm (/get-subopcode-value): New function.
734         (/opcode-slots): Call it.
735         (/fill-slot!): Add logging message.
736
737         * cos.scm (/object-error): Convert symbols to strings before passing
738         to string-append.
739
740         * read.scm (rtl-version-equal?): New function.
741         (rtl-version-at-least?, rtl-version-older?): New functions.
742
743         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
744         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
745         rtl versions >= 0.9.
746         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
747
748 2009-09-03  Doug Evans  <dje@sebabeach.org>
749
750         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
751         is simple.
752
753 2009-09-01  DJ Delorie  <dj@redhat.com>
754
755         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
756         (parse_unsigned16_range): Likewise.
757         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
758         isa.
759
760 2009-09-01  Doug Evans  <dje@sebabeach.org>
761
762         Pmacro .equals -> .equal?
763         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
764         -pmacro-builtin-equals.  All callers updated.
765         (pmacros-init!): Rename .equals to .equal?.
766         * doc/pmacros.texi: Update.
767         * testsuite/pmacros-1.test: Update.
768
769         * doc/porting.texi: Work around texi2html bug where it doesn't
770         properly escape <> inside double-quotes inside @code.
771
772         * doc/porting.texi (Doing an opcodes port): Add step to specify
773         the .opc file.
774
775 2009-08-29  Doug Evans  <dje@sebabeach.org>
776
777         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
778         rtl version 0.7.
779         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
780
781 2009-08-27  Doug Evans  <dje@sebabeach.org>
782
783         Add do-count rtl function.
784         * rtl-c.scm (s-do-count): New function.
785         (do-count): New rtl handler.
786         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
787         (-rtx-make-traverser-table): Add ITERATION.
788         * rtl.scm (rtx-make-iteration-limit-var): New function.
789         (rtx-env-make-iteration-locals): New function.
790         * rtx-funcs.scm (do-count): New rtl function.
791         * cpu/play.cpu: Add do-count-test insn.
792         * doc/rtl.texi: Add docs on do-count.
793
794 2009-08-26  Doug Evans  <dje@sebabeach.org>
795
796         * read.scm (parse-error): Change error message output format
797         to match context-owner-error.
798         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
799         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
800         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
801         (operand): Call estate-error instead of context-error.
802         (local, delay): Ditto.
803         (ref, attr): Call estate-error instead of error.
804         * rtl-traverse.scm (tstate-error): New function.
805         (-rtx-traverse-error): Call tstate-error instead of context-error.
806         (-rtx-traverse-operands, -rtx-traverse): Ditto.
807         (estate-error): New function.
808         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
809         instead of error.
810         (e-if): Call estate-error instead of error.
811         * rtx-funcs.scm (error): Call estate-error instead of context-error.
812         (member): Ditto.
813         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
814         Rewrite to call context-owner-error.
815         (context-owner-error): New function.
816
817         * ifield.scm (<ifield> constructor): New arg `location',
818         all callers updated.
819         * insn.scm (<insn> constructor): Ditto.
820         (<multi-insn> constructor): Ditto.
821         * minsn.scm (<macro-insn> constructor): Ditto.
822         * operand.scm (<operand> constructor): Ditto.
823         * utils-cgen.scm (builtin-location): New function.
824         (<source-ident>): Fix default value of member `location'.
825         (source-ident?): New function.
826
827         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
828         (estate-push-env, estate-with-modifiers): Ditto.
829         (estate-deepen): New function.
830
831 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
832
833         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
834         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
835         routines.
836
837 2009-08-25  Doug Evans  <dje@sebabeach.org>
838
839         * doc/pmacros.texi (pmacro default argument values): Add text.
840
841 2009-08-23  Doug Evans  <dje@sebabeach.org>
842
843         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
844         Rename member prefix -> name-prefix.
845         (<keyword> getters): Update.
846         (-keyword-parse): Update.  Default enum-prefix to NAME-.
847         (-keyword-read): Update.  Don't compute default value for
848         enum-prefix here.
849         (define-keyword): Update.
850         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
851         * read.scm (cgen-rtl-version): New function.
852         (-supported-rtl-versions): Add (0 8).
853         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
854         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
855         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
856         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
857         Update, print-name -> enum-prefix, make uppercase.
858         Remove unnecessary name-prefix spec.
859         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
860         * cpu/ip2k.cpu (register-names): Ditto.
861         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
862         * cpu/sparc.cpu (gr-names): Ditto.
863         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
864         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
865         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
866         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
867         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
868         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
869         prefix -> name-prefix.
870         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
871         Update, print-name -> enum-prefix, make uppercase.
872         (drc-names, xf-names): Ditto.
873         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
874         * doc/rtl.texi (Keywords): New section.
875         (hardware indices): Update text.
876         (rtl versions): Add 0.8.
877
878         Add define-rtl-version.
879         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
880         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
881         (cgen-lang-fixlevel): Delete.
882         (-supported-rtl-versions): New variable.
883         (-cmd-define-rtl-version): New function.
884         (init-reader!): New command define-rtl-version.
885         (-cgen): Add rtl version to --version output.
886         * doc/rtl.texi: Document rtl version support.
887         * cpu/play.cpu: Add define-rtl-version.
888
889 2009-08-22  Doug Evans  <dje@sebabeach.org>
890
891         * Makefile.am (OPTIONS): Define.
892         (desc): Just generate <arch>-desc.[ch] files.
893         * Makefile.in: Regenerate.
894         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
895         no .opc file.
896         (cgen-desc.c): Similarly.
897         * gen-all-desc: New file.
898         * opcodes.scm (opc-file-provided?): New function.
899
900         * mach.scm (current-*-add!): Update calls to parse-error.
901         * operand.scm (op:new-mode): Update call to parse-error.
902         * utils-cgen.scm (make-obj-context): New function.
903
904         * NEWS: Copy over entries from 1.1 branch.
905
906 2009-08-20  Doug Evans  <dje@sebabeach.org>
907
908         * gas-test.scm (<keyword> test-data): Catch invalid requests,
909         flag a warning and compensate.
910         (<hw-address test-data): Tweak for readability.
911         (<hw-iaddress test-data): Ditto.
912         (cgen-build.sh): Convert symbols to strings before passing to
913         string-append.
914         (cgen-allinsn.exp): Ditto.
915
916         * doc/pmacros.texi (.splice): Add more text.
917
918 2009-08-19  Doug Evans  <dje@sebabeach.org>
919
920         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
921         distinguish from 1.1.
922         * configure: Regenerate.
923         * read.scm (-CGEN-VERSION): Update.
924         * doc/version.texi: Update.
925
926         New builtin .pmacro?.
927         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
928         (pmacros-init!): Add .pmacro?.
929         * doc/pmacros.text: Document .pmacro?.
930         * testsuite/pmacros-1.test: Test .pmacro?.
931
932         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
933         of a pmacro begins before its arguments are evaluated, improves
934         readability.
935
936         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
937         * testsuite/pmacros-1.test: Ditto.  Add better tests.
938
939         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
940         in assembler syntax.
941         (Operands): Similarly.
942
943 2009-08-18  Doug Evans  <dje@sebabeach.org>
944
945         * ifield.scm (ifld-encode-mode): Add FIXME.
946         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
947         modes.
948         (<ifield> gen-extract): Similarly.
949
950         * read.scm (parse-error): Handle #f for context-location.
951         * utils-cgen.scm (unspecified-location): Fix building of
952         single-location.
953
954         * doc/rtl.texi: Document how to write hex and boolean values.
955
956         * gas-test.scm (<hw-asm> test-data): Handle () values.
957         (<keyword> test-data): Convert symbols to strings before passing
958         to string-append.
959         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
960         result for scalars.
961
962         * operand.scm (hw-index-scalar): Set `name'.
963         (hw-index-anyof, hw-index-derived): Ditto.
964
965 2009-08-17  Doug Evans  <dje@sebabeach.org>
966
967         * pmacros.scm (-pmacro-builtin-internal-test): New function.
968         (pmacros-init!): Add .internal-test.
969         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
970         * testsuite/testsuite.cpu (internal-verify): New pmacro.
971         * doc/pmacros.text: Document .internal-test.
972
973         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
974         (parse-comment): Allow numbers.
975         * doc/porting.texi: Document that names and comments may be lists.
976
977         * insn.scm (-insn-parse): Fix typo.
978
979         Rename .eval -> .exec.  Add new .eval.
980         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
981         (-pmacro-builtin-eval): New function.
982         (pmacros-init!): Add .exec.
983         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
984         * testsuite/location-1.test: Update.
985         * testsuite/pmacros-1.test: Add test for .eval.
986
987 2009-08-16  Doug Evans  <dje@sebabeach.org>
988
989         * doc/porting.texi: Remove support for Guile 1.4.
990
991         * read.scm (current-reader-location): Return unspecified location
992         if reader hasn't been initialized yet.
993
994 2009-08-13  Doug Evans  <dje@sebabeach.org>
995
996         * dev.scm: Document tracing options.
997
998         * pmacros.scm (pmacro-dump): New function.
999         (check-pmacro): Tweak debugging output.
1000         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1001         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1002
1003         Add .let* pmacro builtin.
1004         * pmacros.scm (-pmacro-builtin-let*): New function.
1005         (pmacros-init!): Add .let*.
1006         * doc/pmacros.texi: Document .let*.
1007         * testsuite/pmacros-1.test: Test .let*.
1008
1009 2009-08-12  Doug Evans  <dje@sebabeach.org>
1010
1011         Clean up cpu file parsing, pass context consistently instead of the
1012         old "errtxt" argument.
1013         NOTE: ACU == "All Callers Updated".
1014         * attr.scm (-parse-simple-attribute): Renamed from
1015         parse-simple-attribute, ACU.
1016         (-attr-parse): Change errtxt argument to context, ACU.
1017         (-attr-read): Ditto.
1018         (atlist-parse): Ditto.  Put context arg first.
1019         (attr-parse): Use parse-error instead of context-error.
1020         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1021         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1022         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1023         `context' arg is now a <context> object.  ACU.
1024         (-keyword-read): `context' arg is now a <context> object.  ACU.
1025         (-hw-parse-indices): Change errtxt argument to context, ACU.
1026         (-hw-parse-values, -hw-parse-handlers): Ditto.
1027         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1028         (-hw-validate-layout, -hw-create-getter-from-layout,
1029         -hw-create-setter-from-layout): Ditto.
1030         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1031         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1032         (<hw-address>:parse!): Ditto.
1033         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1034         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1035         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1036         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1037         * insn.scm (-insn-parse, -insn-read): Ditto.
1038         (parse-syntax): Ditto.  Put context arg first.
1039         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1040         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1041         (-parse-insn-format): Ditto.
1042         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1043         (-arch-parse-isas): Ditto.
1044         (-isa-read): Add context arg, ACU.
1045         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1046         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1047         context, ACU.
1048         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1049         (minsn-make-alias): Ditto.
1050         * mode.scm (-mode-parse): Ditto.
1051         (parse-mode-name): Ditto.  Put context arg first.
1052         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1053         errtxt argument to context, ACU.
1054         (-unit-parse, -model-parse, -model-read): Ditto.
1055         * operand.scm (-operand-parse-getter): Use parse-error instead of
1056         context-error.
1057         (-operand-parse-setter): Ditto.
1058         (-operand-parse): Change errtxt argument to context, ACU.
1059         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1060         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1061         * read.scm (reader-error): Delete.  Use parse-error instead.
1062         (parse-error): Change errtxt argument to context, ACU.  Split args
1063         argument into expr and maybe-help-text.
1064         (-reader-process-expanded-1!): Reorganize.
1065         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1066         * types.scm (parse-type): Ditto.
1067         * utils-cgen.scm (single-location->simple-string): New function.
1068         (<context>): Replace members file,lineno with location.
1069         (make-prefix-context): Renamed from context-make-prefix, ACU.
1070         (make-current-context): New function.
1071         (context-append, context-append-name): New functions.
1072         (context-make-reader): Delete.
1073         (parse-name): Change errtxt argument to context, ACU.
1074         Put context arg first.
1075         (parse-comment): Ditto.
1076         (parse-number): Change errtxt argument to context, ACU.
1077         (arg-list-validate-name, arg-list-check-no-args,
1078         arg-list-symbol-arg): Ditto.
1079
1080         * read.scm (-cmd-if): Don't assume test is a list.
1081
1082         * html.scm (get-insn-properties): Delete errtxt, unused.
1083
1084 2009-08-11  Doug Evans  <dje@sebabeach.org>
1085
1086         * doc/rtl.texi (hardware types): Add pc.
1087
1088 2009-08-07  Doug Evans  <dje@sebabeach.org>
1089
1090         Add -t option for tracing things like commands, pmacro expansion.
1091         * dev.scm (cload): New arg #:trace.
1092         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1093         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1094         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1095         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1096         (-reader-process-expanded-1!): Trace commands if requested.
1097         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1098         (-set-trace-options!): New function.
1099         (-init-reader!): New function.
1100         (cpu-load): New arg trace-options, all callers updated.
1101         Call -init-reader! and -set-trace-options!.
1102         (cgen-usage): Improve output formatting.
1103         (common-arguments): New option -t.
1104         (-cgen): Process -t.
1105         * utils-cgen.scm (single-location->string): Renamed from
1106         pretty-print-single-location.  All callers updated.
1107         (location->string): Renamed from pretty-print-location.
1108         All callers updated.
1109         (source-properties-location->string): New function.
1110         * doc/running.texi: Document -t.
1111
1112 2009-08-06  Doug Evans  <dje@sebabeach.org>
1113
1114         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1115         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1116         * utils.scm: ... here.
1117
1118 2009-08-05  Doug Evans  <dje@sebabeach.org>
1119
1120         Track source location better, for better error messages.
1121         * pmacros.scm (-pmacro-eval): Delete, unused.
1122         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1123         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1124         (scan-list, scan): Ditto.
1125         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1126         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1127         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1128         (scan-list1): New function.
1129         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1130         * read.scm (<reader>): New member `location'.
1131         (-reader-lookup-command): Renamed from reader-lookup-command,
1132         all callers updated.
1133         (reader-error): Rewrite to produce better source location info.
1134         (current-reader-location): New function.
1135         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1136         All callers updated.  Record source location of expression.
1137         (reader-process-expanded!): Renamed from reader-process-expanded.
1138         All callers updated.
1139         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1140         All callers updated.  Record source location of define-pmacro.
1141         * utils-cgen.scm (<location>): New class.
1142         (single-location): New (pseudo) class.
1143         (pretty-print-single-location, pretty-print-location): New functions.
1144         (location-top, location-push-single, location-push): New functions.
1145         (unspecified-location, current-input-location): New functions.
1146         (location-property): New object property.
1147         (location-property-set!): New function.
1148         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1149         All uses updated.
1150         * testsuite/location-1.test: New testcase.
1151         * testsuite/run-tests.sh: Fix fail count handling.
1152         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1153         to expect cgen to fail.
1154
1155         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1156
1157         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1158         (-cmd-if): Renamed from cmd-if.  All callers updated.
1159         Use reader-process-expanded! on then/else clauses instead of eval1.
1160
1161 2009-07-22  Doug Evans  <dje@sebabeach.org>
1162
1163         * modes.scm (TI,OI): New modes.
1164         * types.scm (parse-type): Improve error checking.  Don't hardwire
1165         mode names here.
1166         * utils.scm (non-negative-integer?): New function.
1167
1168         * pmacros.scm (-pmacro-builtin-find): New predicate.
1169         (pmacros-init!): Add .find.
1170         * doc/pmacros.tex: Document .find.
1171         * testsuite/pmacros-1.test: Test .find.
1172
1173 2009-07-20  Doug Evans  <dje@sebabeach.org>
1174
1175         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1176         commented out printfs.
1177         * rtl.scm (rtl-finish!): Whitespace tweaks.
1178         * model.scm (parse-insn-timing): Tweak logging message.
1179         * operand.scm: Comment and whitespace tweaks.
1180         (op:type): Tweak error message.
1181         (op-ifield): Tweak logging message.
1182         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1183         * read.scm: Whitespace cleanup.
1184         * utils.scm: Whitespace cleanup.
1185
1186 2009-07-19  Doug Evans  <dje@sebabeach.org>
1187
1188         Fix binding of nested pmacro parameters.
1189         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1190         All callers updated.
1191         (-pmacro-bulid-lambda): Ditto.
1192         * doc/pmacros.texi: Update.
1193         * testsuite/pmacros-1.test: Add testcase.
1194
1195         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1196         calculation.
1197         (-multi-ifield-make-default-extract): Ditto.
1198
1199         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1200         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1201         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1202         Define.
1203         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1204         * doc/rtl.texi: Update.
1205
1206         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1207
1208         Rename builtin boolean pmacros, for consistency with rtl.
1209         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1210         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1211         * doc/pmacros.texi: Update.
1212         * testsuite/pmacros-1.test: Update.
1213
1214 2009-07-17  Doug Evans  <dje@sebabeach.org>
1215
1216         Use hash tables to record ifields, operands, insns, macro-insns.
1217         * attr.scm (attr-builtin!): Tweak some comments.
1218         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1219         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1220         <ident>.
1221         (<multi-ifield>): New constructor.
1222         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1223         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1224         <ident>.
1225         (-sub-insn-make!): Add hack to avoid differences in generated code.
1226         (multi-insn-instantiate!): Add total number of multi-insns to
1227         logging message.
1228         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1229         minsn-list to foo-table.  New member next-ordinal.
1230         Update getters/setters.
1231         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1232         New functions.
1233         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1234         (-make-ident-object-table, -ident-object-table->list,
1235         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1236         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1237         -ifld-already-defined?): Rewrite.
1238         (current-op-list, current-op-add! current-op-lookup,
1239         -op-already-defined?): Rewrite.
1240         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1241         (current-insn-list, current-insn-add! current-insn-lookup,
1242         -insn-already-defined?): Rewrite.
1243         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1244         -minsn-already-defined?): Rewrite.
1245         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1246         (MAX-VIRTUAL-INSNS): Define.
1247         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1248         Update use of arch-insn-list.
1249         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1250         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1251         minsn-list.
1252         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1253         <ident>.  New constructor.
1254         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1255         <ident>.
1256         * sid.scm (-virtual-insn-add!): New function.
1257         (-create-virtual-insns!): Call it.
1258         (-fill-sim-insn-list!): Rewrite.
1259         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1260         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1261         * utils-cgen.scm (<ordered-ident>): New class.
1262         (obj-ordinal, obj-set-ordinal!): New functions.
1263         (add-ident-methods!): Delete.
1264
1265         * model.scm (parse-insn-timing): Change logging message to level 3.
1266
1267 2009-07-16  Doug Evans  <dje@sebabeach.org>
1268
1269         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1270         add a link to define-normal-insn-enum.
1271
1272         * doc/porting.texi (Conventions): Add docs on writing integers.
1273
1274         * cpu/simplify.inc (*): One line doc strings don't need \n.
1275         (df): Invoke define-full-ifield instead of claiming it's an alias.
1276         (dno): Define.
1277         (dnop): Mark as deprecated.
1278
1279         * cpu/play.cpu: Add example of hardware `layout'.
1280         * doc/porting.tex: Add docs on simplify.inc.
1281         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1282         and other things.
1283
1284         * ifield.scm: Whitespace/formatting cleanup.
1285
1286         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1287
1288         * read.scm (parse-error): Don't print single entry args as a list.
1289         (-reader-process-expanded-1): Convert symbol to string for
1290         string-append.
1291
1292         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1293
1294 2009-07-15  Doug Evans  <dje@sebabeach.org>
1295
1296         * cpu/simplify.inc (dno): New pmacro.
1297         * doc/porting.texi: Add section on simplify.inc.
1298         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1299
1300 2009-07-15  Doug Evans  <devans@sourceware.org>
1301
1302         * gen-all-doc: Generate index.html.
1303
1304 2009-07-13  Doug Evans  <dje@sebabeach.org>
1305
1306         Extend pmacro language, add testsuite.
1307         * Makefile.am (SUBDIRS): Add testsuite.
1308         * Makefile.in: Regenerate.
1309         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1310         testsuite/test-utils.sh.
1311         * configure: Regenerate.
1312         * dev.scm (cload): Handle testsuite app.
1313         (load-testsuite): New function.
1314         * pmacros.scm: (-pmacro-debug?): New global.
1315         (-smacro-table): New global.
1316         (-smacro-lookup, -smacro-set!): New functions.
1317         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1318         (-pmacro-syntactic-form?): New function.
1319         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1320         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1321         (-pmacro-expected-non-negative-integer): New function.
1322         (-pmacro-verify-non-negative-integer): New function.
1323         (-pmacro-expand-expr-list): New function.
1324         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1325         (-pmacro-process-args): Renamed from -pmacro-invoke.
1326         (-pmacro-apply, -smacro-apply): New functions.
1327         (-pmacro-expand): Rewrite syntactic form processing.
1328         (-pmacro-build-lambda): Reformat.
1329         (define-pmacro): Watch for more errors in definition.
1330         (pmacro-debug): New function.
1331         (pmacro-trace): Set/reset -pmacro-debug?.
1332         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1333         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1334         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1335         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1336         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1337         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1338         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1339         (pmacros-init!): Initialize -smacro-table.
1340         Rewrite pmacro initialization.
1341         * read.scm (reader-process-expanded): Renamed from
1342         -reader-process-expanded.  All callers updated.
1343         Recognize () as a no-op.
1344         (cpu-load): Tweak logging messages.
1345         * utils.scm (message): Add comment.
1346         * cpu/play.cpu: Add some instructions to play with .let.
1347         * doc/cgenint.texi: Move some debugging related docs to here from
1348         cgen.texi.
1349         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1350         * testsuite/Makefile.am: New file.
1351         * testsuite/Makefile.in: New file.
1352         * testsuite/test-utils.sh.in: New file.
1353         * testsuite/run-tests.sh: New file.
1354         * testsuite/testsuite.cpu: New file.
1355         * testsuite/pmacros-1.test: New file.
1356
1357         * decode.scm: Comment and formatting tweaks.
1358         (-build-decode-table-guts): Add more data to logging message.
1359
1360 2009-07-12  Doug Evans  <dje@sebabeach.org>
1361
1362         Delete files that now live in ../cpu.
1363         * cpu/iq10.cpu: Delete.
1364         * cpu/iq2000.cpu: Delete.
1365         * cpu/iq2000.opc: Delete.
1366         * cpu/iq2000m.cpu: Delete.
1367         * cpu/m32r.cpu: Delete.
1368         * cpu/m32r.opc: Delete.
1369
1370 2009-07-09  Doug Evans  <dje@sebabeach.org>
1371
1372         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1373         All callers updated.  Work around -ve shifts by referencing the
1374         entire value.
1375
1376         * utils.scm (message): Handle pairs.
1377
1378 2009-07-08  DJ Delorie  <dj@redhat.com>
1379
1380         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1381         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1382         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1383         written to.
1384
1385 2009-07-07  Doug Evans  <dje@sebabeach.org>
1386
1387         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1388         * cpu/play.opc: New file.
1389
1390         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1391         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1392         * doc/rtl.texi (Instructions): Update.
1393
1394         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1395         (opc-arguments, -OPC): Call set-opc-file-path!.
1396         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1397         (set-opc-file-path!): New function.
1398         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1399
1400         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1401         before passing to gen-c-args.
1402
1403 2009-07-06  DJ Delorie  <dj@redhat.com>
1404
1405         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1406         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1407         unspecified accesses to control registers.
1408
1409 2009-07-01  DJ Delorie  <dj@redhat.com>
1410
1411         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1412         unspecified accesses to control registers.
1413
1414         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1415         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1416
1417 2009-06-27  Doug Evans  <dje@sebabeach.org>
1418
1419         * gen-all-intrinsics: New file.
1420
1421 2009-06-24  Doug Evans  <dje@sebabeach.org>
1422
1423         * All *.scm files: Update copyright year.
1424         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1425
1426 2009-06-23  DJ Delorie  <dj@redhat.com>
1427
1428         * intrinsics.scm: Updates to support IVC2.
1429         (belongs-to-group?): Check IVC2 slots.
1430         (-slots-attribute): New.
1431         (targets::attributes): Add SLOTS.
1432         (target:add-well-known-intrinsics): Add CPMOV.
1433         (md-insn): Add CPTYPE and CRET?.
1434         (add-md-insn): Likewise.
1435         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1436         duplicate insns with different bit patterns.
1437         (write-cgen-insn?): Add cret? support.
1438         (intrinsics.h): Add vector types.
1439         (runtime-op): Add vector support.
1440         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1441
1442         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1443         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1444         (h-cr-ivc2): Default to typeless.
1445         (h-ccr-ivc2): Fix register width.
1446         (SLOTS): Fix values and default.
1447         (ivc2_*): Add control register names.
1448         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1449
1450         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1451         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1452
1453 2009-06-22  Doug Evans  <dje@sebabeach.org>
1454
1455         * semantics.scm (insn-build-known-values): Fix typo in comment.
1456
1457 2009-06-21  Doug Evans  <dje@sebabeach.org>
1458
1459         * rtl-xform.scm (rtx-simplify-insn): New function.
1460         * html.scm (gen-insn-docs): Call it.
1461         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1462         * iformat.scm (ifmt-analyze): Minor simplification.
1463
1464         * semantics.scm (semantic-compile): Change arg sem-code-list to
1465         sem-code.
1466         (semantic-attrs): Ditto.
1467         * iformat.scm (ifmt-analyze): Update.
1468         (ifmt-compute!): Update.
1469         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1470         rtl-xform.scm.
1471         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1472         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1473         * semantics.scm (rtx-simplify): Ditto.
1474         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1475         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1476         (-simplify-expr-fn): Move to rtl-xform.scm.
1477         (-solve-expr-fn, rtx-solve): Ditto.
1478         * rtl-xform.c: New file.
1479         * read.scm: Load it.
1480
1481         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1482         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1483         (-rtx-traverse, rtx-traverse): Ditto.
1484
1485 2009-06-20  Doug Evans  <dje@sebabeach.org>
1486
1487         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1488
1489         * configure.in: Update version to 1.1.
1490         * configure: Regenerate.
1491         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1492
1493 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1494             Doug Evans  <dje@sebabeach.org>
1495
1496         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1497         (cgen-desc.c): Ditto.
1498         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1499         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1500         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1501         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1502         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1503         (cgen-cpuall.h, cgen-ops.c): Ditto.
1504         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1505         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1506         (cgen-sem-switch.c): Ditto.
1507         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1508         * sim-model.c (cgen-model.c): Ditto.
1509
1510 2009-06-18  Doug Evans  <dje@sebabeach.org>
1511
1512         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1513
1514         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1515
1516         * dev.scm (cload): Change #:arch argument to take the path to the
1517         .cpu file instead of just the name of the architecture.
1518         * read.scm (arch-path): Remove trailing '/'.
1519         (cpu-load): Set `arch-path' to directory of .cpu file.
1520         (-cgen): Don't set `arch-path' here.
1521         (include): Update.
1522         * doc/porting.texi: Update.
1523
1524 2009-06-14  Doug Evans  <dje@sebabeach.org>
1525
1526         * gen-all-doc: Use files in ../cpu where possible.
1527
1528         * Makefile.am (ARCHFILE): Fix path.
1529         * Makefile.in: Regenerate.
1530         * html.scm: Use "pre" instead of "plaintext".
1531
1532         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1533         * doc/app.texi: Cleanup pass.
1534         * doc/cgen.texi: Cleanup pass.
1535         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1536         * doc/intro.texi: Cleanup pass.
1537         * doc/mdate-sh: New file.
1538         * doc/opcodes.texi: Cleanup pass.
1539         * doc/pmacros.texi: Cleanup pass.
1540         * doc/porting.texi: Cleanup pass.
1541         * doc/rtl.texi: Cleanup pass.
1542         * doc/running.texi: Cleanup pass.  Document more runtime options.
1543         * doc/stamp-vti: Update.
1544         * doc/version.texi: Update.
1545
1546         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1547         (GUILE): Fix definition.
1548         * Makefile.in: Regenerate with automake 1.9.6.
1549         * aclocal.m4: Regenerate with aclocal 1.9.6.
1550         * configure.in (AC_PREREQ): Set to 2.59.
1551         (GENINSRC_NEVER): Define.
1552         * configure: Regenerate with autoconf 2.59.
1553         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1554         (cgen.info,cgen.dvi): Delete.
1555         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1556         (noinst_TEXINFOS): Add cgenint.texi.
1557         (DOCFILES): Add missing files.
1558         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1559         * doc/Makefile.in: Regenerate with automake 1.9.6.
1560
1561         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1562
1563         * attr.scm: Removing trailing whitespace.
1564         * cgen-intrinsics.scm: Ditto.
1565         * cgen-sim.scm: Ditto.
1566         * cos.scm: Ditto.
1567         * enum.scm: Ditto.
1568         * guile.scm: Ditto.
1569         * sim.scm: Ditto.
1570
1571 2009-05-28  DJ Delorie  <dj@redhat.com>
1572
1573         * cpu/mep.opc (parse_signed16_range): New.
1574         (parse_unsigned16_range): New.
1575         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1576
1577 2009-05-26  DJ Delorie  <dj@redhat.com>
1578
1579         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1580         accumulator names.
1581         (f-ivc2-ccrn-c3hi): New.
1582         (f-ivc2-ccrn-c3lo): New.
1583         (f-ivc2-ccrn-c3): New.
1584         (ivc2c3ccrn): Use it.
1585
1586 2009-05-22  DJ Delorie  <dj@redhat.com>
1587
1588         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1589         (mep_config_map): Regenerate.
1590
1591         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1592         ivc2-specific names.
1593         (simm8p20): New.
1594         (cmovc): move to after field definitions, use ivc2-specific
1595         register names.
1596         (cpmovi_b_P0S_P1): New.
1597         
1598 2009-05-19  DJ Delorie  <dj@redhat.com>
1599
1600         * cpu/mep.opc: Regenerate configuration.
1601         (parse_cdisp10): Only check CPU flags, not COP flags.
1602         (check_configured_mach): Likewise.
1603
1604 2009-05-13  DJ Delorie  <dj@redhat.com>
1605
1606         * intrinsics.scm (insns.md): Add RTL predicates.
1607         (intrinsics.h): Remove old C intrinsics.
1608
1609 2009-04-29  DJ Delorie  <dj@redhat.com>
1610
1611         * mep-ivc2.cpu: New.
1612         * mep-core.cpu: Regenerated.  Add support for deferred register
1613         writes.
1614         (SLOT): Add IVC2 slot types.
1615         (sim-syscall): Rename to something more appropriate.
1616         * mep-ext-cop.cpu: Regenerate.
1617         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1618         (print_slot_insn): New.
1619         (mep_examine_ivc2_insns): New.
1620         (mep_print_insn_set_ivc2_mode): New.
1621         (mep_print_insn): Support IVC2 slotting.
1622         
1623 2009-04-20  DJ Delorie  <dj@redhat.com>
1624
1625         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1626         (guess-mode): Drop COP* syntax.
1627         (need-insn): Add "--syscall--" to the list.
1628         (enum-type): Drop COP* syntax.
1629         (intrinsics.h): Likewise.
1630         (intrinsic-protos.h): Change file header to allow it to be
1631         included.
1632
1633 2009-04-17  DJ Delorie  <dj@redhat.com>
1634
1635         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1636         (lhucpm1): Limit to C5 mach.
1637         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1638         * cpu/mep-core.cpu (extend-cdisp10): New.
1639         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1640         
1641 2009-04-08  DJ Delorie  <dj@redhat.com>
1642
1643         * cpu/mep-c5.cpu: New.
1644         * cpu/mep-core.cpu: Add C5 support.
1645         * cpu/mep.opc: Likewise.
1646
1647 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1648
1649         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1650         about calling memset with a zero length.
1651
1652 2009-02-03  DJ Delorie  <dj@redhat.com>
1653
1654         * cpu/mep-core.cpu: Update to new MeP configuration.
1655         * cpu/mep-ext-cop.cpu: Likewise.
1656         * cpu/mep.opc: Likewise.
1657
1658 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1659
1660         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1661
1662 2008-06-17  Dave Brolley  <brolley@redhat.com>
1663
1664         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1665         (h-gr): Likewise.
1666
1667 2007-11-13  Dave Brolley  <brolley@redhat.com>
1668
1669         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1670
1671 2007-11-05  Dave Brolley  <brolley@redhat.com>
1672
1673         * intrinsics.scm,cgen-intrinsics.scm: New application which
1674         generates code to support intrinsic functions for insns in the
1675         mep architecture in gcc.
1676
1677 2007-09-21  Dave Brolley  <brolley@redhat.com>
1678
1679         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1680         (rn3us): CDATA attribute now LONG.
1681         
1682 2007-08-21  Dave Brolley  <brolley@redhat.com>
1683
1684         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1685         than 32 bits.
1686
1687 2007-07-05  Nick Clifton  <nickc@redhat.com>
1688
1689         * utils.scm (copyright-fsf): Update copyright notice to refer to
1690         the GPL version 3.
1691
1692 2007-05-22  Nick Clifton  <nickc@redhat.com>
1693
1694         * doc/cgen.texi: Use @copying around the copyright notice.
1695         * doc/internals.texi: Likewise.
1696
1697 2007-02-05  Dave Brolley  <brolley@redhat.com>
1698
1699         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1700
1701 2007-02-05  Dave Brolley  <brolley@redhat.com>
1702
1703         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1704         in the generated code for @arch@_cgen_init_asm if it is defined.
1705
1706         * Contribute the following changes:
1707         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1708
1709         * attr.scm (<string-attribute>): New attribute class.
1710         (attr-kind): Handle <string-attribute>.
1711         (parse-simple-attribute): New function.
1712         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1713         (<bitset-attribute> 'parse-value): Likewise.
1714         (<boolean-attribute> 'parse-value): Likewise.
1715         (<enum-attribute> 'parse-value): Likewise.
1716         (<string-attribute> 'parse-value): New function.
1717         (-attr-parse): Handle <string-attribute>.
1718         (-attr-read): Likewise.
1719         (<string-attribute> 'gen-value-for-defn-raw): New function.
1720         (<string-attribute> 'gen-value-for-defn): New function.
1721
1722 2006-11-07  Dave Brolley  <brolley@redhat.com>
1723
1724         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1725         necessary.
1726
1727 2006-10-18  Dave Brolley  <brolley@redhat.com>
1728
1729         * Contribute the following changes:
1730
1731         2006-07-11  Dave Brolley  <brolley@redhat.com>
1732
1733         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1734         (movcol): New insn.
1735         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1736         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1737         hardware or memory mode which was used.
1738         * sid-cpu.scm (hw-need-write-stack?): New function.
1739         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1740         identify hardware which uses write stacks.
1741         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1742         Initialized to an empty list.
1743         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1744         hw-need-write-stack?.
1745         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1746         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1747         (used-in-delay-rtl?): New method of <hardware-base>.
1748         (hw-used-in-delay-rtl?): New function.
1749
1750         2006-06-20  Dave Brolley  <brolley@redhat.com>
1751
1752         * sid.scm (gen-attr-type): Removed.
1753         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1754         (SH2a-MACH): Add sh5.
1755         (sh2a-nofpu-models): Add units for sh5.
1756         (sh2a-fpu-models): Likewise.
1757
1758         2006-06-15  Dave Brolley  <brolley@redhat.com>
1759
1760         * cpu/sh-sim.cpu: New file.
1761         * cpu/sh-sid.cpu: New file.
1762         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1763         (All fields): Remap for (insn-lsb0? #f)
1764         (All insns): Add timing specs.
1765         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1766         'xattrs' and .splice it in.
1767         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1768         (h-frc,h-drc): Add PROFILE attribute.
1769         (h-fpccr): Removed.
1770         (h-vbr): New hardware.
1771         (All fields): Remap for (insn-lsb0? #f)
1772         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1773         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1774         (fpscr): Use h-fpscr.
1775         (fsdm,fsdn): Use h-fsd.
1776         (dshci): Add xtiming argument and splice it in.
1777         (dr,xd): pmacros removed.
1778         (All insns): Add timing specs, *-MACH attribibutes,
1779         SH4{A}-GROUP attributes.
1780         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1781         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1782         we're being processed for sim or sid.
1783         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1784         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1785         (define-isa compact): Add (isa-parallel-insns 2).
1786         (define-isa media): Add (isa-parallel-insns 2). Add
1787         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1788         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1789         sh4a, sh4al
1790         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1791         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1792         (SH4al-MACH, SH5-MACH): New pmacros.
1793         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1794         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1795         (sh5-media-fp-units, common-model, common-model-with-fp) 
1796         (sh3-model, sh3e-model): New pmacros.
1797         (define-model sh2): New model.
1798         (define-model sh2e): New model.
1799         (define-model sh3): New model.
1800         (define-model sh3e): New model.
1801         (define-model sh2a-nofpu): New model.
1802         (define-model sh2a-fpu): New model.
1803         (define-model sh4-nofpu): New model.
1804         (define-model sh4): New model.
1805         (define-model sh4a-nofpu): New model.
1806         (define-model sh4a): New model.
1807         (define-model sh4al): New model.
1808         (define-model sh5-media): New model.
1809         (define-model sh5): Add all units.
1810         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1811         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1812         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1813         (h-pc): Add PROFILE attribute.
1814         (h-fr): Likewise.
1815         (h-tr): Likewise.
1816         (h-gr,h-grc): Likewise.
1817         (h-cr): Set h-sr in setter.
1818         (h-frbit): Get/Set h-fpscr.
1819         (h-szbit,h-prbit): Likewise.
1820         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1821         Add getter and setter.
1822         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1823         Adjust getter and setter.
1824         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1825         Adjust getter and setter.
1826         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1827         (h-fsd,h-fmov): New hardware.
1828
1829 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1830
1831         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1832         doc/notes.texi, doc/porting.texi, doc/running.texi,
1833         doc/sim.texi: Fix some typos.
1834
1835 2006-07-14  Dave Brolley  <brolley@redhat.com>
1836
1837         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1838         hardware or memory mode which was used.
1839         * sid-cpu.scm (hw-need-write-stack?): New function.
1840         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1841         identify hardware which uses write stacks.
1842         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1843         Initialized to an empty list.
1844         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1845         hw-need-write-stack?.
1846         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1847         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1848         (used-in-delay-rtl?): New method of <hardware-base>.
1849         (hw-used-in-delay-rtl?): New function.
1850
1851 2006-06-20  Dave Brolley  <brolley@redhat.com>
1852
1853         * sid.scm (gen-attr-type): Removed.
1854
1855 2006-05-10  Dave Brolley  <brolley@redhat.com>
1856
1857         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1858         support for (if (application-is? <appname>) (...) (...)).
1859         (-cgen): Add trailing "/" to arch-path.
1860         * utils.scm (dirname): Removed. dirname is a primitive function.
1861
1862 2006-05-09  Dave Brolley  <brolley@redhat.com>
1863
1864         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1865         'entire_insn' not 'base_insn'.
1866         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1867         is null.
1868         * sim.scm (-gen-arch-model-decls): Likewise.
1869         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1870         abuf->written if profiling.
1871         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1872         object->string om the mode.
1873         (-hw-gen-write-stack-decl): Likewise.
1874         * read.scm (include): Use arch-path as file location.
1875         (arch-path): Define it with a default setting.
1876         (-cgen): Update arch-path when "-a" option is specified.
1877         * utils.scm (dirname): New function.
1878
1879 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1880
1881         * configure.in: Remove AC_ARG_PROGRAM.
1882         * configure: Regenerate with autoconf 2.59.
1883
1884 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1885
1886         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1887         SIMULATOR.
1888
1889 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1890
1891         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1892         or an error message otherwise.
1893         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1894         Fix up comments to correctly describe the functions.
1895
1896 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1897             Anil Paranjape   <anilp1@kpitcummins.com>
1898             Shilin Shakti    <shilins@kpitcummins.com>
1899
1900         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1901         CPU description.
1902         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1903
1904 2006-02-10  Nick Clifton  <nickc@redhat.com>
1905
1906         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1907
1908 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1909
1910         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1911         for concatenation.
1912         (-hw-gen-write-stack-decl): Likewise.
1913
1914 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1915
1916         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1917         non-(adata-integral-insn? CURRENT-ARCH) case.
1918
1919 2005-10-28  Dave Brolley  <brolley@redhat.com>
1920
1921         Contribute the following changes:
1922         2005-09-19  Dave Brolley  <brolley@redhat.com>
1923
1924         * attr.scm (gen-value-for-defn-raw): New methods.
1925         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1926         gen-value-for-defn-raw.
1927         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1928
1929         2002-12-13  Dave Brolley  <brolley@redhat.com>
1930
1931         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1932         (-gen-attr-accessors): New function.
1933         (gen-obj-attr-defn): Update terminating initializer.
1934         (gen-obj-attr-end-defn): New function.
1935         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1936         * sid-cpu.scm (cgen-desc.h): Generate code to include
1937         "opcode/cgen-bitset.h"
1938         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1939         name.
1940         * desc.scm ('gen-defn): Update terminating initializer.
1941         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1942         terminatinig initializer.
1943         (gen-hw-decls): Ditto.
1944         (gen-operand-decls): Ditto.
1945         (gen-insn-decls): Ditto.
1946         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1947         (gen-insn-table): Update terminating initializer.
1948         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1949         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1950         * attr.scm (charmask-bytes): New function.
1951         (bitset-attr->charmask): New function.
1952         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1953         differences for SID-SIMULATOR.
1954         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1955         (<enum-attribute>): Ditto.
1956
1957 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1958
1959         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1960
1961 2005-10-24  DJ Delorie  <dj@redhat.com>
1962
1963         * operand.scm (-anyof-merge-syntax): Print a more useful error
1964         message.
1965
1966 2005-10-19  Nick Clifton  <nickc@redhat.com>
1967
1968         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1969         patch.
1970
1971 2005-10-18  Andreas Schwab  <schwab@suse.de>
1972
1973         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1974
1975 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1976
1977         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1978         size.
1979
1980 2005-08-02  Dave Brolley  <brolley@redhat.com>
1981
1982         * rtl-c.scm (s-unop): Don't dereference
1983         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1984         (s-binop, s-convop, s-cmpop): Likewise.
1985
1986 2005-07-29  Dave Brolley  <brolley@redhat.com>
1987
1988         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1989         if with-profile or with-parallel-write.
1990         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1991         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1992         string-append.
1993
1994 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1995
1996         * cpu/fr30.opc (print_register_list): Correct format strings.
1997         * cpu/ip2k.opc: Likewise.
1998
1999 2005-07-05  Nick Clifton  <nickc@redhat.com>
2000
2001         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2002         unsigned in order to avoid compile time warnings about sign
2003         conflicts.
2004
2005 2005-07-01  Nick Clifton  <nickc@redhat.com>
2006
2007         * desc-cpu.scm: Update to ISO C90 function declaration style.
2008         * opc-asmdis.scm: Likewise.
2009         * opc-ibld.scm: Likewise.
2010         * opc-itab.scm: Likewise.
2011         * cpu/fr30.opc: Likewise.
2012         * cpu/i960.opc: Likewise.
2013         * cpu/ip2k.opc: Likewise.
2014         * cpu/iq2000.opc: Likewise.
2015         * cpu/m32r.opc: Likewise.
2016         * cpu/openrisc.opc: Likewise.
2017         * cpu/sh.opc: Likewise.
2018         * cpu/sparc.opc: Likewise.
2019         * cpu/xstormy16.opc: Likewise.
2020
2021 2005-06-15  Dave Brolley  <brolley@redhat.com>
2022
2023         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2024         (cgen-cpu.h): Call it.
2025
2026         Contributed on behalf of Graydon Hoare
2027         2001-06-05  graydon hoare  <graydon@redhat.com>
2028
2029         * utils.scm (foldl): Define.
2030         (foldr): Define.
2031         (filter): Define.
2032         (union): Define.
2033         (intersection): Simplify.
2034         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2035         (-op-gen-delayed-set-maybe-trace): Define.
2036         (<operand> 'gen-set-{quiet,trace}): Delegate to
2037         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2038         up and needs cleaning.
2039         (-with-parallel?): Hardwire with-parallel to #t.
2040         (<operand> 'cxmake-get): Replace with lookahead-aware code
2041         * sid-decode.scm: Remove per-insn writeback fns.
2042         (-gen-idesc-decls): Redefine sem_fn type.
2043         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2044         with write stack stuff.
2045         (cgen-write.cxx): Replace per-insn writebacks with single write
2046         stack writeback. Add write stack reset function.
2047         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2048         stack stuff.
2049         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2050         estate attribute set.
2051         (delay): Set #:delayed attribute to calculated delay, update
2052         maximum delay of cpu, check (delay ...) usage.
2053         * operand.scm (<operand>): Add delayed slot to <operand>.
2054         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2055         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2056         * doc/rtl.texi (Expressions): Add section on (delay ...).
2057
2058 2005-06-13  Jim Blandy  <jimb@redhat.com>
2059
2060         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2061         as well as strings.
2062
2063 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2064
2065         * doc/porting.texi: Change all mention of md_apply_fix3 and
2066         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2067         respectively.
2068
2069 2005-05-18  Dave Brolley  <brolley@redhat.com>
2070
2071         * utils-sim.scm (-gen-decode-default-entry): New function.
2072         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2073         code to check that all opcodes bits match.
2074         (-gen-decoder-switch): Use -gen-decode-default-entry.
2075
2076 2005-05-16  Jim Blandy  <jimb@redhat.com>
2077
2078         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2079         fetched by one of our GETIMEM* methods.
2080         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2081         base-insn-sized chunks.
2082
2083 2005-05-10  Nick Clifton  <nickc@redhat.com>
2084
2085         * Update the address and phone number of the FSF organization in
2086         the GPL notices in the following files:
2087         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2088         cpu/powerpc.cpu, slib/random.scm
2089
2090 2005-05-06  Jim Blandy  <jimb@redhat.com>
2091
2092         * pprint.scm, cos-pprint.scm: Add documentation.
2093
2094         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2095
2096         * pprint.scm, cos-pprint.scm: New files.
2097
2098 2005-04-04  Nick Clifton  <nickc@redhat.com>
2099
2100         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2101         avoid a compile time warning.
2102
2103 2005-03-18  Nick Clifton  <nickc@redhat.com>
2104
2105         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2106         "percent-operand" from "%operand" as the latter confuses xgettext
2107         into thinking that it is a C printf formating directive, which
2108         prevents proper translation.
2109
2110 2005-02-23  Nick Clifton  <nickc@redhat.com>
2111
2112         * opcodes.scm (gen-parse-number): Add a cast to the desired
2113         pointer signed'ness in order to prevent compile time warnings.
2114         * cpu/ip2k.opc: Fixed compile time warnings about differing
2115         signed'ness of pointers passed to functions.
2116         * cpu/iq2000.opc: Likewise.
2117         * cpu/m32r.opc: Likewise.
2118         * cpu/openrisc.opc: Likewise.
2119         * cpu/xstormy16.opc: Likewise.
2120
2121 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2122
2123         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2124         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2125
2126 2005-02-16  Dave Brolley  <brolley@redhat.com>
2127
2128         * utils.scm: Update copyright years.
2129         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2130         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2131         * operand.scm (-derived-operand-parse): Move logit message from level 1
2132         to level 2.
2133
2134 2005-02-15  Nick Clifton  <nickc@redhat.com>
2135
2136         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2137         prevent compile time warning messages.
2138         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2139         * utils-gen.scm (attr-int-gen-defn): Likewise.
2140         (attr-gen-defn): Likewise.
2141         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2142         (print_dollarhex16): Remove unused function.
2143
2144 2005-02-15  Jim Blandy  <jimb@redhat.com>
2145
2146         * guile.scm (cgen-call-with-debugging): Doc fix.
2147
2148         Make backtraces work more reliably.
2149         * guile.scm: Set up debugging parameters, and enable debugging and
2150         source positions while loading.
2151         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2152         functions.
2153         * read.scm: Don't set debugging parameters here.
2154         (catch-with-backtrace): Function deleted.
2155         (-cgen): Simply note the presence or absence of the -b option.
2156         Pass the flag to cgen-call-with-debugging, so debugging is turned
2157         off here if the user didn't request it, for faster computation.
2158         (cgen): Call cgen-debugging-stack-start here, instead of
2159         catch-with-backtrace.
2160
2161         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2162         trailing -s.
2163         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2164         Don't write out the trailing -s here.
2165         * Makefile.in: Regenerated.
2166         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2167         fixup.scm here; let the caller decide which Scheme's customization
2168         file to preload.
2169         * dev.scm: Load guile.scm, not fixup.scm.
2170         * fixup.scm: Deleted; contents have all moved to guile.scm.
2171         * README: Doc fix.
2172
2173         * guile.scm (debug-write): New function.
2174
2175 2005-02-14  Jim Blandy  <jimb@redhat.com>
2176
2177         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2178         transformer procedure, not eval.  Transformer procedures take one
2179         argument.
2180
2181 2005-02-11  Nick Clifton  <nickc@redhat.com>
2182
2183         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2184         to 'bfd_vma *' in order avoid compile time warning message.
2185
2186 2005-02-09  Jim Blandy  <jimb@redhat.com>
2187
2188         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2189         corresponding change in the sim/common directory.)
2190
2191 2005-02-07  Jim Blandy  <jimb@redhat.com>
2192
2193         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2194         changes in the opcodes directory.)
2195
2196         * guile.scm: New file, containing Guile-specific definitions and
2197         adaptations.  This is loaded by the app-specific shell scripts.
2198         Initially identical to fixup.scm.
2199         * cgen-sid.scm: Don't load fixup.scm here.
2200
2201         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2202         latter is a macro.
2203
2204 2005-01-27  Jim Blandy  <jimb@redhat.com>
2205
2206         * utils.scm (string/symbol->append): Renamed from 'concat'.
2207         * opcodes.scm (gen-switch): Use new name.
2208         * insn.scm (-sub-insn-make!): Same.
2209         * rtl.scm (rtx-dump): Same.
2210         * semantics.scm (semantic-compile): Same.
2211
2212 2005-01-20  Jim Blandy  <jimb@redhat.com>
2213
2214         * opcodes.scm (gen-switch): Use concat instead of string-map.
2215
2216         * utils.scm (concat): New function.
2217         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2218         * rtl.scm (rtx-dump): Same.
2219         * semantics.scm (semantic-compile): Same.
2220
2221 2004-12-16  Jim Blandy  <jimb@redhat.com>
2222
2223         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2224         applied to symbols.  Process everything as strings, and then
2225         convert to a symbol at the end.
2226
2227         * read.scm (debug-repl): Temporarily redirect input and output to
2228         /dev/tty while we debug, so we don't interfere with whatever CGEN
2229         is reading or writing.
2230         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2231         New functions.
2232
2233 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2234
2235         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2236         will work with newer versions of guile.
2237
2238 2004-10-27  Nick Clifton  <nickc@redhat.com>
2239
2240         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2241         * cpu/iq2000.cpu: Likewise.
2242
2243 2004-07-21  DJ Delorie  <dj@redhat.com>
2244
2245         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2246
2247 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2248
2249         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2250         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2251
2252 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2253
2254         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2255
2256 2004-03-22  Dave Brolley  <brolley@redhat.com>
2257
2258         * utils.scm (copyright-fsf): Update copyright years.
2259         (copyright-red-hat): Ditto.
2260         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2261         code.
2262         (-op-gen-set-trace-parallel): Ditto.
2263
2264 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2265
2266         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2267         disassembling codes for 0x*2 addresses.
2268
2269 2004-01-29  Dave Brolley  <brolley@redhat.com>
2270
2271         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2272         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2273         in the extra bit positions.
2274
2275 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2276
2277         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2278
2279 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2280
2281         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2282         "short" being 16 bit.
2283         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2284         internationalize error message.
2285         (parse_lo16): Likewise.  Remove useless code.
2286
2287 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2288
2289         * cpu/m32r.cpu : Add new model m32r2.
2290         Add new instructions.
2291         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2292         Changed PIPE attr of push from O to OS.
2293         Care for Little-endian of M32R.
2294         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2295         Care for Little-endian of M32R.
2296         (parse_slo16): signed extension for value.
2297
2298 2003-10-26  Dave Brolley  <brolley@redhat.com>
2299
2300         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2301         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2302         (-gen-extract-fn): Call -gen-record-profile-args.
2303
2304 2003-10-21  Dave Brolley  <brolley@redhat.com>
2305
2306         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2307         a static const int.
2308         * decode.scm (-opcode-slots): Correct typo in logit call.
2309
2310 2003-10-09  Jim Blandy  <jimb@redhat.com>
2311
2312         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2313         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2314
2315         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2316
2317 2003-10-06  Dave Brolley  <brolley@redhat.com>
2318
2319         * gen-all-doc: Add fr550.
2320
2321 2003-09-11  Doug Evans  <dje@sebabeach.org>
2322
2323         * Makefile.am (ARCHFILE): New var.
2324         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2325         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2326         * Makefile.in: Regenerate.
2327
2328 2003-09-08  Dave Brolley  <brolley@redhat.com>
2329
2330         On behalf of Doug Evans <dje@sebabeach.org>
2331         Pass in paths to input files, instead of assuming they live in
2332         $srcdir/cpu.  Plus misc. option processing cleanup.
2333         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2334         Add pre-process pass to all options.
2335         * cgen-gas.scm (gas-arguments): Ditto.
2336         * cgen-sid.scm (sim-arguments): Ditto.
2337         * cgen-sim.scm (sim-arguments): Ditto.
2338         * cgen-stest.scm (stest-arguments): Ditto.
2339         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2340         (-opc-file-path): New global.
2341         (opc-file-path): New fn.
2342         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2343         All callers updated.
2344         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2345         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2346         Replace srcdir arg with opc-file.  All callers updated.
2347         * read.scm (-opt-spec-update): Delete.
2348         (opt-get-first-pass,opt-get-second-pass): New fns.
2349         (-cgen): Process application-specific arguments in two passes.
2350
2351 2003-08-29  Dave Brolley  <brolley@redhat.com>
2352
2353         * cpu/frv.cpu: Removed.
2354         * cpu/frv.opc: Removed.
2355
2356 2003-08-21  Nick Clifton  <nickc@redhat.com>
2357
2358         * cpu/frv.cpu (mbtoh): Replace input parameter to
2359         u-media-dual-expand and u-media-dual-btoh with output parameter.
2360         (cmbtoh): Add profiling hack.
2361
2362 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2363
2364         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2365
2366 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2367
2368         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2369         the elements for the END record of CGEN_OPINST, silencing warnings.
2370
2371 2003-07-15  Doug Evans  <dje@sebabeach.org>
2372
2373         Add guile 1.6.4 support.
2374         - empty list must be quoted
2375         - string functions have stricter type checking
2376         - eval now takes a second argument
2377         - symbol-bound? is deprecated
2378         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2379         (bitset-attr->list): Ensure arg to string-cut is a string.
2380         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2381         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2382         * cos.scm (-class-list): Must quote empty list.
2383         (-class-parent-classes,-class-compute-class-desc): Ditto.
2384         (class-make,make,object-reset!): Ditto.
2385         (method-make-make!): Call eval1 instead of eval.
2386         (method-make-forward!,method-make-virtual-forward!): Ditto.
2387         * decode.scm (subdtable-add): Use stringsym-append instead of
2388         string-append.
2389         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2390         (-build-decode-table-entry): Fetch string name of insn.
2391         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2392         (-gen-mach-table-defns): Ditto for mach.
2393         (gen-ifld-defns): Ditto for ifld.
2394         (gen-hw-table-defns): Ditto for hw.
2395         (gen-operand-table): Ditto for op.
2396         (gen-insn-table-entry): Ditto for insn.
2397         * desc.scm (gen-attr-table-defn): Ditto for attr.
2398         (<keyword>,gen-defn): Don't pass symbols to string-append.
2399         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2400         symbol-append.
2401         (enum-vals-upcase): Use symbol-upcase to build result.
2402         (-enum-parse): Use stringsym-append to build errtxt.
2403         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2404         (eval1): New function.
2405         (symbol-bound?): Provide own version if >= guile 1.6.
2406         * hardware.scm (define-keyword): Use string-append instead of
2407         symbol-append.
2408         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2409         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2410         before using.
2411         (gen-list-entry): Handle either symbol or string `name' arg.
2412         (gen-obj-doc-header): Fetch string name of `o' arg.
2413         (define-cpu-intro): Ditto for cpu.
2414         (gen-mach-intro): Ditto for mach.
2415         (gen-model-intro): Ditto for model.
2416         (gen-isa-intro): Ditto for isa.
2417         (gen-machine-doc-1): Ditto for isa.
2418         (gen-reg-doc-1): Convert mach to string first.
2419         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2420         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2421         to string first.
2422         (gen-insn-categories): Fetch string name of mach.  Convert
2423         enum-val-name to string first.
2424         (gen-insn-docs): Fetch string name of mach.
2425         * ifield.scm (ifld-ilk): Result is a string.
2426         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2427         Fetch string name of ifld.
2428         (-sfmt-search-key): Similarily for ifld and op.
2429         * insn.scm (syntax-make): Fetch string name of syntax element.
2430         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2431         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2432         * mode.scm (mode:c-type): Result is a string.
2433         (mode:enum): Fetch string name of mode.
2434         (-mode-parse): Use stringsym-append to build errtxt.
2435         * model.scm (model:enum): Fetch string name of model.
2436         (-model-parse): Use stringsym-append to build errtxt.
2437         (parse-insn-timing): Must quote empty list.
2438         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2439         (-gen-minsn-opcode-entry): Ditto.
2440         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2441         convert to string.
2442         (read-cpu.opc): Convert current-arch-name to a string before using.
2443         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2444         (<derived-operand>): Must quote empty list.
2445         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2446         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2447         of ifld.
2448         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2449         (-pmacro-sym): Must convert symbols to strings before passing to
2450         string-append.
2451         (-pmacro-str): Ditto.
2452         (pmacros-init!): Use eval1 instead of eval.
2453         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2454         (keep-isa-atlist?): Ditto.
2455         (cmd-if): Use eval1 instead of eval.
2456         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2457         (-rtl-c-get): Fetch string name of src.
2458         (s-unop): Ditto for mode.
2459         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2460         (-gen-par-temp-defns,subword): Ditto.
2461         (join): Use stringsym-append instead of string-append.
2462         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2463         (rtx-traverse-debug): Fetch string name of rtx-obj.
2464         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2465         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2466         (rtx-pretty-name): Result is a string.
2467         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2468         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2469         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2470         before using.
2471         (-gen-sfrag-case): Fetch string name of user.
2472         * sid-model.scm (unit:enum): Fetch string name of unit.
2473         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2474         (<hw-memory>,gen-set-quiet): Ditto.
2475         (gen-mode-defs): Ditto.
2476         (sim-finish!): Convert current-arch-name to a string before using.
2477         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2478         (-gen-no-scache-semantic-fn): Ditto.
2479         (cgen-defs.h): Fetch string name of isa.
2480         (cgen-read.c): Convert current-arch-name to a string before using.
2481         (cgen-write.c): Ditto.
2482         * sim-model.scm (unit:enum): Fetch string name of unit.
2483         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2484         (-gen-model-timing-table): Fetch string name of model.
2485         (-gen-mach-model-table): Ditto.
2486         (-gen-mach-defns): Fetch string name of mach.
2487         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2488         (<hw-memory>,cxmake-get): Fetch string name of mode.
2489         (<hw-memory>,gen-set-quiet): Ditto.
2490         (gen-mode-defs): Ditto.
2491         (sim-finish!): Must quote empty list.
2492         * utils-cgen.scm (<ident>): Must quote empty list.
2493         (obj:str-name): New fn.
2494         (parse-comment): Result is a string.
2495         (parse-symbol): Result is a symbol.
2496         (parse-string): Result is a string.
2497         (keyword-list?): Convert arg to string before calling string-ref.
2498         (keyword-list->arg-list): Ditto.
2499         (gen-attr-name): Convert attr-name to string first.
2500         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2501         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2502         (gen-define-ifmt-ifields): Ditto for fld.
2503         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2504         map-over-string.
2505         (gen-file-name): Ditto.
2506         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2507         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2508         (reduce): Call eval1 instead of eval.
2509         * cpu/m32r.cpu (addi): Don't use `#.'.
2510
2511         * gen-all-sim: Fix some typos.
2512
2513 2003-07-08  Doug Evans  <dje@sebabeach.org>
2514
2515         * gen-all-doc: Ensure run from cgen src dir.
2516         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2517         * gen-all-sid: Similarily, in ./tmp-sid.
2518         * gen-all-sim: Similarily, in ./tmp-sim.
2519
2520 2003-06-20  Doug Evans  <dje@sebabeach.org>
2521
2522         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2523
2524 2003-06-19  Doug Evans  <dje@sebabeach.org>
2525
2526         * mach.scm (-ifld-already-defined?): New proc.
2527         (current-ifld-add!): Use it.
2528         (-op-already-defined?): New proc.
2529         (current-op-add!): Use it.
2530         (-insn-already-defined?): New proc.
2531         (current-insn-add!): Use it.
2532         (-minsn-already-defined?): New proc.
2533         (current-minsn-add!): Use it.
2534         (obj-isa-list): New proc.
2535         (isa-supports?): Use it.
2536
2537 2003-06-10  Doug Evans  <dje@sebabeach.org>
2538
2539         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2540         * cpu/m32r.cpu (all insns): Ditto.
2541
2542         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2543         "unspecified".
2544
2545         * gen-all-doc: Split arm and frv docs up a bit.
2546
2547         * cpu/arm.cpu: Add IDOC attribute.
2548         * cpu/frv.cpu: Ditto.
2549         * cpu/i960.cpu: Ditto.
2550         * cpu/openrisc.cpu: Ditto.
2551         * cpu/xstormy16.cpu: Ditto.
2552         * cpu/m32r.cpu: Ditto.
2553         (all insns): Explicitly specify IDOC attribute.
2554
2555         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2556         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2557         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2558         * Makefile.in: Regenerate.
2559         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2560         (-attr-read): Defer computing default value until we know the type.
2561         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2562         (<attr-list>:attr-present?): New method.
2563         (atlist-attr-present?,obj-attr-present?): New fns.
2564         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2565         (attr-builtin!): New insn attr IDOC.
2566         * cgen-doc.scm (doc-arguments): New args -I,-N.
2567         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2568         Support comment as fourth element of enum value.
2569         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2570         * html.scm (gen-html-header): New arg kind, all callers updated.
2571         (gen-table-of-contents): New arg insn-file, all callers updated.
2572         (gen-list-entry,gen-doc-header): New fn.
2573         (get-operands): Delete.
2574         (gen-iformat-table): Rewrite.
2575         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2576         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2577         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2578         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2579         (get-insns-for-category,gen-categories-insn-lists): New fns.
2580         (gen-insn-docs): Simplify each insn's semantics first.
2581         Print insn tables sorted by IDOC categories.
2582         (*insn-html-file-name*): New global.
2583         (cgen-insn.html): New fn.
2584         (cgen-all): Update.
2585         * insn.scm (<insn>): Create a setter for the `tmp' member.
2586         * semantics.scm (insn-build-known-values): Renamed from
2587         -build-known-values.  All callers updated.
2588
2589         * rtl.scm: Move traveral/evaluation support to ...
2590         * rtl-traverse.scm: New file.
2591         * read.scm: Maybe-load rtl-traverse.scm.
2592
2593         * rtl.scm (-rtx-valid-types): Add SETRTX.
2594
2595         * rtx-funcs.scm (nop,parallel): Fix mode.
2596
2597         * utils.scm (eqv-lookup-index): New fn.
2598         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2599
2600         * dev.scm (load-doc): Set APPLICATION.
2601
2602 2003-06-10  Dave Brolley  <brolley@redhat.com>
2603
2604         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2605         * sid-decode.scm: Generate #include of config.h into
2606         @prefix@-decode.cxx.
2607         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2608
2609 2003-06-07  Doug Evans  <dje@sebabeach.org>
2610
2611         * gen-all-sid: New file.
2612         * gen-all-opcodes: New file.
2613
2614 2003-06-05  Nick Clifton  <nickc@redhat.com>
2615
2616         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2617         version of the FRinti operand.
2618         (FRintjeven): Likewise for FRintj.
2619         (FRintkeven): Likewise for FRintk.
2620         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2621         media-quad-arith-sat-semantics, media-quad-arith-sat,
2622         conditional-media-quad-arith-sat, mdunpackh,
2623         media-quad-multiply-semantics, media-quad-multiply,
2624         conditional-media-quad-multiply, media-quad-complex-i,
2625         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2626         conditional-media-quad-multiply-acc, munpackh,
2627         media-quad-multiply-cross-acc-semantics, mdpackh,
2628         media-quad-multiply-cross-acc, mbtoh-semantics,
2629         media-quad-cross-multiply-cross-acc-semantics,
2630         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2631         media-quad-cross-multiply-acc-semantics, cmbtoh,
2632         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2633         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2634         cmhtob): Use new operands.
2635         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2636         (parse_even_register): New function.
2637
2638 2003-06-04  Doug Evans  <dje@sebabeach.org>
2639
2640         Better handling of 64 bit and mixed 32/64 bit architectures.
2641         * hardware.scm (hw-update-word-modes!): New fn.
2642         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2643         hw-update-word-modes!.
2644         (state-word-bitsize): Replace FIXME with requested check.
2645         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2646         * mode.scm (mode-find): Ignore INT,UINT.
2647         (-mode-word-sizes-kind): New global.
2648         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2649         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2650         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2651         of mode-list to ...
2652         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2653         unusable, correct values set later.
2654         (mode-finish!): Remove cruft.
2655         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2656         * opcodes.scm (opcodes-init!): Ditto.
2657         * rtx-funcs.scm (annul): Fix mode of pc.
2658         * cpu/ia64.cpu: Remove cruft that sets word modes.
2659         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2660
2661 2003-06-03  Nick Clifton  <nickc@redhat.com>
2662
2663         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2664         immediate value not unsigned.
2665
2666 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2667
2668         * cpu/sh.cpu: Amend comments to refer to SuperH.
2669         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2670         * cpu/sh64-media.cpu: Likewise.
2671         (Saturation): Update manual reference.
2672
2673 2003-05-15  Doug Evans  <dje@sebabeach.org>
2674
2675         * Makefile.am (srcroot): New var.
2676         (html): New rule.
2677         * Makefile.in: Regenerate.
2678         * cgen-doc.scm: New file.
2679         * html.scm: New file.
2680         * gen-all-doc: New file.
2681         * dev.scm (cload): Handle DOC application.
2682         (load-doc): New fn.
2683         * machs.scm (machs-for-cpu): New fn.
2684         * model.scm (models-for-cpu): New fn.
2685         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2686         All uses updated.
2687         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2688         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2689
2690         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2691         (-gen-decode-bits): Instead put in better fix here.
2692
2693         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2694
2695 2003-05-01  DJ Delorie  <dj@redhat.com>
2696
2697         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2698         word accesses.
2699         (set-alignfix-mem): Likewise.
2700
2701 2003-04-16  Dave Brolley  <brolley@redhat.com>
2702
2703         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2704         * utils.scm (copyright-fsf): Update generate copyright years.
2705         (copyright-cygnus): Ditto.
2706         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2707         operands.
2708         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2709         here.
2710         (<operand>'gen-profile-code): New parameter 'when'.
2711         (<iunit>'gen-profile-code): Ditto.
2712         (<insn>'gen-profile-code): Ditto.
2713         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2714         'insn_reference' for the 'after' function.
2715         * model.scm (unit:enum): Moved to sim-model.scm.
2716         * sim-model.scm (unit:enum): Moved from model.scm.
2717         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2718         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2719         * sid-model.scm (unit:enum): New version for sid.
2720         (gen-model-class-name): New function.
2721         (gen-model-unit-fn-decl): New function.
2722         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2723         (gen-model-unit-fn-name): New parameter 'when'.
2724         (-gen-model-insn-fn-name): Ditto.
2725         (-gen-model-insn-qualified-fn-name): New function.
2726         (-gen-model-insn-fn-decl): New function.
2727         (-gen-model-insn-fn-decls): New function.
2728         (-gen-model-insn-fn): New parameter 'when'. Call
2729         -gen-model-insn-qualified-fn-name.
2730         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2731         functions for modelling insn before and after execution.
2732         (-gen-model-class-decls): New function.
2733         (" (gen-model-class-name model) "): New function.
2734         (gen-model-classes): New function.
2735         (-gen-insn-timing): Generate functions for modelling insn before and after
2736         execution.
2737         (-gen-insn-unit-timing): Generate class-qualified names.
2738         (-gen-model-timing-table): Ditto.
2739         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2740         not needed (yet) by sid.
2741         (cgen-model.h): New function.
2742
2743 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2744
2745         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2746         * cpu/sh64-compact.cpu: Likewise.
2747         * cpu/sh64-media.cpu: Likewise.
2748
2749 2003-03-21  DJ Delorie  <dj@redhat.com>
2750
2751         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2752         which indicates if the sign flag is set from bit 15 or 7.
2753         Adjust all callers.
2754         (set-psw): New argument ws, propogate it.
2755         (set-psw-nowrite): Likewise.
2756         (set-mem-psw): Likewise.
2757         (set-psw-carry): Likewise.  Use temporaries to prevent
2758         prematurely overwriting needed inputs.
2759         (set-psw-rrotate17): Fix logic.
2760         (shrgrgr): Preserve carry for zero-bit shifts.
2761         (shrgrimm): Likewise.
2762         (shlgrgr): Likewise.
2763         (shlgrimm): Likewise.
2764         (asrgrgr): Likewise.
2765         (asrgrimm): Likewise.
2766         (reset): New.
2767
2768 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2769
2770         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2771
2772 2002-03-05  DJ Delorie  <dj@redhat.com>
2773
2774         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2775         prematurely overwriting needed inputs.
2776         (set-psw-sub): Likewise.
2777
2778 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2779
2780         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2781
2782 2003-02-18  DJ Delorie  <dj@redhat.com>
2783
2784         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2785         (movlmemimm): Just mask the address.
2786         (movhmemimm): Likewise.
2787         (movlmemgr): Likewise.
2788         (movhmemgr): Likewise.
2789         (set-psw): Always set the psw last.
2790         (set-psw-carry): Likewise.
2791         (set-psw-add): Likewise.
2792         (set-psw-sub): Likewise.
2793
2794         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2795         of 16 patterns from the set-psw-rotate17 function.
2796         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2797         movgriipostincgr, movgriipredecgr): Set psw correctly.
2798         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2799         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2800         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2801
2802 2003-02-11  Dave Brolley  <brolley@redhat.com>
2803
2804         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2805         @arch@_cgen-ifld_table.
2806         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2807         @arch@_cgen-ifld_table.
2808
2809 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2810
2811         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2812
2813 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2814
2815         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2816         empty ISAs.
2817
2818 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2819
2820         * utils-gen.scm (attr-int-gen-defn): Define.
2821
2822 2002-12-21  Doug Evans  <dje@sebabeach.org>
2823
2824         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2825         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2826
2827         * dev.scm (cload): Update location of .cpu files.
2828
2829 2002-12-19  Doug Evans  <dje@sebabeach.org>
2830
2831         * utils-sim.scm (gen-profile-sym): New fn.
2832         (<operand>,sbuf-profile-sym): New method.
2833         (<operand>,sbuf-profile-elm): Use it.
2834         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2835         of hardcoding symbol name.
2836         (<operand>,gen-profile-code): Ditto.
2837         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2838         symbol name.
2839
2840         * mode.scm (mode-sem-mode): New fn.
2841         * operand.scm (op:new-mode): Update. mode-name.
2842         (op-natural-mode?) New fn.
2843         * rtl.scm (hw): Set hw-name,mode-name.
2844
2845         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2846         Instead do:
2847         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2848         as size of IDESC-TABLE-VAR.
2849         (@prefix@_init_idesc_table): Ditto.
2850         * sim-model.scm (-gen-mach-defns): Ditto.
2851         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2852
2853         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2854
2855         * insn.scm (-parse-insn-format-symbol): Improve error message.
2856         (-parse-insn-format): Ditto.
2857
2858         * gen-all-sim: New script.
2859
2860 2002-12-16  DJ Delorie  <dj@delorie.com>
2861
2862         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2863
2864 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2865
2866         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2867         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2868         (parse_immediate16): Handle immediate16 values, which now include
2869         @hi(label) and @lo(label)
2870
2871 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2872
2873         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2874         Add braces and cast for union field.
2875         (gen-multi-ifield-nodes): Add braces and cast for union field.
2876         (cgen_operand_table): Similarly fix sentinel.
2877         (cgen_cpu_close): Constify "insns".  Formatting.
2878         (cgen-desc.c): Include xregex.h.
2879         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2880         Prototype.
2881         <opc.c>: Include safe-ctype.h.
2882         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2883         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2884         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2885         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2886         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2887         (parse_addr16): Correct type of "value".  Formatting.
2888         (parse_addr16_p): Likewise.
2889         (parse_addr16_cjp): Likewise.
2890         (parse_lit8): Likewise.
2891         (parse_bit3): Formatting.
2892         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2893         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2894         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2895         print_decimal.
2896         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2897         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2898         (print_dollarhex8): Likewise.
2899         (print_dollarhex16): Likewise.
2900         (print_dollarhex_addr16h): Likewise.
2901         (print_dollarhex_addr16l): Likewise.
2902         (print_dollarhex_p): Likewise.
2903         (print_dollarhex_cj): Likewise.
2904         (print_decimal): Likewise.
2905         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2906
2907 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2908
2909         * doc/rtl.texi (Model variants): Mention current limitations for
2910         unit inputs and outputs.
2911         (Hardware elements) <attribute PROFILE>: Be slightly more
2912         verbose.
2913         (Instructions) <timing>: input/output overrides have a direction
2914         operand.
2915
2916 2002-11-25  DJ Delorie  <dj@redhat.com>
2917
2918         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2919
2920 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2921
2922         * cpu/iq10.cpu: New file.
2923         * cpu/iq2000.cpu: Likewise.
2924         * cpu/iq2000.opc: Likewise.
2925         * cpu/iq2000m.cpu: Likewise.
2926
2927 2002-11-19  DJ Delorie  <dj@redhat.com>
2928
2929         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2930
2931 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2932
2933         * dev.scm: Call getenv with a string, not a symbol.
2934
2935 2002-10-08  Doug Evans  <dje@transmeta.com>
2936             Hans-Peter Nilsson  <hp@axis.com>
2937
2938         * types.scm (bitrange-overlap?): Handle lsb0?.
2939
2940 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2941
2942         From Robert Cragie <rcc@jennic.com>:
2943         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2944
2945 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2946             Ben Elliston  <bje@redhat.com>
2947             John Healy  <jhealy@redhat.com>
2948             Jeff Johnston  <jjohnstn@redhat.com>
2949             Alan Lehotsky  <alehotsky@redhat.com>
2950             Ubicom Inc. <SupportDesk@ubicom.com>
2951
2952         * cpu/ip2k.cpu: New file.
2953         * cpu/ip2k.opc: Likewise.
2954
2955 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2956
2957         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2958
2959 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2960
2961         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2962         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2963         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2964         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2965         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2966         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2967         (-sthi-byte): If there is a single byte to store, store it at
2968         proper address.
2969         (sthil, sthiq): Fix big-endian behaviour.
2970         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2971         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2972         (saturate): Use Dimode to check if saturation operation is required.
2973         (usaturate): Likewise.
2974         (mpermw): Fix mask.
2975         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2976         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2977         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2978         (msadubq): Fix subword index in second operand of first subtraction.
2979
2980 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2981
2982         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2983         code.
2984
2985 2002-06-18  Dave Brolley  <brolley@redhat.com>
2986
2987         * cpu/frv.cpu: New cpu description.
2988         * cpu/frv.opc: New cpu support code.
2989
2990 2002-05-21  Dave Brolley  <brolley@redhat.com>
2991
2992         * decode.scm (-opcode-slots): Don't consider bits beyond the
2993         length of the insn.
2994
2995 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2996
2997         * cpu/powerpc.cpu: New file.
2998
2999 2002-05-01  Graydon Hoare  <graydon@redhat.com>
3000
3001         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3002
3003 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
3004
3005         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3006         results are expanded recursively.
3007
3008 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
3009
3010         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3011         call scan-symbol on it, to enable recursive macro-expansion.
3012
3013 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
3014
3015         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3016         for multiple-isa configurations.
3017         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3018
3019 2002-02-04  Ben Elliston  <bje@redhat.com>
3020
3021         * cpu/sh.cpu, cpu/sh.opc: New files.
3022         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3023
3024 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
3025
3026         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3027         (Enumerated constants): Mention that an ifield must not specify a
3028         multi-ifield.
3029         (Instruction operands): Ditto for index.
3030         (Expressions) <parallel>: Remove misplaced mention of local
3031         variables.
3032         <if>: Mention that mode must be specified and non-VOID when the
3033         result is used.
3034
3035 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3036
3037         * doc/porting.texi: When referring to *.opc, mention they are in
3038         the cpu subdir.  Call top-level directory toplevel, not devo.
3039         Close string in define-normal-insn example.
3040
3041         * doc/pmacros.texi: Fix .substr typo to .substring.
3042         Mention that .sym expansions are not further expanded.
3043
3044 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3045
3046         * desc-cpu.scm (ifld-number-cache): Add.
3047         (ifld-number): Add.
3048         (gen-maybe-multi-ifld-of-op): Add.
3049         (gen-maybe-multi-ifld): Add.
3050         (gen-multi-ifield-nodes): Add.
3051         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3052
3053 2002-01-10  matthew green  <mrg@redhat.com>
3054
3055         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3056         (gr-Rb-names): ... to this.
3057         (h-Rb): New hardware piece.
3058         (h-Rbj): Use gr-Rb-names.
3059         (Rb): Use h-Rb.
3060         (holdx): New instruction.
3061
3062 2002-01-07  Ben Elliston  <bje@redhat.com>
3063
3064         * utils.scm (package-cygnus-simulators): Rename from this ..
3065         (package-red-hat-simulators): .. to this.
3066         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3067         * sid-cpu.scm (cgen-desc.h): Likewise.
3068         (cgen-cpu.h): Likewise.
3069         (cgen-defs.h): Likewise.
3070         (cgen-write.cxx): Likewise.
3071         (cgen-semantics.cxx): Likewise.
3072         (cgen-sem-switch.cxx): Likewise.
3073         * sid-decode.scm (cgen-decode.h): Likewise.
3074         (cgen-decode.cxx): Likewise.
3075         * sid-model.scm (cgen-model.cxx): Likewise.
3076         * sid.scm (option-set!): Likewise.
3077         * sim.scm (option-set!): Likewise.
3078
3079 2002-01-07  Ben Elliston  <bje@redhat.com>
3080
3081         * utils.scm (copyright-fsf): Add 2002.
3082         (copyright-cygnus): Rename to copyright-red-hat.
3083         (copyright-red-hat): Add 2002.
3084         (CURRENT-COPYRIGHT): Update comment.
3085         * opcodes.scm (option-set!): Update callers.
3086         * sid-model.scm (cgen-model.cxx): Likewise.
3087         * sid-cpu.scm: Likewise.
3088         * sid-decode.scm: Likewise.
3089         * sid.scm (option-set!): Handle "redhat" as an option for
3090         "copyright"; use copyright-red-hat.
3091         * sim.scm (option-set!): Likewise.
3092
3093 2002-01-03  Dave Brolley  <brolley@redhat.com>
3094
3095         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3096         number of insns in the list.  Update the population count function to
3097         identify and prioritize 3 catgories of useful bits.
3098         (-population-top-few): Don't consider bits with a population count of
3099         zero.
3100         (-build-decode-table-entry): Don't call
3101         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3102         identical insns at the next tree level.
3103         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3104         this function is no longer used.
3105         (filter-non-specialized-ambiguous-insns): New function.
3106         (filter-identical-ambiguous-insns): New function.
3107         (find-identical-insn): New function.
3108         (filter-harmlessly-ambiguous-insns): Removed.
3109
3110 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3111             matthew green  <mrg@redhat.com>
3112             Frank Ch. Eigler  <fche@redhat.com>
3113             Nick Clifton  <nickc@cambridge.redhat.com>
3114
3115         * cpu/xstormy16.cpu: New file.
3116         * cpu/xstormy16.opc: New file.
3117
3118 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3119
3120         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3121
3122 2001-11-14  Dave Brolley  <brolley@redhat.com>
3123
3124         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3125         of the field being extracted.
3126
3127 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3128
3129         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3130         (cos ...) and (sin ..) rtx.
3131
3132 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3133
3134         * desc-cpu.scm: Do not include ctype.h in generated desc
3135         files.  They will inherit safe-ctype.h instead.
3136
3137 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3138
3139         * desc-cpu.scm: Add missing function prototypes (for generated
3140         C files).  Fix compile time warning messages about unused
3141         parameters (for generated C files).
3142         * opc-asmdis.scm: The same.
3143         * opc-ibld.c: The same.
3144         * opc-itab.scm: The same.
3145         * cpu/fr30.opc: The same.
3146         * cpu/m32r.opc: The same.
3147         * cpu/openrisc.opc: The same.
3148
3149 2001-09-17  graydon hoare  <graydon@redhat.com>
3150
3151         * insn.scm (syntax-break-out): Correct logic in handling escaped
3152         syntax characters.
3153
3154 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3155
3156         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3157         call @arch@_cgen_build_insn_regex now that regex support is in
3158         libiberty.
3159
3160 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3161
3162         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3163         (mask-superset?): Look for strict supersets to allow rejection of
3164         duplicate insns.
3165
3166 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3167
3168         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3169         (cgen-desc.h): Call it.
3170         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3171         decode-size.
3172         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3173         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3174
3175 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3176
3177         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3178         mach->cpu insn-chunk-bitsize.
3179         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3180         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3181         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3182         (-cpu-parse, -cpu-read): Parse/initialize it.
3183         * doc/rtl.texi (define-cpu): Document it.
3184
3185 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3186
3187         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3188
3189 2001-07-06  Ben Elliston  <bje@redhat.com>
3190
3191         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3192
3193 2001-07-05  Ben Elliston  <bje@redhat.com>
3194
3195         * README: Update.
3196
3197         * read.scm (include): Include files from srcdir/cpu.
3198         (-cgen): Likewise for loading .cpu files.
3199         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3200         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3201         * *.opc: Likewise.
3202         * simplify.inc: Likewise.
3203
3204 2001-07-04  Ben Elliston  <bje@redhat.com>
3205
3206         * read.scm (include): Log "Including file" message at level 1,
3207         rather than outputting it with (display).
3208         (cpu-load): Log "Loading cpu description" and "Processing cpu
3209         description" messages at levels 1 and 2, respectively, rather than
3210         using (display).
3211
3212 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3213
3214         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3215         CGEN_KEYWORD_ENTRY initializers.
3216
3217         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3218         (<operand> 'test-data): Involve both the index and the hardware
3219         in testcase generation.
3220         (<hw-indx> 'test-data): Generate test data from the underlying
3221         object.
3222         (<ifield> 'test-data): Generate test data by computing bit
3223         patterns for the field, then decoding them.
3224         (<hw-address> 'test-data): Allow for new calling convention.
3225         (<hw-iaddress> 'test-data): Likewise.
3226         (<keyword> 'test-data): Convert index values into keywords.
3227         (<hw-asm> 'test-data): Convert index values into integer strings.
3228
3229         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3230
3231 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3232
3233         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3234         is required for multi-mode hw types (memory).
3235
3236 2001-05-11  Ben Elliston  <bje@redhat.com>
3237
3238         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3239         when generating allinsn.d from objdump output. Without it, the
3240         testsuite will treat $ as the regular expression for end of line.
3241
3242 2001-05-09  Ben Elliston  <bje@redhat.com>
3243
3244         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3245         with `cgen_cpu_open'; documentation had become out of date.
3246         * doc/rtl.texi (Instruction operands): Likewise.
3247
3248 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3249
3250         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3251         various-base-length instruction sets.
3252
3253 2001-04-02  Ben Elliston  <bje@redhat.com>
3254
3255         * sid-cpu.scm (-last-insn): New function.
3256         (-gen-sem-switch-engine): Loop through idesc while less than or
3257         equal to the last instruction enum, not less than the MAX enum.
3258         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3259         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3260         table's size to be the last instruction enum plus one, not
3261         @PREFIX@_INSN_MAX.
3262         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3263         instruction onto the instruction list.
3264
3265         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3266         using the size of the table and its elements.
3267         (-gen-decode-insn-globals): Define the idesc table's size to be
3268         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3269         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3270         last instruction enum plus one, not @CPU@_INSN_MAX.
3271
3272 2001-03-28  Ben Elliston  <bje@redhat.com>
3273
3274         * doc/version.texi (UPDATED, EDITION): Update.
3275         * doc/stamp-vti: Likewise.
3276
3277 2001-03-26  Ben Elliston  <bje@redhat.com>
3278
3279         * doc/credits.texi (Credits): Update.
3280
3281         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3282         specified prefix and, if necessary, escape `$' in gas-build.sh to
3283         prevent unwanted shell variable expansion.
3284
3285 2001-03-24  Ben Elliston  <bje@redhat.com>
3286
3287         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3288         (<keyword>,test-data): Likewise.
3289         (<hw-address>,test-data): Likewise.
3290         (<hw-iaddress>,test-data): Likewise.
3291         (-collate-test-set): New function.
3292         (build-test-set): Use it.
3293         (gen-gas-test): Generate five test cases per instruction.
3294         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3295
3296         * read.scm: Load "slib/random" if random is not defined.
3297         * slib/random.scm: New file.
3298
3299         * utils.scm: Remove comments about the Hobbit compiler.
3300         (copyright-cygnus): Add 2001.
3301         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3302         (package-gnu-simulators): Tidy.
3303
3304 2001-03-23  Ben Elliston  <bje@redhat.com>
3305
3306         * cgen-gas.scm: Inline documentation improvements.
3307
3308 2001-03-21  Ben Elliston  <bje@redhat.com>
3309
3310         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3311         given in a syntax string is undefined.
3312
3313         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3314         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3315
3316 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3317
3318         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3319         for arg_type CGEN_CPU_OPEN_BFDMACH.
3320
3321 2001-03-20  Ben Elliston  <bje@redhat.com>
3322
3323         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3324         instruction onto the instruction list. Define MAX_INSNS to be the
3325         value of the last instruction enum plus one.
3326
3327 2001-03-14  Nick Clifton  <nickc@redhat.com>
3328
3329         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3330
3331 2001-03-05  Dave Brolley  <brolley@redhat.com>
3332
3333         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3334         if the number of ifields is greater than zero.
3335
3336 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3337
3338         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3339         Emit LIKELY/UNLIKELY branch probability hints.
3340         * sid-decode.cpu (-gen-record-args): Ditto.
3341
3342 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3343
3344         * desc-cpu.scm (-gen-hash-defines): Rename
3345         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3346
3347 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3348
3349         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3350         writeback tracking.
3351         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3352         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3353         if unnecessary.
3354         * sid.scm (<operand> gen-write): Use unsigned long long expression
3355         for writeback.
3356         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3357         (<unit> gen-profile-code): Ditto.
3358
3359 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3360
3361         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3362         (regno ...) rtx.
3363
3364 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3365
3366         * operand.scm (<operand> pretty-sem-name): New field.
3367         (<operand> make): Initialize it from hw-name.
3368         (op:set-pretty-sem-name!): New function.
3369         (<operand> gen-pretty-name): Default to fetching new field.
3370         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3371         sem-name setting from -rtx-hw-name.
3372
3373 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3374
3375         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3376         its subsequent gen-pretty-name.
3377
3378         * read.scm: Increase thread working stack limit and backtrace
3379         depth limits.
3380
3381 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3382
3383         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3384
3385 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3386
3387         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3388         current insn plus 4.
3389         (h-delay-insn): New hardware register.
3390         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3391         (l-jalr): Likewise.
3392         (l-bal): Likewise.
3393
3394         * openrisc.opc (parse_hi16): Sign extend value.
3395         (parse_lo16): Likewise.
3396
3397 2001-01-06  Ben Elliston  <bje@redhat.com>
3398
3399         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3400         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3401         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3402         (-gen-semantic-fn-table): Likewise.
3403         (-gen-scache-semantic-fn): Likewise.
3404         (-gen-no-scache-semantic-fn): Likewise.
3405         (cgen-read.c): Likewise.
3406         (cgen-sem-switch.c): Likewise.
3407         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3408         is a filename prefix.
3409         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3410         (-gen-decode-insn-globals): Likewise.
3411         (-gen-idesc-decls): Likewise.
3412         (cgen-decode.h): Likewise.
3413         (cgen-decode.c): Likewise.
3414         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3415         (gen-cpu-insn-enum): Likewise.
3416         (sim-finish!): Likewise.
3417
3418 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3419
3420         * openrisc.cpu: New file.
3421         * openrisc.opc: Likewise.
3422
3423 2000-12-12  Ben Elliston  <bje@redhat.com>
3424
3425         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3426
3427 2000-12-07  Ben Elliston  <bje@redhat.com>
3428
3429         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3430         "insn" when there are zero ifields to extract.
3431
3432 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3433
3434         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3435         used by simple/non-scache simulators.
3436         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3437         regardless of with-scache?.
3438         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3439
3440 2000-12-03  Ben Elliston  <bje@redhat.com>
3441
3442         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3443         (cgen-desc.c): Likewise.
3444
3445 2000-12-01  Greg McGary  <greg@mcgary.org>
3446
3447         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3448
3449 2000-12-01  Ben Elliston  <bje@redhat.com>
3450
3451         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3452         definitions if run without with-multipla-isa?.
3453         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3454         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3455
3456 2000-11-24  Ben Elliston  <bje@redhat.com>
3457
3458         * sim-cpu.scm (-gen-hardware-struct): New function.
3459         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3460         hardware elements wich have share one or more ISAs with the ISAs
3461         being kept.
3462
3463         * sim.scm (-with-multiple-isa?): New symbol.
3464         (with-multiple-isa?): New function.
3465         (option-init!): Initialise -with-multiple-isa?.
3466         (option-set!): Handle with-multiple-isa option.
3467
3468 2000-11-21  Ben Elliston  <bje@redhat.com>
3469
3470         * utils.scm (copyright-fsf): Add the year 2000.
3471
3472 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3473
3474         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3475         unneeded "\n\n" from F() macro definition.
3476
3477 2000-11-15  Greg McGary  <greg@mcgary.org>
3478
3479         * utils-cgen.scm (gen-define-with-symcat): New function.
3480         * desc-cpu.scm (gen-ifld-defns): Use it.
3481         (gen-hw-table-defns): Use it.
3482         (-gen-hash-defines): Use it.
3483         (gen-operand-table): Use it.
3484         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3485         * opc-itab.scm (-gen-ifmt-table): Use it.
3486         (-gen-insn-opcode-table): Use it.
3487         (-gen-macro-insn-table): Use it.
3488         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3489         * sim-cpu.scm (cgen-semantics.c): Use it.
3490         (cgen-sem-switch.c): Use it.
3491
3492 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3493
3494         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3495         request to emit calls to insn extractors as functions rather than
3496         branches to inline blocks.
3497         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3498         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3499
3500         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3501         to extractor clauses.
3502
3503 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3504
3505         * decode.scm (-distinguishing-bit-population): Significantly
3506         improve popularity heuristic.  Renamed from
3507         (-mask-bit-population): Gone.
3508         (-population-above-threshold): Sort new bit numbers in order of
3509         popularity.
3510         (-population-top-few): Allow up to three more bits to be selected
3511         than requested.  Correct selection order to prefer better bits.
3512         Correct bug in fewer-than-requested case.  Keep threshold as
3513         floating-point.
3514         (decode-best-get-bits): Pass also the insn-values.
3515
3516         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3517         future optimization.
3518
3519         * utils.scm (message): Format nested lists better.
3520
3521 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3522
3523         * dev.scm: Add srcdir to %load-path.
3524
3525         * rtx-funcs.scm (subword): Mode of argument can be different
3526         than mode of result, so don't use OP0 to specify argument's mode.
3527
3528 2000-11-02  Ben Elliston  <bje@redhat.com>
3529
3530         * doc/porting.texi (Building a GAS test suite): Document my change
3531         to gas-build.sh.
3532
3533 2000-11-01  Ben Elliston  <bje@redhat.com>
3534
3535         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3536
3537 2000-10-31  Ben Elliston  <bje@redhat.com>
3538
3539         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3540         with no command line arguments if the gas build directory can be
3541         determined.
3542
3543 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3544
3545         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3546         op-ifld -> op-ifield.
3547
3548 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3549
3550         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3551
3552 2000-10-13  matthew green  <mrg@cygnus.com>
3553
3554         * utils-cgen.scm (get-ifetch): Move from here ...
3555         * sim.scm (get-ifetch): ... to here.
3556         * sid.scm (get-ifetch): Copy and port to c++.
3557
3558 2000-10-06  Dave Brolley  <brolley@redhat.com>
3559
3560         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3561         ifld-start + ifld-word-offset.
3562         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3563         the field is beyond the base number of bits.
3564         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3565         (gen-extract-ifields): Ditto.
3566         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3567         characters in the regular expression.
3568
3569 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3570
3571         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3572         preprocessor constant.
3573
3574 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3575
3576         * slib/logical.scm: New file from slib.  Provides robust bitwise
3577         logical operations for large integers.
3578         * read.scm: maybe-load it.
3579
3580 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3581
3582         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3583         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3584         single-isa predicate, but support keep-isa filtering.
3585
3586 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3587
3588         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3589         statement-expression and comma-expression contexts.
3590         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3591
3592 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3593
3594         * decode.scm (-population-top-few): Signal error gracefully if
3595         decoding is about to become ambiguous.
3596
3597 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3598
3599         * doc/rtl.texi (decode-assist): Describe this field as optional.
3600
3601 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3602
3603         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3604         with decode proc.
3605
3606 2000-09-05  Dave Brolley  <brolley@redhat.com>
3607
3608         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3609         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3610
3611 2000-08-29  Dave Brolley  <brolley@redhat.com>
3612
3613         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3614         adata-integral-insn is true for this architecture.
3615
3616 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3617
3618         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3619         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3620         * rtl-c.scm (-c-rtl-get): Improve an error message.
3621         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3622
3623 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3624
3625         * Makefile.in (DIST_COMMON): Regenerated.
3626         * ifield.scm (<derived-ifield> needed-iflds): New method.
3627         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3628         sfmts built from <derived-ifield>s.
3629         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3630         type symbol 'derived-ifield, not an unparseable string.
3631         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3632         (-sfmt-contents): Add tracing.
3633
3634         From Doug Evans <dje@transmeta.com>:
3635         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3636         C code.
3637
3638 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3639
3640         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3641         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3642         (-rtl-c-get): Rename from rtl-c-get.
3643         (rtl-c-get): New fn for getter logging.
3644
3645 2000-07-28  Ben Elliston  <bje@redhat.com>
3646
3647         * NEWS: Update.
3648
3649 2000-07-25  Ben Elliston  <bje@redhat.com>
3650
3651         * doc/credits.texi (Credits): Add Frank Eigler.
3652
3653 2000-07-24  Dave Brolley  <brolley@redhat.com>
3654
3655         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3656         fully.
3657         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3658         (<keyword>): Initialize all elements fully.
3659         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3660         fully.
3661         (-gen-mach-table-defns): Ditto.
3662         (-gen-ifld-defns): Ditto.
3663         (-gen-operand-table): Ditto.
3664         (-gen-insn-table): Ditto.
3665         (-gen-cpu-open): Nothing to do for the mach table.
3666
3667 2000-07-13  Ben Elliston  <bje@redhat.com>
3668
3669         * doc/version.texi (UPDATED): Update.
3670
3671 2000-07-05  Ben Elliston  <bje@redhat.com>
3672
3673         * configure.in (AC_PATH_PROG): Remove.
3674         * configure: Regenerate.
3675         * Makefile.am (GUILE): Locate guile dynamically.
3676         * Makefile.in: Regenerate.
3677         * doc/Makefile.in: Likewise.
3678
3679 2000-07-03  Ben Elliston  <bje@redhat.com>
3680
3681         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3682         * opc-itab.scm (cgen-opc.c): Likewise.
3683
3684 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3685
3686         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3687         guile 1.4 compatibility.
3688         (rtx-env-dump): Comment out buggy display calls.
3689
3690 2000-06-15  matthew green  <mrg@redhat.com>
3691
3692         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3693
3694 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3695
3696         * Makefile.in: Regenerated.
3697
3698         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3699         (gen-ifld-defns): Ditto.
3700         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3701         * rtl.c (rtl-finish!): Ditto.
3702         * opc-itab.scm (-gen-ifield-decls): Ditto.
3703         * opcodes.scm (gen-switch): Exclude derived operands.
3704         * operand.scm (op-iflds-used): Expand derived operands.
3705         (hw-index-derived): New dummy function to create dummy object.
3706         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3707         constructor.  Set object's hw-name and index fields.
3708         (-anyof-merge-subchoices): Set instance object's index also.
3709         (-anyof-name): New helper function.
3710         (anyof-merge-semantics): Correct replacement of operand names in
3711         anyof instance.
3712         (op-ifield): Tolerate derived-operands and their funny indices better.
3713         * ifield.scm (ifld-known-values): Expand derived ifields.
3714         (non-multi-ifields, non-derived-ifields): New utility functions.
3715         (ifld-decode-mode): Tolerate objects with unbound decode field.
3716         * iformat.scm (compute-insn-length): Expand derived ifields.
3717         (compute-insn-base-mask): Ditto.
3718         * insn.scm (insn-base-ifields): Remove.
3719         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3720         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3721         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3722         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3723         (-frag-test-data): Ditto.
3724         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3725         (-gen-sem-switch-engine); Ditto.
3726         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3727         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3728         (-gen-record-args): Tolerate unbound op-ifield.
3729         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3730         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3731         Exclude multi-insns.
3732         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3733         * utils-sim.scm (op-extract?): Handle derived operands.
3734
3735         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3736         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3737         * hardware.scm (hardware-for-mode): New function.
3738
3739         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3740         cleaning up decode tables.
3741         (mask-superset?): Little helper function for above.
3742         * decode.scm (-build-decode-table-entry): Call it.
3743         (-opcode-slots): Add some more tracing.
3744         * arm.cpu: Disable decode-splits construct due to implementation
3745         conflict with `filter-harmlessly-ambiguous-insns'
3746
3747         * decode.scm (-population-top-few): New function for better decode
3748         bit generation.  Includes minor helper functions.
3749         (decode-get-best-bits): Call it instead.
3750         (OLDdecode-get-best-bits): Renamed previous version of above.
3751
3752
3753 2000-06-13  Ben Elliston  <bje@redhat.com>
3754
3755         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3756         for the Guile library directory.
3757         * configure: Regenerate.
3758         * Makefile.in, doc/Makefile.in: Regenerate.
3759
3760         * Makefile.in, doc/Makefile.in: Regenerate.
3761         * configure.in: Remove unnecessary tests. Move to version 1.0.
3762         * acconfig.h, config.in: Remove.
3763         * configure, aclocal.m4: Regenerate.
3764         * doc/stamp-vti, doc/version.texi: Likewise.
3765         * AUTHORS: New file.
3766
3767 2000-06-07 Ben Elliston  <bje@redhat.com>
3768
3769         * fixup.scm (symbol-bound?): Reduce debugging output.
3770
3771 2000-06-02  matthew green  <mrg@redhat.com>
3772
3773         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3774         a given instruction, replacing derived fields with their subfields.
3775         (insn-value): Use `insn-base-ifields' to find all constant values.
3776         (multi-insn-instantiate!): Comment some debug messages.
3777
3778 2000-06-01  Ben Elliston  <bje@redhat.com>
3779
3780         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3781         symbol names used in a (c-call ..) rtx.
3782
3783         * sim-test.scm (build-test-set): Return (()) for an instruction
3784         with no operands, so it too is included in the generated test set.
3785
3786 2000-05-31  Ben Elliston  <bje@redhat.com>
3787
3788         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3789         (sim-test): Likewise.
3790         * Makefile.in: Regenerate.
3791
3792 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3793
3794         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3795         stack traceback, in an order that resembles gdb's `bt'.
3796
3797 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3798
3799         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3800         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3801         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3802         multi insns.
3803         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3804         virtual functions.
3805         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3806         * iformat.scm (ifmt-expanded-ifields): Gone.
3807         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3808         work.
3809         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3810         ifmt entries.
3811
3812         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3813         code.
3814
3815 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3816
3817         * sid.scm (with-any-profile?): New function clone.
3818
3819 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3820
3821         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3822
3823 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3824
3825         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3826         (-multi-ifield-read): Parse them.
3827         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3828         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3829         (multi-ifield gen-extract): Add decode hook.
3830         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3831
3832         * insn.scm (syntax-break-out): More correctly handle \-escaped
3833         syntax characters.
3834         (syntax-make-elements): Ditto.
3835         * opc-itab.scm (compute-syntax): Ditto.
3836
3837 2000-05-17  Ben Elliston  <bje@redhat.com>
3838
3839         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3840
3841 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3842
3843         * gas-test.scm (build-test-set): Return (()) for an instruction
3844         with no operands, so it too is included in the generated test set.
3845
3846 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3847
3848         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3849         IFMT_OPERANDS and SYNTAX_BYTES.
3850
3851 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3852
3853         * sim.scm (with-any-profile?): New function.
3854         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3855         to decide whether or not to include profiling counters.
3856
3857 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3858
3859         Fuller derived-operand support for opcodes.
3860         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3861         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3862         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3863         (gen-operand-table): Omit derived- and anyof- operands from table.
3864         (gen-insn-table): Omit multi-insns from table.
3865         * iformat.scm (ifmt-expanded-fields): New function to expand
3866         subfields of derived-ifields.
3867         (ifmt-compute!): Ignore remaining multi-insns.
3868         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3869         multi-insns.
3870         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3871         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3872         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3873         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3874         (gen-switch): Omit anyof-operands.
3875         * operand.scm (-anyof-syntax): New function.
3876         (-anyof-merge-syntax): Call it.
3877         * utils.scm (collect): New idiomatic function.
3878
3879 2000-05-10  Ben Elliston  <bje@redhat.com>
3880
3881         * m68k.cpu: New file (work in progress).
3882
3883 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3884
3885         * Makefile.am (all-local): New target.  Create stamp-cgen.
3886         * Makefile.in: Regenerated.
3887         * doc/Makefile.in: Regenerated.
3888
3889 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3890
3891         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3892         (-operand-parse-setter): Ditto.
3893         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3894         for CACHE-ADDR operands.
3895         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3896         trace entries.  Widen byte-wide values for printing.
3897         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3898         Widen byte-wide values for printing.  Hexify memory addresses.
3899
3900 2000-04-23  matthew green  <mrg@redhat.com>
3901
3902         * m32r.cpu: Fix a typo.
3903
3904 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3905
3906         * ia64.cpu (define-model): Change merced to Itanium.
3907         (f-qp): Change quilifying to qualifying.
3908         (movbr_ph, movbr_pvec): Delete.
3909         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3910
3911 2000-04-07  Ben Elliston  <bje@redhat.com>
3912
3913         * doc/porting.texi (Building a simulator test suite): Clarify
3914         where generated test cases are placed.
3915
3916 2000-04-07  Ben Elliston  <bje@redhat.com>
3917
3918         * Makefile.am (gas-test): Remove dependency on `cgen'.
3919         (sim-test): Ditto.
3920         * Makefile.in: Regenerate.
3921
3922 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3923
3924         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3925         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3926         type reconfiguration.
3927         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3928         with-profile?.
3929
3930 2000-03-30  Ben Elliston  <bje@redhat.com>
3931
3932         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3933
3934 2000-03-24  Ben Elliston  <bje@redhat.com>
3935
3936         * Makefile.am (stamp-cgen): Reinstate target.
3937         * Makefile.in: Regenerate.
3938
3939 2000-03-22  Ben Elliston  <bje@redhat.com>
3940
3941         * slib/ppfile.scm: Remove; unused.
3942         * slib/defmacex.scm: Likewise.
3943
3944 2000-03-21  Ben Elliston  <bje@redhat.com>
3945
3946         * doc/internals.texi (Source file overview): Document.
3947
3948         * Makefile.am (GUILEDIR): Remove.
3949         (CGEN): Ditto. Callers use $(GUILE) instead.
3950         (GUILEFLAGS): Ditto.
3951         (CGENFILES): Ditto.
3952         (APPDESCFILES): Ditto.
3953         (OPCODESFILES): Ditto.
3954         (SIMFILES): Ditto.
3955         (pkgdata_SCRIPTS): Ditto.
3956         (stamp-cgen): Remove target.
3957         * Makefile.in: Regenerate.
3958
3959         * configure.in: Remove header and library tests.
3960         * configure: Regenerate.
3961         * config.in: Likewise.
3962
3963 2000-03-20  Ben Elliston  <bje@redhat.com>
3964
3965         * read.scm: Cease loading "hob-sup.scm".
3966         * utils.scm: Inherit the fastcall family of procedures (for now).
3967         * hob-sup.scm: Remove.
3968
3969 2000-03-20  Ben Elliston  <bje@redhat.com>
3970
3971         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3972         * configure: Regenerate.
3973         * gdbinit.in: Remove.
3974
3975 2000-03-17  Ben Elliston  <bje@redhat.com>
3976
3977         * Makefile.am (CGEN): Use guile, not cgen.
3978         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3979         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3980         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3981         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3982         (HOB_OBJS): Likewise.
3983         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3984         (CGENOBJS): Likewise.
3985         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3986         (hobbit, hobbit.o, hobbit.c): Remove targets.
3987         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3988         (CLEANFILES): Update.
3989         * acconfig.h (WITH_HOBBIT): Remove.
3990         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3991         option --with-cgen-hobbit.
3992         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3993         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3994         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3995         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3996         * Makefile.in: Regenerate.
3997         * config.in: Likewise.
3998         * aclocal.m4: Likewise.
3999         * configure: Likewise.
4000         * README (Hobbit support): Remove.
4001         * doc/internals.texi (Conventions): Do not mention Hobbit.
4002         * doc/porting.texi (Supported Guile versions): Likewise.
4003
4004 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
4005
4006         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4007         callback convention to new sid sidutil::basic_cpu code.
4008         (-gen-sfrag-engine-fn): Ditto.
4009         * sid.scm (-create-virtual-insns!): Ditto.
4010         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4011         mode.
4012         (cxmake-skip): Implement properly for pbb mode.
4013
4014 2000-03-03  Ben Elliston  <bje@redhat.com>
4015
4016         * doc/internals.texi: New file.
4017
4018 2000-02-29  Ben Elliston  <bje@redhat.com>
4019
4020         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4021         * doc/porting.texi: Formatting tweaks.
4022
4023 2000-02-25  Nick Clifton  <nickc@cygnus.com>
4024
4025         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4026         field.
4027
4028 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4029
4030         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4031         mode.
4032
4033 2000-02-23  Andrew Haley  <aph@cygnus.com>
4034
4035         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4036         instruction.
4037
4038 2000-02-24  Ben Elliston  <bje@redhat.com>
4039
4040         * doc/rtl.texi (Derived operands): Add some cindex entries.
4041
4042 2000-02-23  Ben Elliston  <bje@redhat.com>
4043
4044         * ia32.cpu (dndo): Move general purpose macro from here ..
4045         * simplify.inc (dndo): .. to here.
4046
4047 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4048
4049         * arm.cpu (h-tbit): Add c-call setter function.
4050         (h-mbits): Ditto.
4051
4052 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4053
4054         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4055         (-frag-cost-compute!): Ditto.
4056         * utils.scm (copyright-cygnus): Add Y2K.
4057         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4058
4059 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4060
4061         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4062         flags field of the CGEN_CPU_TABLE structure.
4063
4064 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4065
4066         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4067         All references updated.
4068
4069 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4070
4071         * ia32.cpu: Rewrite addressing mode support.
4072
4073         * ifield.scm (<ifield>): New member `follows'.
4074         (ifld-known-values): New proc.
4075         (<ifield>): New method set-word-offset!.
4076         (ifld-set-word-offset!): New proc.
4077         (ifld-new-word-offset): New proc.
4078         (<ifield>): New method next-word.
4079         (<multi-ifield>): New method next-word.
4080         (ifld-next-word): New proc.
4081         (ifld-precedes?): New proc.
4082         (-ifield-parse): New args word-offset,word-length,follows.
4083         All callers updated.  Handle CISC-style vs RISC-style ifields.
4084         (-ifield-read): Recognize word-offset,word-length,follows specs.
4085         (-ifld-parse-follows): New proc.
4086         (-multi-ifield-make-default-insert): New proc.
4087         (-multi-ifield-make-default-extract): New proc.
4088         (-multi-ifield-parse): Provide default values for insert,extract
4089         handlers if not specified.
4090         (<derived-ifield>): New class.
4091         (derived-ifield?): New predicate.
4092         (ifld-derived-operand?): New predicate.
4093         (f-anyof): New global.
4094         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4095         (f-derived,ifld-derived?): Delete.
4096         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4097         * insn.scm (-sub-insn-ifields): New proc.
4098         (-sub-insn-make!): New proc.
4099         (multi-insn-instantiate!): Provide initial implementation.
4100         (-insn-parse): If insn contains "anyof" operands, create a
4101         <multi-insn> object instead of a plain <insn>.
4102         (-parse-insn-format-symbol): Rewrite derived operand handling.
4103         Add anyof operand handling.
4104         (-parse-insn-format-ifield-spec): Rewrite.
4105         (-parse-insn-format-operand-spec): Delete.
4106         (-parse-insn-format-list): Delete support for `(operand value)'.
4107         (anyof-operand-format?): Replaces derived-operand-format?.
4108         * operand.scm (-operand-parse-getter): Improve error messages.
4109         (-operand-parse-setter): Ditto.
4110         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4111         ifield-assertion.
4112         (<anyof-operand>): Change baseclass from <derived-operand> to
4113         <operand>.  Delete member values.  New members base-ifield,choices.
4114         (anyof-operand?): New predicate.
4115         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4116         (-derived-operand-parse): Rewrite.
4117         (-derived-operand-read): Rewrite.
4118         (-anyof-parse-choice): New proc.
4119         (-anyof-operand-parse): Rewrite.
4120         (-anyof-operand-read,define-anyof-operand): New procs.
4121         (<anyof-value>): Rewrite.
4122         (-anyof-initial-known): New proc.
4123         (anyof-satisfies-assertions?): New proc.
4124         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4125         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4126         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4127         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4128         (-anyof-value-from-derived): New proc.
4129         (-anyof-all-choices-1,anyof-all-choices): New procs.
4130         (operand-init!): Create define-anyof-operand reader command.
4131
4132         * insn (syntax-break-out): Take syntax as argument instead of insn.
4133         All callers updated.
4134         (syntax-make): Move here, from ???.
4135
4136         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4137         bitrange-foo. All uses updated.
4138         (bitrange-next-word): New proc.
4139
4140         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4141
4142         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4143         (rtx-make-const,rtx-make-enum): New procs.
4144         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4145         (rtx-mem-addr,rtx-mem-sel): New procs.
4146         (rtx-change-address): New proc.
4147         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4148         (rtx-make-set,rtx-single-set?): New procs.
4149         (rtx-combine): New proc.
4150
4151         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4152         (rtx-traverse-with-locals): Ditto.
4153         (-rtx-traverse,-rtx-traverse-*): Ditto.
4154
4155         * rtl.scm (define-subr): New proc.
4156         (rtl-init!): Create reader command `define-subr'.
4157
4158         * cos.c (_object_mi_p): Ensure argument is an object.
4159         (indent): New function.
4160         (_object_print_elms): Add pretty-printing support.
4161         (_object_print): Ditto.
4162
4163         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4164         (*floats-s->c-fun-table*): Ditto.
4165         * hobbit.c,hobbit.h: Rebuild.
4166         * hob-sup.c (fastcall7): New proc.
4167         * hob-sup.h (fastcall7): Declare.
4168         * hob-sup.scm (fastcall7): New macro.
4169
4170         * mach.scm (<arch>): New member subr-list.
4171         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4172         (arch-finish!): Reverse recorded subr list.
4173
4174         * read.scm (debug-env): New global.
4175         (debug-var-names,debug-var,debug-repl-env): New procs.
4176         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4177         (debug-quit): Renamed from `continue'.
4178
4179         * simplify.inc (dsmf): New pmacro.
4180
4181         * utils.scm (plus-scan): New proc.
4182         (split-bits): Rewrite.
4183         (split-value): New proc.
4184
4185 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4186
4187         * doc/Makefile.am (DOCFILES): Add notes.texi.
4188         * doc/Makefile.in: Rebuild.
4189
4190 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4191
4192         * ifield.scm (ifld-derived?): New proc.
4193         (f-derived): New global.
4194         (ifield-builtin!): Create ifield f-derived.
4195         (<multi-insn>): New class.
4196         (multi-insn?): New predicate.
4197         (multi-insn-instantiate!): New proc.
4198         (-insn-parse): Create <multi-insn> objects for insns with derived
4199         ifields.
4200         (-parse-insn-format-symbol): Handle derived ifields.
4201         (-parse-insn-format-ifield-spec): New proc.
4202         (-parse-insn-format-operand-spec): New proc.
4203         (-parse-insn-format-list): Simplify.
4204         (-parse-insn-format): No longer allow (ifield-object value) spec.
4205         (derived-operand-format?): New proc.
4206         (insn-alias?): New proc.
4207         (non-alias-insns): Rewrite.
4208         (insn-real?): Renamed from real-insn?, all callers updated.
4209         (virutal-insns): Rewrite.
4210         (multi-insns): New proc.
4211         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4212         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4213         Return #f if operand doesn't have an index or if index is not an
4214         ifield.
4215         (hw-index-anyof): New proc.
4216         (-operand-parse): Allow integer indices.
4217         (<derived-operand>): New class.
4218         (derived-operand?): New predicate.
4219         (<anyof-operand>): New class.
4220         (<anyof-value>): New class.
4221         (-anyof-parse-value,-anyof-operand-parse): New procs.
4222         (-derived-operand-parse,-derived-operand-read): New procs.
4223         (define-derived-operand,define-full-derived-operand): New procs.
4224         (operand-init!): New reader command define-derived-operand.
4225
4226         * utils.scm (list-take): Handle negative amount.
4227         (element?): Rewrite.
4228
4229 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4230
4231         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4232
4233 1999-10-04  Richard Henderson  <rth@cygnus.com>
4234
4235         * ia64.cpu: Checkpoint.
4236
4237 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4238
4239         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4240
4241         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4242         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4243
4244 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4245
4246         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4247         PC returned by sim_engine_invalid_insn.
4248
4249 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4250
4251         * ia32.cpu: New file.
4252
4253 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4254
4255         * utils.scm (bit-set?): Fix off by one error.
4256
4257         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4258
4259         * rtl.scm (hw): Check for valid hardware element before trying to
4260         get its mode.
4261
4262         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4263         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4264         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4265         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4266         compute_operand2_foo.
4267
4268         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4269         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4270         Call delayed_branch/branch methods instead of assigning to `vpc'.
4271         (<hw-pc>,cxmake-skip): Call skip method.
4272         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4273         (<pc>,cxmake-skip): Ditto.
4274         (-create-virtual-insns!): Ditto.
4275         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4276         (op:write): Ditto.
4277         (op:record-profile): Specify #:output-language "c++".
4278         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4279         @arch@_insn_attr.
4280         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4281         Define enums here.
4282         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4283         (gen-semantic-code): Ditto.
4284         (-gen-sem-case,-gen-sfrag-code): Ditto.
4285         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4286         (cgen-cpu.h): File is now #included by main cpu class, rather than
4287         subclassing.
4288         (cgen-defs.h): New proc.
4289         (-gen-scache-semantic-fn): Change result type to sem_status.
4290         New local `status'.  Call done_cti_insn/done_insn method at end.
4291         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4292         cgen-ops.h.
4293         (cgen-sem-switch.cxx): Ditto.
4294         * sid-decode.scm (-gen-idesc-decls): Update return type of
4295         @prefix@_sem_fn.
4296         (cgen-decode.h): Add using namespace @arch@.
4297         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4298
4299         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4300         (estate-output-language-c?,estate-output-language-c++?): New procs.
4301         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4302         (estate-make-for-normal-rtl-c++): New proc.
4303         (rtl-c++-parsed,rtl-c++): New proc.
4304         (s-c-call): Invoke cpu class method if c++.
4305         (join): Use s-c-raw-call.
4306
4307         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4308         (nop): Rewrite.
4309
4310         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4311         * rtl.scm (<eval-state>): New member `modifiers'.
4312         (<eval-state>,vmake!): Handle #:modifiers.
4313         (estate-with-modifiers): New proc.
4314
4315         * rtl.scm (rtx-side-effects?): New proc.
4316         (rtx-canonical-bool): Don't change expr if it has side effects.
4317         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4318         better.
4319
4320 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4321
4322         * sim.scm (gen-scache-type): Fix typo in last patch.
4323
4324 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4325
4326         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4327
4328 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4329
4330         * sid.scm (<hw-pc>,cxmake-skip): New method.
4331         (<pc>,cxmake-skip): New method.
4332
4333         * decode.scm (decode-build-table): Delete args startbit,index-list.
4334         All callers updated.
4335         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4336         All callers updated.
4337         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4338         to decode-get-best-bits.
4339         * sid-decode.scm (-gen-decode-fn): Ditto.
4340
4341         * hardware.scm (hw-bits): New proc.
4342         (-hw-parse): New arg layout.  All callers updated.
4343         (define-full-hardware): New arg layout.  All callers updated.
4344         (-hw-validate-layout): New proc.
4345         (-hw-create-[gs]etter-from-layout): New procs.
4346         (<hw-register>,parse!): Handle layout spec.
4347         * types.scm (type-bits): New proc.
4348
4349         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4350         UNARY, BINARY, TRINARY rtxs.
4351
4352         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4353         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4354         Support '- as "unused spot" indicator.
4355
4356 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4357
4358         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4359
4360 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4361
4362         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4363
4364         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4365         construction.
4366         (tstate-make): New arg `depth'.  All callers updated.
4367         (tstate-depth,tstate-set-depth!): New procs.
4368         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4369         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4370         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4371
4372 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4373
4374         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4375         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4376         * utils-sim.scm: Decoder generator support moved here.
4377         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4378         (-gen-decoder-switch): Sort entries for more fall-throughs.
4379
4380         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4381         * Makefile.in: Rebuild.
4382         * sim-test.scm (build-sim-testcase): Add logging message.
4383         * dev.scm (cload): Recognize SIM-TEST application.
4384         (load-stest): Set APPLICATION to SIM-TEST.
4385
4386         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4387
4388         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4389         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4390         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4391
4392         * insn.scm (syntax-break-out): Handle ${foo}.
4393
4394 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4395
4396         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4397         (bin_PROGRAMS): Define.
4398         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4399         (cgen-hob.c): Prepend $(srcdir)/ here.
4400         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4401         (libcpu_a_SOURCES): Delete.
4402         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4403         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4404         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4405         Add AC_CHECK_LIB(guile,main).
4406         * Makefile.in: Rebuild.
4407         * doc/Makefile.in: Rebuild.
4408         * aclocal.m4: Rebuild.
4409         * config.in: Rebuild.
4410         * configure: Rebuild.
4411
4412 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4413
4414         Rename rtx functions from name: to name, accept optional leading
4415         modifier and mode.
4416         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4417         * attr.scm (-attr-eval): Update.
4418         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4419         (<hw-register>,mode-ok?): Disallow VOID.
4420         (<hw-immediate>,mode-ok?): Disallow VOID.
4421         (<hw-address>,mode-ok?): Disallow VOID.
4422         * mode.scm (mode-name?): New proc.
4423         (VOID): Renamed from VM.
4424         (DFLT): Renamed from DM.
4425         (mode-builtin!): Update.
4426         * opcodes.scm (<ifield>,gen-insert): Update.
4427         (<ifield>,gen-extract): Update.
4428         (<multi-ifield>,gen-insert,gen-extract): Update.
4429         * operand.scm (op:mode): Update.
4430         (<pc>,make!): Update.
4431         (op:new-mode): Update.
4432         (-operand-read): Update.
4433         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4434         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4435         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4436         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4437         (rtx-make): Call -rtx-munge-mode&options.
4438         (rtx accessors): Rewrite.
4439         (rtx-pretty-name): Update.
4440         (-rtx-traverse-*): Update.
4441         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4442         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4443         (-rtx-make-traverse-table): Update.
4444         (-rtx-traverse-operands): Update.
4445         (-rtx-option?,-rtx-option-list?): New procs.
4446         (-rtx-munge-mode&options): New proc.
4447         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4448         (-rtx-traverse): Update.
4449         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4450         (rtx-compile-time-constant?): Update.
4451         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4452         (rtx-value): Update.
4453         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4454         * rtx-funcs.scm (*): Update.
4455         * rtl-c.scm (rtl-c-get): Update.
4456         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4457         (s-c-call,s-c-raw-call): Update.
4458         (s-boolifop,s-convop,s-if,s-cond): Update.
4459         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4460         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4461         (s-parallel,s-sequence): Update.
4462         (rtl-c-build-table): Update.
4463         * sem-frags.scm (-frag-hash-compute!): Update.
4464         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4465         for temporary bug compatibility with previous version.
4466         (-frag-expr-locals,-frag-expr-stmts): Update.
4467         (-frag-compute-desired-frags,-frag-pick-best): Update.
4468         * semantics.scm (-simplify-expr-fn): Update.
4469         (rtx-simplify): Update.
4470         (-rtx-ref-type): Update.  Account for modifiers.
4471         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4472         (-build-ifield-operand!): Update.
4473         (-build-known-values): Update.
4474         (semantic-compile): Update.
4475         (-gen-reg-access-defns): Update.
4476         (gen-semantic-code,-gen-sem-case): Update.
4477         (-gen-sfrag-code,-gen-sfrag-case): Update.
4478         * sim-cpu (gen-semantic-code): Update.
4479         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4480         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4481         (-hw-cxmake-get): Update.
4482         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4483         (<hw-index>,cxmake-get): Update.
4484         (<operand>,gen-type,gen-read,cxmake-get): Update.
4485         (<operand>,gen-set-quiet,gen-set-trace): Update.
4486         (<pc>,cxmake-get): Update.
4487         (sim-finish!): Update.
4488         * utils-gen.scm (-gen-ifld-extract-base): Update.
4489         (-gen-ifld-extract-beyond): Update.
4490         (gen-multi-ifld-extract): Update.
4491         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4492         * sid.scm (<hw-pc>,gen-write): Update.
4493         (-gen-decode-insn-globals): Update.
4494         (-hw-cxmake-get): Update.
4495         (<hw-register>,cxmake-get-raw): Update.
4496         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4497         (<hw-index>,cxmake-get): Update.
4498         (<operand>,gen-type,gen-read,cxmake-get): Update.
4499         (<operand>,gen-set-quiet,gen-set-trace): Update.
4500         (<pc>,cxmake-get): Update.
4501         (-create-virtual-insns!): Update.
4502         (-decode-split-build-assertion): Update.
4503         * *.cpu: Update.
4504         * simplify.inc: Update.
4505
4506 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4507
4508         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4509         Prefix queue function name with sim_ instead of @cpu@_.
4510
4511         * sim.scm (-with-parallel-only?): New global.
4512         (option-init!): Initialize it.
4513         (option-set!): Set it.
4514         (with-parallel-only?): New proc.
4515         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4516         and writeback markers if with-parallel-only.
4517         (-gen-idesc-init-fn): Update.
4518         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4519         with-generic-write.
4520
4521 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4522
4523         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4524         with the invalid insn handler.
4525
4526         * utils.scm (list-maybe-ref): New proc.
4527
4528         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4529         define-arch.
4530         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4531
4532         * i960.cpu (test*-*): Delete `expr' arg.
4533         (test-op,branch-op): Update.
4534
4535 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4536
4537         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4538         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4539         updated.
4540         (gen-reg-access-defn): Ditto.
4541         (-gen-hw-addr): Rewrite.
4542         (-op-gen-queued-write): Rewrite.
4543         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4544         (-gen-scache-semantic-fn): Handle with-generic-write.
4545         (-gen-no-scache-semantic-fn): Ditto.
4546
4547 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4548
4549         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4550
4551         * sim.scm (-with-generic-write?): New global.
4552         (option-init!): Initialize it.
4553         (option-set!): Set it.
4554         (with-generic-write?): New proc.
4555         (-gen-hw-addr): New proc.
4556         (-op-gen-queued-write): New proc.
4557         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4558
4559         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4560         turned off.
4561         (-gen-sem-switch): Preserve existing with-parallel? value.
4562         (-gen-sem-parallel-switch): Ditto.
4563         (-gen-write-case): Add /indent support.
4564         (cgen-write.c): Rewrite.
4565
4566         * utils.scm (-current-print-state): New global.
4567         (make-print-state): New proc.
4568         (pstate-indent,pstate-set-indent!): New procs.
4569         (pstate-cmd?,pstate-cmd-do): New procs.
4570         (/indent): New global.
4571         (/indent-set,/indent-add): New procs.
4572         (string-write): Set -current-print-state.
4573         (-string-write): New arg pstate, all callers updated.
4574         Handle print-state commands.
4575         (-string-list-flatten): New proc.
4576         (string-list->string): Use it.
4577
4578         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4579         (-gen-sem-fn-table-entry): New proc.
4580         (-gen-semantic-fn-table): New proc.
4581         (-gen-scache-semantic-fn): Make fn static.
4582         (-gen-no-scache-semantic-fn): Ditto.
4583         (cgen-semantics.c): Define macro SEM_FN_NAME.
4584         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4585         FAST,FULL.  Update @cpu@_insn_sem contents.
4586         (-gen-semf-fn-name): Delete.
4587         (-gen-sem-fn-decls): Delete.
4588         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4589         @cpu@_semf_init_idesc_table.
4590         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4591         handlers here.
4592         (cgen-decode.h): Print sfmt enum.
4593         * sid-decode.scm (-gen-semf-fn-name): Delete.
4594         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4595
4596         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4597         (ifmt-compute!): Ditto.
4598         * sim-decode.scm (-gen-decoder-switch): Ditto.
4599         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4600         (-gen-decoder-switch): Ditto.
4601
4602         * insn.scm (insn-virtual?): New proc.
4603
4604         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4605         convert to string.
4606         * mach.scm (<arch>): attr-list is now a pair of lists.
4607         (current-attr-list): Rewrite.
4608         (current-attr-add!,current-attr-lookup): Rewrite.
4609         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4610
4611 1999-08-06  Richard Henderson  <rth@cygnus.com>
4612
4613         * ia64.cpu: Initial checkpoint.
4614
4615 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4616
4617         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4618         (pmacros-init!): Update .apply help string.
4619
4620 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4621
4622         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4623         (<hw-pc>,cxmake-skip): New method.
4624         (<pc>,cxmake-skip): New method.
4625         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4626         (gen-argbuf-type): New member `skip_count'.
4627         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4628         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4629
4630         * utils-sim.scm: New file.
4631         * dev.scm (load-sim): Load it.
4632         (load-sid): Load it.
4633         * cgen-sid.scm: Load it.
4634         * cgen-sim.scm: Load it.
4635         * iformat.scm (<sformat>): New member sbuf, not initialized by
4636         default make.
4637         * rtx-funcs.scm (skip): Rewrite.
4638         * rtl-c.scm (skip): Rewrite.
4639         * m32r.cpu (sc,snc): Update `skip' usage.
4640         * mode.scm (mode-real-mode): New proc.
4641         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4642         Distinguish fragments by the <sformat-abuf> they use.
4643         * sim.scm (gen-profile-index-type): Delete.
4644         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4645         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4646         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4647         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4648         (-gen-argbuf-elm): Rewrite.
4649         (-gen-argbuf-hw-elm): Delete.
4650         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4651         of each sfmt.
4652         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4653         (sim-init!): Initialize them.
4654         (sim-analyze-insns!): Set them.
4655         (current-sbuf-list): New proc.
4656         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4657         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4658         * sim-model.scm (-gen-model-insn-fn): Ditto.
4659         * sim-decode.scm (-gen-extract-decls): Delete.
4660         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4661         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4662         sim.scm.
4663         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4664         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4665         (-gen-op-extract,-gen-op-trace-extract): New procs.
4666         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4667         gen-sfmt-argvars-foo and rewrite.
4668         (-gen-record-args): Rewrite.
4669         (-gen-extract-case): Tweak.
4670         * sid.scm (gen-profile-index-type): Delete.
4671         (ifield argbuf support): Move to utils-sim.scm.
4672         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4673         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4674         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4675         (-sim-sformat-argbuf-list): New global.
4676         (sim-init!): Initialize it.
4677         (sim-analyze-insns!): Set it.
4678         (current-sbuf-list): New proc.
4679         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4680         (-gen-argbuf-hw-elm): Delete.
4681         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4682         of each sfmt.
4683         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4684         (-gen-extract-decls): Delete.
4685         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4686         sid.scm.
4687         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4688         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4689         (-gen-op-extract,-gen-op-trace-extract): New procs.
4690         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4691         gen-sfmt-argvars-foo and rewrite.
4692         (-gen-record-args): Rewrite.
4693         (-gen-extract-case): Tweak.
4694
4695         * cgen-gh.c (gh_putc,gh_puts): New functions.
4696         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4697         * cos.c (_object_print_elms,_object_print): Use them.
4698         * hob-sup.c (fastcall_print): Use them.
4699         * configure.in: Check for scm_gen_puts, scm_puts.
4700         * config.in: Rebuild.
4701         * configure: Rebuild.
4702         * aclocal.m4: Rebuild.
4703         * Makefile.in: Rebuild.
4704
4705         * dev.scm (load-opc): Use load instead of maybe-load.
4706         (load-gtest,load-sim,load-stest): Ditto.
4707         (load-sid): Ditto.
4708
4709 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4710
4711         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4712         up to avoid g++ 'goto crosses initialization' warning.
4713         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4714         (-gen-sfrag-case): Update use of NEXT_FRAG.
4715
4716 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4717
4718         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4719
4720         * read.scm: Load sem-frags.scm.
4721         * sem-frags.scm (*): Lots rewritten.
4722         * sid.scm (-with-sem-frags?): New global
4723         (with-sem-frags?): New proc.
4724         (option-init!): Initialize -with-sem-frags?.
4725         (option-set!): Recognize with-sem-frags.
4726         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4727         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4728         if asked to.
4729         (-gen-sfrag-engine-decls): New proc.
4730         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4731         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4732         (-gen-sfrag-engine): New proc.
4733         (-gen-sem-case): Emit setup-semantics if specified.
4734         (-gen-sem-switch-engine): Update init/use of computed goto label.
4735         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4736         from local vars.
4737         (-gen-idesc-decls): Replace sem_address with cgoto.
4738         (-gen-scache-decls): Rewrite definition of `execute' member.
4739         * arm.cpu (arm isa): Enable decode-splits.
4740         * arm7.cpu (multiply insns): Rename result to mul-result.
4741
4742         Rename decode-specialize to decode-split.
4743         * decode.scm (*): Update.
4744         * insn.scm (*): Update.
4745         * mach.scm (*): Update.
4746         * sid.scm (*): Update.
4747
4748 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4749
4750         Record objects as a smob.
4751         * cos.c (scm_tc16_object): New static global.
4752         (cos_init): Initialize it.
4753         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4754         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4755         (_object_tag): Delete.
4756         (_object_make_smob): New function.
4757         (_object_make_x,_object_make_with_values_x): Rewrite.
4758         (_object_elements,_object_class_desc): Rewrite.
4759         (_object_copy,object_p): Rewrite.
4760         (_object_specialize): Rewrite.
4761         (_object_print_elms,_object_print): New functions.
4762         (object_smob): New static global.
4763         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4764
4765         * cos.c (_make_x_symbol): New static global.
4766         (object_make): Use it.
4767         (cos_init): Initialize it.
4768
4769 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4770
4771         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4772         instead to determine whether to use FLD macro.
4773         (<rtl-c-eval-state>): New member ifield-var?.
4774         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4775         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4776         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4777
4778         * rtl.scm (rtx-sequence-assq-locals): New proc.
4779
4780         * cos.scm (-object-error): Don't crash on non-objects.
4781
4782         * Makefile.am (CLEANFILES): Add hobbit.
4783         * Makefile.in: Rebuild.
4784
4785         * rtl-c.scm (s-c-call): Delete unnecessary code.
4786
4787 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4788
4789         * rtl-c.scm (ifield): Always reference value via `FLD'.
4790
4791         * cos.c (elm_bound_p): Return problem SCM boolean values.
4792
4793         * utils-cgen.scm (display-argv): New proc.
4794         * cgen-opc.scm (cgen): Call it.
4795         * cgen-sim.scm (cgen): Ditto.
4796         * cgen-gas.scm (cgen): Ditto.
4797         * cgen-stest.scm (cgen): Ditto.
4798         * cgen-sid.scm (cgen): Ditto.
4799
4800 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4801
4802         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4803         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4804         (-gen-extract-switch): Initialize result to 1.
4805         * opcodes.scm (gen-ifield-default-type): New proc.
4806         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4807         updated.
4808         (<hw-index>,gen-insert): Handle non-ifield indices.
4809         (<hw-index>,gen-extract): Ditto.
4810         (<hw-asm>,gen-parse): Ditto.
4811         (<hw-asm>,gen-print): Ditto.
4812         (<keyword>,gen-parse): Ditto.
4813         (<keyword>,gen-print): Ditto.
4814         (<operand>,gen-fget): Ditto.
4815         (<operand>,gen-fset): Ditto.
4816
4817         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4818         (-gen-hw-index): Ditto.
4819         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4820         (-gen-hw-index): Ditto.
4821
4822         * sem-frags.scm: New file.
4823
4824         * attr.scm (attr-parse): Add better checking of input.
4825
4826         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4827         All uses updated.
4828         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4829
4830         * ifield.scm (ifld-nil?): New proc.
4831
4832         * operand.scm (<operand>): New members getter,setter.
4833         (<operand>,make!): New args getter,setter.  All uses updated.
4834         (op:getter,op:setter): New procs.
4835         (<hw-index>,field-start): Return 0 for non-ifield indices.
4836         (<hw-index>,field-length): Return 0 for non-ifield indices.
4837         (-operand-parse-getter,-operand-parse-setter): New procs.
4838         (-operand-parse): New args getter,setter.  All callers updated.
4839         Always use hw-index-scalar for scalar operands.
4840         (-operand-read): Handle getter,setter.
4841         (define-full-operand): New args getter,setter.  All uses updated.
4842         * semantics.scm (-build-ifield-operand!): Update.
4843         (-build-index-of-operand!): Update.
4844         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4845         * simplify.inc (define-normal-operand): Update.
4846
4847         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4848         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4849         (s-binop,s-cmpop,s-convop): Ditto.
4850         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4851         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4852         (fcc-tests): New insn-enum.
4853         (fcc-value): Rename from fcc-type.
4854         * sparcfpu.cpu: New file.  All fp support moved here.
4855
4856         * rtl.scm (<rtx-func>): New member class.
4857         (rtx-class-*?): New procs.
4858         (def-rtx-node): New arg class.  All callers updated.
4859         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4860         * rtx-funcs.scm (*): Specify class.
4861
4862         * utils-cgen.scm (context-make-reader): New proc.
4863
4864         * utils.scm (assert-fail-msg): New variable.
4865         (assert): Use it.
4866         (list-drop,list-tail-drop): New procs.
4867
4868 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4869
4870         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4871         CGEN_MIN_INSN_SIZE deleted on March 22.
4872
4873         * ifield.scm (<ifield>,needed-iflds): New method.
4874         (<multi-ifield>,needed-iflds): New method.
4875         (ifld-needed-iflds): New proc.
4876         (multi-ifield?): New proc.
4877         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4878         (-sfmt-search-key): Include insn length in key.
4879         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4880         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4881         (-ifmt-lookup-ifmt!): Compute key here.
4882         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4883         All callers updated.
4884         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4885         All callers updated.
4886         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4887         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4888         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4889         to ifmt-build.
4890         * operand.scm (op-iflds-used): New proc.
4891         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4892         and sim-cpu.scm.
4893         And from sid.scm,sid-cpu.scm as well.
4894         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4895         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4896         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4897         (gen-extracted-ifld-value): Ditto.
4898         (-extract-chunk-specs): Ditto.
4899         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4900         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4901         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4902         (-extract-insert-subfields): New function.
4903         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4904         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4905         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4906         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4907         gen-extract-foo.
4908         (-gen-no-scache-semantic-fn): Ditto.
4909         (-gen-sem-case): Ditto.
4910         (-gen-read-case): Update calls to gen-define-ifields,
4911         gen-extract-ifields.
4912         * sim-decode.scm (-gen-record-args): Update.
4913         (-gen-sfmt-argvars-assigns): Update.
4914         (-gen-extract-case): Update.
4915         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4916         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4917         gen-extract-foo.
4918         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4919         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4920         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4921         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4922         gen-define-ifields, gen-extract-ifields.
4923         (-gen-record-args): Update.
4924         (gen-sfmt-argvars-assigns): Update.
4925         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4926         with gen-define-ifields.  Ditto for gen-extract-foo.
4927         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4928         procs rather than method calls.
4929
4930 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4931
4932         * sid.scm (-create-virtual-insns!): New local `context', pass it
4933         to insn-read.
4934
4935         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4936         (operand name) not (operand object), (local name) not (local object).
4937         (rtx-traverse-with-locals): New proc.
4938         (-compile-expr-fn): New proc.
4939         (rtx-compile): Rewrite.
4940         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4941         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4942         (rtl-c-set-trace): Ditto.
4943         (operand define-fn): Recognize operand name argument.
4944         (local define-fn): Recognize sequence temp name argument.
4945         * rtx-funcs.scm (operand): Argument is operand name, not object,
4946         so call current-op-lookup.
4947         (local): Similarily, so call rtx-temp-lookup.
4948
4949         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4950         (rtx-operand?): Ditto.
4951         (rtx-pretty-name): Ditto.
4952         (rtx-local-obj): Flag symbol argument as an error.
4953         (rtx-local-name): New proc.
4954         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4955
4956         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4957
4958         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4959         updated.
4960
4961         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4962         (and: QI rd #xff).
4963
4964         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4965         (*floats-s->c-fun-table*): Ditto.
4966         * hobbit.c,hobbit.h: Rebuild.
4967         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4968         * semantics.scm (rtx-simplify): Use /fastcall-make.
4969
4970         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4971
4972         * insn.scm (<insn>): Delete members condition, compiled-condition.
4973         (<insn>,make!): Update
4974         (<insn> getters,setters): Update.
4975         (-insn-parse,insn-read,define-full-insn): Update.
4976         * minsn.scm (minsn-make-alias): Update.
4977         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4978         (ifmt-compute!): Ditto.
4979         * sim.scm (sim-finish!): Update.
4980         * simplify.inc: (define-normal-insn): Update.
4981         * sid-cpu.scm (gen-semantic-code): Update.
4982
4983         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4984         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4985         (ifmt-compute!): Ditto.
4986
4987 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4988
4989         * minsn.scm (minsn-compute-iflds): Print better error message for
4990         missing ifields.
4991
4992 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4993
4994         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4995
4996         * Makefile.am (HOBFLAGS): New variable.
4997         (cgen-hob.c): Use it.
4998         (hobbit.c): Use it.
4999         (libcpu_a_SOURCES): Add hob-sup.c.
5000         (hob-sup.o): New rule.
5001         * Makefile.in: Rebuild.
5002         * cgen.c: #include hob-sup.h.
5003         (cgen_init_c): Call hobbit_init_support.
5004         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5005         (*special-scm->c-functions*): Add them.
5006         (display-c-expression): Handle *c-symbol*.
5007         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5008         (*floats-s->c-fun-table*): Ditto.
5009         (normalize): Recognize /fastcall-make.
5010         (normalize-fastcall-make): New proc.
5011         * hobbit.c,hobbit.h: Rebuild.
5012         * hob-sup.scm: New file.
5013         * hob-sup.c: New file.
5014         * hob-sup.h: New file.
5015         * read.scm: Load hob-sup.scm.
5016         * rtl.scm (-rtx-name-list): New variable.
5017         (rtx-name-list): New proc.
5018         (rtx-lookup): Try symbol first.
5019         (def-rtx-node): Add name to -rtx-name-list.
5020         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5021         (-rtx-traverse-anymode): New proc.
5022         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5023         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5024         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5025         (-rtx-traverse-{symornum,object}): New procs.
5026         (-rtx-make-traverse-table): Rewrite.
5027         (-rtx-traverse-operands): Rewrite arg-types handling.
5028         Handle #f result of traverser.
5029         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5030         Move debug handling here.
5031         (-rtx-traverse-debug): Delete.
5032         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5033         for each rtx.
5034         * semantics.scm (semantic-compile:process-expr!): Fix call to
5035         -rtx-traverse.
5036         * utils.scm (map1-improper): New proc.
5037
5038 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5039
5040         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5041         (h-mbits): Ditto.
5042         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5043         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5044         (<operand>,cxmake-get): Tweak.
5045         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5046
5047 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5048
5049         * thumb.cpu (dnti): Delete timing spec.
5050         (all insn): Update.
5051
5052         * arm.cpu (arm isa): New fields condition, setup-semantics.
5053         (thumb isa): New field setup-semantics.
5054         (h-gr): Add attribute CACHE-ADDR.
5055         * arm7.cpu (dnai): Delete condition.
5056         (eval-cond): Delete.
5057
5058         * mach.scm (<isa>): New member setup-semantics.
5059         (-isa-parse-setup-semantics): New proc.
5060         (-isa-parse): New arg setup-semantics.
5061         (-isa-read): Recognize setup-semantics.
5062
5063         * sid-cpu.scm (gen-extract-fields): Split into two:
5064         gen-extract-ifields, gen-extract-ifmt-ifields.
5065         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5066         tracing begin/end messages (done by caller now).
5067         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5068         tracing begin/end messages (done by x-before,x-after virtual insns).
5069         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5070         end so don't have to look it up again next time.
5071         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5072         (-decode-expr-ifield-tracking-key): New proc.
5073         (-decode-expr-ifield-tracking): New proc.
5074         (-decode-expr-ifield-values-used): New proc.
5075         (-decode-expr-ifield-mark-used!): New proc.
5076         (-gen-decode-expr-set-itype): New proc.
5077         (-gen-decode-expr-entry): Rewrite.
5078         (-gen-decode-table-entry): New proc.
5079         (-gen-decoder-switch): Use it.
5080         (-gen-virtual-insn-finder): New proc.
5081         (-gen-argbuf-elm): Move here from sid.scm.
5082         (-gen-argbuf-hw-elm): Ditto.
5083         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5084         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5085         conditional-execution isas.
5086         (-gen-decode-fn): Record conditional-exec ifield.
5087         * sid.scm (-current-pbb-engine?): New global.
5088         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5089         (<ifield>,gen-ifld-extract): New arg `indent'.
5090         (<multi-ifield>,gen-ifld-extract): Ditto.
5091         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5092         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5093         (-gen-arch-model-decls): Only scan real insns.
5094         (scache-engine-insns,pbb-engine-insns): New procs.
5095         (-create-virtual-insns!): New proc.
5096         (sim-finish!): Call it.
5097         (-decode-specialize-insn?): New proc.
5098         (-decode-specialize-build-assertion): New proc.
5099         (-decode-specialize-insn-1): New proc.
5100         (-decode-specialize-insn): New proc.
5101         (-fill-sim-insn-list!): New proc.
5102         (sim-analyze!): Create copies of insns to be specialized.
5103         * utils-cgen.scm (obj-set-name!): New proc.
5104
5105         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5106         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5107         semantic-attrs.
5108         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5109         sformats.
5110         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5111         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5112         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5113         (attr): Rewrite test for insn owner.
5114         (member): New rtx function.
5115         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5116         as separate function.
5117         (rtx-ifield?,rtx-ifield-name): New procs.
5118         (rtx-operand-obj): Rewrite.
5119         (rtx-operand-name): New proc.
5120         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5121         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5122         (tstate-make): New args owner, known.  All callers updated.
5123         (tstate-known-lookup): New proc.
5124         (rtx-traverse): New arg owner.  All callers updated.
5125         (rtx-make-bool): New proc.
5126         (rtl-find-ifields): Rewrite.
5127         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5128         * semantics.scm: ... here.
5129         (rtx-const-equal,rtx-const-list-equal): New procs.
5130         (-build-known-values): New proc.
5131         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5132         (semantic-attrs): Ditto.
5133         * rtx-funcs.scm (member,number-list): New rtx functions.
5134
5135         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5136         Rewrite.  Delete arg `all-attrs'. All callers updated.
5137         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5138         updated.
5139         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5140
5141         * decode.scm (subdtable-add): Handle `expr' entries.
5142         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5143         (exprtable-entry-*): Update.
5144         (exprtable-entry-iflds): New proc.
5145         (exprentry-cost): New proc.
5146         (exprtable-sort,-gen-exprtable-name): New procs.
5147         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5148         (exprtable-*): Update.
5149         (-build-decode-table-entry): Don't issue collision warning if all are
5150         specialized insns.  Sort exprtable entries before building table.
5151
5152         * read.scm (-reader-process-expanded-1): Move pretty printing of
5153         input to logging level 4.
5154
5155         * utils.scm (string-list->string): New proc.
5156
5157         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5158         semantics.
5159         (insn-read): Delete leading '-' in name.  All callers updated.
5160         (real-insn?): New proc.
5161         (real-insns): Rewrite.
5162         (insn-has-ifield?): New proc.
5163         (insn-builtin!): Create insn attribute SPECIALIZED.
5164
5165         * mach.scm (<arch>): Delete member app-data.
5166         (current-raw-insn-list): New proc.
5167         (insn-list-car,insn-list-splice!): New procs.
5168         (<decode-specialize>): New class.
5169         (-isa-parse-decode-specialize): New proc.
5170         (-isa-parse-decode-specializes): New proc.
5171         (<isa>): New members `condition', `decode-specializes'.
5172         (-isa-parse-condition): New proc.
5173         (-isa-parse): New args condition, decode-specializes.
5174         (-isa-read): Recognize condition, decode-specializes.
5175         (-isa-add-decode-specialize!): New proc.
5176         (modify-isa): New proc.
5177         (isa-conditional-exec?,state-conditional-exec?): New procs.
5178         (arch-init!): New reader command `modify-isa'.
5179
5180         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5181         (mode-signed,mode-unsigned?): New procs.
5182
5183 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5184
5185         * types.scm (<array>): New method get-shape.
5186         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5187         onto type.
5188         (hw-shape,hw-num-elms): New procs.
5189         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5190         if there's more than 255 registers.
5191         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5192
5193         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5194         with get/set specs.
5195
5196 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5197
5198         * cgen-sid.scm (sim-arguments): Add -X.
5199         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5200         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5201         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5202         Simplify by supporting pbb engine only.
5203         (-gen-sem-switch-init): New proc.
5204         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5205         (cgen-sem-switch.cxx): New proc.
5206         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5207         with with-pbb?.  Support dual scache/pbb engines.
5208         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5209         Support dual scache/pbb engines.
5210         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5211         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5212         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5213
5214 1999-05-10  Ben Elliston  <bje@cygnus.com>
5215
5216         * arm7.cpu: Remove coprocessor related fields, operands and insn
5217         definitions for now. Take the undefined instruction trap instead.
5218         (ldmda-wb): New instruction.
5219         (ldmib-wb): Likewise.
5220         (ldmdb-wb): Likewise.
5221         (stmdb-wb): Likewise.
5222         (stmib-wb): Likewise.
5223         (stmda-wb): Likewise.
5224
5225 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5226
5227         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5228         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5229
5230         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5231         hobbit can't handle optional third arg.
5232
5233 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5234
5235         * arm.cpu (h-tbit): Delete set spec.
5236         (h-mbits): Don't call arm_mbits_set in set spec.
5237         * arm.sim: New file.
5238         * hardware.scm (modify-hardware): New proc.
5239         (hardware-init!): Add modify-hardware command.
5240         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5241         (-hw-gen-set-quiet): Ditto.
5242         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5243         hardware attribute.  Load $arch.sim file if present.
5244         * utils-cgen.scm (keyword-list?): New proc.
5245         (keyword-list->arg-list,arg-list-validate-name): New procs.
5246         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5247
5248         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5249
5250         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5251         @cpu@_cpu_cgen.
5252
5253         * attr.scm (obj-prepend-atlist!): New proc.
5254
5255         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5256
5257         * sid.scm (<operand>,profilable?): Use op:type.
5258         * sim.scm (<operand>,profilable?): Use op:type.
5259
5260 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5261
5262         * utils.scm (find-index,find): Be more stack friendly.
5263
5264         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5265         (bic-imm): Ditto.
5266
5267 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5268
5269         * arm.cpu (h-gr-usr): New hardware element.
5270         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5271         (arm-mode): New keyword.
5272         (h-mbits): Add set spec.
5273         (h-spsr): Implement get/set specs.
5274
5275         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5276         (-reader-process-expanded-1): Pretty print logging output.
5277
5278         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5279         (cgen-cpu.h): Print enums before hardware elements.
5280         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5281         * sid-decode.scm (cgen-decode.cxx): Ditto.
5282         * sid-model.scm (cgen-model.cxx): Ditto.
5283
5284         * utils-cgen.scm (context-error): Accept variable number of
5285         trailing args.
5286
5287         * rtx-funcs.scm (error:): New rtx function.
5288         * rtl-c.scm (s-case-vm): New proc.
5289         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5290         (s-case): Simplify, handle non-VM result.
5291         (error:): New rtx function.
5292
5293 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5294
5295         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5296         (test-hi,test-ls): Fix cbit handling.
5297         (shift-type,h-operand2-shifttype): Move here ...
5298         * arm7.cpu: ... from here.
5299         (set-cond,set-cond-maybe,dnix): Delete, unused.
5300         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5301         * arm.cpu: ... to here.
5302         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5303         (alu-cmn): Use set-add-flags.
5304         (alu-tst): Use set-zn-flags.
5305         (alu-cmp): Use set-sub-flags.
5306         (lsl,lsr,asr): Set condition codes.
5307         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5308         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5309         alu-shift-op.
5310         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5311         All callers updated.
5312         (sub-sp): Rename from add-sp-neg.
5313         (f-lbwl-offset): Delete.
5314         (f-lbwl-hi,f-lbwl-lo): New ifields.
5315         (lbwl-hi,lbwl-lo): Update.
5316         (bl-hi): Add 4 to pc.
5317         (push-reg,pop-reg): Simplify.
5318         (push,push-lr): Push registers in correct order.
5319         (pop,pop-pc): Pop registers in correct order.
5320         (save-reg-inc,load-reg-inc): Simplify.
5321         (ldmia): Save registers in correct order.
5322
5323 1999-04-30  Ben Elliston  <bje@cygnus.com>
5324
5325         * arm7.cpu (f-op-hdt): Remove; unused.
5326         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5327         (f-ror-imm8): New multi-ifield.
5328         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5329         callers updated.
5330         (f-uimm12): New field.
5331         (ror-imm8): New operand.
5332         (uimm12): Likewise.
5333         (hdt-offset8): Reinstate operand.
5334         (offset4-hi,offset4-lo): Remove.
5335         (set-cond): Remove macro; unused.
5336         (set-cond-maybe): Likewise.
5337         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5338         (store-word/byte): Likewise.
5339         (load-halfword): Use hdt-offset8 multifield operand instead of two
5340         4-bit operands that are explicitly combined by semantic code.
5341         (do-halfword-store): Bug fix. Set address when not preindexing.
5342         (store-halfword): Also use hdt-offset8 operand.
5343         (arith-op): Avoid clobbering source registers when one of them is
5344         the destination register.
5345         (arith-imm-op): Likewise.
5346         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5347         (teq-imm): Likewise.
5348         (ldm-p): Rename to ldmdb.
5349         (stm-pw): Rename to stmdb-wb.
5350         (multi-action): New macro; test reg-list bits and execute a
5351         semantic fn if the bit is set.
5352         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5353         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5354         (all insns): Use dnai entries for simplicity rather than dni.
5355         (*): Use short-form of (const ..).
5356
5357 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5358
5359         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5360         member eval to evaluator.
5361         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5362         (tstate-make): Delete arg op-fn.  All callers updated.
5363         (tstate-op-fn,tstate-set-op-fn!): Delete.
5364         (rtx-traverse): Delete op-fn arg.  All callers updated.
5365         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5366         split out of -simplify-for-compilation.
5367
5368         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5369         (cgen_DEPENDENCIES): Add stamp-cgen.
5370         (stamp-cgen): New rule.
5371         * Makefile.in: Rebuild.
5372
5373         * rtl-c.scm (enum:): Define emitter for.
5374         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5375         enums as well.
5376         (rtx-constant-value,rtx-enum-value): New procs.
5377         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5378         (rtx-compile-time-constant?): Return #t for enums.
5379         (rtx-true?,rtx-false?): Handle enums.
5380         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5381         building result by hand.
5382         (rtx-simplify-eq-attr-insn): Ditto.
5383         * rtx-funcs.scm (enum:,enum): New rtx functions.
5384
5385         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5386         aliases-analyzed?.
5387         (arch-analyze-insns!): New proc.
5388         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5389         of calling ifmt-compute! directly.
5390         * sid.scm (-sim-insns-analyzed?): Delete.
5391         (sim-analyze!): Call arch-analyze-insns! instead of calling
5392         ifmt-compute! directly.
5393         * sim.scm (-sim-insns-analyzed?): Delete.
5394         (sim-analyze!): Call arch-analyze-insns! instead of calling
5395         ifmt-compute! directly.
5396
5397         * utils.scm (string-take-with-filler): New proc.
5398         (string-take): Use it.
5399
5400         * pgmr-tools.scm: New file.
5401         * read.scm: Load it.
5402         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5403
5404         * insn.scm (insn-base-mask): Renamed from insn:mask.
5405         All callers updated.
5406         (insn-base-mask-length): Renamed from insn:mask-length.
5407         All callers updated.
5408         (insn-foo): Renamed from insn:foo.  All callers updated.
5409         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5410         * iformat.scm (compute-insn-base-mask-length): Renamed from
5411         compute-insn-mask-length.  All callers updated.
5412         (compute-insn-base-mask): Renamed from compute-insn-mask.
5413         All callers updated.
5414
5415         * enum.scm (-enum-parse-prefix): New proc.
5416         (<enum>,make!): Don't parse enum values here.
5417         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5418         (define-full-insn-enum): Ditto.
5419         (enum-vals-upcase): New proc.
5420         * hardware.scm (define-keyword): Make enum prefix uppercase.
5421         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5422
5423         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5424         (<ifield>,field-extract): New method.
5425         (<multi-ifield>,field-extract): New method.
5426         (ifld-extract): New proc.
5427         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5428         (ifld-extract-fn-name): Renamed from ifld-extract.
5429
5430         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5431         All callers updated.
5432
5433         * ifield.scm (ifld-lsb0?): New proc.
5434         (sort-ifield-list): New arg up?.  All callers updated.
5435         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5436         rather than global state.
5437
5438 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5439
5440         * insn.scm (pretty-print-insn-format): New proc.
5441
5442         * Makefile.in: Rebuild.
5443         * aclocal.m4: Rebuild
5444         * configure: Rebuild.
5445
5446 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5447
5448         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5449         * configure: Rebuild.
5450         * aclocal.m4: Rebuild.
5451         * Makefile.in: Rebuild.
5452         * doc/Makefile.in: Rebuild.
5453         * doc/version.texi: Rebuild.
5454
5455 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5456
5457         * utils.scm (bits->bools): New proc.
5458
5459 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5460
5461         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5462         subfield's gen-ifld-extract-decl method.
5463
5464 1999-04-23  Ben Elliston  <bje@cygnus.com>
5465
5466         * arm7.cpu (ldrsh-pu): Remove.
5467         (do-halfword-load): New pmacro.
5468         (load-halfword): Likewise.
5469         (do-halfword-store): Likewise.
5470         (store-halfword): Likewise.
5471         (strh-*): New instructions.
5472         (ldrsb-*): Likewise.
5473         (ldrh-*): Likewise.
5474         (ldrsh-*): Likewise.
5475
5476 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5477
5478         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5479         fields.
5480
5481         * arm7.cpu (do-word/byte-store): Fix typo.
5482
5483 1999-04-22  Ben Elliston  <bje@cygnus.com>
5484
5485         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5486         register is the program counter (R15).
5487
5488         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5489         (str-*): Implement using store-word-byte. Remove older versions.
5490         (bic): Use the `inv' rtx for obtaining bitwise complements.
5491         (bic-imm): Likewise.
5492         (mvn): Likewise.
5493         (mvn-imm): Likewise.
5494         (store-indev-reg): Remove crufty pmacro.
5495         (load-indiv-reg): Likewise.
5496         (ldm-p): Reverse the order of register processing for decrement.
5497         (stm-p): Likewise.
5498         (stbi): Remove; handled by the str-* insns.
5499
5500 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5501
5502         * thumb.cpu (cmp): Fix carry bit computation.
5503         (alu-cmp): Ditto.
5504
5505 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5506
5507         * arm.cpu (h-tbit): Specify set spec.
5508         (h-cpsr): Ditto.
5509         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5510         (set-sub-flags): Interpret "carry bit" as a borrow.
5511         (all sub/cmp insns): Carry bit is actually a borrow bit.
5512         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5513         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5514         .pmacro instead.
5515         (hireg-add,hireg-cmp,hireg-move): Ditto.
5516
5517         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5518         (-CGEN-LANG-VERSION): Ditto.
5519
5520 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5521
5522         * pmacros.scm (-pmacro-make): New arg `default-values',
5523         all callers updated.
5524         (-pmacro-default-values): New proc.
5525         (-pmacro-process-keyworded-args): New proc.
5526         (-pmacro-process-args): New proc.
5527         (-pmacro-invoke): Process arguments before expanding macro.
5528         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5529         (define-pmacro): Handle default values specified in arg list.
5530         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5531         (rtx-boolif-op-arg[01]): New procs.
5532         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5533         (rtx-simplify): Handle not,orif,andif.
5534         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5535         * utils.scm (alist-copy): New proc.
5536         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5537         (ldr*): Rewrite.
5538         (swi): Explicitly set pc.
5539
5540         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5541
5542 1999-04-17  Ben Elliston  <bje@cygnus.com>
5543
5544         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5545         correctly adjusts the program counter now.
5546
5547         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5548         (f-signed?): Rename from `f-hdt-signed?'.
5549         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5550         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5551         (f-hdt-offset8): Use new field names.
5552         (ldr): Use `imm12' field, not `offset12', since we do our own
5553         address arithmetic.
5554         (str, str-*): Likewise.
5555         (ldu-*): Remove most; better not implemented than broken.
5556         (ldrh*): Likewise.
5557         (ldrsh-pu): New insn.
5558         (stri): Likewise.
5559         (stri-p): Likewise.
5560         (stbi): Likewise.
5561         (ldm-p): Likewise; replace (load-indiv-reg) version.
5562
5563 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5564
5565         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5566         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5567         (*): Explicitly specify mode in c-call.
5568         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5569         (arith-op): Ditto.
5570         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5571         (arith-imm-op): New pmacro.
5572         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5573         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5574
5575 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5576
5577         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5578
5579         * rtl.scm (rtl-find-ifields): Implement.
5580
5581         * utils-gen.scm: New file.
5582         * read.scm: Load it.
5583         * desc.scm: Move generic attribute code to utils-gen.scm.
5584         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5585         * Makefile.in: Rebuild.
5586
5587         * arm7.cpu (R15-OFFSET): New attribute.
5588         (dnai): New pmacro.
5589         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5590         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5591         for reg-shift version.
5592         (arith-op): Ditto.
5593         (data processing insns): Reorganize.  Use dnai.
5594
5595         * attr.scm (attr-kind): New proc.
5596         (attr-list-enum-list): Rewrite.
5597         (-attr-sort): Split result into two lists, bools and non-bools.
5598         (current-attr-list-for): Update.
5599
5600         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5601         * sid-cpu.scm (-gen-attr-decls): New proc.
5602         (-gen-insn-attr-decls): New proc.
5603         (cgen-desc.h): New proc.
5604         (cgen-cpu.h): Put everything in @cpu@ namespace.
5605         (gen-parallel-exec-type): Change prefix of parexec struct from
5606         @cpu@ to @prefix@.
5607         (-gen-trace-record-type): Ditto for trace_record struct.
5608         (-gen-write-case): Update.
5609         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5610         @prefix@.  Update scache struct references.
5611         (-gen-sem-case): Update scache struct references.
5612         (-gen-sem-switch-fn): Update idesc struct reference.
5613         Update insn_type enum reference.
5614         (cgen-write.cxx): Update scache,argbuf references.
5615         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5616         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5617         from @cpu@ to @prefix@.
5618         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5619         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5620         from @CPU@ to @PREFIX@.
5621         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5622         from @CPU@ to @PREFIX@.
5623         (-gen-decode-insn-globals): Generate insn attributes.
5624         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5625         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5626         semantic fn typedef.
5627         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5628         Change prefix of scache struct from @cpu@ to @prefix@.
5629         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5630         Change prefix of idesc struct from @cpu@ to @prefix@.
5631         Change prefix of insn_type enum from @cpu@ to @prefix@.
5632         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5633         from @cpu@ to @prefix@.
5634         (-gen-scache-decls): Change prefix of scache struct from
5635         @cpu@ to @prefix@.  Update idesc struct name.
5636         Update decode,execute methods.
5637         (-gen-extract-case): Update to type name changes.
5638         (-gen-decode-fn): Ditto.
5639         (cgen-decode.h): Put everything in @cpu@ namespace (except
5640         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5641         (cgen-decode.cxx): Add using namespace @cpu@.
5642         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5643         model_mark_get/set from @cpu@ to @prefix@.
5644         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5645         @prefix@.
5646         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5647         of model_insn_before/after from @cpu@ to @prefix@.
5648         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5649         Update insn_word type name.
5650         (-gen-model-timing-table): Update INSN_TIMING struct name.
5651         (-gen-model-init-fn): Update MODEL_DATA struct name.
5652         (-gen-mach-defns): Update name of init_idesc_table fn.
5653         (cgen-model.cxx): Add using namespace @cpu@.
5654         * sid.scm (gen-cpu-class): Delete.
5655         (gen-attr-type): New proc.
5656         (gen-obj-attr-sid-defn): New proc.
5657         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5658         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5659         @CPU@ to @PREFIX@.
5660         (gen-cpu-insn-enum): Update name of insn enum.
5661         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5662         (bx-hs): Ditto.
5663         (swi): Rename @cpu@_swi to @prefix@_swi.
5664
5665         * decode.scm (-build-decode-table-entry): Remove heuristic for
5666         distinguishing insns, and use insn ifield-assertion specs.
5667
5668         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5669         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5670         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5671         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5672         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5673         all callers updated.
5674         (gen-attr-name): New proc
5675         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5676         (gen-obj-attr-defn): Delete num_nonbools count.
5677
5678         * iformat.scm (ifmt-analyze): Handle insn-condition.
5679         (ifmt-compute!): Ditto.
5680         * insn.scm (<insn>): Specify default value for condition,
5681         post-cond-trap,compiled-condition,compiled-semantics.
5682         (<insn>,make!): New arg condition.
5683         (<insn>): Add getters for condition,compiled-condition.
5684         (-insn-parse): New arg condition, all callers updated.
5685         (-insn-read): Recognize condition spec.
5686         (define-full-insn): New arg condition.
5687         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5688         * semantics.scm (semantic-compile): Change arg sem-code to
5689         sem-code-list.
5690         (semantic-attrs): Ditto.
5691         * sim.scm (sim-finish!): Update calls to define-full-insn.
5692         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5693         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5694         * sid.scm (sim-finish!): Update call to define-full-insn.
5695
5696 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5697
5698         * Makefile.am (sim-cpu): Allow specification of ISA.
5699         * Makefile.in: Rebuild.
5700
5701 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5702
5703         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5704
5705 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5706
5707         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5708
5709         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5710
5711         * attr.scm (atlist?): New proc.
5712         (-attr-eval): Rewrite.
5713         (attr-parse): New proc.
5714         (atlist-parse): Use it.
5715
5716         * decode.scm (exprtable-entry-make): New proc.
5717         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5718         (exprtable-make,exprtable-insns): New procs.
5719
5720         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5721         All uses updated.
5722         (hardware-builtin!): Make h-memory a vector.
5723
5724         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5725         All callers updated.
5726         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5727
5728         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5729         All uses updated.
5730         (-insn-parse): Set semantics to #f if not specified.
5731         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5732         if simulator.
5733         (-parse-insn-format): Recognize `=' iformat spec.
5734
5735         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5736         (isa-max-insn-bitsize): Ditto.
5737
5738         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5739         rtl-c-with-alist.
5740         (<ifield>,gen-extract): Ditto.
5741         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5742         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5743         (gen-define-ifmt-ifields): New proc.
5744         (gen-semantic-code): Rewrite.
5745         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5746         (-gen-decoder-switch): Handle expression tables.
5747         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5748         gen-define-fields.
5749         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5750         instead of gen-define-fields.
5751         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5752         callers updated.
5753         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5754         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5755         (-gen-ifld-extract-beyond): Ditto.
5756         (<multi-ifield>,gen-ifld-extract): Ditto.
5757         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5758         rtl evaluation code.
5759         (op:read): Build an <eval-state> to pass to gen-read.
5760         (op:write): Build an <eval-state> to pass to gen-write.
5761         (op:record-profile): Build an <eval-state> to pass to
5762         gen-record-profile.
5763         * sim-cpu.scm (gen-semantic-code): Rewrite.
5764         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5765         rtl-c-with-alist.
5766         (-gen-ifld-extract-beyond): Ditto.
5767         (<multi-ifield>,gen-ifld-extract): Ditto.
5768         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5769         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5770         rtl evaluation code.
5771         (op:read): Build an <eval-state> to pass to gen-read.
5772         (op:write): Build an <eval-state> to pass to gen-write.
5773         (op:record-profile): Build an <eval-state> to pass to
5774         gen-record-profile.
5775
5776         * operand.scm (<operand>): Give `selector' default value of #f.
5777         Give `num' default value of -1.  Give `cond?' default value of #f.
5778         (op:new-mode): Delete arg `set?', all uses updated.
5779
5780         * read.scm (reader-error): Handle #f return from port-filename.
5781         (-init-parse-cpu!): Call rtl-c-init!.
5782         (reader-install-builtin!): Call rtl-builtin!.
5783
5784         * rtl-c.scm: New file.
5785         * semantics.scm: New file.
5786         * read.scm: Load them.
5787         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5788         to semantics.scm.
5789         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5790         type,eval,num.
5791         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5792         (-rtx-num-text,-rtx-max-num): New globals.
5793         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5794         (-rtx-macro-lookup): New proc.
5795         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5796         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5797         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5798         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5799         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5800         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5801         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5802         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5803         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5804         (rtx-pretty-name): New proc.
5805         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5806         (rtx-traverse-*): Rewrite rtx traversing.
5807         (rtx-eval-*): Rewrite rtx evaluation.
5808         (rtx-compile): New proc.
5809         (rtx-simplify): New proc.
5810         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5811         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5812         (ifield,index-of): Rewrite.
5813         (name): Renamed from `operand:'.
5814         (operand,xop,local): New rtx's.
5815         (current-insn): Rewrite.
5816         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5817         (cgen-hob.h): Remove rule for.
5818         (cgen-hob.o): Depend on cgen-hob.c only.
5819         * Makefile.in: Rebuild.
5820
5821         * utils-cgen.scm (vmake): New proc.
5822         (<context>): New class.
5823         (context-make-prefix,context-error): New procs.
5824
5825 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5826
5827         * i960.cpu: Add some ??? comments.
5828         (xnor, ornot): New instructions.
5829         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5830
5831 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5832
5833         * cos.scm (-object-error): Print better error message.
5834
5835         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5836         (-pmacro-env-ref): Renamed from -env-ref.
5837
5838 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5839
5840         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5841         (h-pc): Delete.
5842         (hardware-builtin!): Delete h-pc builtin.
5843         * arm.cpu (h-pc): Define.
5844         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5845         * arm7.cpu (set-logical-cc-maybe): Delete.
5846         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5847         (data processing insns): Rewrite.
5848         * m32r.cpu (h-pc): Define.
5849         * fr30.cpu (h-pc): Define.
5850         * i960.cpu (h-pc): Define.
5851         * sparc.cpu (h-pc): Define.
5852
5853         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5854         (s-parallel): Replace do {...} while (0) with {...}.
5855         (s-sequence): Ditto.
5856
5857         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5858         consistent.
5859         (-gen-write-case,-gen-sem-case): Ditto.
5860         (-gen-sem-case): Only specify `written' if profiling or
5861         parallel-write-back.
5862         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5863         (-gen-sem-switch-fn): New proc.
5864         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5865         based on with-sem-switch option.
5866         * sid-decode.scm (-gen-decode-insn-globals): Only define
5867         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5868         addresses in idesc_table if !with-sem-switch.
5869         (-gen-sem-fn-decls): Rewrite.
5870         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5871         member based on with-sem-switch.  Only define
5872         `idesc_table_initialized_p' member if with-sem-switch.
5873         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5874         * sid.scm (-with-sem-switch?): New variable.
5875         (option-init!): Initialize it.
5876         (option-set!): Set it.
5877         (with-sem-switch?): New proc.
5878         (-op-gen-set-trace): Only emit `written' reference if profiling.
5879         (sim-finish!): Use h_pc_set to set pc.
5880
5881 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5882
5883         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5884         All callers updated.
5885         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5886
5887         * sid.scm (gen-argbuf-type): Delete.
5888         (-gen-argbuf-fields-union): Move to ...
5889         * sid-decode.scm: ... here.
5890
5891         * read.scm (-reader-process-expanded-1): New proc.
5892         (-reader-process-expanded): Call it to catch nested begin's.
5893         (reader-process): Move `begin' handling to -reader-process-expanded.
5894
5895         * insn.scm (-insn-read): Fix name of `format' spec.
5896
5897         * pmacros.scm (.pmacro): New builtin.
5898         (scan-symbol): If procedure macro, return macro rather than its symbol.
5899         (check-macro): Don't do lookup, instead check if (car expr) is
5900         macro object.
5901         (scan-list): Handle .pmacro.
5902         (scan): No longer re-examine text for another macro invocation.
5903         (-pmacro-build-lambda): New proc.
5904         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5905         another, fetch the other's value (rather than doing it during
5906         expansion).
5907
5908 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5909
5910         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5911         * Makefile.in: Rebuild.
5912
5913         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5914         (-fill-slot!): Simplify.
5915         (-build-slots): Simplify.
5916
5917         * dev.scm (load-sid): Don't load sid-arch.scm.
5918
5919         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5920         switch's.
5921         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5922         switch's.
5923
5924 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5925
5926         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5927         * decode.scm: ... here.  New file.
5928         * sid-decode.scm: Use decoder computation code in decode.scm.
5929         * read.scm: Load decode.scm.
5930
5931         * arm.cpu (arm710 model): Add u-exec function unit.
5932         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5933         Add get/set specs to redirect reg 15 to h-pc.
5934         (h-*): Indicate for both ARM and THUMB isas.
5935         (cbit,nbit,vbit,zbit): Ditto.
5936         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5937         (h-cpsr): Make virtual.  Add get/set specs.
5938         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5939         (h-spsr): New virtual reg.
5940         * arm7.cpu (shift-type): New explicitly defined keyword.
5941         (h-operand2-shifttype): Use it.
5942         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5943         All callers updated.  Don't set cbit.
5944         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5945         shift-type enum as case choices.  Set cbit.
5946         (and,orr,eor,add-imm): Uncomment out.
5947         (undefined): Temporarily comment out.
5948         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5949         (lda-pc,lda-sp): Ditto.
5950         (ldr-pc): Rename from ldr.
5951         (cbranch): Mark insns as being thumb insns.
5952
5953         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5954
5955         * cgen-sid.scm: Don't load sid-arch.scm.
5956         (sim-arguments): Delete unused entries.
5957         * sid-arch.scm: Delete.
5958
5959         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5960         (<insn>,ifld-assertions): New member.
5961         (<insn>,make!): New arg ifld-assertions, all callers updated.
5962         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5963         (insn:fields): Delete.
5964         (-insn-parse): New arg ifld-assertions.  All callers updated.
5965         (-insn-read,define-insn): New procs.
5966         (define-full-insn): New arg ifld-assertions.  All callers updated.
5967         (insn-init!): New comment define-insn.
5968
5969         * model.scm (-model-parse): Ensure at least one unit specified.
5970
5971         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5972         (<c-expr-temp>,get-name): New method.
5973         (-rtx-make-current-closure,s-closure): New proc.
5974         (hw:): Wrap rtx indices in a closure.
5975         (-gen-case-prefix): New proc.
5976         (s-case): Simplify.
5977         * rtx-funcs.scm (case:): Fix call to s-case.
5978         (closure): New rtx func.
5979
5980         * hardware.scm (<hardware-base>): New member isas-cache.
5981         (<hardware-base>,get-isas): New method.
5982         (hardware-builtin): Indicate for all isas.
5983         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5984         * mach.scm (current-arch-mach-name-list): Return list of names.
5985         (current-isa-mach-name-list): Ditto.
5986         (define-arch): Install builtin objects here.
5987         * read.scm (keep-atlist?): Only keep if both mach and isa are
5988         being kept.
5989         (keep-mach-atlist?): New proc.
5990         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5991         (reader-install-builtin!): Renamed from -install-builtin!.
5992         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5993         -gen-cpu-reg-access-defns.  Rewrite.
5994         (gen-reg-access-defn): Delete.
5995         (-gen-hardware-struct): New proc.
5996         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5997         (gen-semantic-fn,-gen-all-semantics): Delete.
5998         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5999         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6000         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6001         Call sem-analyze-insns!.
6002         (cgen-semantics.cxx): Add multiple-isa support.
6003         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6004         (-gen-scache-decls,-gen-decode-fn): Ditto.
6005         (cgen-decode.h): Call sem-analyze-insns!.
6006         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6007         * sid.scm (-with-multiple-isa?): New variable.
6008         (option-init!): Initialize it.
6009         (option-set!): Set it.
6010         (with-multiple-isa?): New proc.
6011         (gen-cpu-ref): New arg isas.  All callers updated.
6012         (gen-cpu-class): New proc.
6013         (*-get-macro,*-set-macro): Delete.
6014         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6015         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6016         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6017         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6018         (-sim-insns-analyzed): New global variable.
6019         (sim-init!): Reset it.
6020         (sim-analyze-insns!): New proc.
6021         (sim-analyze!): Don't do instruction analysis here.
6022         (sim-finish!): Specify isa of x-invalid insn.
6023         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6024
6025 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
6026
6027         * thumb.cpu (cpu,mach,model): Delete.
6028         (dntf): New pmacro.  Use it for all field definitions.
6029         (dntop): New pmacro.  Use it for all operand definitions.
6030         (asr): Correct field list.
6031         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6032
6033         * utils-cgen.scm (define-getters): New macro to simplify
6034         writing class accessors.
6035         (define-setters): Ditto.
6036         (sanitize): Recognize isa elements.
6037
6038         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6039         state-parallel-exec?.
6040         * sid-model.scm (*): Ditto.
6041         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6042         state-decode-assist.
6043
6044         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6045         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6046         * sim-decode.scm (-gen-decode-switch): Ditto.
6047
6048         * sim-arch.scm (-regs-for-access-fns): Delete.
6049         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6050         (-gen-arch-reg-access-defns): Delete.
6051
6052         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6053         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6054         with state-parallel=exec?.
6055         (cgen-*): Call sim-analyze-insns! here.
6056         * sim-decode.scm (cgen-*): Ditto.
6057         * sim-model.scm (cgen-*): Ditto.
6058         * sim.scm (-sim-insns-analyzed): New global variable.
6059         (sim-init!): Reset it.
6060         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6061         already done the analysis.
6062
6063         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6064         MACH struct.
6065
6066         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6067         (arm arch): Update isa spec.
6068         (arm,thumb isas): Define.
6069         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6070         (arm7tdmi mach): Add isa spec.
6071         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6072         `const' on word number.
6073         * fr30.cpu (fr30 arch): Update isa spec.
6074         (fr30 isa): Define.
6075         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6076         moved to isa spec.
6077         * i960.cpu (i960 arch): Update isa spec.
6078         (i960 isa): Define.
6079         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6080         liw-insns,parallel-insns moved to isas spec.
6081         * m32r.cpu (m32r arch): Update isas spec.
6082         (m32r isa): Define.
6083         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6084         liw-insns,parallel-insns moved to isa spec.
6085         * sparc.cpu (sparc arch): Update isas spec.
6086         (sparc isa): Define.
6087         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6088         decode-assist moved to isa spec.
6089         * sparc64.cpu (sparc64 cpu): Ditto.
6090         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6091         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6092         (-gen-mach-table-defns): Output mach table.
6093         (-gen-hash-defines): Delete insn size macros, except for
6094         CGEN_MAX_INSN_SIZE.
6095         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6096         (cgen-desc.h): Define MAX_ISAS.
6097         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6098         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6099         (arch-* accessors): Renamed from arch:*.  All callers updated.
6100         (current-arch-isa-name-list): New proc.
6101         (-arch-parse-isas): Renamed from -arch-parse-isa.
6102         (def-isa-attr!): Rewrite.
6103         (<iframe>): New class.
6104         (<itype>): New class.
6105         (<isa>): Rewrite.
6106         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6107         (isa-integral-insn?,isa-parallel-exec?): New procs.
6108         (-isa-parse,-isa-read,define-isa): New proc.
6109         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6110         liw-insns moved to <isa>.
6111         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6112         (-cpu-parse,-cpu-read): Update.
6113         (state-*): Renamed from state:*.  All callers updated.
6114         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6115         not cpu.
6116         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6117         (state-decode-assist): New proc.
6118         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6119         (-adata-set-derived!): Rewrite.
6120         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6121         callers updated.
6122         (arch-init!): Add define-isa command.
6123         * read.scm (<reader>): Default keep-isa member to (all).
6124         (reader-* accessors): Renamed from reader:*.  All callers updated.
6125         (-keep-isa-set!): Call string->symbol on isa name list.
6126         (keep-isa-validate!): Rewrite.
6127         (current-isa): New proc.
6128         (keep-isa?): Recognize "all".
6129         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6130         Call -keep-isa-set!.
6131         (cmd-if): Recognize keep-isa?.
6132         (cpu-load): New arg keep-isa.  All callers updated.
6133         (-opt-spec-update): New proc.
6134         (common-arguments): First arg is string, not symbol.
6135         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6136
6137         * rtl.scm (rtx-get): Default mode of string arg is INT.
6138
6139         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6140
6141         * rtx-funcs.scm (join:): Pass cpu to handler.
6142
6143         * configure.in (guile_include_dir): Delete.
6144         * configure: Rebuild.
6145         * Makefile.in: Rebuild.
6146         * doc/Makefile.in: Rebuild.
6147
6148         * sid-cpu.scm (-extract-chunk-specs): New proc.
6149         (gen-define-fields): Use it.
6150         (-extract-chunk): New proc.
6151         (-gen-extract-beyond-var-list): Use it.
6152         (gen-extract-fields): Simplify.
6153
6154 1999-03-22  Ben Elliston  <bje@cygnus.com>
6155
6156         * arm7.cpu (ldri-p): New instruction.
6157         (swi): Do not vector through 0x8 yet--there is nothing there.
6158         (addi): Reinstate.
6159         (movi): Likewise.
6160         (all): Use (const x) in subreg expressions.
6161
6162 1999-03-19  Ben Elliston  <bje@cygnus.com>
6163
6164         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6165         (smlal): Likewise.
6166
6167 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6168
6169         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6170         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6171         * sim-cpu.scm (-extract-chunk-specs): New proc.
6172         (gen-define-fields): Use it.
6173         (-extract-chunk): New proc.
6174         (-gen-extract-beyond-var-list): Use it.
6175         (gen-extract-fields): Simplify.
6176
6177         Port to guile 1.3.1.
6178         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6179         (LIBIBERTY): New var.
6180         (HOB_OBJS): Add cgen-gh.o.
6181         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6182         * Makefile.in: Rebuild.
6183         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6184         * config.in: Rebuild.
6185         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6186         libncurses, libtermcap.
6187         Add checks for needed functions in guile 1.2 not in guile 1.3,
6188         and vice versa.  Add test for 3 argument scm_make_vector.
6189         * configure: Rebuild.
6190         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6191         definitions if guile doesn't have them.
6192         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6193         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6194         with gh_vector_set_x.
6195         (cgh_qsort): Replace gh_list_length with gh_length.
6196         * cgen-gh.h: Add decls for added functions.
6197         (cgh_qsort): Don't declare if IN_HOBBIT.
6198         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6199         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6200         scm_make_vector with gh_make_vector.
6201         * cos.scm: Use vector-length instead of length on vectors.
6202         * dev.scm (cload): Make varargs proc with keyword/value args.
6203         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6204         provide version that works with guile 1.2 or 1.3.
6205         Include private copy of scmhob.h.
6206         * scmhob.h: New file.  Keep our own copy for now.
6207
6208 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6209
6210         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6211         plain text.
6212         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6213         (-cx-temp-dump-stack): Pretty up output.
6214
6215         * arm.cpu: comment out thumb.cpu until isa support ready.
6216         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6217         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6218         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6219
6220         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6221
6222 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6223
6224         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6225         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6226
6227         * operand (op:new-mode): Improve error message.
6228
6229         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6230         * arm7.cpu: New file.
6231
6232 1999-03-12  Ben Elliston  <bje@cygnus.com>
6233
6234         * arm.cpu: Lots of minor fixes after desk checking.
6235
6236 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6237
6238         * thumb.cpu: snapshot of current work
6239
6240         * rtl.scm (rtx-get): Tweak error message.
6241
6242 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6243
6244         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6245         * Makefile.in: Rebuild.
6246
6247         * cos.c (cos_vector_copy): New function.
6248         (_object_copy): Use it.
6249
6250         * mode.scm (mode:eq?): Clean up.
6251         * rtl.scm (cx-new-mode): Copy attributes.
6252         (rtx-get): Don't make copy if <c-expr> with identical mode.
6253
6254         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6255         add new isas spec.
6256         (gr-names): h-gr register names moved here.
6257         (h-gr): Update.
6258         (cr-names): h-cr register names moved here.
6259         (h-cr): update.
6260         (dr-names): h-dr register names moved here.
6261         (h-dr): update.
6262         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6263         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6264         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6265         add new isas spec.
6266         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6267         add new isas spec.
6268         (gr-names): h-gr register names moved here.
6269         (h-gr): Update.
6270         (cr-names): h-cr register names moved here.
6271         (h-cr): update.
6272         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6273         (h-accums,h-psw): Ditto.
6274         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6275         add new isas spec.
6276         (gr-names): h-gr register names moved here.
6277         (h-gr-indices): Delete.
6278         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6279         (sparc64 h-gr): Ditto.
6280         (h-y): Add get/set specs.
6281         (fp regs): Rewrite.
6282         (fp operands): Rewrite.
6283         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6284         (h-tbr,h-cwp,h-wim): Ditto.
6285         * sparc64.cpu (h-fpsr): Add get/set specs.
6286         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6287         (fp-ld-op): New arg `dest', all callers updated.
6288         (*): Replace `make-di' with `join'.
6289
6290         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6291         present.
6292         (gen-semantic-code): Save/restore rtl generator state.
6293         (cgen-cpu.h): Call rtl-gen-init!.
6294         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6295         (-gen-ifld-extract-beyond): Ditto.
6296         (<multi-ifield>,gen-ifld-extract): Ditto.
6297         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6298         `gstate'.
6299         (-hw-gen-set-quiet-pc): Ditto.
6300         (<hw-pc>,gen-write): Ditto.
6301         (-hw-cxmake-get): Ditto.  Call getter function if present.
6302         (<hw-register>,cxmake-get-raw): New method.
6303         (<hw-register>,gen-set-quiet-raw): New method.
6304         (-hw-gen-set-quiet): New arg `gstate'.
6305         (hw-fun-access?): Delete.
6306         (gen-reg-access-defn): Output function contents.
6307         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6308         invocation.
6309         (-gen-hw-index): Ditto.
6310         (op:read): Update gen-read invocation.
6311         (op:write): Update gen-write invocation.
6312         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6313         operands.
6314         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6315         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6316         (<unit>,gen-profile-code): Update to sim.scm version.
6317
6318         * sim-arch.scm (-regs-for-access-fns): New proc.
6319         (-biggest-reg-mode): New proc.
6320         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6321         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6322         virtual regs separately.
6323         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6324         get/set specs.
6325         (gen-semantic-code): Save/restore rtl generator state.
6326         (cgen-cpu.h): Call rtl-gen-init!.
6327         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6328         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6329         renamed to mach-bfd-name.
6330         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6331         (-gen-ifld-extract-beyond): Ditto.
6332         (<multi-ifield>,gen-ifld-extract): Ditto.
6333         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6334         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6335         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6336         `gstate'.
6337         (hw-fun-access?): Delete.
6338         (-hw-gen-set-quiet-pc): New arg `gstate'.
6339         (<hw-register>,gen-get-macro): Rewrite.
6340         (<hw-register>,gen-set-macro): Rewrite.
6341         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6342         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6343         (<hw-register>,cxmake-get-raw): New method.
6344         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6345         (<hw-register>,gen-set-quiet-raw): New method.
6346         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6347         invocation.
6348         (-gen-hw-index): Ditto.
6349         (<hw-index>): New arg `gstate'.
6350         (-gen-hw-selector): Update call to rtx-c.
6351         (<pc>): New arg `gstate'.
6352         (op:read): Update gen-read invocation.
6353         (op:write): Update gen-write invocation.
6354         (<operand>,cxmake-get): Handle raw-reg.
6355         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6356         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6357         (<operand>,gen-set-quiet): Handle raw-reg.
6358         (<operand>,gen-set-trace): Handle raw-reg.
6359         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6360
6361         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6362         cgen_operand_type enum.
6363         (gen-operand-table): Add operand type enum.  Replace pointer to
6364         hardware element with its enum.  Null terminate table.
6365         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6366         Build operand table.
6367         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6368         * mach.scm (<arch-data>): New member `isas'.
6369         (adata-isas): New accessor.
6370         (<isa>): New class.
6371         (isa-default-insn-word-bitsize): New accessor.
6372         (isa-enum): New proc.
6373         (current-arch-default-insn-word-bitsize): Delete.
6374         (current-isa-list,current-isa-lookup): New procs.
6375         (-arch-parse-isa): New proc.
6376         (-arch-parse): Rewrite.
6377         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6378         (define-arch): Define ISA attribute.
6379         (def-isa-attr!,isa-supports?): New procs.
6380         (<mach>): New member `isas'.
6381         (mach-isas): New accessor.
6382         (-mach-parse): New arg `isas', all callers updated.
6383         (-mach-read): Recognize `isas'.
6384         (arch-finish!): Rewrite.
6385         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6386         @arch@_cgen_get_{int,vma}_operand.
6387         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6388         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6389         of pointer to table entry.
6390         * opcodes.scm (gen-switch): Handle multiply defined operands.
6391         * operand.scm (op-sort): New proc.
6392
6393         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6394         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6395         (hw-enum): Accept symbol argument.
6396         (hardware-builtin!): Delete attribute FUN-ACCESS.
6397         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6398
6399         * attr.scm (atlist-source-form): New proc.
6400         (attr-builtin!): New attr `PRIVATE'.
6401         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6402         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6403         if they have `PRIVATE' attribute.
6404         (gen-hw-table-defns): Output definitions of explicitly defined
6405         keyword tables.
6406         * hardware.scm (<keyword>): New member print-name.  Rename member
6407         `value' to `values', all uses updated.
6408         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6409         (keyword-parse): Rewrite.
6410         (-keyword-read): New proc.
6411         (define-keyword): New proc.
6412         (-hw-parse-keyword): New proc.
6413         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6414         `extern-keyword'.
6415         (-hw-parse-values): Ditto.
6416         (-hw-parse-get,-hw-parse-set): Rewrite.
6417         (hardware-init!): Add new comment define-keyword.
6418         * mach.scm (<arch>): New member `kw-list'.
6419         (arch:kw-list,arch_set-kw-list!): New accessors.
6420         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6421
6422         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6423         * mode.scm (mode-class-integral?): New proc.
6424         (mode-class-float?,mode-class-numeric?): New procs.
6425         (mode-integral?,mode-float?,mode-numeric?): New procs.
6426         (mode-compatible?): New proc.
6427         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6428         rtx-c-with-alist.
6429         (<ifield>,gen-extract): Ditto.
6430         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6431         (<gstate>): New class.
6432         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6433         (gstate-context,gstate-set-context!): New accessors.
6434         (gstate-macro?,gstate-set-macro?!): New accessors.
6435         (gstate-make,gstate-copy): New procs.
6436         (-rtl-current-gstate): New global.
6437         (current-gstate-simulator?): New proc.
6438         (current-gstate-context,current-gstate-macro?): New procs.
6439         (current-gstate,current-gstate-set!): New procs.
6440         (rtl-gen-init!): Rewrite.
6441         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6442         (tstate-make): New arg `gstate', all callers updated.
6443         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6444         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6445         (tstate-gstate,tstate-set-gstate!): New accessors.
6446         (tstate-copy): New proc.
6447         (tstate-new-cond?,tstate-new-set?): Rewrite.
6448         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6449         (rtx-traverse): New arg `gstate', all callers updated.
6450         (rtx-strdump): New proc.
6451         (-simplify-for-compilation): New arg `gstate', all callers updated.
6452         (semantic-in-out-operands): Ditto.
6453         (semantic-attrs): Ditto.
6454         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6455         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6456         (rtx-value): Rewrite.
6457         (<c-expr>,gen-name): New method.
6458         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6459         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6460         (cx-new-mode): New proc.
6461         (-rtx-c-with-tstate): New proc.
6462         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6463         callers updated.
6464         (-rtx-mode): Rewrite.
6465         (-rtx-mode-compatible?): New proc.
6466         (<c-expr-temp>): New member `value'.
6467         (cx-temp:value): New accessor.
6468         (<c-expr-temp>,make!): Override default method.
6469         (<c-expr-temp>,cxmake-get): Rewrite.
6470         (<c-expr-temp>,gen-set-quiet): Rewrite.
6471         (<c-expr-temp>,gen-set-trace): Rewrite.
6472         (gen-temp-defs): Use cx-temp:value.
6473         (record-temp!): New arg value, all callers updated.
6474         (cx-temp:cx:make): Delete.
6475         (-cx-temp-dump-stack): New proc.
6476         (rtx-get): New arg `gstate', all callers updated.  Do mode
6477         compatibility checks.  Ensure result has specified mode.
6478         (rtx-set-quiet): New arg `gstate', all callers updated.
6479         (rtx-set-trace): Ditto.
6480         (s-c-call): New arg `tstate', all callers updated.
6481         (s-c-raw-call): Ditto.
6482         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6483         (s-cmpop,s-if,e-if): Ditto.
6484         (s-subreg): New proc.
6485         (-par-new-temp!): New proc.
6486         (-par-next-temp!): Rewrite.
6487         (-par-replace-set-dests): Use -par-new-temp!.
6488         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6489         (s-sequence): Use -rtx-c-with-state.
6490         * rtx-funcs.scm (*): Update.
6491         (raw-reg:): New rtx function.
6492         (make-di): Delete.
6493         (join:,subreg:): New rtx functions.
6494
6495         * insn.scm (<insn>): New members pre-cond-trap, condition,
6496         post-cond-trap, compiled-condition.
6497
6498         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6499
6500         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6501
6502         * utils-cgen.scm (parse-symbol): New proc.
6503         (parse-string): New proc.
6504         (gen-get-macro,gen-set-macro): New arg `index-args'.
6505         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6506         Prepend \ to newlines.
6507
6508         * utils.scm (alist-remove-duplicates): Delete.
6509
6510         * sid.scm (sim-init!): Delete private debugging code.
6511
6512 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6513
6514         * cgen-sid.scm: New file for C++ simulator application.
6515         * sid-arch.scm: Ditto.
6516         * sid-cpu.scm: Ditto.
6517         * sid-decode.scm: Ditto.
6518         * sid-model.scm: Ditto.
6519         * sid.scm: Ditto.
6520         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6521
6522 1999-03-05  Ben Elliston  <bje@cygnus.com>
6523
6524         * arm.cpu: New file.
6525
6526 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6527
6528         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6529         * Makefile.in: Rebuild.
6530
6531         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6532         (-attr-parse): Validate default value.
6533
6534         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6535         (-CGEN-LANG-VERSION): Ditto.
6536         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6537         (<reader>): New member keep-isa plus accessors.
6538         (-keep-isa-set!,keep-isa-validate!): New procs.
6539         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6540         (common-arguments): New variable.
6541         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6542         (-debug-repl,continue): New procs.
6543         (-cgen,cgen): New procs.
6544         * cgen-gas.scm: Rewrite.
6545         * cgen-opc.scm: Rewrite.
6546         * cgen-sim.scm: Rewrite.
6547         * cgen-stest.scm: Rewrite.
6548
6549         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6550         (gas-test-finish!): Call opcodes-finish!.
6551         (gas-test-analyze!): Call opcodes-analyze!.
6552         (<hw-asm>): New method test-data.
6553         (<operand>,testdata): Rewrite.
6554         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6555         (sim-test-finish!): Call opcodes-finish!.
6556         (sim-test-analyze!): Call opcodes-analyze!.
6557         (<hw-asm>): New method test-data.
6558         (<operand>,testdata): Rewrite.
6559
6560 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6561
6562         * fixup.scm (reverse!): Define if missing.
6563         * *.scm: Use reverse! instead of list-reverse!.
6564
6565         * utils.scm (leading-id-char?): New proc.
6566         (id-char?): Rewrite.
6567         (chars-until-delimiter): New proc.
6568         * opc-itab.scm (extract-syntax-operands): Rewrite.
6569         (strip-mnemonic): Rewrite.
6570         (compute-syntax): Rewrite.
6571
6572         * pmacros.scm (-pmacro-substr): New proc.
6573         (pmacros-init!): Add builtin .substr.
6574
6575 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6576
6577         * thumb.cpu: New file.
6578
6579 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6580
6581         * Makefile.am (CGENCFLAGS): New variable.
6582         (WITH_HOBBIT): Use automake conditional.
6583         (CGEN_HOB_SRC): New variable.
6584         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6585         (*.o): Compile with CGENCFLAGS.
6586         (cgen-hob.c): Simplify.
6587         (cgen-nohob.c): New rule.
6588         (hobbit): Renamed from hob.x.
6589         (CLEANFILES): Add cgen-nohob.c.
6590         * Makefile.in: Rebuild.
6591         * doc/Makefile.in: Rebuild.
6592         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6593         (WITH_HOBBIT): Use AM_CONDITIONAL.
6594         * configure: Rebuild.
6595         * aclocal.m4: Rebuild.
6596
6597         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6598         with string-write-map.
6599
6600         * sim-cpu.scm (hw-need-storage?): New proc.
6601         (-gen-hardware-types): Use it.
6602         (gen-parallel-exec-elm): Call op-save-index?.
6603
6604         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6605
6606         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6607         UNSIGNED attribute.
6608         (-gen-ifld-extract-beyond): Ditto.
6609         (<integer>): Delete all references.
6610         (<sim-hardware>): Delete.
6611         (hw-profilable?): New proc.
6612         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6613         (<hw-register>): Rename method get-index-mode to save-index?.
6614         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6615         (<hw-register>,gen-sym-decl): Make virtual.
6616         (<hw-memory>,gen-sym-decl): Make virtual.
6617         (<hw-memory>): Rename method get-index-mode to save-index?.
6618         (<hw-address>,gen-sym-decl): Make virtual.
6619         (<operand>): New method save-index?.
6620         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6621
6622         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6623         prefix added.  All uses updated.
6624
6625         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6626         rather than pointer to table entry.
6627
6628         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6629         Remove all hw-asm,op-asm support.
6630         (-gen-parse-number,-gen-parse-address): New procs.
6631         (<keyword>,gen-parse): Redo function name computation.
6632         (<keyword>,gen-print): Ditto.
6633         (<operand>,gen-function-name): Rewrite.
6634         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6635         (opcodes-init!): Delete call to add-parser!.
6636
6637         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6638         Define enum using hardware semantic name.
6639         (-gen-hw-decl,-gen-hw-defn): New procs.
6640         (gen-hw-table-decls): Use -gen-hw-decl.
6641         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6642         CGEN_HW_ENTRY structs.
6643         (gen-operand-table): Output hw's enum, not pointer to table entry.
6644         (-gen-cpu-open): Build table of selected hardware elements.
6645
6646         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6647         (<hardware> support): Delete.
6648         (<hw-asm>): Delete, moved to hardware.scm.
6649         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6650         (<hw-asm>,gen-table-entry): New method.
6651         (<hw-asm>,parse!): Delete.
6652         (<keyword>,gen-table-entry): New method.
6653         (<keyword>,parse!): Delete.
6654         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6655         for gen-decl,gen-defn,gen-ref,gen-init.
6656         (desc-init!): Don't create parser for operand asm specs.
6657
6658         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6659         * ifield.scm (<ifield>): New member `mode'.
6660         (<ifield>,make!): New arg `mode'.
6661         (ifld-mode): Rewrite.
6662         (ifld-hw-type): Rewrite.
6663         (<ifield>,min-value): Rewrite.
6664         (<ifield>,max-value): Rewrite.
6665         (-ifield-parse): New arg `mode'.
6666         (-ifield-read): Update.
6667         (define-full-ifield): New arg `mode'.
6668         (define-full-multi-ifield): Ditto.
6669         (-multi-ifield-parse): Ditto.
6670         (-multi-ifield-read): Update.
6671         (define-full-multi-ifield): New arg `mode'.
6672         (ifield-builtin!): Update definition of f-nil.
6673         * simplify.inc (define-normal-ifield): Update call to
6674         define-full-ifield.
6675         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6676         (define-normal-hardware): Delete arg asm.  New args indices, values,
6677         handlers.  Update call to define-full-hardware.
6678         (define-simple-hardware,dsh): New pmacros.
6679         (define-normal-operand): Update call to define-full-operand.
6680         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6681         Specify INT/UINT mode instead.
6682         (h-gr,h-cr): Use "indices" instead of "asm".
6683         (h-dr,h-ps): Update keyword syntax.
6684         (h-r13,h-r14,h-r15): Ditto.
6685         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6686         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6687         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6688         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6689         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6690         Specify INT/UINT mode instead.
6691         (h-gr): Use "indices" instead of "asm".
6692         (h-cc): Update keyword syntax.
6693         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6694         Specify INT/UINT mode instead.
6695         (h-hi16,h-slo16,h-ulo16): Update.
6696         (h-gr,h-cr): Use "indices" instead of "asm".
6697         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6698         (h-accums): Update keyword syntax.
6699         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6700         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6701         Specify INT/UINT mode instead.
6702         (h-gr-indices): New pmacro.
6703         (h-gr32,h-gr64): Split up from h-gr.
6704         (h-a): Update type spec.  Use values instead of asm spec.
6705         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6706         (h-y,h-annul-p): Ditto.
6707         (h-asr): Update keyword spec.
6708         (h-lo10,h-lo13,h-hi22): Update.
6709         (get-freg-spec,set-freg-spec): New pmacros.
6710         (h-fr32,h-fr64): Split up from h-fr.
6711         (rdd): Comment out get/set specs.
6712         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6713         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6714         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6715         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6716         UNSIGNED.  Specify INT/UINT mode instead.
6717         (h-*): Use dsh instead of dnh where appropriate.
6718         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6719         (h-p,h-membarmask): Ditto.
6720         (membarmask): Use "handlers" instead of "asm".
6721
6722         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6723         values,handlers,getters,setters plus accessors.
6724         (hw-mode-ok?,hw-default-mode): New procs.
6725         (<hardware-base>): Rename method new-mode to mode-ok?
6726         (<hardware-base>): New method get-index-mode.
6727         (hw-index-mode): New proc.
6728         (pc?): Delete, moved to operand.scm.
6729         (address?): New proc.
6730         (<hardware>): Delete.
6731         (<hw-asm>): Definition moved here from desc.scm.
6732         (keyword-parse): New proc.
6733         (hardware-parsers): Delete.
6734         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6735         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6736         (-hw-parse-get,-hw-parse-set): New procs.
6737         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6738         indices,values,handlers,get,set.  Rewrite.
6739         (-hw-read-extra): Delete.
6740         (-hw-read): Update.
6741         (define-hardware): Don't add object if not selected.
6742         (define-full-hardware): Ditto.
6743         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6744         (<hw-register>): Member `type' moved to baseclass.  Delete member
6745         hw-asm.
6746         (<hw-register>,parse!): Rewrite.
6747         (<hw-register>): Delete methods get-rank,get-mode.
6748         (<hw-register>): Method new-mode renamed to mode-ok?
6749         (<hw-register>): New method get-index-mode.
6750         (<hw-pc>,parse!): Rewrite.
6751         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6752         (<hw-memory>,parse!): Rewrite.
6753         (<hw-memory>): Delete methods get-rank,get-mode.
6754         (<hw-memory>): Method new-mode renamed to mode-ok?
6755         (<hw-memory>): New method get-index-mode.
6756         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6757         hw-asm.
6758         (<hw-immediate>,parse!): Rewrite.
6759         (<hw-immediate>): Delete methods get-rank,get-mode.
6760         (<hw-immediate>): Method new-mode renamed to mode-ok?
6761         (<hw-address>): Delete member hw-asm.
6762         (<hw-address>,parse!): Rewrite.
6763         (<hw-address>): Delete methods get-rank,get-mode.
6764         (<hw-address>): Method new-mode renamed to mode-ok?
6765         (hw-profilable?): Delete.
6766         (hardware-init!): Delete hardware-parsers reference.
6767         Update argument specs of command define-full-hardware.
6768         (hardware-builtin!): Update definitions of hardware builtins.
6769         * operand.scm (<operand>): New members hw-name,mode-name.
6770         Delete member op-asm.  New member handlers.
6771         (<operand>,make!): Update.
6772         (op:hw-name,op:mode-name,op:handlers): New procs.
6773         (op:type): Rewrite.
6774         (op:mode): Rewrite.
6775         (<operand>): New method get-index-mode.
6776         (<pc>,make!): Update.
6777         (op:new-mode): Rewrite.
6778         (operand-parsers): Delete.
6779         (-operand-parse): Rewrite.  Return #f if insn not selected.
6780         (-op-read-extra): Delete.
6781         (-operand-read): Update.
6782         (define-operand,define-full-operand): Update.
6783         (operand-init!): Delete operand-parsers reference.
6784         Update syntax of define-full-operand command.
6785
6786         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6787         (define-full-insn): Update.
6788         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6789         (define-full-minsn): Update.
6790
6791         * mode.scm (<mode>): New member class.
6792         (mode:class): New proc.
6793         (mode?): Rewrite.
6794         (-mode-parse): New arg class.
6795         (define-full-mode): Update.
6796         (mode-find): Rewrite.
6797         (mode-make-int,mode-make-uint): New procs.
6798         (mode-init!): Update syntax of define-full-mode command.
6799         (mode-builtin!): Update definitions of builtin modes.
6800
6801         * model.scm (<profile>): Delete.
6802
6803         * read.scm (keep-atlist?): New proc.
6804         (keep-multiple?): New proc.
6805         (<parser-list>): Delete.
6806         (add-parser!,parse-spec!): Delete.
6807
6808         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6809         (def-rtx-syntax-node): Ditto.
6810         (-rtx-traverse-debug?): New variable.
6811         (tstate-make): New proc.
6812         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6813         (tstate-new-cond?,tstate-new-set?): New procs.
6814         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6815         tstate.  All callers updated.
6816         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6817         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6818         (-build-operand!): Replace arg cond? with tstate.
6819         (-build-reg-operand!,-build-mem-operand!): Ditto.
6820         (-build-index-of-operand!): Update making of <operand> object.
6821         (s-ifield): New arg tstate.  All callers updated.
6822         (hw:): New arg tstate.  All callers updated.  Replace call to
6823         current-hw-lookup with current-hw-sem-lookup-1.
6824         (s-index-of): New arg tstate.  All callers updated.
6825         (reg:,mem:): Ditto.
6826         (-rtx-use-sem-fn?): New proc.
6827         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6828         semantic cover fns.
6829         (s-convop): Only use semantic mode when using semantic cover fns.
6830         (s-cmpop): Call -rtx-use-sem-fn?.
6831         (s-cond,s-case): New arg tstate.  All callers updated.
6832         (s-parallel,s-sequence): Ditto.
6833
6834         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6835
6836         * types.scm (<scalar>): Rewrite implementation.
6837         (<integer>): Delete.
6838         (parse-type): Rewrite.
6839
6840         * utils-cgen.scm (parse-handlers): New proc.
6841
6842         * utils.scm (!=): New proc.
6843
6844 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6845
6846         * pmacros.scm (-pmacro-expand): Fix typo.
6847
6848 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6849
6850         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6851         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6852         * i960.cpu (build-hex2): New pmacro.
6853         (insn-opcode): Simplify.
6854         (insn-opcode2): Ditto.
6855
6856         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6857         * cgen-stest.scm (catch-with-backtrace): Ditto.
6858
6859 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6860
6861         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6862         All callers updated.
6863         (-pmacro-invoke): New proc.
6864         (-pmacro-sym,-pmacro-str): New procs.
6865         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6866         (pmacros-init!): Install builtins .iota, .map, .apply.
6867         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6868         (h-fr): Simplify register name spec.
6869         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6870         * utils.scm (num-args-ok?): New proc.
6871
6872 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6873
6874         * pmacros.scm (-pmacro-error): New proc.
6875         (-pmacro-expand): Use it.
6876         (-pmacro-splice): New proc.
6877         (pmacros-init!): Install new builtin .splice.
6878
6879         * sparc.cpu: Include sparc64.cpu when appropriate.
6880         (f-mmask,f-simm11): Moved to sparc64.cpu.
6881         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6882         (ANNUL attribute): Delete.
6883         (test-* pmacros): New arg cc, all callers updated.
6884         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6885         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6886         atomic-opc.
6887         (ldstub,swap): Moved to sparccom.cpu.
6888         * sparc64.cpu: Add more insns.
6889
6890 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6891
6892         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6893         CGEN_ATTR_VALUE.
6894         (cgen-sem-switch.c): Ditto.
6895         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6896         moved to cgen-engine.h.
6897         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6898         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6899         global.  Cache attributes and insn length in IDESC.
6900         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6901         @cpu@_opcode renamed to @cpu@_get_idata.
6902         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6903         done later underneath sim_resume.
6904         (@mach@_mach): Record @cpu@_prepare_run.
6905         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6906         updated.
6907         (-hw-gen-set-quiet-pc): Ditto.
6908         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6909         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6910         (<hw-addr>,cxmake-get): Ditto.
6911         (<hw-iaddr>,cxmake-get): Ditto.
6912         (<pc>,cxmake-get): Ditto.
6913         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6914         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6915         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6916         (<hw-pc>,gen-write): Use hw-selector-default.
6917         (<hw-register>,gen-write): Ditto.
6918         (<hw-memory>,gen-write): Ditto.
6919         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6920         (-gen-hw-selector): New proc.
6921
6922         * desc.scm: New file.
6923         * desc-cpu.scm: New file.
6924         * opcodes.scm: Split up into several smaller files.
6925         * opc-asmdis.scm: New file.
6926         * opc-ibld.scm: New file.
6927         * opc-itab.scm: New file.
6928         * opc-opinst.scm: New file.
6929         * Makefile.am (desc): New target.
6930         (opcodes): Update args to cgen-opc.scm.
6931         * Makefile.in: Rebuild.
6932         * aclocal.m4: Rebuild.
6933         * config.in: Rebuild.
6934         * configure.in: Update arg to AC_INIT.
6935         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6936         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6937         AC_PROG_INSTALL.
6938         * configure: Rebuild.
6939         * cgen-gas.scm: Update files to load.
6940         * cgen-opc.scm: Ditto.  Reorganize option letters.
6941         * cgen-sim.scm: Update files to load.
6942         * cgen-stest.scm: Ditto.
6943         * dev.scm (cload): New app "DESC".
6944         (load-opc): Update files to load.
6945         (load-gtest,load-sim,load-stest): Ditto.
6946
6947         * attr.scm (bool-attr?): New proc.
6948         (attr-list-enum-list): New proc.
6949         (-attr-sort): Rewrite.
6950         (attr-builtin!): Give ALIAS attribute a fixed index.
6951         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6952         calculate attribute enum list.
6953         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6954
6955         * insn.scm (-insn-parse): Renamed from parse-insn.
6956
6957         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6958         (-hw-read): Ditto.
6959
6960         * mode.scm (-mode-parse): Renamed from parse-mode.
6961
6962         * operand.scm (<operand>): New member `selector'.
6963         (<operand>,make!): Use default selector.
6964         (hw-selector-default): New variable.
6965         (hw-selector-default?): New proc.
6966
6967         * pmacros.scm (pmacros-init!): New proc.
6968         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6969         (-env-set!): Delete.
6970         (-pmacro-expand): New proc apply-macro.
6971         Use it in scan-list,scan.  Scan list first, then see if macro
6972         invocation.
6973         (define-pmacro): Rewrite.
6974         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6975
6976         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6977         selected if (current-mach) seen.
6978         (rtx?): Renamed from rtx-uneval?, all callers updated.
6979         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6980         updated.
6981         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6982         selector, all callers updated.
6983         (hw:): New arg selector, all callers updated.  Delete old comments
6984         and code.
6985         (reg:,mem:): Handle selectors
6986         * rtx-funcs.scm (reg:): Handle selectors.
6987
6988         * read.scm: Renamed from cpu.scm.
6989         (<command>): New class.
6990         (<reader>): New member commands.
6991         (reader-add-command!): New proc.
6992         (reader-lookup-command): New proc.
6993         (reader-error,-reader-process-expanded,reader-process): New procs.
6994         (reader-read-file!): New proc.
6995         (include): Call reader-read-file!.
6996         (cmd-if): New proc.
6997         (cpu-load): Call reader-read-file!.
6998         * utils.scm (num-args): New proc.
6999         * simplify.inc: New file.
7000         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
7001         procs.  Move define-normal-foo procs (and abbreviated forms) to
7002         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
7003         routines.
7004         * fr30.cpu: Include simplify.inc.
7005         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7006         * i960.cpu: Include simplify.inc.
7007         * m32r.cpu: Include simplify.inc.
7008         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7009         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7010         * sparc.cpu: Include simplify.inc.
7011         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7012         * utils-cgen.scm (parse-error): Moved to read.scm.
7013         (sanitize): Rewrite.
7014         (utils-init!): New proc.
7015
7016 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
7017
7018         * sparc.cpu: New file.
7019         * sparc32.cpu: New file.
7020         * sparc64.cpu: New file.
7021         * sparccom.cpu: New file.
7022         * sparc.opc: New file.
7023
7024 1999-01-27  Frank Eigler  <fche@cygnus.com>
7025
7026         * utils.scm (gen-copyright): New proc.
7027
7028 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7029
7030         Parameterize rtl parsing, rather than having lots of little handlers.
7031         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7032         Delete member traverse.
7033         (rtx:set-traverse!): Delete.
7034         (-rtx-valid-types,-rtx-valid-matches): New variables.
7035         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7036         instead of expression.  All callers updated.
7037         (def-rtx-node): New args arg-types,arg-modes.
7038         (def-rtx-syntax-node): Ditto.
7039         (def-rtx-dual-mode): Ditto.
7040         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7041         All callers updated.
7042         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7043         All callers updated.
7044         (rtx-macro-expand): New proc.
7045         (-rtx-traverse-check-args): Delete.
7046         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7047         an rtx specific traverser.
7048         (-rtx-any-mode?,-rtx-symornum?): New procs.
7049         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7050         (-rtx-traverse-no-mode): Delete.
7051         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7052         (-rtx-traverse-operands): Rewrite.
7053         (-rtx-traverse-expr): Rewrite.
7054         (rtx-traverse): Don't expand macros here, leave for caller to do.
7055         (rtx-simplify): Delete.
7056         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7057         attributes.
7058         (rtx-true?,rtx-false?): Ditto.
7059         (-rtx-ref-type): Set dest is operand 1 now.
7060         (-simplify-for-compilation): New proc.
7061         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7062         Expand macros before calling rtx-traverse.  Sort operands by name
7063         to avoid unnecessary semantic formats.
7064         (semantic-attrs): New proc.
7065         (rtx-uneval?): Handle (<rtx-func> ...).
7066         (s-boolifop): Delete arg mode.  All callers updated.
7067         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7068         (eq-attr): New arg obj.
7069         (eq-attr:): Delete.
7070         * m32r.cpu (rach): Update calls to andif.
7071
7072         * minsn.scm (-minsn-parse-expansion): Renamed from
7073         parse-minsn-expansion.
7074         (-minsn-parse): Renamed from parse-minsn.
7075         (-minsn-read): Renamed from read-minsn.
7076         (def-minsn): Don't check APPLICATION here.
7077         (def-full-minsn): New proc.
7078         (define-macro-insn): Check APPLICATION here.  Expand macros.
7079         (define-normal-macro-insn): Ditto.
7080
7081         * utils.scm (word-value): New arg start-lsb?.
7082         (word-mask,word-extract): Ditto.
7083         (split-bits,powers-of-2): Use integer-expt instead of expt.
7084         (bit-set?): Handle 32 bit values (which are bignums).
7085         (cg-logand,cg-logxor): New functions.
7086         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7087         (<ifield>,field-value): Update call to word-value.
7088         (<ifield>,min-value): Use integer-expt instead of expt.
7089         (<ifield>,max-value): Ditto.
7090
7091         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7092
7093         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7094
7095         Compute raw instruction format in addition to semantic based format.
7096         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7097         (<iformat> accessors): Rename accessors to ifmt-*.
7098         (<sformat>): New class.
7099         (fmt-enum): Renamed from fmt:enum.
7100         (-ifmt-search-key): Rewrite.
7101         (-sfmt-search-key): New proc.
7102         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7103         Compute iformat and sformat search keys.
7104         (ifmt-build): Update.
7105         (sfmt-build): New proc.
7106         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7107         (ifmt-compute!): Compute instruction format <iformat> based on
7108         instruction fields alone.  Compute new semantic format <sformat>
7109         based on instruction fields and semantic information.
7110         (ifmt:lookup): Delete.
7111         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7112         (current-sfmt-list): New proc.
7113         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7114         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7115         (insn-length,insn-length-bytes): Update.
7116         (insn:mask-length,insn:mask): Update.
7117         (insn-lookup-op): Update.
7118         * gas-test.scm (gas-test-analyze!): Update.
7119         (gen-gas-test): Ditto.
7120         * sim-test.scm (sim-test-analyze!): Update.
7121         (gen-sim-test): Ditto.
7122         * opcodes.scm (gen-operand-instance-table): Update.
7123         (gen-operand-instance-ref): Ditto.
7124         (max-operand-instances): Use heuristic if semantics not parsed.
7125         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7126         (opcodes-analyze!): Only scan semantics of building operand instance
7127         tables.
7128         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7129         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7130         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7131         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7132         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7133         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7134         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7135
7136         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7137         New arg lsb0?  All callers updated.
7138         (decode-bits): New arg lsb0?.  All callers updated.
7139         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7140         of expt.
7141         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7142         (build-slots): Call integer-expt instead of expt.
7143         (build-decode-table-entry): Handle crossing word boundaries better.
7144         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7145         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7146
7147         * enum.scm (define-enum): Rewrite.
7148         (define-normal-enum): Ditto.
7149         (def-full-insn-enum): New proc.
7150         (define-normal-insn-enum): Rewrite.
7151
7152         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7153         valid C.
7154         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7155
7156         * dev.scm: Add sid support.
7157
7158         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7159         (CLEANFILES): Add tmp-*.
7160         * Makefile.in: Rebuild.
7161
7162         * doc/Makefile.am: New file.
7163         * doc/Makefile.in: New file.
7164         * doc/cgen.texi: New file.
7165         * Makefile.am (SUBDIRS): Define.
7166         * Makefile.in: Rebuild.
7167         * configure.in: Create doc/Makefile.
7168         * configure: Rebuild.
7169
7170 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7171
7172         * insn.scm (insn:syn): Delete.
7173
7174 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7175
7176         * fr30.cpu (model fr30-1): Add state variables load-regs,
7177         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7178         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7179         (model m32rx): Ditto.
7180         (addi): Simplify function unit usage spec.
7181         (ld-plus): Rewrite operand names in function unit usage spec.
7182         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7183         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7184         overridden.  Allow operand to appear in input and output spec.
7185         (<insn>,gen-profile-code): string-append -> string-list.
7186
7187         * ifield.scm (define-ifield): Call pmacro-expand.
7188         (define-full-ifield,define-normal-ifield): Ditto.
7189         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7190
7191         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7192         with-scache and without-scache cases.
7193
7194 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7195
7196         * fr30.cpu (fr30-1): Add state variable h-gr.
7197         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7198         (all insns): First pass at providing cycle counts.
7199         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7200         when initializing unit output operands, ditto for input operands.
7201
7202         * insn.scm (insn-length,insn-length-bytes): New procs.
7203         * mach.scm (-adata-set-derived!): Use them.
7204         * sim-cpu.scm (-gen-sem-case): Ditto.
7205
7206         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7207         (-gen-write-case): Ditto.
7208         (gen-semantic-fn): Ditto.  Split into two:
7209         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7210         in non-scache case.
7211         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7212         scache/no-scache appropriately.  All callers updated.
7213         (-gen-sem-case): PCADDR->IADDR.
7214         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7215
7216         * sim-decode.scm (*): Replace string-append,string-map with
7217         string-list,string-list-map where the result is sufficiently large.
7218         (-gen-decode-insn-table): Go back to simple version for non-scache
7219         case: just record IDESC in decoder tables and leave field extraction
7220         to the caller.
7221         (-gen-decode-switch): Ditto.
7222         (-gen-decode-fn): Ditto.
7223         (-gen-extract-decls): Only emit format enum if with-scache?.
7224         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7225         non-scache case.
7226         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7227         (-gen-insn-timing): Ditto.
7228         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7229         with-scache case.
7230
7231         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7232         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7233
7234 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7235
7236         * cpu.scm (keep-mach-validate!): New proc.
7237         (include): New proc.
7238
7239         * mach.scm (current-arch-mach-name-list): New proc.
7240         (-parse-arch-machs): Always return canonical form.
7241         (def-arch): Validate user specified machs to be kept.
7242         (def-mach-attr!): Simplify.
7243
7244         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7245         (option-init!): Initialize it.
7246         (option-set!): Set it.
7247         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7248         output operand instance tables.
7249         (cgen-opc.in): Only output operand instance tables if asked to.
7250
7251         * sim.scm (option-init!,option-set!): Clarify returned value.
7252
7253         * sim.scm (gen-mach-bfd-name): Move from here.
7254         * utils-cgen.scm: To here.
7255
7256 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7257
7258         * fr30.cpu (ilm): Fix comment field.
7259         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7260         compute it.
7261
7262         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7263         (rtx-true?, rtx-false?): New procs.
7264         * rtx-funcs.scm (annul): Rename vpc to pc.
7265         (-rtx-traverse-if): Improve determination of whether then/else parts
7266         are conditionally executed.
7267
7268         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7269         outer level.
7270         (gen-argbuf-type): Simplify generated definition (big sem_fields
7271         union moved outside).
7272
7273 1999-01-11  Ben Elliston  <bje@cygnus.com>
7274
7275         * doc/porting.texi: New file.
7276
7277         * doc/intro.texi: New file.
7278         (Layout): Use @example to insert preformatted ASCII text (such as
7279         diagrams). @code is inappropriate here.
7280
7281 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7282
7283         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7284
7285         * m32r.opc (print_hash): Cast dis_info.
7286
7287         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7288         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7289         get/set macros.
7290
7291 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7292
7293         * i960.cpu (f-br-disp): Remove RELOC attribute.
7294         (f-ctrl-disp): Ditto.
7295         (callx-disp): set-quiet -> set for (reg h-gr 2).
7296         (callx-indirect,callx-indirect-offset): Ditto.
7297
7298         * Makefile.am (gas-test): Fix dependencies.
7299         * Makefile.in: Rebuild.
7300         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7301         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7302         (gas-test-analyze!): Use syntax-break-out.
7303         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7304         (sim-test-analyze!): Use syntax-break-out.
7305         (cgen-build.sh): Use gen-file-name.
7306         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7307         * insn.scm (syntax-break-out): New proc.
7308         * utils.scm (gen-file-name): New proc.
7309
7310         * fixup.scm (nil,<?,<=?,>?): Delete.
7311
7312         * utils.scm (count-true): Rewrite.
7313
7314         * slib/sort.scm: Move sort.scm to slib directory.
7315         * cpu.scm: Update.
7316
7317         * iformat.scm (ifmt-compute!): Record empty format.
7318
7319         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7320         internal procs outside.  Handle expression register numbers.
7321         Handle index-of.
7322
7323         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7324
7325         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7326         every register.
7327         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7328         (gen-semantic-fn,-gen-sem-case): Ditto.
7329         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7330         (cgen-semantics.c): Ditto.
7331         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7332         (gen-ifmt-argvars-defns): New proc.
7333         (gen-ifmt-argvars-assigns): New proc.
7334         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7335         (-gen-decode-fn): Handle non-with-scache case.
7336         (cgen-decode.c): Define WANT_CPU to @cpu@.
7337         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7338         (cgen-model.c): Define WANT_CPU to @cpu@.
7339         * sim.scm (gen-ifld-extract-argvar): New proc.
7340         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7341         with FUN-ACCESS specified.
7342         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7343         (<hw-register>,gen-extract): New arg local?.
7344         (<hw-address>,gen-extract): Ditto.
7345         (-hw-cxmake-get): Handle non-with-scache case.
7346         (-hw-gen-set-quiet): Ditto.
7347         (<hw-address>,cxmake-get): Handle non-with-scache case.
7348         (gen-op-extract-argvar): New proc.
7349         (<operand>,gen-record-profile): Rewrite.
7350         (<operand>,gen-profile-code): Rewrite.
7351         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7352         (gen-argbuf-fields-union): New proc.
7353         (gen-argbuf-type): Use it.  Handle non-scache case.
7354
7355         * *.scm: class:foo procs renamed to class-foo.
7356         * attr.scm (<attribute>): New member `for'.
7357         (-attr-parse): New first value in list for default if
7358         none specified.
7359         (non-bool-attr-list,attr:add!): Delete.
7360         (def-attr): Use current-attr-add!.
7361         (atlist-attr-value-no-default): New proc.
7362         (attr-lookup-default): Handle boolean attributes.
7363         (gen-attr-enum): New proc.
7364         (-attr-remove-meta-attrs-alist): New proc.
7365         (attr-nub): New proc.
7366         (current-attr-list-for): New proc.
7367         (current-{ifld,hw,op,insn}-attr-list): New procs.
7368         (attr-builtin!): New proc.
7369         * cpu.scm (keep-obj?): Rewrite.
7370         (-init-parse-cpu!): Call arch-init!.
7371         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7372         (-finish-parse-cpu!): Call arch-finish!.
7373         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7374         (def-enum,def-full-enum): Use current-enum-add!.
7375         (gen-obj-list-enums): New proc.
7376         * hardware.scm (hw:add!,hw:lookup): Delete.
7377         (def-hardware,def-hardware-ext): Use current-hw-add!.
7378         (hw:std-attrs,hw:attr-list): Delete.
7379         (hardware-builtin!): Define builtin hardware attributes.
7380         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7381         (def-ifield,def-full-ifield): Use current-ifld-add!.
7382         (ifld:std-attrs,ifld:attr-list): Delete.
7383         (ifield-builtin!): New proc.
7384         * insn.scm (insn:add!,insn:lookup): Delete.
7385         (def-full-insn): Use current-insn-add!.
7386         (insn:std-attrs): Delete.
7387         (insn-builtin!): New proc.
7388         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7389         minsn-list.
7390         (<arch-data>): New member machs.
7391         (current-attr-list,current-enum-list): New procs.
7392         (current-op-list,current-minsn-list): New procs.
7393         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7394         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7395         Ditto.
7396         (-parse-arch-machs): New proc.
7397         (-arch-parse): New arg machs, all callers updated.
7398         (-arch-read): Handle machs spec.
7399         (def-arch): Define MACH attribute here.
7400         (mach-init!,mach-finish!): Not here.
7401         (cpu:add!,cpu:lookup): Delete.
7402         (def-cpu): Use current-cpu-add!.
7403         (<mach>): New member bfd-name.
7404         (-mach-parse): New arg bfd-name, all callers updated.
7405         (-mach-read): Handle bfd-name spec.
7406         (mach:add!,mach:lookup): Delete.
7407         (def-mach): Use current-mach-add!.
7408         (def-mach-attr!): New proc.
7409         (arch-init!): New proc.
7410         (arch-finish!): New proc.  Reverse all object lists here.
7411         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7412         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7413         (define-normal-macro-insn): Ignore minsn if mach not kept.
7414         * mode.scm (mode-builtin!): New proc.
7415         * model.scm (model:add!,model:lookup): Delete.
7416         (def-model): Use current-model-add!.
7417         * opcodes.scm (insn:attr-list): Delete.
7418         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7419         (gen-attr-table-defn): Emit value for default.
7420         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7421         (op:attr-list): Delete.
7422         (gen-operand-decls,gen-insn-decls): New proc.
7423         (compute-insn-attr-list): Delete.
7424         (cgen-opc.h): Reorganize and simplify.
7425         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7426         (def-operand,def-full-operand): Use current-op-add!.
7427         (op:std-attrs): Delete.
7428         (operand-enum): Delete.
7429         (operand-builtin!): Define builtin operand attrs.
7430         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7431         (gen-attr-enum-decl): Use gen-obj-list-enums.
7432         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7433         Rewrite.
7434         * fr30.cpu (define-arch): Add machs spec.
7435         (f-i4): SIGNED attribute -> !UNSIGNED.
7436         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7437         (HASH-PREFIX): Define operand attribute.
7438         (NOT-IN-DELAY-SLOT): Define insn attribute.
7439         * i960.cpu (define-arch): Add machs spec.
7440         * m32r.cpu (define-arch): Add machs spec.
7441         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7442         (HASH-PREFIX): Define operand attribute.
7443         (FILL-SLOT): Define insn attribute.
7444
7445 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7446
7447         * fr30.cpu (stilm): Correct mask for and operation.
7448
7449 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7450
7451         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7452         Replace START/EXIT with start/pass.
7453         (gen-sim-test): Delete ".text".
7454
7455 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7456
7457         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7458
7459 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7460
7461         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7462         (h-sbit): Make it FUN-ACCESS.
7463         (h-gr): Reorder so that general regs are always printed by number.
7464
7465 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7466
7467         * i960.cpu (flushreg): Use nop.
7468
7469 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7470
7471         * m32r.cpu (default-alignment): Specify.
7472         * mach.scm (<arch-data>): New member default-alignment.
7473         (adata:default-alignment): New proc.
7474         (current-arch-default-alignment): New proc.
7475         (-arch-parse): New arg default-alignment.
7476         (parse-alignment): New proc.
7477         (-arch-read): Handle default-alignment spec.
7478
7479         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7480
7481         * insn.scm (f-%): Delete.
7482         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7483         be readded if proved useful.
7484         (gen-extract-fields): Ditto.  Use gen-ifetch.
7485         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7486         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7487
7488 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7489
7490         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7491
7492 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7493
7494         * fr30.cpu: Remove stub macros.
7495         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7496         (div2): Don't use addc/subc.
7497
7498 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7499
7500         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7501         if opcodes.
7502
7503 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7504
7505         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7506
7507 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7508
7509         * cpu.scm (keep-all?): New proc.
7510         (assert-keep-all): Use it.
7511         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7512         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7513         Check for spelling errors.
7514
7515 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7516
7517         * rtl.scm (s-convop): Call -rtx-sem-mode.
7518
7519 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7520
7521         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7522         (-parse-hw-profile): Ditto.
7523         (<hw-register>, parse!): Return `void' result.
7524         (<hw-pc>, parse!): Ditto.
7525         (<hw-memory>, parse!): Ditto.
7526         (<hw-immediate>, parse!): Ditto.
7527         (<hw-address>, parse!): Ditto.
7528
7529         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7530         (-ifld-parse-encode-decode): New proc.
7531         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7532         (-multi-ifield-parse): Set encode/decode to #f.
7533         (ifld:decode-mode): New proc.
7534         * utils.scm (nub): Rewrite.
7535         * operand.scm (op-nub): Rewrite.
7536         * sim.scm (<ifield>, gen-type): Rewrite.
7537         (-gen-ifld-argbuf-defn): New proc.
7538         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7539         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7540         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7541         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7542         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7543         New method gen-trace-extract.
7544         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7545         from gen-argbuf-elm, return "" if not caching register address.
7546         Rewrite gen-extract.  New method gen-trace-extract.
7547         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7548         gen-extract, gen-trace-extract, cxmake-get.
7549         (<hw-iaddress>): New method cxmake-get.
7550         (op-needed-iflds): New proc.
7551         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7552         (-gen-op-argbuf-defn): New proc.
7553         (gen-op-extract): Renamed from op:extract.
7554         (gen-op-trace-extract): Renamed from op:trace-extract.
7555         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7556         and rewritten.
7557         (gen-argbuf-elm): Rewrite.
7558         * sim-decode.scm (-gen-record-args): Update.
7559
7560         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7561
7562         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7563         argument position.  Flag symbolic macros in function position as
7564         an error.
7565         (define-pmacro): Handle quoting in definition of symbolic macros.
7566         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7567
7568 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7569
7570         * fr30.opc (parse_register_list): Account for reverse masks
7571         for load and store.
7572         (print_register_list): Ditto.
7573         (parse_low_register_list_ld): New function.
7574         (parse_hi_register_list_ld): New function.
7575         (parse_low_register_list_st): New function.
7576         (parse_hi_register_list_st): New function.
7577         (print_hi_register_list_ld): New function.
7578         (print_hi_register_list_st): New function.
7579         (print_low_register_list_ld): New function.
7580         (print_low_register_list_st): New function.
7581         * fr30.cpu (ldr15dr): Implement workaround.
7582         (ldm0,ldm1,stm0,stm1): Implemented.
7583
7584 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7585
7586         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7587         * configure: Regenerate.
7588         * Makefile.am (WITH_HOBBIT): Update.
7589         (cgen-hob.c): Remove Makefile dependency.
7590         (cgen.o): Depend on cgen-gh.h, config.h.
7591         * Makefile.in: Regenerate.
7592         * aclocal.m4: Regenerate.
7593
7594 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7595
7596         * i960.cpu, i960.opc: New files.
7597
7598 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7599
7600         * fr30.opc (parse_register_number): New function.
7601         (parse_register_list): New function.
7602         (parse_low_register_list): Use parse_register_list.
7603         (parse_hi_register_list): Use parse_register_list.
7604         * fr30.cpu (sth): Fix assembler syntax. Implement more
7605         insns.
7606
7607 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7608
7609         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7610         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7611         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7612         (-op-gen-set-trace-parallel): Ditto.
7613         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7614
7615         * fr30.cpu (call,calld): Fix setting of pc.
7616         (f-op5): Fix start bit number.
7617
7618 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7619
7620         * fr30.cpu (st): Fix operand ordering. Implement more
7621         insns.
7622
7623 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7624
7625         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7626         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7627         (fmt-semantic-operands): Move to sim.scm.
7628         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7629         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7630         (<hw-index>): New method get-name.
7631         (op-profilable?): Moved to sim.scm.
7632         (op-nub): New proc.
7633         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7634         (op-profilable?): Moved here from operand.scm.
7635         (gen-extract-type): Delete.
7636         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7637         (-gen-argfld-ref): New proc.
7638         (-gen-ifld-argfld-name): New proc.
7639         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7640         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7641         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7642         (<hardware-base>): Delete method gen-extract-type.  New method
7643         gen-argbuf-elm.
7644         (<hw-register): Ditto.  Update method gen-extract.
7645         (<operand>, method gen-argbuf-elm): Rewrite.
7646         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7647         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7648         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7649
7650         * sim-decode.scm (-gen-record-args): Tweak.
7651
7652         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7653
7654 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7655
7656         * doc/porting: Fix typo: gas->sim.
7657         * fr30.opc (print_m4): New function.
7658         * fr30.cpu: Implemented many insns.
7659
7660 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7661
7662         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7663
7664         * fr30.cpu (f-rel9): Delete RELOC attribute.
7665         (f-rel12): Add PCREL-ADDR attribute.
7666         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7667         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7668         * fr30.opc (print_label9): Delete.
7669
7670         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7671         code for CTI indicators.
7672         * insn.scm (insn-cti?): Simplify.
7673         * utils-cgen.scm (atlist:cti?): New proc.
7674
7675 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7676
7677         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7678         (f-i20-4,f-i20-16,f-i20): New fields.
7679         (i20): New operand.
7680         (ldi8): Implement.
7681         (ldi20): New insn.
7682         (ldi32m): Delete.
7683         (jmpd): Implement.
7684         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7685         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7686         * mach.scm (arch-data): Ditto.
7687         (current-arch-default-insn-word-bitsize): Renamed from
7688         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7689         (-arch-read): Update.
7690
7691         * hardware.scm (hw:attr-list): Move here ...
7692         * opcodes.scm: ... from here.
7693
7694         * ifield.scm (fld:bitrange): Delete.
7695         (fld:word-offset,fld:word-length): New procs.
7696         (ifield?): Use class-instance.
7697         (<ifield>, method field-start): Rewrite.
7698         (ifld:enum): New proc.
7699         (<ifield>, methods field-mask,field-value): Rewrite.
7700         (-ifield-parse): Rewrite.
7701         (<multi-ifield> support): Rewrite.
7702         (ifld-beyond-base?): Rewrite.
7703         (ifld:std-attrs): New variable.
7704         (ifld:attr-list): New proc.
7705         * iformat.scm (-compute-insn-mask): Rewrite.
7706         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7707         Simplify.
7708         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7709         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7710         onto type.
7711         (<operand>): Ditto.  Forward onto index instead.
7712         (gen-ifld-decls,gen-ifld-defns): New procs.
7713         (ifld:insert,ifld:extract): New procs.
7714         (<ifield>): New methods gen-insert, gen-extract.
7715         (<multi-ifield>): Ditto.
7716         (<hw-index>): Forward gen-insert,gen-extract onto value.
7717         (<hw-asm>): Delete insert/extract support.
7718         (<hw-register,hw-memory,hw-immediate>): Ditto.
7719         (gen-hash-defines): Use string-list.
7720         Define CGEN_MAX_IFMT_OPERANDS.
7721         (gen-switch): Use string-list,string-list-map.
7722         (gen-fget-switch,gen-fset-switch): Use string-list.
7723         (gen-parse-switch,gen-insert-switch): Ditto.
7724         (gen-extract-switch,gen-print-switch): Ditto.
7725         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7726         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7727         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7728         (gen-ivalue-entry): New proc.
7729         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7730         computation.  Use 0 for operand ref table if ALIAS insn.
7731         (gen-minsn-table-entry): Use string-list.
7732         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7733         (gen-opcode-open): Record address of ifield table.
7734         (cgen-opc.h): Call gen-ifld-decls.
7735         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7736         * types.scm (<bitrange>): New members word-offset,word-length.
7737         Delete member total-length.  Delete methods start,mask,value.
7738         (bitrange:word-offset,bitrange:word-length): New procs.
7739         * sim-cpu.scm (gen-define-fields): Simplify.
7740         (gen-extract-fields): Simplify.
7741         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7742         (<ifield>): New methods gen-ifld-extract-decl.
7743         Delete method gen-ifld-extract-beyond.
7744         (<multi-ifield>): New methods gen-ifld-extract-decl.
7745         (<multi-ifield>, method gen-ifld-extract): Implement.
7746         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7747         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7748
7749         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7750         (-rtx-traverse-syntax-no-mode): New proc.
7751         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7752         (s-ifield): New proc.
7753         (s-shop): Don't prepend `unsigned' for unsigned modes.
7754         * rtx-funcs.scm (ifield): New rtx function.
7755         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7756         (delay): New rtx function.
7757         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7758
7759         * cos.scm (-elm-make-method-getter): Fix typo.
7760
7761         * utils.scm (backslash): Handle lists of strings.
7762
7763 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7764
7765         * fr30.cpu (f-rel9): Correct for pc+2.
7766         (label9): Use print_label9.
7767         * fr30.opc (print_label9): New function.
7768
7769 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7770
7771         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7772         * fr30.opc (parse_low_register_list): Renamed.
7773         (parse_hi_register_list): Renamed.
7774         (print_hi_register_list): Renamed.
7775         (print_low_register_list): Renamed.
7776
7777 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7778
7779         * fr30.cpu (f-rel9): Now a pc relative offset.
7780
7781 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7782
7783         * opcodes.scm (op-asm): Move to here, from operands.scm.
7784         (<op-asm>, method parse!): Validate arguments.
7785         (<operand>, method gen-function-name): Fix thinko.
7786         * operand.scm (<operand>, method make!): Don't set op-asm here.
7787         * utils.scm (list-elements-ok?): New proc.
7788
7789         * opcodes.scm: Clean up pass.
7790
7791 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7792
7793         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7794         the fr30_int function.
7795         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7796         (h-dr): Add FUN-ACCESS attribute.
7797
7798 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7799
7800         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7801         for C symbol for models array.
7802
7803 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7804
7805         * fr30.opc (parse_reglist_low): New function.
7806         (parse_reglist_hi): New function.
7807         (print_reglist_low): New function.
7808         (print_reglist_hi): New function.
7809         * fr30.cpu: Finish remaining insn stubs.
7810
7811 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7812
7813         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7814
7815         * fr30.cpu (ldi32m): Don't use for disassembly.
7816
7817 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7818
7819         * fr30.cpu (int): Implement it.
7820
7821 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7822
7823         * rtx-funcs.scm (nop): Fix C code.
7824
7825         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7826
7827         * fr30.cpu (f-i32): New ifield.
7828         (i32): New operand.
7829         (ldi32): New insn.
7830         (ldi32m): New macro insn.
7831         (inte): Provide simple version for now.
7832
7833         * sim-arch.scm: New file.
7834         * sim.scm: Move architecture support generation to sim-arch.scm.
7835         * cgen-sim.scm: Load sim-arch.scm.
7836         * dev.scm: Ditto.
7837
7838         * hardware.scm (pc?) New proc.
7839         (class <hardware-base>): Rewrite method 'pc?.
7840         (class <hardware>): Forward 'pc? to the hardware type.
7841         (class <hw-pc>): New method 'pc?.
7842
7843         Add support for variable length ISAs.
7844         * ifield.scm (ifld-beyond-base?): New proc.
7845         * m32r.cpu: Remove integral-insn? spec.
7846         * mach.scm (arch:derived,arch:set-derived!): New procs.
7847         (arch:app-data,arch:set-app-data!): New procs.
7848         (class <arch>): New members derived, app-data.
7849         (class <cpu>): Delete member integral-insn?.
7850         (cpu:integral-insn?): Delete.
7851         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7852         (-cpu-read): Delete integral-insn? support.
7853         (state:decode-assist): Delete.
7854         (state:int-insn?): Delete.
7855         (<derived-arch-data>): New class.
7856         (-adata-set-derived!): New proc.
7857         (mach-finish!): Call it.
7858         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7859         (gen-operand-instance): Add COND_REF support.
7860         (gen-operand-instance-table): Ditto.
7861         (gen-hash-defines): Update.
7862         (gen-extract-switch): Update type of `insn_value' arg.
7863         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7864         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7865         updated.
7866         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7867         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7868         beyond the base insn (for large insns).
7869         (-gen-extract-beyond-var-list): New proc.
7870         (gen-extract-fields): Handle large insns.
7871         (-gen-write-case): Update sem_arg computation.
7872         Update initial vpc computation.
7873         (gen-semantic-fn): Ditto.  Update type of `insn'.
7874         (-gen-sem-case): Update sem_arg computation.
7875         Update initial vpc computation.
7876         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7877         (-gen-extract-word): New proc.
7878         (<ifield>): New method gen-ifld-extract-beyond.
7879         (gen-ifld-extract-beyond): New proc.
7880         * types.scm (bitrange-overlap?): New proc.
7881
7882         * utils.scm (bits->bytes): New proc.
7883         (bytes->bits): New proc.
7884
7885         Move extraction support into decoder.
7886         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7887         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7888         support to sim-decode.scm.
7889         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7890         be array of IDESC,FMT entries.  Make the array const.
7891         (-gen-gcc-label-table): Make array const.
7892         (-gen-decode-switch): Branch to extraction code after insn has been
7893         identified.
7894         (-gen-decode-insn-globals): Delete extract handler from
7895         @cpu@_insn_sem.
7896         (gen-decode-fn): Add extraction support.
7897         (-gen-sem-fn-decls): Delete extraction fn decls.
7898         (-gen-idesc-decls): Update @cpu@_decode decl.
7899         (-gen-idesc-init-fn): Delete extraction support.
7900         (-gen-extract-decls): New proc.
7901
7902         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7903         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7904
7905         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7906         All callers updated.
7907         (table-entry:make): Record insn value as insn object, not name.
7908         All uses updated.
7909
7910         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7911         collision with C function.
7912         (path_dirname): Similarily.
7913         * hobbit.c,hobbit.h: Rebuild.
7914
7915 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7916
7917         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7918
7919 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7920
7921         * fr30.cpu: Implement more instruction stubs.
7922
7923 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7924
7925         * fr30.cpu: Implement more instruction stubs.
7926
7927 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7928
7929         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7930
7931         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7932
7933         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7934         (op:std-attrs): Ditto.
7935         * opcodes.scm (gen-operand-instance): Ditto.
7936         (gen-switch): Ditto.
7937         * m32r.cpu (condbit,accum): Update.
7938         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7939
7940 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7941
7942         * enum.scm (-enum-read): Fix typo.
7943
7944         * iformat.scm (-ifmt-search-key): Simplify a little.
7945
7946 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7947
7948         * doc/porting: semantics.c -> sem.c.
7949         * Makefile.in: Regenerate.
7950         * fr30.cpu (add): Change ADD to add. Add more registers and set
7951         status bits on 'add' instruction.
7952
7953 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7954
7955         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7956         of 0.
7957
7958 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7959
7960         * minsn.scm (minsn:enum): Update, call current-arch-name.
7961
7962         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7963
7964         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7965         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7966         (ARCH,CGEN,CGENFLAGS): New variables.
7967         (gas-test,sim-test): New rules.
7968         * Makefile.in: Rebuild.
7969         * configure.in (arch): Define.
7970         * configure: Rebuild.
7971
7972         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7973         * All .scm files: Ditto.
7974
7975         * dev.scm: Fix gas-test call to cpu-load.
7976         * gas-test.scm: Clean up pass to remove bit-rot.
7977         * sim-test.scm: Ditto.
7978
7979         * enum.scm (read-enum): Fix typo in `vals' handling.
7980
7981         * hardware.scm (-parse-hw-type): Fix typo.
7982         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7983         (def-hardware,define-normal-hardware): Ditto.
7984
7985         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7986         (display-var): Use it.
7987         * hobbit.c: Rebuild.
7988         * hobbit.h: Rebuild.
7989
7990         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7991         avoid hobbit problem.
7992         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7993         `parallel-insns-' to avoid hobbit problem.
7994
7995 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7996
7997         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7998         (parse_slo16,parse_ulo16): Ditto.
7999         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8000
8001 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
8002
8003         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8004         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8005         * Makefile.in: Rebuild.
8006         * insn.scm (define-normal-insn): Expand pmacros.
8007         * mode.scm (<mode>): New member `host?'.  All uses updated.
8008         (mode:host?): New proc.
8009         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8010         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8011         (define-rtx-dual-mode): Ditto.
8012         (s-index-of): New proc.
8013         (s-unop): Use plain C for host mode operations.
8014         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8015         * rtx-funcs.scm (index-of): New rtx function.
8016         * sim.scm (<hw-index>): New method cxmake-get.
8017
8018 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
8019
8020         * sim-cpu.scm (-gen-engine-decls): Delete.
8021
8022 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
8023
8024         * doc/rtl (Example): Correct Typo.
8025         * doc/porting: Add 'make dep' step to opcodes port instructions.
8026         * fr30.opc: New file.
8027         * fr30.cpu: New file.
8028
8029 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8030
8031         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8032         * Makefile.am (GUILEINCDIR): New variable.
8033         (INCLUDES): Use it.
8034         * configure: Regenerate.
8035         * Makefile.in: Ditto.
8036         * aclocal.m4: Ditto.
8037
8038 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8039
8040         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8041         (cgen-semantics.c): Ditto.
8042         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8043         * sim-model.scm (cgen-model.c): Ditto.
8044         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8045         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8046
8047         * opcodes.scm (read-cpu.opc): Handle empty file.
8048
8049         * cos.scm (-elm-make-method-setter): Fix typo.
8050
8051         * cpu.scm (-init-parse-cpu!): Call types-init!.
8052         (-finish-parse-cpu!): Call types-finish!.
8053         * ifield.scm (<ifield>): Delete members start,length.
8054         New member bitrange.
8055         (<ifield>, methods field-start,field-length): Update.
8056         (fld:start): New arg insn-len.  All callers updated.
8057         (<ifield>, methods field-mask,field-value): Update.
8058         (-ifield-parse): Update.
8059         (ifield-init!): Update.
8060         * iformat.scm (compute-insn-length): Simplify.
8061         (compute-insn-mask): Update.
8062         * insn.scm (insn:value): Update.
8063         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8064         (current-arch-default-insn-bitsize): New proc.
8065         (current-arch-insn-lsb0?): New proc.
8066         (-arch-parse,-arch-read): Update.
8067         (<cpu>): New member file-transform.
8068         (-cpu-parse,-cpu-read): Update.
8069         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8070         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8071         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8072         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8073         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8074         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8075         * operand.scm (op:start): Update call to field-start method.
8076         * sim-decode.scm (opcode-slots): New arg lsb0?.
8077         (fill-slot!,build-slots): Ditto.
8078         (build-decode-table-entry,build-decode-table-guts): Ditto.
8079         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8080         (gen-decode-fn): Ditto.
8081         (cgen-decode.c): Update call to gen-decode-fn.
8082         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8083         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8084         (cgen-cpuall.h): Call -gen-cpuall-includes.
8085         * types.scm (<bitrange>): New class.
8086         (types-init!,types-finish!): New procs.
8087         * utils-cgen.scm (parse-number): New proc.
8088         (parse-boolean): New proc.
8089         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8090         (word-mask): Rewrite.
8091         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8092         (m32rxf): New field `file-transform'.
8093         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8094
8095         * hobbit.h: Fix include file name.
8096
8097 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8098
8099         * slib: New directory of slib files used by cgen/hobbit.
8100         * hobbit.scm: New file.
8101         * hobbit.c: New file.
8102         * hobbit.h: New file.
8103         * hobscmif.h: New file.
8104         * hob-main.c: New file.
8105         * hobslib.scm: New file.
8106         * hob.sh: New file.
8107         * Makefile.am: Add support for compiling hobbit, and using compiled
8108         version of hobbit to compile cgen.
8109         * Makefile.in: Regenerate.
8110         * configure.in: Support --with-hobbit.
8111         * configure: Regenerate.
8112         * acconfig.h (WITH_HOBBIT): Add.
8113         * config.in: Regenerate.
8114
8115         * rtl.scm: New file, was cdl-c.scm.
8116         Definition of rtx funcs moved to rtx-funcs.scm.
8117         (semantic-in-out-operands): Rewrite to compute object form of
8118         semantic code.
8119         * rtx-funcs.scm: New file.
8120
8121         * cgen-gh.c: #include "config.h".
8122         (gh_cadddr,gh_cddddr): New fns.
8123         (cgh_vector_to_list): New fn.
8124         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8125         (cgh_init): Prefix qsort procs with "cgh-".
8126         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8127         * cgen.c: #include "config.h".
8128
8129         * attr.scm (bitset-attr?): New proc.
8130         (<bitset-attribute>, method parse-value): Value syntax changed from
8131         (val1 val2 ...) to val1,val2,....
8132         (<bitset-attribute>): New method gen-value.
8133         (<integer-attribute>): New method gen-value.
8134         (<enum-attribute>): New method gen-value.
8135         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8136         (<reader>): New class.
8137         (CURRENT-ARCH,CURRENT-READER): New globals.
8138         (keep-mach?): Move here from mach.scm.
8139         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8140         (<arch>): New class.
8141         (<arch-data>): New class.
8142         (<cpu>): Make subclass of <ident>.
8143         (*ENDIAN* variables): Delete.
8144         (process-state-vars): Delete.
8145         (mach-finish!): Add `base' value to MACH attribute.
8146         * hardware.scm (<hardware>): Make subclass of <ident>.
8147         (hw:std-attrs): New global.
8148         (hw-profilable?): New proc.
8149         * ifield.scm (<ifield>): Make subclass of <ident>.
8150         (sort-ifield-list): Move here from iformat.scm.
8151         * iformat.scm (<iformat>): Renamed from <insn-format>.
8152         Make subclass of <ident>.
8153         (-ifmt-search-key): Include cti? in categorization of formats.
8154         (ifmt-analyze): Compile semantics (turn to object form).
8155         * insn.scm (<insn>): Make subclass of <ident>.
8156         New member compiled-semantics.
8157         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8158         * mode.scm (<mode>): Make subclass of <ident>.
8159         (UBI): Delete.
8160         * model.scm (<unit>): Make subclass of <ident>.
8161         New members inputs,outputs.
8162         (<model>): Make subclass of <ident>.  New member state.
8163         (-unit-parse): Parse inputs,outputs.
8164         (<iunit>): New class.
8165         (-insn-timing-parse-model): New proc.
8166         (parse-insn-timing): Function unit spec rewritten.
8167         * operand.scm (<operand>): Make subclass of <ident>.
8168         New members sem-name,num,cond?  New method gen-pretty-name.
8169         (hw-index-scalar): New global.
8170         (op-nub-hw): Move here from rtl.scm.
8171         (op:lookup-sem-name,op-profilable?): New procs.
8172         * pmacros.scm: Rewrite to pass through hobbit.
8173         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8174         * utils.scm (logit): Make a macro.
8175         (bit-set?): Rewrite.
8176         (high-part): Rewrite.
8177
8178         * m32r.cpu (define-arch): Move to top of file.
8179         (cpu family m32rbf): Renamed from m32rb.
8180         (model m32r/d): Function unit spec rewritten.
8181         (all insns): Ditto.  Replace UBI with BI.
8182
8183         * opcodes.scm (gen-attr-table-decls): Declare
8184         @arch@_cgen_hw_attr_table.
8185         (gen-attr-table-defns): Generate hw attribute table.
8186
8187         * sim-cpu.scm (-gen-engine-decls): New proc.
8188         (-gen-model-decls): New proc.
8189         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8190         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8191         (-gen-record-profile-args): Simplify.
8192         (-gen-parallel-sem-case): Delete.
8193         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8194         New local `written'.  Delete profiling code.
8195         (-gen-sem-case): Ditto.
8196         (-uncond-written-mask,-any-cond-written?): New procs.
8197         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8198         parallelly or serially, and write-back handlers for all parallel insns.
8199         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8200         support to initialization of struct insn_sem.
8201         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8202         (-gen-insn-sem-type): Add parallel write-back support to struct
8203         insn_sem.
8204         (-gen-idesc-init-fn): Add support for virtual insns.
8205         Add parallel write-back support.
8206         * sim-model.scm (gen-model-profile-fn): Delete
8207         (-gen-model-fn-decls): New proc.
8208         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8209         (-gen-model-init-fn): New proc.
8210         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8211         members in @mach@_init_cpu.
8212         (cgen-model.c): Generate model handlers for each insn.
8213         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8214         (<hw-pc>): New method gen-write.
8215         (<hw-register>, method gen-write): New arg `mode'.
8216         (<hw-register>): Delete method gen-record-profile!.
8217         New method gen-profile-index-type.
8218         (<hw-memory>, method gen-write): New arg `mode'.
8219         (<hw-address>, method gen-extract): Delete.
8220         (<hw-address>, method gen-write): New arg `mode'.
8221         (<hw-index>, method get-write-index): Rewrite.
8222         (<pc>, method cxmake-get-direct): Delete.
8223         (<pc>): New method cxmake-get.  Comment out methods
8224         gen-set-quiet,gen-set-trace.
8225         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8226         gen-profile-index-type,gen-profile-code.
8227         Delete method gen-pretty-name.  Rewrite method gen-write.
8228         Delete method cxmake-get-direct.
8229         (-op-gen-set-trace): Update `written'.
8230         (-op-gen-set-trace-parallel): Ditto.
8231         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8232         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8233         insns and their write-back handlers.
8234         (insn-op-lookup): New proc.
8235         (<unit>): New method gen-profile-code.
8236         (<iunit>): New method gen-profile-code.
8237         (gen-argbuf-elm): Add profiling elements.
8238         (gen-argbuf-type): Define cti insns separately in their own struct.
8239         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8240         insns.  Move semantic entries here from struct scache.
8241         Delete everything from struct scache except argbuf.
8242         (<insn>, method gen-profile-locals): Rewrite.
8243         (<insn>, method gen-profile-code): Rewrite.
8244         (sim-finish!): Create virtual pbb insns.
8245
8246 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8247
8248         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8249         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8250         (h-psw,h-bpsw,h-bbpsw): Define.
8251         (rte,trap): Handle bbpc,bbpsw.
8252         * opcodes.scm (max-operand-instances): Fix typo.
8253         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8254         hardware elements to be fun-access.
8255         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8256
8257 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8258
8259         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8260
8261 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8262
8263         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8264
8265 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8266
8267         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8268         architecture name.
8269         (mach m32r): Update.
8270
8271         * mach.scm (mach:supports?): New proc.
8272         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8273         gen-reg-access-{decls,defns}.
8274         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8275         (gen-mach-bfd-name): New proc.
8276         (gen-arch-reg-access-{decls,defns}): New procs.
8277         (cgen-arch.[ch]): Output register access cover fns.
8278
8279         * hardware.scm (hardware-builtin!): Set print handlers for
8280         h-addr,h-iaddr.
8281         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8282         `od'.
8283         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8284         (my_print_insn): Ditto.  Delete args buf, buflen.
8285         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8286         (-hw-asm-specs): Add `handlers' spec.
8287         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8288         `normal-hw-asm'.
8289         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8290         print.
8291         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8292         (<hw-asm>, parse!): New method.
8293         (gen-insn-table-entry): Print semantics.
8294         (gen-opcode-open): Renamed from gen-opcode-table.
8295
8296         * utils.scm (string-write): No longer a macro.
8297         (-string-write): Handle procedure args.
8298         * opcodes.scm: Update all calls to string-write.
8299         * sim-cpu.scm: Ditto.
8300         * sim-decode.scm: Ditto.
8301         * sim-model.scm: Ditto.
8302         * sim.scm: Ditto.
8303
8304 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8305
8306         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8307         (-gen-insn-builders,-gen-insn-builder): New procs.
8308
8309 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8310
8311         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8312         (gen-opcode-table): Properly terminate comment.
8313
8314 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8315
8316         * Version 0.6.0.
8317         Clean up pass over everything, so starting fresh.