OSDN Git Service

Merge branch 'master' of git://github.com/monaka/binutils
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2010-01-05  Doug Evans  <dje@sebabeach.org>
2
3         * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
4         All uses updated.
5         (mode:non-mode-c-type): Delete.
6         (mode:c-type): Update.
7         * rtl-c.scm (s-shop): Fix casting of DI mode values.
8
9 2010-01-04  Doug Evans  <dje@sebabeach.org>
10
11         * gen-all (all_cgen_cpus): Add sh.
12
13 2010-01-02  Doug Evans  <dje@sebabeach.org>
14
15         * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
16
17 2009-12-17  Doug Evans  <dje@sebabeach.org>
18
19         * mep.opc: Apply patches from opcodes to compile with -Wshadow.
20         mep-asm.c now regenerates correctly again.
21         
22         * gen-all: Add support for building gcc/newlib.
23         Specify --prefix and install all built tools.
24
25 2009-12-16  Doug Evans  <dje@sebabeach.org>
26
27         * sim.scm (/op-gen-written-update): Disable operand number is too
28         large warning, for now.
29
30 2009-12-11  Nick Clifton  <nickc@redhat.com>
31
32         * cpu/fr30.opc: Fix shadowed variable warnings.
33
34 2009-12-10  Doug Evans  <dje@sebabeach.org>
35
36         * gen-all: Rewrite.  Build more ports.  Split out building of sid.
37
38 2009-11-23  Doug Evans  <dje@sebabeach.org>
39
40         * hardware.scm (hw-pc?): New function.
41         * ifield.scm (ifld-signed?): New function.
42         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
43         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
44         (insn-cti?): New function.
45         * rtl.scm (/hw): Create <pc> object for pcs.
46         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
47         All callers updated.  Watch for sets to the pc.
48         (semantic-attrs): Watch for sets to the pc.
49         * sid.scm (<pc> cxmake-get): Handle raw-reg.
50         * sim.scm (<pc> cxmake-get): Handle raw-reg.
51         (<operand> cxmake-get): Add debugging printf.
52         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
53         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
54         (/gen-extract-word): Ditto.
55
56         * utils.scm (gen-c-hex-constant): New function.
57         * utils-sim.scm (/gen-decode-insn-entry): Call it.
58
59 2009-11-22  Doug Evans  <dje@sebabeach.org>
60
61         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
62         * read.scm (parse-error-continuable): New function.
63         (define /continuable-error-found?): New variable.
64         (/init-reader!): Initialize it.
65         (/finish-reader!): New function.
66         (cpu-load): Call it.
67         * utils-cgen.scm (obj-list-nub): New function.
68
69         * mach.scm (<derived-arch-data>): New member large-insn-word?.
70         (/adata-set-derived!): Set it.
71         (adata-large-insn-word?): New function.
72         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
73         here.
74         * sim-cpu.scm (cgen-cpu.h): #include it here.
75         (/gen-cpu-defines): Define CGEN_INSN_WORD.
76         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
77         CGEN_INSN_INT.
78         * sim-decode.scm (/gen-idesc-decls): Ditto.
79         (/gen-extract-case, /gen-decode-fn): Ditto.
80         * sim-model.scm (/gen-model-insn-fn): Ditto.
81         * sim.scm (gen-argbuf-type): Ditto.
82
83         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
84         (s-sequence): Call it.
85
86 2009-11-21  Doug Evans  <dje@sebabeach.org>
87
88         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
89         non-VOID-mode expressions with multiple statements.
90
91         * sim.scm (/operand-number-elaboration-written?): New variable.
92         (/op-gen-written-update op): New function.
93         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
94
95         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
96
97         * operand.scm (op-nub): Delete.
98
99         * dev-utils.scm: New file.
100         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
101         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
102         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
103         /loaded-file-record!, maybe-load): Delete.
104         Load cgen files directly instead of via maybe-load.
105
106 2009-11-14  Doug Evans  <dje@sebabeach.org>
107
108         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
109         expressions used in a void context.
110
111         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
112
113         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
114         * cpu/xc16x.opc: Ditto.
115
116 2009-11-12  Doug Evans  <dje@sebabeach.org>
117
118         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
119
120         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
121         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
122
123 2009-11-11  Doug Evans  <dje@sebabeach.org>
124
125         * html.scm (gen-insn-docs): Add logging message.
126
127 2009-11-05  Doug Evans  <dje@sebabeach.org>
128
129         * utils-cgen.scm (gen-set-macro2): New function.
130         * sim.scm (<hw-register> gen-get-macro): Call it.
131
132         * co-for-gen-all: New file.
133
134         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
135
136         * utils.scm (reduce): Delete.
137
138         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
139
140         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
141         regarding PREFIX attribute handling.
142
143         * operand.scm (<hw-index>): Add enum to possible types, all uses
144         updated.
145         (hw-index-constant?, hw-index-constant-value): New functions.
146         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
147         hw-index-enum-obj): New functions.
148         (/operand-parse): Handle enum indices.
149         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
150         hw-index-constant-value.
151         * rtl.scm (rtx-constant-value): Fix handling of enums.
152         * rtx-funcs.scm (enum): Ditto.
153         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
154         currently supported here.
155
156 2009-11-02  Doug Evans  <dje@sebabeach.org>
157
158         Specify isa(s) when doing ifield, operand, insn lookups.
159         ACU = all callers updated.
160         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
161         * enum.scm (define-full-insn-enum): Pass isa-name-list to
162         current-ifld-lookup.
163         * html.scm (get-insn-properties): Pass isa-name-list to
164         current-op-lookup.
165         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
166         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
167         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
168         (/parse-insn-format, syntax-break-out): Ditto.
169         * mach.scm (obj-filter-by-isa): New function.
170         (current-ifld-lookup): New optional arg maybe-isa-name-list.
171         (/ifld-already-defined?, /op-already-defined?): Simplify.
172         (current-op-lookup): New optional arg maybe-isa-name-list.
173         (current-insn-lookup): New arg isa-name-list, ACU.
174         (/insn-already-defined?, /minsn-already-defined?): Simplify.
175         (current-minsn-lookup): New arg isa-name-list, ACU.
176         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
177         current-op-lookup.
178         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
179         (gen-syntax-entry): Ditto.
180         * operand.scm (/operand-parse): Pass isa-name-list to
181         current-ifld-lookup.
182         (/derived-parse-encoding): New arg isa-name-list, ACU.
183         (/derived-parse-ifield-assertion): Ditto.
184         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
185         (/anyof-parse-choice): Ditto.
186         (anyof-satisfies-assertions?): Pass context to rtx-solve.
187         (/anyof-merge-syntax): New arg container, ACU.
188         (operand-builtin!): Add pc to all isas.
189         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
190         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
191         (rtl-c-parsed, rtl-c++-parsed): Ditto.
192         (rtl-c): New arg isa-name-list, ACU.
193         (rtl-c-expr, rtl-c++): Ditto.
194         (closure): New arg isa-name-list, ACU.
195         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
196         (/cstate-isas): New function.
197         (/rtx-canon-symbol-list): New function.
198         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
199         updated.
200         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
201         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
202         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
203         (rtx-canonicalize): New arg isa-name-list, ACU.
204         (rtx-canonicalize-stmt): Delete.
205         (tstate-make): New arg isas, ACU.
206         (tstate-isas, tstate--set-isas!): New functions.
207         (tstate-env-stack): Renamed from tstate-env, ACU.
208         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
209         (tstate-make-closure): Renamed from tstate-new-env, new arg
210         isa-name-list, ACU.
211         (/rtx-traverse-env): Delete.
212         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
213         SUMBOLLIST.
214         (/rtx-traverse): Include conditional flag in dump output.
215         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
216         (<eval-state>): New member isas.  Rename env to env-stack.
217         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
218         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
219         to env-stack.
220         (estate-make-for-eval): Provide #:isas.
221         (estate-make-closure): Renamed from estate-new-env.  New arg
222         isa-name-list, ACU.
223         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
224         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
225         (/rtx-trim-for-doc): Handle closures.
226         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
227         SYMBOLLIST.
228         (rtx-env-var-list): Delete.
229         (rtx-env-make): Handle already-compiled environments.
230         (rtx-var-alist-to-env): New function.
231         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
232         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
233         (rtx-operand-obj): New arg isa-name-list, ACU.
234         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
235         functions.
236         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
237         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
238         (/frag-compute-desired-frags): Minor simplification.
239         (/frag-pick-best): Ditto.
240         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
241         (/gen-sfrag-code): Update.
242         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
243         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
244         * utils.scm (non-null-intersection?): New function.
245
246         * gen-all (do_src): Manually run cgen-all for sid.
247
248 2009-11-01  Doug Evans  <dje@sebabeach.org>
249
250         * gen-all: New file.
251
252         * rtl-traverse.scm (/rtx-canon): Issue better error message for
253         invalid rtx function names.
254
255 2009-10-28  Doug Evans  <dje@sebabeach.org>
256
257         * cos.scm (object-assign!): New function.
258         * mode.scm (/mode-set-word-params!): Call it.
259
260 2009-10-25  Doug Evans  <dje@sebabeach.org>
261
262         Record bitset attributes internally as a list.
263         Record rtx attribute values internally as ((rtx-expr)).
264         * attr.scm (bitset-attr?): Delete, unused.
265         (<bitset-attribute> parse-value): Rewrite.
266         (/attr-parse): Rewrite bitset default value processing.
267         (/attr-read): Pick out values of scalar attributes to distinguish
268         them from bitset values which are a list.
269         Fix spelling errors for processing of default values.
270         Handle string attributes.
271         (bitset-attr->list): Delete, all callers updated.
272         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
273         All callers updated.
274         (atlist-source-form): Rewrite.
275         * hardware.scm (<hardware-base> 'get-isas): Update recognition
276         of all isas.
277         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
278         -> (ISA foo bar).
279         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
280         values are now lists.
281         * mach.scm (def-isa-attr!): Update, bitset attribute values,
282         including the default, are now lists.
283         (all-isas-attr-value): Result is now a list.
284         * doc/rtl.texi: Clean up pass over attribute docs.
285
286         Change internal representation of rtx attribute values.
287         * attr.scm (/attr-val-is-rtx?): New function.
288         (attr-value): Call it.
289         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
290         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
291         Disallow rtx values for bitset attributes.
292         (/attr-read): Record rtx in default value as ((rtx-expr)).
293         (/attr-eval): Update.
294
295 2009-10-24  Doug Evans  <dje@sebabeach.org>
296
297         * gen-all-doc: Add sh.cpu.
298         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
299         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
300
301         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
302         (/gen-sfrag-case): Ditto.
303         * sim-cpu.scm (/gen-sem-case): Ditto.
304
305         * doc/rtl.texi: Add note that different ifields, operands, insns,
306         and minsns may occur with the same name in different isas.
307         Add note on the canonical form of rtl expressions.
308
309 2009-10-23  Doug Evans  <dje@sebabeach.org>
310
311         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
312         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
313
314         * decode.scm: Tweak various comments.
315         (/opcode-slots): Add FIXME.
316         (/build-decode-table-guts): Add assert.
317         * utils-sim.scm (/gen-set-itype-and-extract): New function.
318         (/gen-bracketed-set-itype-and-extract): New function.
319         (/gen-decode-default-entry): Rewrite.
320         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
321         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
322         updated.  Don't unnecessarily emit check for whether all opcode bits
323         have been examined.
324         (/gen-decode-expr-set-itype): Delete.
325         (/gen-decode-expr-entry): Update.
326         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
327         updated.  Keep track of decoder tables used thus far.
328         (/gen-decoder-switch): Ditto.
329         * utils.scm (word-bit-value): New function.
330
331 2009-10-14  Doug Evans  <dje@sebabeach.org>
332
333         * ifield.scm (<ifield>, value): Provide default initial value.
334         (ifield-encode-mode): Delete
335         (ifield-decode-mode): Delete duplicate definition.
336         (<derived-ifield>, 'make!): Initialize members encode, decode.
337         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
338         ifld-encode-mode.
339         (<multi-ifield>, 'gen-insert): Ditto.
340         
341 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
342
343         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
344         for @foo@_init_idesc_table.
345
346 2009-09-30  Doug Evans  <dje@sebabeach.org>
347
348         * doc/intro.texi: Mention SID.
349         * doc/sim.texi: Ditto.
350         * doc/porting.text (Doing a simulator port): Add some text.
351
352 2009-09-27  Doug Evans  <dje@sebabeach.org>
353
354         * cos.scm (/class-table): New global.
355         (/class-uid, /class-set-uid!): New functions.
356         (/class-parent-name): Renamed from /class-parents.
357         (/class-make!): Change parents arg to parent-name, all callers updated.
358         Assign uid to class.
359         (/class-lookup-uid): New function.
360         (/class-parent-classes): Rewrite.
361         (/class-mi?): Delete.
362         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
363         Delete.
364         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
365         (/class-compute-class-desc, class-desc-dump): Update.
366         (/object-make!): Update.
367         (/object-make-with-values!): Delete arg class-desc, all callers
368         updated.
369         (/object-copy): Delete arg top?, all callers updated.
370         (/object-specialize): Delete.
371         (/object-elements, /object-top-class): Delete.
372         (/object-class-name, /object-class-desc): Update.
373         (/object-class-uid): New function.
374         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
375         class-make, /class-subclass? /class-lookup-element,
376         Update.
377         (/elm-delta, elm-list): Delete.
378         (/elm-make-method-getter, elm-get, elm-xget): Update.
379         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
380         (elm-make-getter, elm-make-setter): Update.
381         (/method-lookup-next): Update.
382         (send): Don't specialize class passed to method.
383         (send-next): New arg class-name, all callers updated.
384         (/class-parent, /class-parent-via-path, object-parent): Delete.
385         (class-cons-parent!, class-append-parent!): Delete.
386         (object-reset!): Init /class-table.
387
388         * cos.scm (/object-debug-classes): Delete.
389         (/object-debug-elements, /object-debug-methods): Delete.
390
391         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
392         (method-proc): Delete.
393         (method-make-virtual!, method-make-virtual-forward!): Delete.
394         * ifield.scm (<ifield> field-start): Update.
395         (<ifield> field-length, pretty-print): Update.
396         (<multi-ifield> field-length, field-start, pretty-print): Update.
397         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
398         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
399         (<array> gen-sym-defn): Ditto.
400         (<hardware-base> gen-defn): Renamed from gen-defn.
401         (<hw-register> gen-type): Update.
402         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
403         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
404         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
405         (<hw-immediate> gen-type): Update.
406         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
407         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
408         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
409         (<array> gen-sym-defn): Ditto.
410         (<hardware-base> gen-defn): Renamed from gen-defn.
411         (<hw-register> gen-type): Update.
412         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
413         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
414         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
415         (<hw-immediate> gen-type): Update.
416         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
417
418 2009-09-25  Doug Evans  <dje@sebabeach.org>
419
420         * operand.scm (/anyof-merge-setter): Handle set-quiet.
421         * rtl.scm (rtx-single-set?): Handle set-quiet.
422
423         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
424         rtl-cover-fns?, macro?.  All callers updated.
425         (estate-make-for-normal-rtl-c): Delete, have all callers call
426         estate-make-for-rtl-c directly.
427         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
428         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
429
430         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
431         replaces /par-replace-set-dests.
432         (/par-replace-set-src-expr-fn): New function, replaces
433         /par-replace-set-srcs.
434         (s-parallel): Rewrite.
435
436         * rtl.scm (rtx-pretty-strdump): New function.
437         * rtl-traverse.scm (/rtx-canon-error): Use it.
438         (<eval-state>): New member outer-expr.
439         (estate-error): Include outer expression in error message if present.
440
441 2009-09-23  Doug Evans  <dje@sebabeach.org>
442
443         * xc16x.cpu (h-cr): New hardware.
444         (muls): Comment out parts that won't compile, add fixme.
445         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
446         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
447         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
448
449         Rewrite rtl processing to require it to be "canonicalized" first,
450         and write a full canonicalizer / expression checker.
451         Remove all appearances of DFLT in canonical rtl.
452         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
453         then rtx-simplify.
454         * iformat.scm (ifmt-analyze) Use canonical semantics.
455         * insn (<insn>): New member canonical-semantics.
456         * mach.scm (<arch>): New member multi-insns-instantiated?.
457         (/instantiate-multi-insns!): New function.
458         (/canonicalize-insns!): New function.
459         (arch-analyze-insns!): Canonicalize insn semantics before processing
460         them.
461         * mode.scm (/mode-set-word-params!): New function.
462         (mode-void?): New function.
463         (mode-compatible?): VOID is compatible with VOID.
464         (/mode-word-sizes-defined?): New global.
465         (mode-set-word-modes!): Use/set it.
466         (mode-ensure-word-sizes-defined): Update.
467         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
468         Redo WI/UWI/AI/IAI handling.
469         (op:new-mode): No longer accept DFLT.
470         (<derived-operand> constructor): Ensure all fields are initialized.
471         (<anyof-operand> constructor): Ditto.
472         (/derived-parse-ifield-assertion): Delete arg `args'.
473         All callers updated.
474         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
475         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
476         (rtl-c-expr, rtl-c++): Ditto.
477         (/rtl-c-get): Use mode of operand, not containing expression.
478         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
479         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
480         estate-for-insn? instead.
481         (s-unop): Use mode of expression, not first operand.
482         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
483         (s-sequence): Remove DFLT support.
484         (ifield): Use mode of expression, not UINT.
485         (pc): Comment out, unused.
486         (int-attr): New rtx kind.
487         (attr): Deprecate.
488         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
489         * rtl-traverse.scm (/rtx-canon-debug?): New global.
490         (/make-cstate): New function.
491         (/cstate-context, /cstate-outer-expr): New functions.
492         (/rtx-canon-error): New function.
493         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
494         /rtx-get-last-cond-case-rtx): New functions.
495         (/rtx-canon-*): New functions.
496         (/rtx-canner-table, /rtx-operand-canoners): New globals.
497         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
498         (/rtx-option, /rtx-option-list?): Rewrite.
499         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
500         Rewritten, all callers updated.
501         (/rtx-canon-expr, /rtx-canon): New functions.
502         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
503         (rtx-canonicalize-stmt): New function.
504         (tstate-make): Remove arg `set?'.  All callers updated.
505         (tstate-new-set?): Delete.
506         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
507         moved to /rtx-canon-*.
508         (/rtx-traverse-normal-operand): New function.
509         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
510         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
511         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
512         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
513         Ditto.
514         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
515         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
516         (/rtx-make-traverser-table): Update.
517         (/rtx-traverse-operands): Remove mode processing, now done during
518         canonicalization.
519         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
520         (/rtx-traverse): Ditto.
521         (rtx-init-traverser-tables!): New function.
522         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
523         (rtx-verify-no-dflt-modes): New function.
524         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
525         (rtx-simplify-insn): Use insn-canonical-semantics.
526         (rtx-canonicalize): Moved to rtl-traverse.scm.
527         (/compile-expr-fn, rtx-compile): Delete.
528         (/rtx-trim-rtx-list): New function.
529         (/rtx-trim-for-doc): Handle set, if.
530         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
531         (/rtx-valid-mode-types): Update.
532         (/rtx-valid-matches): Update.
533         (/rtx-find-matchexpr-index): New function.
534         (rtx-lookup): Require rtx-kind to be the rtx name.
535         (def-rtx-node): New arg result-mode, all callers updated.
536         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
537         (rtx-lazy-sem-mode): Delete.
538         (/rtx-closure-make): New arg `mode', all callers updated.
539         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
540         (rtx-operand-obj): Rewrite.
541         (rtx-make-xop): New functions.
542         (/hw): Renamed from `hw', all callers updated.
543         Use the correct mode instead of DFLT for the index.
544         (rtl-builtin!): Call rtx-init-traversal-tables!.
545         (rtl-finish!): Update.
546         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
547         Update mode arg-type.
548         (pc): Comment out.
549         (int-attr): New rtx kind.
550         (attr): Deprecate.
551         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
552         (/frag-cost-compute!): Ditto.
553         * semantics.scm (/build-operand!): Delete args op-name, op.
554         New arg op-expr.  All callers updated.
555         (/build-mem-operand!): Remove DFLT support.
556         (semantic-compile): Update process-expr!, mode arg deleted.
557         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
558         rtl-c++ calls.
559         (/gen-sem-case, /gen-sfrag-code): Ditto.
560         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
561         (/op-gen-set-trace): New function.  If not doing profiling, or using
562         the pbb engine, call /op-gen-set-quiet.
563         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
564         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
565         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
566         * utils.scm (find-first-index): New function.
567         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
568
569         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
570         to COMPARE.
571         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
572
573 2009-09-21  Doug Evans  <dje@sebabeach.org>
574
575         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
576         All callers updated.  Add FIXME.
577         (all rtx functions): Rename local estate to *estate*.  It's an
578         artificial argument added to the rtx, so make it stand out.
579
580         * openrisc.cpu (or32 isa): Fix setup-semantics.
581
582         * rtl.scm (rtx-class-*?): Delete, unused.
583         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
584
585         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
586         (init-reader!): Set /CGEN-RTL-VERSION to default.
587
588         * read.scm (cpu-load): Print load parameters.
589
590         * dev.scm (load-doc): Set verbose-level to 2.
591
592 2009-09-20  Doug Evans  <dje@sebabeach.org>
593
594         * rtl.scm (rtx-strdump): Use write instead of display.
595
596 2009-09-17  Doug Evans  <dje@sebabeach.org>
597
598         * utils-cgen.scm (obj-csv-names): New function.
599         * utils-sim.scm (/sfmt-contents): Use it in logging message.
600
601 2009-09-12  Doug Evans  <dje@sebabeach.org>
602
603         Clean up pass of mode handling.
604         Make use of mode name vs <mode> object more consistent and clear.
605         * hardware.scm (/keyword-read): Default mode to the mode name,
606         not the <mode> object.
607         (/hw-parse-indices): Parse mode name and pass mode object to
608         <hw-asm> constructor.
609         (/hw-parse-values): Ditto.
610         (<hw-register> parse!): Pass mode name to /hw-parse-indices
611         and /hw-parse-values.
612         (<hw-memory> parse!): Ditto.
613         (<hw-address> parse!): Ditto.
614         * mode.scm (/mode-table): New global, replaces mode-list.
615         Modes stored in hashtable instead of list.
616         (/mode-class-table): New global.
617         (mode-list-non-alias-values): Update.
618         (mode:eq?, mode-compatible?, mode:add!): Update.
619         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
620         (mode-maybe-lookup): New function.
621         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
622         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
623         (mode-find, mode-set-word-modes!): Update
624         (mode-ensure-word-sizes-defined): Update.
625         (/sort-mode-classes!): New function.
626         (mode-builtin!): Update.  Sort mode classes here.
627         (mode-finish!): Sort mode classes here too.
628         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
629         All callers updated.
630         (rtl-c-set-quiet): Allow mode to be name of object.
631         (rtl-c-set-trace): Ditto.
632         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
633         <mode> object.  All callers updated.
634         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
635         (rtx-lazy-sem-mode): Ditto.
636         (<rtx-temp> make!): Assert mode arg is a <mode> object.
637         (rtx-env-make): Allow var-list modes to be name or object.
638         * sem-frags.scm (/frag-expr-assq-locals): New function.
639         (/frag-compute-locals!): Call it.
640         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
641         All callers updated.
642         * semantics.scm (/build-mem-operand!): Handle mode aliases.
643
644         * sim-test.scm (*): Symbols no longer can be passed to string-append.
645
646 2009-09-10  Doug Evans  <dje@sebabeach.org>
647
648         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
649         Improve error message for missing or too many bits.
650         (/insn-parse): Don't verify iformat for virtual insns.
651         
652         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
653         non-multi-insns.
654         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
655         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
656         * sid.scm (pbb-engine-insns): Ditto.
657         * sim-decode.scm (cgen-decode.c): Ditto.
658
659 2009-09-09  Doug Evans  <dje@sebabeach.org>
660
661         * rtl-traverse.scm: Comment tweaks.
662         * rtl-xform.scm: Comment and reformatting tweaks.
663         * doc/rtl.texi: Add text to docs on ifield-assertions.
664
665         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
666         saving.
667
668         Add support for controlling warnings/errors.
669         Add tests for iformat description errors.
670         * dev.scm (cload): New option #:diag.
671         * read.scm (<reader>): New member verify-iformat?.
672         (/parse-diagnostic, parse-warning): New functions.
673         (parse-error): Guts moved to /parse-diagnostic.
674         (/set-diagnostic-options!): New function.
675         (cpu-load): New arg diagnostic-options, all callers updated.
676         Recognize -w diagnostic-option-list.
677         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
678         (ifld-simple-ifields, ifields-simple-ifields): New function.
679         * insn.scm (/parse-insn-format-iflds): New function.
680         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
681         New arg isa, all callers updated.  Do some basic validation of the
682         ifield list if requested.
683         * mach.scm (/sanity-check-insns): Improve error message text.
684         * doc/running.texi: Document -w option.
685         * doc/porting.texi: Document #:trace, #:diag options to cload.
686
687         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
688
689         * dev.scm (*): Change default verbosity level to 2.
690
691         * ifield.scm (<ifield> pretty-print): New method.
692         (ifld-pretty-print): New function.
693         (<multi-ifield> pretty-print): New method.
694
695         * ifield.scm (<ifield> field-start): Delete word-len arg.
696         All callers updated.
697         (ifld-start): Ditto.
698         (<multi-ifield> field-start): Ditto.
699         * operand.scm (<hw-index> field-start): Ditto.
700
701         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
702         total-bitsize.  All callers updated.
703         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
704         New member /insn-base-value.
705         (insn-base-value): New function.
706         * mach.scm (/sanity-check-insns): New function.
707         (arch-analyze-insns!): Call it.
708
709 2009-09-08  Doug Evans  <dje@sebabeach.org>
710
711         * iformat.scm (ifields-base-ifields): Simplify.
712         (compute-insn-length): Simplify, call ifields-base-ifields.
713         (compute-insn-base-mask): Ditto.
714         * ifield.scm (ifld-known-values): Ditto.
715         (ifld-base-ifields): Ditto.
716         * insn.scm (insn-value): Ditto.
717         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
718
719 2009-09-08  DJ Delorie  <dj@redhat.com>
720
721         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
722         preprocessor macro, not an enum.
723
724 2009-09-08  Doug Evans  <dje@sebabeach.org>
725
726         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
727         to string-append.
728         (*): Remove trailing ":" from error messages passed to estate-error.
729
730 2009-09-07  Doug Evans  <dje@sebabeach.org>
731
732         * types.scm (<struct>): Delete.
733
734         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
735         updated.
736         (/pmacro-loc-error): New function.
737
738         * mach.scm (/isa-parse-decode-assist): New function.
739         (/isa-parse): Call it.
740
741         * decode.scm (/get-subopcode-value): New function.
742         (/opcode-slots): Call it.
743         (/fill-slot!): Add logging message.
744
745         * cos.scm (/object-error): Convert symbols to strings before passing
746         to string-append.
747
748         * read.scm (rtl-version-equal?): New function.
749         (rtl-version-at-least?, rtl-version-older?): New functions.
750
751         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
752         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
753         rtl versions >= 0.9.
754         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
755
756 2009-09-03  Doug Evans  <dje@sebabeach.org>
757
758         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
759         is simple.
760
761 2009-09-01  DJ Delorie  <dj@redhat.com>
762
763         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
764         (parse_unsigned16_range): Likewise.
765         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
766         isa.
767
768 2009-09-01  Doug Evans  <dje@sebabeach.org>
769
770         Pmacro .equals -> .equal?
771         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
772         -pmacro-builtin-equals.  All callers updated.
773         (pmacros-init!): Rename .equals to .equal?.
774         * doc/pmacros.texi: Update.
775         * testsuite/pmacros-1.test: Update.
776
777         * doc/porting.texi: Work around texi2html bug where it doesn't
778         properly escape <> inside double-quotes inside @code.
779
780         * doc/porting.texi (Doing an opcodes port): Add step to specify
781         the .opc file.
782
783 2009-08-29  Doug Evans  <dje@sebabeach.org>
784
785         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
786         rtl version 0.7.
787         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
788
789 2009-08-27  Doug Evans  <dje@sebabeach.org>
790
791         Add do-count rtl function.
792         * rtl-c.scm (s-do-count): New function.
793         (do-count): New rtl handler.
794         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
795         (-rtx-make-traverser-table): Add ITERATION.
796         * rtl.scm (rtx-make-iteration-limit-var): New function.
797         (rtx-env-make-iteration-locals): New function.
798         * rtx-funcs.scm (do-count): New rtl function.
799         * cpu/play.cpu: Add do-count-test insn.
800         * doc/rtl.texi: Add docs on do-count.
801
802 2009-08-26  Doug Evans  <dje@sebabeach.org>
803
804         * read.scm (parse-error): Change error message output format
805         to match context-owner-error.
806         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
807         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
808         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
809         (operand): Call estate-error instead of context-error.
810         (local, delay): Ditto.
811         (ref, attr): Call estate-error instead of error.
812         * rtl-traverse.scm (tstate-error): New function.
813         (-rtx-traverse-error): Call tstate-error instead of context-error.
814         (-rtx-traverse-operands, -rtx-traverse): Ditto.
815         (estate-error): New function.
816         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
817         instead of error.
818         (e-if): Call estate-error instead of error.
819         * rtx-funcs.scm (error): Call estate-error instead of context-error.
820         (member): Ditto.
821         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
822         Rewrite to call context-owner-error.
823         (context-owner-error): New function.
824
825         * ifield.scm (<ifield> constructor): New arg `location',
826         all callers updated.
827         * insn.scm (<insn> constructor): Ditto.
828         (<multi-insn> constructor): Ditto.
829         * minsn.scm (<macro-insn> constructor): Ditto.
830         * operand.scm (<operand> constructor): Ditto.
831         * utils-cgen.scm (builtin-location): New function.
832         (<source-ident>): Fix default value of member `location'.
833         (source-ident?): New function.
834
835         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
836         (estate-push-env, estate-with-modifiers): Ditto.
837         (estate-deepen): New function.
838
839 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
840
841         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
842         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
843         routines.
844
845 2009-08-25  Doug Evans  <dje@sebabeach.org>
846
847         * doc/pmacros.texi (pmacro default argument values): Add text.
848
849 2009-08-23  Doug Evans  <dje@sebabeach.org>
850
851         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
852         Rename member prefix -> name-prefix.
853         (<keyword> getters): Update.
854         (-keyword-parse): Update.  Default enum-prefix to NAME-.
855         (-keyword-read): Update.  Don't compute default value for
856         enum-prefix here.
857         (define-keyword): Update.
858         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
859         * read.scm (cgen-rtl-version): New function.
860         (-supported-rtl-versions): Add (0 8).
861         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
862         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
863         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
864         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
865         Update, print-name -> enum-prefix, make uppercase.
866         Remove unnecessary name-prefix spec.
867         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
868         * cpu/ip2k.cpu (register-names): Ditto.
869         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
870         * cpu/sparc.cpu (gr-names): Ditto.
871         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
872         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
873         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
874         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
875         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
876         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
877         prefix -> name-prefix.
878         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
879         Update, print-name -> enum-prefix, make uppercase.
880         (drc-names, xf-names): Ditto.
881         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
882         * doc/rtl.texi (Keywords): New section.
883         (hardware indices): Update text.
884         (rtl versions): Add 0.8.
885
886         Add define-rtl-version.
887         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
888         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
889         (cgen-lang-fixlevel): Delete.
890         (-supported-rtl-versions): New variable.
891         (-cmd-define-rtl-version): New function.
892         (init-reader!): New command define-rtl-version.
893         (-cgen): Add rtl version to --version output.
894         * doc/rtl.texi: Document rtl version support.
895         * cpu/play.cpu: Add define-rtl-version.
896
897 2009-08-22  Doug Evans  <dje@sebabeach.org>
898
899         * Makefile.am (OPTIONS): Define.
900         (desc): Just generate <arch>-desc.[ch] files.
901         * Makefile.in: Regenerate.
902         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
903         no .opc file.
904         (cgen-desc.c): Similarly.
905         * gen-all-desc: New file.
906         * opcodes.scm (opc-file-provided?): New function.
907
908         * mach.scm (current-*-add!): Update calls to parse-error.
909         * operand.scm (op:new-mode): Update call to parse-error.
910         * utils-cgen.scm (make-obj-context): New function.
911
912         * NEWS: Copy over entries from 1.1 branch.
913
914 2009-08-20  Doug Evans  <dje@sebabeach.org>
915
916         * gas-test.scm (<keyword> test-data): Catch invalid requests,
917         flag a warning and compensate.
918         (<hw-address test-data): Tweak for readability.
919         (<hw-iaddress test-data): Ditto.
920         (cgen-build.sh): Convert symbols to strings before passing to
921         string-append.
922         (cgen-allinsn.exp): Ditto.
923
924         * doc/pmacros.texi (.splice): Add more text.
925
926 2009-08-19  Doug Evans  <dje@sebabeach.org>
927
928         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
929         distinguish from 1.1.
930         * configure: Regenerate.
931         * read.scm (-CGEN-VERSION): Update.
932         * doc/version.texi: Update.
933
934         New builtin .pmacro?.
935         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
936         (pmacros-init!): Add .pmacro?.
937         * doc/pmacros.text: Document .pmacro?.
938         * testsuite/pmacros-1.test: Test .pmacro?.
939
940         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
941         of a pmacro begins before its arguments are evaluated, improves
942         readability.
943
944         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
945         * testsuite/pmacros-1.test: Ditto.  Add better tests.
946
947         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
948         in assembler syntax.
949         (Operands): Similarly.
950
951 2009-08-18  Doug Evans  <dje@sebabeach.org>
952
953         * ifield.scm (ifld-encode-mode): Add FIXME.
954         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
955         modes.
956         (<ifield> gen-extract): Similarly.
957
958         * read.scm (parse-error): Handle #f for context-location.
959         * utils-cgen.scm (unspecified-location): Fix building of
960         single-location.
961
962         * doc/rtl.texi: Document how to write hex and boolean values.
963
964         * gas-test.scm (<hw-asm> test-data): Handle () values.
965         (<keyword> test-data): Convert symbols to strings before passing
966         to string-append.
967         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
968         result for scalars.
969
970         * operand.scm (hw-index-scalar): Set `name'.
971         (hw-index-anyof, hw-index-derived): Ditto.
972
973 2009-08-17  Doug Evans  <dje@sebabeach.org>
974
975         * pmacros.scm (-pmacro-builtin-internal-test): New function.
976         (pmacros-init!): Add .internal-test.
977         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
978         * testsuite/testsuite.cpu (internal-verify): New pmacro.
979         * doc/pmacros.text: Document .internal-test.
980
981         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
982         (parse-comment): Allow numbers.
983         * doc/porting.texi: Document that names and comments may be lists.
984
985         * insn.scm (-insn-parse): Fix typo.
986
987         Rename .eval -> .exec.  Add new .eval.
988         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
989         (-pmacro-builtin-eval): New function.
990         (pmacros-init!): Add .exec.
991         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
992         * testsuite/location-1.test: Update.
993         * testsuite/pmacros-1.test: Add test for .eval.
994
995 2009-08-16  Doug Evans  <dje@sebabeach.org>
996
997         * doc/porting.texi: Remove support for Guile 1.4.
998
999         * read.scm (current-reader-location): Return unspecified location
1000         if reader hasn't been initialized yet.
1001
1002 2009-08-13  Doug Evans  <dje@sebabeach.org>
1003
1004         * dev.scm: Document tracing options.
1005
1006         * pmacros.scm (pmacro-dump): New function.
1007         (check-pmacro): Tweak debugging output.
1008         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1009         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1010
1011         Add .let* pmacro builtin.
1012         * pmacros.scm (-pmacro-builtin-let*): New function.
1013         (pmacros-init!): Add .let*.
1014         * doc/pmacros.texi: Document .let*.
1015         * testsuite/pmacros-1.test: Test .let*.
1016
1017 2009-08-12  Doug Evans  <dje@sebabeach.org>
1018
1019         Clean up cpu file parsing, pass context consistently instead of the
1020         old "errtxt" argument.
1021         NOTE: ACU == "All Callers Updated".
1022         * attr.scm (-parse-simple-attribute): Renamed from
1023         parse-simple-attribute, ACU.
1024         (-attr-parse): Change errtxt argument to context, ACU.
1025         (-attr-read): Ditto.
1026         (atlist-parse): Ditto.  Put context arg first.
1027         (attr-parse): Use parse-error instead of context-error.
1028         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1029         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1030         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1031         `context' arg is now a <context> object.  ACU.
1032         (-keyword-read): `context' arg is now a <context> object.  ACU.
1033         (-hw-parse-indices): Change errtxt argument to context, ACU.
1034         (-hw-parse-values, -hw-parse-handlers): Ditto.
1035         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1036         (-hw-validate-layout, -hw-create-getter-from-layout,
1037         -hw-create-setter-from-layout): Ditto.
1038         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1039         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1040         (<hw-address>:parse!): Ditto.
1041         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1042         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1043         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1044         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1045         * insn.scm (-insn-parse, -insn-read): Ditto.
1046         (parse-syntax): Ditto.  Put context arg first.
1047         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1048         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1049         (-parse-insn-format): Ditto.
1050         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1051         (-arch-parse-isas): Ditto.
1052         (-isa-read): Add context arg, ACU.
1053         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1054         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1055         context, ACU.
1056         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1057         (minsn-make-alias): Ditto.
1058         * mode.scm (-mode-parse): Ditto.
1059         (parse-mode-name): Ditto.  Put context arg first.
1060         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1061         errtxt argument to context, ACU.
1062         (-unit-parse, -model-parse, -model-read): Ditto.
1063         * operand.scm (-operand-parse-getter): Use parse-error instead of
1064         context-error.
1065         (-operand-parse-setter): Ditto.
1066         (-operand-parse): Change errtxt argument to context, ACU.
1067         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1068         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1069         * read.scm (reader-error): Delete.  Use parse-error instead.
1070         (parse-error): Change errtxt argument to context, ACU.  Split args
1071         argument into expr and maybe-help-text.
1072         (-reader-process-expanded-1!): Reorganize.
1073         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1074         * types.scm (parse-type): Ditto.
1075         * utils-cgen.scm (single-location->simple-string): New function.
1076         (<context>): Replace members file,lineno with location.
1077         (make-prefix-context): Renamed from context-make-prefix, ACU.
1078         (make-current-context): New function.
1079         (context-append, context-append-name): New functions.
1080         (context-make-reader): Delete.
1081         (parse-name): Change errtxt argument to context, ACU.
1082         Put context arg first.
1083         (parse-comment): Ditto.
1084         (parse-number): Change errtxt argument to context, ACU.
1085         (arg-list-validate-name, arg-list-check-no-args,
1086         arg-list-symbol-arg): Ditto.
1087
1088         * read.scm (-cmd-if): Don't assume test is a list.
1089
1090         * html.scm (get-insn-properties): Delete errtxt, unused.
1091
1092 2009-08-11  Doug Evans  <dje@sebabeach.org>
1093
1094         * doc/rtl.texi (hardware types): Add pc.
1095
1096 2009-08-07  Doug Evans  <dje@sebabeach.org>
1097
1098         Add -t option for tracing things like commands, pmacro expansion.
1099         * dev.scm (cload): New arg #:trace.
1100         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1101         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1102         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1103         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1104         (-reader-process-expanded-1!): Trace commands if requested.
1105         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1106         (-set-trace-options!): New function.
1107         (-init-reader!): New function.
1108         (cpu-load): New arg trace-options, all callers updated.
1109         Call -init-reader! and -set-trace-options!.
1110         (cgen-usage): Improve output formatting.
1111         (common-arguments): New option -t.
1112         (-cgen): Process -t.
1113         * utils-cgen.scm (single-location->string): Renamed from
1114         pretty-print-single-location.  All callers updated.
1115         (location->string): Renamed from pretty-print-location.
1116         All callers updated.
1117         (source-properties-location->string): New function.
1118         * doc/running.texi: Document -t.
1119
1120 2009-08-06  Doug Evans  <dje@sebabeach.org>
1121
1122         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1123         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1124         * utils.scm: ... here.
1125
1126 2009-08-05  Doug Evans  <dje@sebabeach.org>
1127
1128         Track source location better, for better error messages.
1129         * pmacros.scm (-pmacro-eval): Delete, unused.
1130         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1131         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1132         (scan-list, scan): Ditto.
1133         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1134         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1135         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1136         (scan-list1): New function.
1137         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1138         * read.scm (<reader>): New member `location'.
1139         (-reader-lookup-command): Renamed from reader-lookup-command,
1140         all callers updated.
1141         (reader-error): Rewrite to produce better source location info.
1142         (current-reader-location): New function.
1143         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1144         All callers updated.  Record source location of expression.
1145         (reader-process-expanded!): Renamed from reader-process-expanded.
1146         All callers updated.
1147         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1148         All callers updated.  Record source location of define-pmacro.
1149         * utils-cgen.scm (<location>): New class.
1150         (single-location): New (pseudo) class.
1151         (pretty-print-single-location, pretty-print-location): New functions.
1152         (location-top, location-push-single, location-push): New functions.
1153         (unspecified-location, current-input-location): New functions.
1154         (location-property): New object property.
1155         (location-property-set!): New function.
1156         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1157         All uses updated.
1158         * testsuite/location-1.test: New testcase.
1159         * testsuite/run-tests.sh: Fix fail count handling.
1160         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1161         to expect cgen to fail.
1162
1163         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1164
1165         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1166         (-cmd-if): Renamed from cmd-if.  All callers updated.
1167         Use reader-process-expanded! on then/else clauses instead of eval1.
1168
1169 2009-07-22  Doug Evans  <dje@sebabeach.org>
1170
1171         * modes.scm (TI,OI): New modes.
1172         * types.scm (parse-type): Improve error checking.  Don't hardwire
1173         mode names here.
1174         * utils.scm (non-negative-integer?): New function.
1175
1176         * pmacros.scm (-pmacro-builtin-find): New predicate.
1177         (pmacros-init!): Add .find.
1178         * doc/pmacros.tex: Document .find.
1179         * testsuite/pmacros-1.test: Test .find.
1180
1181 2009-07-20  Doug Evans  <dje@sebabeach.org>
1182
1183         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1184         commented out printfs.
1185         * rtl.scm (rtl-finish!): Whitespace tweaks.
1186         * model.scm (parse-insn-timing): Tweak logging message.
1187         * operand.scm: Comment and whitespace tweaks.
1188         (op:type): Tweak error message.
1189         (op-ifield): Tweak logging message.
1190         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1191         * read.scm: Whitespace cleanup.
1192         * utils.scm: Whitespace cleanup.
1193
1194 2009-07-19  Doug Evans  <dje@sebabeach.org>
1195
1196         Fix binding of nested pmacro parameters.
1197         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1198         All callers updated.
1199         (-pmacro-bulid-lambda): Ditto.
1200         * doc/pmacros.texi: Update.
1201         * testsuite/pmacros-1.test: Add testcase.
1202
1203         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1204         calculation.
1205         (-multi-ifield-make-default-extract): Ditto.
1206
1207         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1208         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1209         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1210         Define.
1211         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1212         * doc/rtl.texi: Update.
1213
1214         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1215
1216         Rename builtin boolean pmacros, for consistency with rtl.
1217         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1218         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1219         * doc/pmacros.texi: Update.
1220         * testsuite/pmacros-1.test: Update.
1221
1222 2009-07-17  Doug Evans  <dje@sebabeach.org>
1223
1224         Use hash tables to record ifields, operands, insns, macro-insns.
1225         * attr.scm (attr-builtin!): Tweak some comments.
1226         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1227         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1228         <ident>.
1229         (<multi-ifield>): New constructor.
1230         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1231         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1232         <ident>.
1233         (-sub-insn-make!): Add hack to avoid differences in generated code.
1234         (multi-insn-instantiate!): Add total number of multi-insns to
1235         logging message.
1236         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1237         minsn-list to foo-table.  New member next-ordinal.
1238         Update getters/setters.
1239         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1240         New functions.
1241         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1242         (-make-ident-object-table, -ident-object-table->list,
1243         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1244         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1245         -ifld-already-defined?): Rewrite.
1246         (current-op-list, current-op-add! current-op-lookup,
1247         -op-already-defined?): Rewrite.
1248         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1249         (current-insn-list, current-insn-add! current-insn-lookup,
1250         -insn-already-defined?): Rewrite.
1251         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1252         -minsn-already-defined?): Rewrite.
1253         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1254         (MAX-VIRTUAL-INSNS): Define.
1255         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1256         Update use of arch-insn-list.
1257         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1258         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1259         minsn-list.
1260         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1261         <ident>.  New constructor.
1262         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1263         <ident>.
1264         * sid.scm (-virtual-insn-add!): New function.
1265         (-create-virtual-insns!): Call it.
1266         (-fill-sim-insn-list!): Rewrite.
1267         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1268         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1269         * utils-cgen.scm (<ordered-ident>): New class.
1270         (obj-ordinal, obj-set-ordinal!): New functions.
1271         (add-ident-methods!): Delete.
1272
1273         * model.scm (parse-insn-timing): Change logging message to level 3.
1274
1275 2009-07-16  Doug Evans  <dje@sebabeach.org>
1276
1277         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1278         add a link to define-normal-insn-enum.
1279
1280         * doc/porting.texi (Conventions): Add docs on writing integers.
1281
1282         * cpu/simplify.inc (*): One line doc strings don't need \n.
1283         (df): Invoke define-full-ifield instead of claiming it's an alias.
1284         (dno): Define.
1285         (dnop): Mark as deprecated.
1286
1287         * cpu/play.cpu: Add example of hardware `layout'.
1288         * doc/porting.tex: Add docs on simplify.inc.
1289         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1290         and other things.
1291
1292         * ifield.scm: Whitespace/formatting cleanup.
1293
1294         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1295
1296         * read.scm (parse-error): Don't print single entry args as a list.
1297         (-reader-process-expanded-1): Convert symbol to string for
1298         string-append.
1299
1300         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1301
1302 2009-07-15  Doug Evans  <dje@sebabeach.org>
1303
1304         * cpu/simplify.inc (dno): New pmacro.
1305         * doc/porting.texi: Add section on simplify.inc.
1306         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1307
1308 2009-07-15  Doug Evans  <devans@sourceware.org>
1309
1310         * gen-all-doc: Generate index.html.
1311
1312 2009-07-13  Doug Evans  <dje@sebabeach.org>
1313
1314         Extend pmacro language, add testsuite.
1315         * Makefile.am (SUBDIRS): Add testsuite.
1316         * Makefile.in: Regenerate.
1317         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1318         testsuite/test-utils.sh.
1319         * configure: Regenerate.
1320         * dev.scm (cload): Handle testsuite app.
1321         (load-testsuite): New function.
1322         * pmacros.scm: (-pmacro-debug?): New global.
1323         (-smacro-table): New global.
1324         (-smacro-lookup, -smacro-set!): New functions.
1325         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1326         (-pmacro-syntactic-form?): New function.
1327         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1328         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1329         (-pmacro-expected-non-negative-integer): New function.
1330         (-pmacro-verify-non-negative-integer): New function.
1331         (-pmacro-expand-expr-list): New function.
1332         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1333         (-pmacro-process-args): Renamed from -pmacro-invoke.
1334         (-pmacro-apply, -smacro-apply): New functions.
1335         (-pmacro-expand): Rewrite syntactic form processing.
1336         (-pmacro-build-lambda): Reformat.
1337         (define-pmacro): Watch for more errors in definition.
1338         (pmacro-debug): New function.
1339         (pmacro-trace): Set/reset -pmacro-debug?.
1340         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1341         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1342         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1343         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1344         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1345         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1346         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1347         (pmacros-init!): Initialize -smacro-table.
1348         Rewrite pmacro initialization.
1349         * read.scm (reader-process-expanded): Renamed from
1350         -reader-process-expanded.  All callers updated.
1351         Recognize () as a no-op.
1352         (cpu-load): Tweak logging messages.
1353         * utils.scm (message): Add comment.
1354         * cpu/play.cpu: Add some instructions to play with .let.
1355         * doc/cgenint.texi: Move some debugging related docs to here from
1356         cgen.texi.
1357         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1358         * testsuite/Makefile.am: New file.
1359         * testsuite/Makefile.in: New file.
1360         * testsuite/test-utils.sh.in: New file.
1361         * testsuite/run-tests.sh: New file.
1362         * testsuite/testsuite.cpu: New file.
1363         * testsuite/pmacros-1.test: New file.
1364
1365         * decode.scm: Comment and formatting tweaks.
1366         (-build-decode-table-guts): Add more data to logging message.
1367
1368 2009-07-12  Doug Evans  <dje@sebabeach.org>
1369
1370         Delete files that now live in ../cpu.
1371         * cpu/iq10.cpu: Delete.
1372         * cpu/iq2000.cpu: Delete.
1373         * cpu/iq2000.opc: Delete.
1374         * cpu/iq2000m.cpu: Delete.
1375         * cpu/m32r.cpu: Delete.
1376         * cpu/m32r.opc: Delete.
1377
1378 2009-07-09  Doug Evans  <dje@sebabeach.org>
1379
1380         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1381         All callers updated.  Work around -ve shifts by referencing the
1382         entire value.
1383
1384         * utils.scm (message): Handle pairs.
1385
1386 2009-07-08  DJ Delorie  <dj@redhat.com>
1387
1388         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1389         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1390         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1391         written to.
1392
1393 2009-07-07  Doug Evans  <dje@sebabeach.org>
1394
1395         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1396         * cpu/play.opc: New file.
1397
1398         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1399         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1400         * doc/rtl.texi (Instructions): Update.
1401
1402         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1403         (opc-arguments, -OPC): Call set-opc-file-path!.
1404         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1405         (set-opc-file-path!): New function.
1406         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1407
1408         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1409         before passing to gen-c-args.
1410
1411 2009-07-06  DJ Delorie  <dj@redhat.com>
1412
1413         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1414         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1415         unspecified accesses to control registers.
1416
1417 2009-07-01  DJ Delorie  <dj@redhat.com>
1418
1419         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1420         unspecified accesses to control registers.
1421
1422         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1423         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1424
1425 2009-06-27  Doug Evans  <dje@sebabeach.org>
1426
1427         * gen-all-intrinsics: New file.
1428
1429 2009-06-24  Doug Evans  <dje@sebabeach.org>
1430
1431         * All *.scm files: Update copyright year.
1432         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1433
1434 2009-06-23  DJ Delorie  <dj@redhat.com>
1435
1436         * intrinsics.scm: Updates to support IVC2.
1437         (belongs-to-group?): Check IVC2 slots.
1438         (-slots-attribute): New.
1439         (targets::attributes): Add SLOTS.
1440         (target:add-well-known-intrinsics): Add CPMOV.
1441         (md-insn): Add CPTYPE and CRET?.
1442         (add-md-insn): Likewise.
1443         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1444         duplicate insns with different bit patterns.
1445         (write-cgen-insn?): Add cret? support.
1446         (intrinsics.h): Add vector types.
1447         (runtime-op): Add vector support.
1448         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1449
1450         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1451         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1452         (h-cr-ivc2): Default to typeless.
1453         (h-ccr-ivc2): Fix register width.
1454         (SLOTS): Fix values and default.
1455         (ivc2_*): Add control register names.
1456         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1457
1458         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1459         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1460
1461 2009-06-22  Doug Evans  <dje@sebabeach.org>
1462
1463         * semantics.scm (insn-build-known-values): Fix typo in comment.
1464
1465 2009-06-21  Doug Evans  <dje@sebabeach.org>
1466
1467         * rtl-xform.scm (rtx-simplify-insn): New function.
1468         * html.scm (gen-insn-docs): Call it.
1469         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1470         * iformat.scm (ifmt-analyze): Minor simplification.
1471
1472         * semantics.scm (semantic-compile): Change arg sem-code-list to
1473         sem-code.
1474         (semantic-attrs): Ditto.
1475         * iformat.scm (ifmt-analyze): Update.
1476         (ifmt-compute!): Update.
1477         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1478         rtl-xform.scm.
1479         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1480         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1481         * semantics.scm (rtx-simplify): Ditto.
1482         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1483         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1484         (-simplify-expr-fn): Move to rtl-xform.scm.
1485         (-solve-expr-fn, rtx-solve): Ditto.
1486         * rtl-xform.c: New file.
1487         * read.scm: Load it.
1488
1489         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1490         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1491         (-rtx-traverse, rtx-traverse): Ditto.
1492
1493 2009-06-20  Doug Evans  <dje@sebabeach.org>
1494
1495         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1496
1497         * configure.in: Update version to 1.1.
1498         * configure: Regenerate.
1499         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1500
1501 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1502             Doug Evans  <dje@sebabeach.org>
1503
1504         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1505         (cgen-desc.c): Ditto.
1506         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1507         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1508         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1509         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1510         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1511         (cgen-cpuall.h, cgen-ops.c): Ditto.
1512         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1513         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1514         (cgen-sem-switch.c): Ditto.
1515         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1516         * sim-model.c (cgen-model.c): Ditto.
1517
1518 2009-06-18  Doug Evans  <dje@sebabeach.org>
1519
1520         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1521
1522         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1523
1524         * dev.scm (cload): Change #:arch argument to take the path to the
1525         .cpu file instead of just the name of the architecture.
1526         * read.scm (arch-path): Remove trailing '/'.
1527         (cpu-load): Set `arch-path' to directory of .cpu file.
1528         (-cgen): Don't set `arch-path' here.
1529         (include): Update.
1530         * doc/porting.texi: Update.
1531
1532 2009-06-14  Doug Evans  <dje@sebabeach.org>
1533
1534         * gen-all-doc: Use files in ../cpu where possible.
1535
1536         * Makefile.am (ARCHFILE): Fix path.
1537         * Makefile.in: Regenerate.
1538         * html.scm: Use "pre" instead of "plaintext".
1539
1540         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1541         * doc/app.texi: Cleanup pass.
1542         * doc/cgen.texi: Cleanup pass.
1543         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1544         * doc/intro.texi: Cleanup pass.
1545         * doc/mdate-sh: New file.
1546         * doc/opcodes.texi: Cleanup pass.
1547         * doc/pmacros.texi: Cleanup pass.
1548         * doc/porting.texi: Cleanup pass.
1549         * doc/rtl.texi: Cleanup pass.
1550         * doc/running.texi: Cleanup pass.  Document more runtime options.
1551         * doc/stamp-vti: Update.
1552         * doc/version.texi: Update.
1553
1554         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1555         (GUILE): Fix definition.
1556         * Makefile.in: Regenerate with automake 1.9.6.
1557         * aclocal.m4: Regenerate with aclocal 1.9.6.
1558         * configure.in (AC_PREREQ): Set to 2.59.
1559         (GENINSRC_NEVER): Define.
1560         * configure: Regenerate with autoconf 2.59.
1561         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1562         (cgen.info,cgen.dvi): Delete.
1563         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1564         (noinst_TEXINFOS): Add cgenint.texi.
1565         (DOCFILES): Add missing files.
1566         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1567         * doc/Makefile.in: Regenerate with automake 1.9.6.
1568
1569         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1570
1571         * attr.scm: Removing trailing whitespace.
1572         * cgen-intrinsics.scm: Ditto.
1573         * cgen-sim.scm: Ditto.
1574         * cos.scm: Ditto.
1575         * enum.scm: Ditto.
1576         * guile.scm: Ditto.
1577         * sim.scm: Ditto.
1578
1579 2009-05-28  DJ Delorie  <dj@redhat.com>
1580
1581         * cpu/mep.opc (parse_signed16_range): New.
1582         (parse_unsigned16_range): New.
1583         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1584
1585 2009-05-26  DJ Delorie  <dj@redhat.com>
1586
1587         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1588         accumulator names.
1589         (f-ivc2-ccrn-c3hi): New.
1590         (f-ivc2-ccrn-c3lo): New.
1591         (f-ivc2-ccrn-c3): New.
1592         (ivc2c3ccrn): Use it.
1593
1594 2009-05-22  DJ Delorie  <dj@redhat.com>
1595
1596         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1597         (mep_config_map): Regenerate.
1598
1599         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1600         ivc2-specific names.
1601         (simm8p20): New.
1602         (cmovc): move to after field definitions, use ivc2-specific
1603         register names.
1604         (cpmovi_b_P0S_P1): New.
1605         
1606 2009-05-19  DJ Delorie  <dj@redhat.com>
1607
1608         * cpu/mep.opc: Regenerate configuration.
1609         (parse_cdisp10): Only check CPU flags, not COP flags.
1610         (check_configured_mach): Likewise.
1611
1612 2009-05-13  DJ Delorie  <dj@redhat.com>
1613
1614         * intrinsics.scm (insns.md): Add RTL predicates.
1615         (intrinsics.h): Remove old C intrinsics.
1616
1617 2009-04-29  DJ Delorie  <dj@redhat.com>
1618
1619         * mep-ivc2.cpu: New.
1620         * mep-core.cpu: Regenerated.  Add support for deferred register
1621         writes.
1622         (SLOT): Add IVC2 slot types.
1623         (sim-syscall): Rename to something more appropriate.
1624         * mep-ext-cop.cpu: Regenerate.
1625         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1626         (print_slot_insn): New.
1627         (mep_examine_ivc2_insns): New.
1628         (mep_print_insn_set_ivc2_mode): New.
1629         (mep_print_insn): Support IVC2 slotting.
1630         
1631 2009-04-20  DJ Delorie  <dj@redhat.com>
1632
1633         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1634         (guess-mode): Drop COP* syntax.
1635         (need-insn): Add "--syscall--" to the list.
1636         (enum-type): Drop COP* syntax.
1637         (intrinsics.h): Likewise.
1638         (intrinsic-protos.h): Change file header to allow it to be
1639         included.
1640
1641 2009-04-17  DJ Delorie  <dj@redhat.com>
1642
1643         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1644         (lhucpm1): Limit to C5 mach.
1645         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1646         * cpu/mep-core.cpu (extend-cdisp10): New.
1647         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1648         
1649 2009-04-08  DJ Delorie  <dj@redhat.com>
1650
1651         * cpu/mep-c5.cpu: New.
1652         * cpu/mep-core.cpu: Add C5 support.
1653         * cpu/mep.opc: Likewise.
1654
1655 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1656
1657         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1658         about calling memset with a zero length.
1659
1660 2009-02-03  DJ Delorie  <dj@redhat.com>
1661
1662         * cpu/mep-core.cpu: Update to new MeP configuration.
1663         * cpu/mep-ext-cop.cpu: Likewise.
1664         * cpu/mep.opc: Likewise.
1665
1666 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1667
1668         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1669
1670 2008-06-17  Dave Brolley  <brolley@redhat.com>
1671
1672         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1673         (h-gr): Likewise.
1674
1675 2007-11-13  Dave Brolley  <brolley@redhat.com>
1676
1677         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1678
1679 2007-11-05  Dave Brolley  <brolley@redhat.com>
1680
1681         * intrinsics.scm,cgen-intrinsics.scm: New application which
1682         generates code to support intrinsic functions for insns in the
1683         mep architecture in gcc.
1684
1685 2007-09-21  Dave Brolley  <brolley@redhat.com>
1686
1687         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1688         (rn3us): CDATA attribute now LONG.
1689         
1690 2007-08-21  Dave Brolley  <brolley@redhat.com>
1691
1692         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1693         than 32 bits.
1694
1695 2007-07-05  Nick Clifton  <nickc@redhat.com>
1696
1697         * utils.scm (copyright-fsf): Update copyright notice to refer to
1698         the GPL version 3.
1699
1700 2007-05-22  Nick Clifton  <nickc@redhat.com>
1701
1702         * doc/cgen.texi: Use @copying around the copyright notice.
1703         * doc/internals.texi: Likewise.
1704
1705 2007-02-05  Dave Brolley  <brolley@redhat.com>
1706
1707         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1708
1709 2007-02-05  Dave Brolley  <brolley@redhat.com>
1710
1711         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1712         in the generated code for @arch@_cgen_init_asm if it is defined.
1713
1714         * Contribute the following changes:
1715         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1716
1717         * attr.scm (<string-attribute>): New attribute class.
1718         (attr-kind): Handle <string-attribute>.
1719         (parse-simple-attribute): New function.
1720         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1721         (<bitset-attribute> 'parse-value): Likewise.
1722         (<boolean-attribute> 'parse-value): Likewise.
1723         (<enum-attribute> 'parse-value): Likewise.
1724         (<string-attribute> 'parse-value): New function.
1725         (-attr-parse): Handle <string-attribute>.
1726         (-attr-read): Likewise.
1727         (<string-attribute> 'gen-value-for-defn-raw): New function.
1728         (<string-attribute> 'gen-value-for-defn): New function.
1729
1730 2006-11-07  Dave Brolley  <brolley@redhat.com>
1731
1732         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1733         necessary.
1734
1735 2006-10-18  Dave Brolley  <brolley@redhat.com>
1736
1737         * Contribute the following changes:
1738
1739         2006-07-11  Dave Brolley  <brolley@redhat.com>
1740
1741         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1742         (movcol): New insn.
1743         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1744         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1745         hardware or memory mode which was used.
1746         * sid-cpu.scm (hw-need-write-stack?): New function.
1747         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1748         identify hardware which uses write stacks.
1749         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1750         Initialized to an empty list.
1751         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1752         hw-need-write-stack?.
1753         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1754         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1755         (used-in-delay-rtl?): New method of <hardware-base>.
1756         (hw-used-in-delay-rtl?): New function.
1757
1758         2006-06-20  Dave Brolley  <brolley@redhat.com>
1759
1760         * sid.scm (gen-attr-type): Removed.
1761         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1762         (SH2a-MACH): Add sh5.
1763         (sh2a-nofpu-models): Add units for sh5.
1764         (sh2a-fpu-models): Likewise.
1765
1766         2006-06-15  Dave Brolley  <brolley@redhat.com>
1767
1768         * cpu/sh-sim.cpu: New file.
1769         * cpu/sh-sid.cpu: New file.
1770         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1771         (All fields): Remap for (insn-lsb0? #f)
1772         (All insns): Add timing specs.
1773         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1774         'xattrs' and .splice it in.
1775         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1776         (h-frc,h-drc): Add PROFILE attribute.
1777         (h-fpccr): Removed.
1778         (h-vbr): New hardware.
1779         (All fields): Remap for (insn-lsb0? #f)
1780         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1781         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1782         (fpscr): Use h-fpscr.
1783         (fsdm,fsdn): Use h-fsd.
1784         (dshci): Add xtiming argument and splice it in.
1785         (dr,xd): pmacros removed.
1786         (All insns): Add timing specs, *-MACH attribibutes,
1787         SH4{A}-GROUP attributes.
1788         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1789         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1790         we're being processed for sim or sid.
1791         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1792         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1793         (define-isa compact): Add (isa-parallel-insns 2).
1794         (define-isa media): Add (isa-parallel-insns 2). Add
1795         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1796         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1797         sh4a, sh4al
1798         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1799         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1800         (SH4al-MACH, SH5-MACH): New pmacros.
1801         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1802         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1803         (sh5-media-fp-units, common-model, common-model-with-fp) 
1804         (sh3-model, sh3e-model): New pmacros.
1805         (define-model sh2): New model.
1806         (define-model sh2e): New model.
1807         (define-model sh3): New model.
1808         (define-model sh3e): New model.
1809         (define-model sh2a-nofpu): New model.
1810         (define-model sh2a-fpu): New model.
1811         (define-model sh4-nofpu): New model.
1812         (define-model sh4): New model.
1813         (define-model sh4a-nofpu): New model.
1814         (define-model sh4a): New model.
1815         (define-model sh4al): New model.
1816         (define-model sh5-media): New model.
1817         (define-model sh5): Add all units.
1818         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1819         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1820         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1821         (h-pc): Add PROFILE attribute.
1822         (h-fr): Likewise.
1823         (h-tr): Likewise.
1824         (h-gr,h-grc): Likewise.
1825         (h-cr): Set h-sr in setter.
1826         (h-frbit): Get/Set h-fpscr.
1827         (h-szbit,h-prbit): Likewise.
1828         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1829         Add getter and setter.
1830         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1831         Adjust getter and setter.
1832         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1833         Adjust getter and setter.
1834         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1835         (h-fsd,h-fmov): New hardware.
1836
1837 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1838
1839         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1840         doc/notes.texi, doc/porting.texi, doc/running.texi,
1841         doc/sim.texi: Fix some typos.
1842
1843 2006-07-14  Dave Brolley  <brolley@redhat.com>
1844
1845         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1846         hardware or memory mode which was used.
1847         * sid-cpu.scm (hw-need-write-stack?): New function.
1848         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1849         identify hardware which uses write stacks.
1850         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1851         Initialized to an empty list.
1852         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1853         hw-need-write-stack?.
1854         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1855         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1856         (used-in-delay-rtl?): New method of <hardware-base>.
1857         (hw-used-in-delay-rtl?): New function.
1858
1859 2006-06-20  Dave Brolley  <brolley@redhat.com>
1860
1861         * sid.scm (gen-attr-type): Removed.
1862
1863 2006-05-10  Dave Brolley  <brolley@redhat.com>
1864
1865         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1866         support for (if (application-is? <appname>) (...) (...)).
1867         (-cgen): Add trailing "/" to arch-path.
1868         * utils.scm (dirname): Removed. dirname is a primitive function.
1869
1870 2006-05-09  Dave Brolley  <brolley@redhat.com>
1871
1872         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1873         'entire_insn' not 'base_insn'.
1874         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1875         is null.
1876         * sim.scm (-gen-arch-model-decls): Likewise.
1877         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1878         abuf->written if profiling.
1879         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1880         object->string om the mode.
1881         (-hw-gen-write-stack-decl): Likewise.
1882         * read.scm (include): Use arch-path as file location.
1883         (arch-path): Define it with a default setting.
1884         (-cgen): Update arch-path when "-a" option is specified.
1885         * utils.scm (dirname): New function.
1886
1887 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1888
1889         * configure.in: Remove AC_ARG_PROGRAM.
1890         * configure: Regenerate with autoconf 2.59.
1891
1892 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1893
1894         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1895         SIMULATOR.
1896
1897 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1898
1899         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1900         or an error message otherwise.
1901         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1902         Fix up comments to correctly describe the functions.
1903
1904 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1905             Anil Paranjape   <anilp1@kpitcummins.com>
1906             Shilin Shakti    <shilins@kpitcummins.com>
1907
1908         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1909         CPU description.
1910         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1911
1912 2006-02-10  Nick Clifton  <nickc@redhat.com>
1913
1914         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1915
1916 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1917
1918         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1919         for concatenation.
1920         (-hw-gen-write-stack-decl): Likewise.
1921
1922 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1923
1924         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1925         non-(adata-integral-insn? CURRENT-ARCH) case.
1926
1927 2005-10-28  Dave Brolley  <brolley@redhat.com>
1928
1929         Contribute the following changes:
1930         2005-09-19  Dave Brolley  <brolley@redhat.com>
1931
1932         * attr.scm (gen-value-for-defn-raw): New methods.
1933         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1934         gen-value-for-defn-raw.
1935         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1936
1937         2002-12-13  Dave Brolley  <brolley@redhat.com>
1938
1939         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1940         (-gen-attr-accessors): New function.
1941         (gen-obj-attr-defn): Update terminating initializer.
1942         (gen-obj-attr-end-defn): New function.
1943         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1944         * sid-cpu.scm (cgen-desc.h): Generate code to include
1945         "opcode/cgen-bitset.h"
1946         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1947         name.
1948         * desc.scm ('gen-defn): Update terminating initializer.
1949         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1950         terminatinig initializer.
1951         (gen-hw-decls): Ditto.
1952         (gen-operand-decls): Ditto.
1953         (gen-insn-decls): Ditto.
1954         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1955         (gen-insn-table): Update terminating initializer.
1956         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1957         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1958         * attr.scm (charmask-bytes): New function.
1959         (bitset-attr->charmask): New function.
1960         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1961         differences for SID-SIMULATOR.
1962         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1963         (<enum-attribute>): Ditto.
1964
1965 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1966
1967         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1968
1969 2005-10-24  DJ Delorie  <dj@redhat.com>
1970
1971         * operand.scm (-anyof-merge-syntax): Print a more useful error
1972         message.
1973
1974 2005-10-19  Nick Clifton  <nickc@redhat.com>
1975
1976         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1977         patch.
1978
1979 2005-10-18  Andreas Schwab  <schwab@suse.de>
1980
1981         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1982
1983 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1984
1985         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1986         size.
1987
1988 2005-08-02  Dave Brolley  <brolley@redhat.com>
1989
1990         * rtl-c.scm (s-unop): Don't dereference
1991         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1992         (s-binop, s-convop, s-cmpop): Likewise.
1993
1994 2005-07-29  Dave Brolley  <brolley@redhat.com>
1995
1996         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1997         if with-profile or with-parallel-write.
1998         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1999         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
2000         string-append.
2001
2002 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
2003
2004         * cpu/fr30.opc (print_register_list): Correct format strings.
2005         * cpu/ip2k.opc: Likewise.
2006
2007 2005-07-05  Nick Clifton  <nickc@redhat.com>
2008
2009         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2010         unsigned in order to avoid compile time warnings about sign
2011         conflicts.
2012
2013 2005-07-01  Nick Clifton  <nickc@redhat.com>
2014
2015         * desc-cpu.scm: Update to ISO C90 function declaration style.
2016         * opc-asmdis.scm: Likewise.
2017         * opc-ibld.scm: Likewise.
2018         * opc-itab.scm: Likewise.
2019         * cpu/fr30.opc: Likewise.
2020         * cpu/i960.opc: Likewise.
2021         * cpu/ip2k.opc: Likewise.
2022         * cpu/iq2000.opc: Likewise.
2023         * cpu/m32r.opc: Likewise.
2024         * cpu/openrisc.opc: Likewise.
2025         * cpu/sh.opc: Likewise.
2026         * cpu/sparc.opc: Likewise.
2027         * cpu/xstormy16.opc: Likewise.
2028
2029 2005-06-15  Dave Brolley  <brolley@redhat.com>
2030
2031         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2032         (cgen-cpu.h): Call it.
2033
2034         Contributed on behalf of Graydon Hoare
2035         2001-06-05  graydon hoare  <graydon@redhat.com>
2036
2037         * utils.scm (foldl): Define.
2038         (foldr): Define.
2039         (filter): Define.
2040         (union): Define.
2041         (intersection): Simplify.
2042         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2043         (-op-gen-delayed-set-maybe-trace): Define.
2044         (<operand> 'gen-set-{quiet,trace}): Delegate to
2045         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2046         up and needs cleaning.
2047         (-with-parallel?): Hardwire with-parallel to #t.
2048         (<operand> 'cxmake-get): Replace with lookahead-aware code
2049         * sid-decode.scm: Remove per-insn writeback fns.
2050         (-gen-idesc-decls): Redefine sem_fn type.
2051         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2052         with write stack stuff.
2053         (cgen-write.cxx): Replace per-insn writebacks with single write
2054         stack writeback. Add write stack reset function.
2055         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2056         stack stuff.
2057         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2058         estate attribute set.
2059         (delay): Set #:delayed attribute to calculated delay, update
2060         maximum delay of cpu, check (delay ...) usage.
2061         * operand.scm (<operand>): Add delayed slot to <operand>.
2062         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2063         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2064         * doc/rtl.texi (Expressions): Add section on (delay ...).
2065
2066 2005-06-13  Jim Blandy  <jimb@redhat.com>
2067
2068         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2069         as well as strings.
2070
2071 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2072
2073         * doc/porting.texi: Change all mention of md_apply_fix3 and
2074         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2075         respectively.
2076
2077 2005-05-18  Dave Brolley  <brolley@redhat.com>
2078
2079         * utils-sim.scm (-gen-decode-default-entry): New function.
2080         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2081         code to check that all opcodes bits match.
2082         (-gen-decoder-switch): Use -gen-decode-default-entry.
2083
2084 2005-05-16  Jim Blandy  <jimb@redhat.com>
2085
2086         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2087         fetched by one of our GETIMEM* methods.
2088         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2089         base-insn-sized chunks.
2090
2091 2005-05-10  Nick Clifton  <nickc@redhat.com>
2092
2093         * Update the address and phone number of the FSF organization in
2094         the GPL notices in the following files:
2095         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2096         cpu/powerpc.cpu, slib/random.scm
2097
2098 2005-05-06  Jim Blandy  <jimb@redhat.com>
2099
2100         * pprint.scm, cos-pprint.scm: Add documentation.
2101
2102         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2103
2104         * pprint.scm, cos-pprint.scm: New files.
2105
2106 2005-04-04  Nick Clifton  <nickc@redhat.com>
2107
2108         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2109         avoid a compile time warning.
2110
2111 2005-03-18  Nick Clifton  <nickc@redhat.com>
2112
2113         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2114         "percent-operand" from "%operand" as the latter confuses xgettext
2115         into thinking that it is a C printf formating directive, which
2116         prevents proper translation.
2117
2118 2005-02-23  Nick Clifton  <nickc@redhat.com>
2119
2120         * opcodes.scm (gen-parse-number): Add a cast to the desired
2121         pointer signed'ness in order to prevent compile time warnings.
2122         * cpu/ip2k.opc: Fixed compile time warnings about differing
2123         signed'ness of pointers passed to functions.
2124         * cpu/iq2000.opc: Likewise.
2125         * cpu/m32r.opc: Likewise.
2126         * cpu/openrisc.opc: Likewise.
2127         * cpu/xstormy16.opc: Likewise.
2128
2129 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2130
2131         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2132         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2133
2134 2005-02-16  Dave Brolley  <brolley@redhat.com>
2135
2136         * utils.scm: Update copyright years.
2137         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2138         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2139         * operand.scm (-derived-operand-parse): Move logit message from level 1
2140         to level 2.
2141
2142 2005-02-15  Nick Clifton  <nickc@redhat.com>
2143
2144         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2145         prevent compile time warning messages.
2146         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2147         * utils-gen.scm (attr-int-gen-defn): Likewise.
2148         (attr-gen-defn): Likewise.
2149         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2150         (print_dollarhex16): Remove unused function.
2151
2152 2005-02-15  Jim Blandy  <jimb@redhat.com>
2153
2154         * guile.scm (cgen-call-with-debugging): Doc fix.
2155
2156         Make backtraces work more reliably.
2157         * guile.scm: Set up debugging parameters, and enable debugging and
2158         source positions while loading.
2159         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2160         functions.
2161         * read.scm: Don't set debugging parameters here.
2162         (catch-with-backtrace): Function deleted.
2163         (-cgen): Simply note the presence or absence of the -b option.
2164         Pass the flag to cgen-call-with-debugging, so debugging is turned
2165         off here if the user didn't request it, for faster computation.
2166         (cgen): Call cgen-debugging-stack-start here, instead of
2167         catch-with-backtrace.
2168
2169         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2170         trailing -s.
2171         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2172         Don't write out the trailing -s here.
2173         * Makefile.in: Regenerated.
2174         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2175         fixup.scm here; let the caller decide which Scheme's customization
2176         file to preload.
2177         * dev.scm: Load guile.scm, not fixup.scm.
2178         * fixup.scm: Deleted; contents have all moved to guile.scm.
2179         * README: Doc fix.
2180
2181         * guile.scm (debug-write): New function.
2182
2183 2005-02-14  Jim Blandy  <jimb@redhat.com>
2184
2185         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2186         transformer procedure, not eval.  Transformer procedures take one
2187         argument.
2188
2189 2005-02-11  Nick Clifton  <nickc@redhat.com>
2190
2191         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2192         to 'bfd_vma *' in order avoid compile time warning message.
2193
2194 2005-02-09  Jim Blandy  <jimb@redhat.com>
2195
2196         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2197         corresponding change in the sim/common directory.)
2198
2199 2005-02-07  Jim Blandy  <jimb@redhat.com>
2200
2201         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2202         changes in the opcodes directory.)
2203
2204         * guile.scm: New file, containing Guile-specific definitions and
2205         adaptations.  This is loaded by the app-specific shell scripts.
2206         Initially identical to fixup.scm.
2207         * cgen-sid.scm: Don't load fixup.scm here.
2208
2209         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2210         latter is a macro.
2211
2212 2005-01-27  Jim Blandy  <jimb@redhat.com>
2213
2214         * utils.scm (string/symbol->append): Renamed from 'concat'.
2215         * opcodes.scm (gen-switch): Use new name.
2216         * insn.scm (-sub-insn-make!): Same.
2217         * rtl.scm (rtx-dump): Same.
2218         * semantics.scm (semantic-compile): Same.
2219
2220 2005-01-20  Jim Blandy  <jimb@redhat.com>
2221
2222         * opcodes.scm (gen-switch): Use concat instead of string-map.
2223
2224         * utils.scm (concat): New function.
2225         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2226         * rtl.scm (rtx-dump): Same.
2227         * semantics.scm (semantic-compile): Same.
2228
2229 2004-12-16  Jim Blandy  <jimb@redhat.com>
2230
2231         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2232         applied to symbols.  Process everything as strings, and then
2233         convert to a symbol at the end.
2234
2235         * read.scm (debug-repl): Temporarily redirect input and output to
2236         /dev/tty while we debug, so we don't interfere with whatever CGEN
2237         is reading or writing.
2238         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2239         New functions.
2240
2241 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2242
2243         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2244         will work with newer versions of guile.
2245
2246 2004-10-27  Nick Clifton  <nickc@redhat.com>
2247
2248         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2249         * cpu/iq2000.cpu: Likewise.
2250
2251 2004-07-21  DJ Delorie  <dj@redhat.com>
2252
2253         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2254
2255 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2256
2257         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2258         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2259
2260 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2261
2262         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2263
2264 2004-03-22  Dave Brolley  <brolley@redhat.com>
2265
2266         * utils.scm (copyright-fsf): Update copyright years.
2267         (copyright-red-hat): Ditto.
2268         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2269         code.
2270         (-op-gen-set-trace-parallel): Ditto.
2271
2272 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2273
2274         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2275         disassembling codes for 0x*2 addresses.
2276
2277 2004-01-29  Dave Brolley  <brolley@redhat.com>
2278
2279         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2280         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2281         in the extra bit positions.
2282
2283 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2284
2285         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2286
2287 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2288
2289         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2290         "short" being 16 bit.
2291         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2292         internationalize error message.
2293         (parse_lo16): Likewise.  Remove useless code.
2294
2295 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2296
2297         * cpu/m32r.cpu : Add new model m32r2.
2298         Add new instructions.
2299         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2300         Changed PIPE attr of push from O to OS.
2301         Care for Little-endian of M32R.
2302         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2303         Care for Little-endian of M32R.
2304         (parse_slo16): signed extension for value.
2305
2306 2003-10-26  Dave Brolley  <brolley@redhat.com>
2307
2308         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2309         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2310         (-gen-extract-fn): Call -gen-record-profile-args.
2311
2312 2003-10-21  Dave Brolley  <brolley@redhat.com>
2313
2314         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2315         a static const int.
2316         * decode.scm (-opcode-slots): Correct typo in logit call.
2317
2318 2003-10-09  Jim Blandy  <jimb@redhat.com>
2319
2320         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2321         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2322
2323         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2324
2325 2003-10-06  Dave Brolley  <brolley@redhat.com>
2326
2327         * gen-all-doc: Add fr550.
2328
2329 2003-09-11  Doug Evans  <dje@sebabeach.org>
2330
2331         * Makefile.am (ARCHFILE): New var.
2332         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2333         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2334         * Makefile.in: Regenerate.
2335
2336 2003-09-08  Dave Brolley  <brolley@redhat.com>
2337
2338         On behalf of Doug Evans <dje@sebabeach.org>
2339         Pass in paths to input files, instead of assuming they live in
2340         $srcdir/cpu.  Plus misc. option processing cleanup.
2341         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2342         Add pre-process pass to all options.
2343         * cgen-gas.scm (gas-arguments): Ditto.
2344         * cgen-sid.scm (sim-arguments): Ditto.
2345         * cgen-sim.scm (sim-arguments): Ditto.
2346         * cgen-stest.scm (stest-arguments): Ditto.
2347         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2348         (-opc-file-path): New global.
2349         (opc-file-path): New fn.
2350         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2351         All callers updated.
2352         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2353         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2354         Replace srcdir arg with opc-file.  All callers updated.
2355         * read.scm (-opt-spec-update): Delete.
2356         (opt-get-first-pass,opt-get-second-pass): New fns.
2357         (-cgen): Process application-specific arguments in two passes.
2358
2359 2003-08-29  Dave Brolley  <brolley@redhat.com>
2360
2361         * cpu/frv.cpu: Removed.
2362         * cpu/frv.opc: Removed.
2363
2364 2003-08-21  Nick Clifton  <nickc@redhat.com>
2365
2366         * cpu/frv.cpu (mbtoh): Replace input parameter to
2367         u-media-dual-expand and u-media-dual-btoh with output parameter.
2368         (cmbtoh): Add profiling hack.
2369
2370 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2371
2372         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2373
2374 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2375
2376         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2377         the elements for the END record of CGEN_OPINST, silencing warnings.
2378
2379 2003-07-15  Doug Evans  <dje@sebabeach.org>
2380
2381         Add guile 1.6.4 support.
2382         - empty list must be quoted
2383         - string functions have stricter type checking
2384         - eval now takes a second argument
2385         - symbol-bound? is deprecated
2386         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2387         (bitset-attr->list): Ensure arg to string-cut is a string.
2388         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2389         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2390         * cos.scm (-class-list): Must quote empty list.
2391         (-class-parent-classes,-class-compute-class-desc): Ditto.
2392         (class-make,make,object-reset!): Ditto.
2393         (method-make-make!): Call eval1 instead of eval.
2394         (method-make-forward!,method-make-virtual-forward!): Ditto.
2395         * decode.scm (subdtable-add): Use stringsym-append instead of
2396         string-append.
2397         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2398         (-build-decode-table-entry): Fetch string name of insn.
2399         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2400         (-gen-mach-table-defns): Ditto for mach.
2401         (gen-ifld-defns): Ditto for ifld.
2402         (gen-hw-table-defns): Ditto for hw.
2403         (gen-operand-table): Ditto for op.
2404         (gen-insn-table-entry): Ditto for insn.
2405         * desc.scm (gen-attr-table-defn): Ditto for attr.
2406         (<keyword>,gen-defn): Don't pass symbols to string-append.
2407         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2408         symbol-append.
2409         (enum-vals-upcase): Use symbol-upcase to build result.
2410         (-enum-parse): Use stringsym-append to build errtxt.
2411         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2412         (eval1): New function.
2413         (symbol-bound?): Provide own version if >= guile 1.6.
2414         * hardware.scm (define-keyword): Use string-append instead of
2415         symbol-append.
2416         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2417         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2418         before using.
2419         (gen-list-entry): Handle either symbol or string `name' arg.
2420         (gen-obj-doc-header): Fetch string name of `o' arg.
2421         (define-cpu-intro): Ditto for cpu.
2422         (gen-mach-intro): Ditto for mach.
2423         (gen-model-intro): Ditto for model.
2424         (gen-isa-intro): Ditto for isa.
2425         (gen-machine-doc-1): Ditto for isa.
2426         (gen-reg-doc-1): Convert mach to string first.
2427         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2428         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2429         to string first.
2430         (gen-insn-categories): Fetch string name of mach.  Convert
2431         enum-val-name to string first.
2432         (gen-insn-docs): Fetch string name of mach.
2433         * ifield.scm (ifld-ilk): Result is a string.
2434         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2435         Fetch string name of ifld.
2436         (-sfmt-search-key): Similarily for ifld and op.
2437         * insn.scm (syntax-make): Fetch string name of syntax element.
2438         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2439         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2440         * mode.scm (mode:c-type): Result is a string.
2441         (mode:enum): Fetch string name of mode.
2442         (-mode-parse): Use stringsym-append to build errtxt.
2443         * model.scm (model:enum): Fetch string name of model.
2444         (-model-parse): Use stringsym-append to build errtxt.
2445         (parse-insn-timing): Must quote empty list.
2446         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2447         (-gen-minsn-opcode-entry): Ditto.
2448         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2449         convert to string.
2450         (read-cpu.opc): Convert current-arch-name to a string before using.
2451         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2452         (<derived-operand>): Must quote empty list.
2453         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2454         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2455         of ifld.
2456         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2457         (-pmacro-sym): Must convert symbols to strings before passing to
2458         string-append.
2459         (-pmacro-str): Ditto.
2460         (pmacros-init!): Use eval1 instead of eval.
2461         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2462         (keep-isa-atlist?): Ditto.
2463         (cmd-if): Use eval1 instead of eval.
2464         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2465         (-rtl-c-get): Fetch string name of src.
2466         (s-unop): Ditto for mode.
2467         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2468         (-gen-par-temp-defns,subword): Ditto.
2469         (join): Use stringsym-append instead of string-append.
2470         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2471         (rtx-traverse-debug): Fetch string name of rtx-obj.
2472         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2473         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2474         (rtx-pretty-name): Result is a string.
2475         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2476         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2477         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2478         before using.
2479         (-gen-sfrag-case): Fetch string name of user.
2480         * sid-model.scm (unit:enum): Fetch string name of unit.
2481         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2482         (<hw-memory>,gen-set-quiet): Ditto.
2483         (gen-mode-defs): Ditto.
2484         (sim-finish!): Convert current-arch-name to a string before using.
2485         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2486         (-gen-no-scache-semantic-fn): Ditto.
2487         (cgen-defs.h): Fetch string name of isa.
2488         (cgen-read.c): Convert current-arch-name to a string before using.
2489         (cgen-write.c): Ditto.
2490         * sim-model.scm (unit:enum): Fetch string name of unit.
2491         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2492         (-gen-model-timing-table): Fetch string name of model.
2493         (-gen-mach-model-table): Ditto.
2494         (-gen-mach-defns): Fetch string name of mach.
2495         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2496         (<hw-memory>,cxmake-get): Fetch string name of mode.
2497         (<hw-memory>,gen-set-quiet): Ditto.
2498         (gen-mode-defs): Ditto.
2499         (sim-finish!): Must quote empty list.
2500         * utils-cgen.scm (<ident>): Must quote empty list.
2501         (obj:str-name): New fn.
2502         (parse-comment): Result is a string.
2503         (parse-symbol): Result is a symbol.
2504         (parse-string): Result is a string.
2505         (keyword-list?): Convert arg to string before calling string-ref.
2506         (keyword-list->arg-list): Ditto.
2507         (gen-attr-name): Convert attr-name to string first.
2508         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2509         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2510         (gen-define-ifmt-ifields): Ditto for fld.
2511         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2512         map-over-string.
2513         (gen-file-name): Ditto.
2514         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2515         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2516         (reduce): Call eval1 instead of eval.
2517         * cpu/m32r.cpu (addi): Don't use `#.'.
2518
2519         * gen-all-sim: Fix some typos.
2520
2521 2003-07-08  Doug Evans  <dje@sebabeach.org>
2522
2523         * gen-all-doc: Ensure run from cgen src dir.
2524         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2525         * gen-all-sid: Similarily, in ./tmp-sid.
2526         * gen-all-sim: Similarily, in ./tmp-sim.
2527
2528 2003-06-20  Doug Evans  <dje@sebabeach.org>
2529
2530         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2531
2532 2003-06-19  Doug Evans  <dje@sebabeach.org>
2533
2534         * mach.scm (-ifld-already-defined?): New proc.
2535         (current-ifld-add!): Use it.
2536         (-op-already-defined?): New proc.
2537         (current-op-add!): Use it.
2538         (-insn-already-defined?): New proc.
2539         (current-insn-add!): Use it.
2540         (-minsn-already-defined?): New proc.
2541         (current-minsn-add!): Use it.
2542         (obj-isa-list): New proc.
2543         (isa-supports?): Use it.
2544
2545 2003-06-10  Doug Evans  <dje@sebabeach.org>
2546
2547         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2548         * cpu/m32r.cpu (all insns): Ditto.
2549
2550         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2551         "unspecified".
2552
2553         * gen-all-doc: Split arm and frv docs up a bit.
2554
2555         * cpu/arm.cpu: Add IDOC attribute.
2556         * cpu/frv.cpu: Ditto.
2557         * cpu/i960.cpu: Ditto.
2558         * cpu/openrisc.cpu: Ditto.
2559         * cpu/xstormy16.cpu: Ditto.
2560         * cpu/m32r.cpu: Ditto.
2561         (all insns): Explicitly specify IDOC attribute.
2562
2563         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2564         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2565         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2566         * Makefile.in: Regenerate.
2567         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2568         (-attr-read): Defer computing default value until we know the type.
2569         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2570         (<attr-list>:attr-present?): New method.
2571         (atlist-attr-present?,obj-attr-present?): New fns.
2572         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2573         (attr-builtin!): New insn attr IDOC.
2574         * cgen-doc.scm (doc-arguments): New args -I,-N.
2575         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2576         Support comment as fourth element of enum value.
2577         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2578         * html.scm (gen-html-header): New arg kind, all callers updated.
2579         (gen-table-of-contents): New arg insn-file, all callers updated.
2580         (gen-list-entry,gen-doc-header): New fn.
2581         (get-operands): Delete.
2582         (gen-iformat-table): Rewrite.
2583         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2584         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2585         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2586         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2587         (get-insns-for-category,gen-categories-insn-lists): New fns.
2588         (gen-insn-docs): Simplify each insn's semantics first.
2589         Print insn tables sorted by IDOC categories.
2590         (*insn-html-file-name*): New global.
2591         (cgen-insn.html): New fn.
2592         (cgen-all): Update.
2593         * insn.scm (<insn>): Create a setter for the `tmp' member.
2594         * semantics.scm (insn-build-known-values): Renamed from
2595         -build-known-values.  All callers updated.
2596
2597         * rtl.scm: Move traveral/evaluation support to ...
2598         * rtl-traverse.scm: New file.
2599         * read.scm: Maybe-load rtl-traverse.scm.
2600
2601         * rtl.scm (-rtx-valid-types): Add SETRTX.
2602
2603         * rtx-funcs.scm (nop,parallel): Fix mode.
2604
2605         * utils.scm (eqv-lookup-index): New fn.
2606         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2607
2608         * dev.scm (load-doc): Set APPLICATION.
2609
2610 2003-06-10  Dave Brolley  <brolley@redhat.com>
2611
2612         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2613         * sid-decode.scm: Generate #include of config.h into
2614         @prefix@-decode.cxx.
2615         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2616
2617 2003-06-07  Doug Evans  <dje@sebabeach.org>
2618
2619         * gen-all-sid: New file.
2620         * gen-all-opcodes: New file.
2621
2622 2003-06-05  Nick Clifton  <nickc@redhat.com>
2623
2624         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2625         version of the FRinti operand.
2626         (FRintjeven): Likewise for FRintj.
2627         (FRintkeven): Likewise for FRintk.
2628         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2629         media-quad-arith-sat-semantics, media-quad-arith-sat,
2630         conditional-media-quad-arith-sat, mdunpackh,
2631         media-quad-multiply-semantics, media-quad-multiply,
2632         conditional-media-quad-multiply, media-quad-complex-i,
2633         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2634         conditional-media-quad-multiply-acc, munpackh,
2635         media-quad-multiply-cross-acc-semantics, mdpackh,
2636         media-quad-multiply-cross-acc, mbtoh-semantics,
2637         media-quad-cross-multiply-cross-acc-semantics,
2638         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2639         media-quad-cross-multiply-acc-semantics, cmbtoh,
2640         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2641         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2642         cmhtob): Use new operands.
2643         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2644         (parse_even_register): New function.
2645
2646 2003-06-04  Doug Evans  <dje@sebabeach.org>
2647
2648         Better handling of 64 bit and mixed 32/64 bit architectures.
2649         * hardware.scm (hw-update-word-modes!): New fn.
2650         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2651         hw-update-word-modes!.
2652         (state-word-bitsize): Replace FIXME with requested check.
2653         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2654         * mode.scm (mode-find): Ignore INT,UINT.
2655         (-mode-word-sizes-kind): New global.
2656         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2657         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2658         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2659         of mode-list to ...
2660         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2661         unusable, correct values set later.
2662         (mode-finish!): Remove cruft.
2663         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2664         * opcodes.scm (opcodes-init!): Ditto.
2665         * rtx-funcs.scm (annul): Fix mode of pc.
2666         * cpu/ia64.cpu: Remove cruft that sets word modes.
2667         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2668
2669 2003-06-03  Nick Clifton  <nickc@redhat.com>
2670
2671         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2672         immediate value not unsigned.
2673
2674 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2675
2676         * cpu/sh.cpu: Amend comments to refer to SuperH.
2677         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2678         * cpu/sh64-media.cpu: Likewise.
2679         (Saturation): Update manual reference.
2680
2681 2003-05-15  Doug Evans  <dje@sebabeach.org>
2682
2683         * Makefile.am (srcroot): New var.
2684         (html): New rule.
2685         * Makefile.in: Regenerate.
2686         * cgen-doc.scm: New file.
2687         * html.scm: New file.
2688         * gen-all-doc: New file.
2689         * dev.scm (cload): Handle DOC application.
2690         (load-doc): New fn.
2691         * machs.scm (machs-for-cpu): New fn.
2692         * model.scm (models-for-cpu): New fn.
2693         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2694         All uses updated.
2695         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2696         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2697
2698         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2699         (-gen-decode-bits): Instead put in better fix here.
2700
2701         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2702
2703 2003-05-01  DJ Delorie  <dj@redhat.com>
2704
2705         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2706         word accesses.
2707         (set-alignfix-mem): Likewise.
2708
2709 2003-04-16  Dave Brolley  <brolley@redhat.com>
2710
2711         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2712         * utils.scm (copyright-fsf): Update generate copyright years.
2713         (copyright-cygnus): Ditto.
2714         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2715         operands.
2716         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2717         here.
2718         (<operand>'gen-profile-code): New parameter 'when'.
2719         (<iunit>'gen-profile-code): Ditto.
2720         (<insn>'gen-profile-code): Ditto.
2721         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2722         'insn_reference' for the 'after' function.
2723         * model.scm (unit:enum): Moved to sim-model.scm.
2724         * sim-model.scm (unit:enum): Moved from model.scm.
2725         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2726         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2727         * sid-model.scm (unit:enum): New version for sid.
2728         (gen-model-class-name): New function.
2729         (gen-model-unit-fn-decl): New function.
2730         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2731         (gen-model-unit-fn-name): New parameter 'when'.
2732         (-gen-model-insn-fn-name): Ditto.
2733         (-gen-model-insn-qualified-fn-name): New function.
2734         (-gen-model-insn-fn-decl): New function.
2735         (-gen-model-insn-fn-decls): New function.
2736         (-gen-model-insn-fn): New parameter 'when'. Call
2737         -gen-model-insn-qualified-fn-name.
2738         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2739         functions for modelling insn before and after execution.
2740         (-gen-model-class-decls): New function.
2741         (" (gen-model-class-name model) "): New function.
2742         (gen-model-classes): New function.
2743         (-gen-insn-timing): Generate functions for modelling insn before and after
2744         execution.
2745         (-gen-insn-unit-timing): Generate class-qualified names.
2746         (-gen-model-timing-table): Ditto.
2747         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2748         not needed (yet) by sid.
2749         (cgen-model.h): New function.
2750
2751 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2752
2753         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2754         * cpu/sh64-compact.cpu: Likewise.
2755         * cpu/sh64-media.cpu: Likewise.
2756
2757 2003-03-21  DJ Delorie  <dj@redhat.com>
2758
2759         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2760         which indicates if the sign flag is set from bit 15 or 7.
2761         Adjust all callers.
2762         (set-psw): New argument ws, propogate it.
2763         (set-psw-nowrite): Likewise.
2764         (set-mem-psw): Likewise.
2765         (set-psw-carry): Likewise.  Use temporaries to prevent
2766         prematurely overwriting needed inputs.
2767         (set-psw-rrotate17): Fix logic.
2768         (shrgrgr): Preserve carry for zero-bit shifts.
2769         (shrgrimm): Likewise.
2770         (shlgrgr): Likewise.
2771         (shlgrimm): Likewise.
2772         (asrgrgr): Likewise.
2773         (asrgrimm): Likewise.
2774         (reset): New.
2775
2776 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2777
2778         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2779
2780 2002-03-05  DJ Delorie  <dj@redhat.com>
2781
2782         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2783         prematurely overwriting needed inputs.
2784         (set-psw-sub): Likewise.
2785
2786 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2787
2788         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2789
2790 2003-02-18  DJ Delorie  <dj@redhat.com>
2791
2792         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2793         (movlmemimm): Just mask the address.
2794         (movhmemimm): Likewise.
2795         (movlmemgr): Likewise.
2796         (movhmemgr): Likewise.
2797         (set-psw): Always set the psw last.
2798         (set-psw-carry): Likewise.
2799         (set-psw-add): Likewise.
2800         (set-psw-sub): Likewise.
2801
2802         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2803         of 16 patterns from the set-psw-rotate17 function.
2804         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2805         movgriipostincgr, movgriipredecgr): Set psw correctly.
2806         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2807         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2808         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2809
2810 2003-02-11  Dave Brolley  <brolley@redhat.com>
2811
2812         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2813         @arch@_cgen-ifld_table.
2814         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2815         @arch@_cgen-ifld_table.
2816
2817 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2818
2819         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2820
2821 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2822
2823         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2824         empty ISAs.
2825
2826 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2827
2828         * utils-gen.scm (attr-int-gen-defn): Define.
2829
2830 2002-12-21  Doug Evans  <dje@sebabeach.org>
2831
2832         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2833         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2834
2835         * dev.scm (cload): Update location of .cpu files.
2836
2837 2002-12-19  Doug Evans  <dje@sebabeach.org>
2838
2839         * utils-sim.scm (gen-profile-sym): New fn.
2840         (<operand>,sbuf-profile-sym): New method.
2841         (<operand>,sbuf-profile-elm): Use it.
2842         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2843         of hardcoding symbol name.
2844         (<operand>,gen-profile-code): Ditto.
2845         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2846         symbol name.
2847
2848         * mode.scm (mode-sem-mode): New fn.
2849         * operand.scm (op:new-mode): Update. mode-name.
2850         (op-natural-mode?) New fn.
2851         * rtl.scm (hw): Set hw-name,mode-name.
2852
2853         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2854         Instead do:
2855         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2856         as size of IDESC-TABLE-VAR.
2857         (@prefix@_init_idesc_table): Ditto.
2858         * sim-model.scm (-gen-mach-defns): Ditto.
2859         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2860
2861         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2862
2863         * insn.scm (-parse-insn-format-symbol): Improve error message.
2864         (-parse-insn-format): Ditto.
2865
2866         * gen-all-sim: New script.
2867
2868 2002-12-16  DJ Delorie  <dj@delorie.com>
2869
2870         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2871
2872 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2873
2874         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2875         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2876         (parse_immediate16): Handle immediate16 values, which now include
2877         @hi(label) and @lo(label)
2878
2879 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2880
2881         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2882         Add braces and cast for union field.
2883         (gen-multi-ifield-nodes): Add braces and cast for union field.
2884         (cgen_operand_table): Similarly fix sentinel.
2885         (cgen_cpu_close): Constify "insns".  Formatting.
2886         (cgen-desc.c): Include xregex.h.
2887         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2888         Prototype.
2889         <opc.c>: Include safe-ctype.h.
2890         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2891         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2892         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2893         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2894         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2895         (parse_addr16): Correct type of "value".  Formatting.
2896         (parse_addr16_p): Likewise.
2897         (parse_addr16_cjp): Likewise.
2898         (parse_lit8): Likewise.
2899         (parse_bit3): Formatting.
2900         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2901         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2902         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2903         print_decimal.
2904         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2905         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2906         (print_dollarhex8): Likewise.
2907         (print_dollarhex16): Likewise.
2908         (print_dollarhex_addr16h): Likewise.
2909         (print_dollarhex_addr16l): Likewise.
2910         (print_dollarhex_p): Likewise.
2911         (print_dollarhex_cj): Likewise.
2912         (print_decimal): Likewise.
2913         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2914
2915 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2916
2917         * doc/rtl.texi (Model variants): Mention current limitations for
2918         unit inputs and outputs.
2919         (Hardware elements) <attribute PROFILE>: Be slightly more
2920         verbose.
2921         (Instructions) <timing>: input/output overrides have a direction
2922         operand.
2923
2924 2002-11-25  DJ Delorie  <dj@redhat.com>
2925
2926         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2927
2928 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2929
2930         * cpu/iq10.cpu: New file.
2931         * cpu/iq2000.cpu: Likewise.
2932         * cpu/iq2000.opc: Likewise.
2933         * cpu/iq2000m.cpu: Likewise.
2934
2935 2002-11-19  DJ Delorie  <dj@redhat.com>
2936
2937         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2938
2939 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2940
2941         * dev.scm: Call getenv with a string, not a symbol.
2942
2943 2002-10-08  Doug Evans  <dje@transmeta.com>
2944             Hans-Peter Nilsson  <hp@axis.com>
2945
2946         * types.scm (bitrange-overlap?): Handle lsb0?.
2947
2948 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2949
2950         From Robert Cragie <rcc@jennic.com>:
2951         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2952
2953 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2954             Ben Elliston  <bje@redhat.com>
2955             John Healy  <jhealy@redhat.com>
2956             Jeff Johnston  <jjohnstn@redhat.com>
2957             Alan Lehotsky  <alehotsky@redhat.com>
2958             Ubicom Inc. <SupportDesk@ubicom.com>
2959
2960         * cpu/ip2k.cpu: New file.
2961         * cpu/ip2k.opc: Likewise.
2962
2963 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2964
2965         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2966
2967 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2968
2969         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2970         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2971         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2972         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2973         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2974         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2975         (-sthi-byte): If there is a single byte to store, store it at
2976         proper address.
2977         (sthil, sthiq): Fix big-endian behaviour.
2978         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2979         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2980         (saturate): Use Dimode to check if saturation operation is required.
2981         (usaturate): Likewise.
2982         (mpermw): Fix mask.
2983         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2984         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2985         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2986         (msadubq): Fix subword index in second operand of first subtraction.
2987
2988 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2989
2990         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2991         code.
2992
2993 2002-06-18  Dave Brolley  <brolley@redhat.com>
2994
2995         * cpu/frv.cpu: New cpu description.
2996         * cpu/frv.opc: New cpu support code.
2997
2998 2002-05-21  Dave Brolley  <brolley@redhat.com>
2999
3000         * decode.scm (-opcode-slots): Don't consider bits beyond the
3001         length of the insn.
3002
3003 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
3004
3005         * cpu/powerpc.cpu: New file.
3006
3007 2002-05-01  Graydon Hoare  <graydon@redhat.com>
3008
3009         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3010
3011 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
3012
3013         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3014         results are expanded recursively.
3015
3016 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
3017
3018         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3019         call scan-symbol on it, to enable recursive macro-expansion.
3020
3021 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
3022
3023         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3024         for multiple-isa configurations.
3025         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3026
3027 2002-02-04  Ben Elliston  <bje@redhat.com>
3028
3029         * cpu/sh.cpu, cpu/sh.opc: New files.
3030         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3031
3032 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
3033
3034         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3035         (Enumerated constants): Mention that an ifield must not specify a
3036         multi-ifield.
3037         (Instruction operands): Ditto for index.
3038         (Expressions) <parallel>: Remove misplaced mention of local
3039         variables.
3040         <if>: Mention that mode must be specified and non-VOID when the
3041         result is used.
3042
3043 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3044
3045         * doc/porting.texi: When referring to *.opc, mention they are in
3046         the cpu subdir.  Call top-level directory toplevel, not devo.
3047         Close string in define-normal-insn example.
3048
3049         * doc/pmacros.texi: Fix .substr typo to .substring.
3050         Mention that .sym expansions are not further expanded.
3051
3052 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3053
3054         * desc-cpu.scm (ifld-number-cache): Add.
3055         (ifld-number): Add.
3056         (gen-maybe-multi-ifld-of-op): Add.
3057         (gen-maybe-multi-ifld): Add.
3058         (gen-multi-ifield-nodes): Add.
3059         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3060
3061 2002-01-10  matthew green  <mrg@redhat.com>
3062
3063         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3064         (gr-Rb-names): ... to this.
3065         (h-Rb): New hardware piece.
3066         (h-Rbj): Use gr-Rb-names.
3067         (Rb): Use h-Rb.
3068         (holdx): New instruction.
3069
3070 2002-01-07  Ben Elliston  <bje@redhat.com>
3071
3072         * utils.scm (package-cygnus-simulators): Rename from this ..
3073         (package-red-hat-simulators): .. to this.
3074         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3075         * sid-cpu.scm (cgen-desc.h): Likewise.
3076         (cgen-cpu.h): Likewise.
3077         (cgen-defs.h): Likewise.
3078         (cgen-write.cxx): Likewise.
3079         (cgen-semantics.cxx): Likewise.
3080         (cgen-sem-switch.cxx): Likewise.
3081         * sid-decode.scm (cgen-decode.h): Likewise.
3082         (cgen-decode.cxx): Likewise.
3083         * sid-model.scm (cgen-model.cxx): Likewise.
3084         * sid.scm (option-set!): Likewise.
3085         * sim.scm (option-set!): Likewise.
3086
3087 2002-01-07  Ben Elliston  <bje@redhat.com>
3088
3089         * utils.scm (copyright-fsf): Add 2002.
3090         (copyright-cygnus): Rename to copyright-red-hat.
3091         (copyright-red-hat): Add 2002.
3092         (CURRENT-COPYRIGHT): Update comment.
3093         * opcodes.scm (option-set!): Update callers.
3094         * sid-model.scm (cgen-model.cxx): Likewise.
3095         * sid-cpu.scm: Likewise.
3096         * sid-decode.scm: Likewise.
3097         * sid.scm (option-set!): Handle "redhat" as an option for
3098         "copyright"; use copyright-red-hat.
3099         * sim.scm (option-set!): Likewise.
3100
3101 2002-01-03  Dave Brolley  <brolley@redhat.com>
3102
3103         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3104         number of insns in the list.  Update the population count function to
3105         identify and prioritize 3 catgories of useful bits.
3106         (-population-top-few): Don't consider bits with a population count of
3107         zero.
3108         (-build-decode-table-entry): Don't call
3109         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3110         identical insns at the next tree level.
3111         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3112         this function is no longer used.
3113         (filter-non-specialized-ambiguous-insns): New function.
3114         (filter-identical-ambiguous-insns): New function.
3115         (find-identical-insn): New function.
3116         (filter-harmlessly-ambiguous-insns): Removed.
3117
3118 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3119             matthew green  <mrg@redhat.com>
3120             Frank Ch. Eigler  <fche@redhat.com>
3121             Nick Clifton  <nickc@cambridge.redhat.com>
3122
3123         * cpu/xstormy16.cpu: New file.
3124         * cpu/xstormy16.opc: New file.
3125
3126 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3127
3128         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3129
3130 2001-11-14  Dave Brolley  <brolley@redhat.com>
3131
3132         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3133         of the field being extracted.
3134
3135 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3136
3137         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3138         (cos ...) and (sin ..) rtx.
3139
3140 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3141
3142         * desc-cpu.scm: Do not include ctype.h in generated desc
3143         files.  They will inherit safe-ctype.h instead.
3144
3145 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3146
3147         * desc-cpu.scm: Add missing function prototypes (for generated
3148         C files).  Fix compile time warning messages about unused
3149         parameters (for generated C files).
3150         * opc-asmdis.scm: The same.
3151         * opc-ibld.c: The same.
3152         * opc-itab.scm: The same.
3153         * cpu/fr30.opc: The same.
3154         * cpu/m32r.opc: The same.
3155         * cpu/openrisc.opc: The same.
3156
3157 2001-09-17  graydon hoare  <graydon@redhat.com>
3158
3159         * insn.scm (syntax-break-out): Correct logic in handling escaped
3160         syntax characters.
3161
3162 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3163
3164         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3165         call @arch@_cgen_build_insn_regex now that regex support is in
3166         libiberty.
3167
3168 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3169
3170         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3171         (mask-superset?): Look for strict supersets to allow rejection of
3172         duplicate insns.
3173
3174 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3175
3176         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3177         (cgen-desc.h): Call it.
3178         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3179         decode-size.
3180         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3181         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3182
3183 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3184
3185         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3186         mach->cpu insn-chunk-bitsize.
3187         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3188         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3189         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3190         (-cpu-parse, -cpu-read): Parse/initialize it.
3191         * doc/rtl.texi (define-cpu): Document it.
3192
3193 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3194
3195         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3196
3197 2001-07-06  Ben Elliston  <bje@redhat.com>
3198
3199         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3200
3201 2001-07-05  Ben Elliston  <bje@redhat.com>
3202
3203         * README: Update.
3204
3205         * read.scm (include): Include files from srcdir/cpu.
3206         (-cgen): Likewise for loading .cpu files.
3207         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3208         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3209         * *.opc: Likewise.
3210         * simplify.inc: Likewise.
3211
3212 2001-07-04  Ben Elliston  <bje@redhat.com>
3213
3214         * read.scm (include): Log "Including file" message at level 1,
3215         rather than outputting it with (display).
3216         (cpu-load): Log "Loading cpu description" and "Processing cpu
3217         description" messages at levels 1 and 2, respectively, rather than
3218         using (display).
3219
3220 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3221
3222         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3223         CGEN_KEYWORD_ENTRY initializers.
3224
3225         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3226         (<operand> 'test-data): Involve both the index and the hardware
3227         in testcase generation.
3228         (<hw-indx> 'test-data): Generate test data from the underlying
3229         object.
3230         (<ifield> 'test-data): Generate test data by computing bit
3231         patterns for the field, then decoding them.
3232         (<hw-address> 'test-data): Allow for new calling convention.
3233         (<hw-iaddress> 'test-data): Likewise.
3234         (<keyword> 'test-data): Convert index values into keywords.
3235         (<hw-asm> 'test-data): Convert index values into integer strings.
3236
3237         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3238
3239 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3240
3241         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3242         is required for multi-mode hw types (memory).
3243
3244 2001-05-11  Ben Elliston  <bje@redhat.com>
3245
3246         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3247         when generating allinsn.d from objdump output. Without it, the
3248         testsuite will treat $ as the regular expression for end of line.
3249
3250 2001-05-09  Ben Elliston  <bje@redhat.com>
3251
3252         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3253         with `cgen_cpu_open'; documentation had become out of date.
3254         * doc/rtl.texi (Instruction operands): Likewise.
3255
3256 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3257
3258         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3259         various-base-length instruction sets.
3260
3261 2001-04-02  Ben Elliston  <bje@redhat.com>
3262
3263         * sid-cpu.scm (-last-insn): New function.
3264         (-gen-sem-switch-engine): Loop through idesc while less than or
3265         equal to the last instruction enum, not less than the MAX enum.
3266         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3267         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3268         table's size to be the last instruction enum plus one, not
3269         @PREFIX@_INSN_MAX.
3270         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3271         instruction onto the instruction list.
3272
3273         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3274         using the size of the table and its elements.
3275         (-gen-decode-insn-globals): Define the idesc table's size to be
3276         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3277         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3278         last instruction enum plus one, not @CPU@_INSN_MAX.
3279
3280 2001-03-28  Ben Elliston  <bje@redhat.com>
3281
3282         * doc/version.texi (UPDATED, EDITION): Update.
3283         * doc/stamp-vti: Likewise.
3284
3285 2001-03-26  Ben Elliston  <bje@redhat.com>
3286
3287         * doc/credits.texi (Credits): Update.
3288
3289         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3290         specified prefix and, if necessary, escape `$' in gas-build.sh to
3291         prevent unwanted shell variable expansion.
3292
3293 2001-03-24  Ben Elliston  <bje@redhat.com>
3294
3295         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3296         (<keyword>,test-data): Likewise.
3297         (<hw-address>,test-data): Likewise.
3298         (<hw-iaddress>,test-data): Likewise.
3299         (-collate-test-set): New function.
3300         (build-test-set): Use it.
3301         (gen-gas-test): Generate five test cases per instruction.
3302         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3303
3304         * read.scm: Load "slib/random" if random is not defined.
3305         * slib/random.scm: New file.
3306
3307         * utils.scm: Remove comments about the Hobbit compiler.
3308         (copyright-cygnus): Add 2001.
3309         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3310         (package-gnu-simulators): Tidy.
3311
3312 2001-03-23  Ben Elliston  <bje@redhat.com>
3313
3314         * cgen-gas.scm: Inline documentation improvements.
3315
3316 2001-03-21  Ben Elliston  <bje@redhat.com>
3317
3318         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3319         given in a syntax string is undefined.
3320
3321         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3322         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3323
3324 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3325
3326         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3327         for arg_type CGEN_CPU_OPEN_BFDMACH.
3328
3329 2001-03-20  Ben Elliston  <bje@redhat.com>
3330
3331         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3332         instruction onto the instruction list. Define MAX_INSNS to be the
3333         value of the last instruction enum plus one.
3334
3335 2001-03-14  Nick Clifton  <nickc@redhat.com>
3336
3337         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3338
3339 2001-03-05  Dave Brolley  <brolley@redhat.com>
3340
3341         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3342         if the number of ifields is greater than zero.
3343
3344 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3345
3346         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3347         Emit LIKELY/UNLIKELY branch probability hints.
3348         * sid-decode.cpu (-gen-record-args): Ditto.
3349
3350 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3351
3352         * desc-cpu.scm (-gen-hash-defines): Rename
3353         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3354
3355 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3356
3357         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3358         writeback tracking.
3359         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3360         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3361         if unnecessary.
3362         * sid.scm (<operand> gen-write): Use unsigned long long expression
3363         for writeback.
3364         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3365         (<unit> gen-profile-code): Ditto.
3366
3367 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3368
3369         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3370         (regno ...) rtx.
3371
3372 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3373
3374         * operand.scm (<operand> pretty-sem-name): New field.
3375         (<operand> make): Initialize it from hw-name.
3376         (op:set-pretty-sem-name!): New function.
3377         (<operand> gen-pretty-name): Default to fetching new field.
3378         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3379         sem-name setting from -rtx-hw-name.
3380
3381 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3382
3383         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3384         its subsequent gen-pretty-name.
3385
3386         * read.scm: Increase thread working stack limit and backtrace
3387         depth limits.
3388
3389 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3390
3391         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3392
3393 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3394
3395         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3396         current insn plus 4.
3397         (h-delay-insn): New hardware register.
3398         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3399         (l-jalr): Likewise.
3400         (l-bal): Likewise.
3401
3402         * openrisc.opc (parse_hi16): Sign extend value.
3403         (parse_lo16): Likewise.
3404
3405 2001-01-06  Ben Elliston  <bje@redhat.com>
3406
3407         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3408         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3409         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3410         (-gen-semantic-fn-table): Likewise.
3411         (-gen-scache-semantic-fn): Likewise.
3412         (-gen-no-scache-semantic-fn): Likewise.
3413         (cgen-read.c): Likewise.
3414         (cgen-sem-switch.c): Likewise.
3415         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3416         is a filename prefix.
3417         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3418         (-gen-decode-insn-globals): Likewise.
3419         (-gen-idesc-decls): Likewise.
3420         (cgen-decode.h): Likewise.
3421         (cgen-decode.c): Likewise.
3422         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3423         (gen-cpu-insn-enum): Likewise.
3424         (sim-finish!): Likewise.
3425
3426 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3427
3428         * openrisc.cpu: New file.
3429         * openrisc.opc: Likewise.
3430
3431 2000-12-12  Ben Elliston  <bje@redhat.com>
3432
3433         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3434
3435 2000-12-07  Ben Elliston  <bje@redhat.com>
3436
3437         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3438         "insn" when there are zero ifields to extract.
3439
3440 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3441
3442         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3443         used by simple/non-scache simulators.
3444         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3445         regardless of with-scache?.
3446         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3447
3448 2000-12-03  Ben Elliston  <bje@redhat.com>
3449
3450         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3451         (cgen-desc.c): Likewise.
3452
3453 2000-12-01  Greg McGary  <greg@mcgary.org>
3454
3455         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3456
3457 2000-12-01  Ben Elliston  <bje@redhat.com>
3458
3459         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3460         definitions if run without with-multipla-isa?.
3461         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3462         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3463
3464 2000-11-24  Ben Elliston  <bje@redhat.com>
3465
3466         * sim-cpu.scm (-gen-hardware-struct): New function.
3467         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3468         hardware elements wich have share one or more ISAs with the ISAs
3469         being kept.
3470
3471         * sim.scm (-with-multiple-isa?): New symbol.
3472         (with-multiple-isa?): New function.
3473         (option-init!): Initialise -with-multiple-isa?.
3474         (option-set!): Handle with-multiple-isa option.
3475
3476 2000-11-21  Ben Elliston  <bje@redhat.com>
3477
3478         * utils.scm (copyright-fsf): Add the year 2000.
3479
3480 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3481
3482         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3483         unneeded "\n\n" from F() macro definition.
3484
3485 2000-11-15  Greg McGary  <greg@mcgary.org>
3486
3487         * utils-cgen.scm (gen-define-with-symcat): New function.
3488         * desc-cpu.scm (gen-ifld-defns): Use it.
3489         (gen-hw-table-defns): Use it.
3490         (-gen-hash-defines): Use it.
3491         (gen-operand-table): Use it.
3492         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3493         * opc-itab.scm (-gen-ifmt-table): Use it.
3494         (-gen-insn-opcode-table): Use it.
3495         (-gen-macro-insn-table): Use it.
3496         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3497         * sim-cpu.scm (cgen-semantics.c): Use it.
3498         (cgen-sem-switch.c): Use it.
3499
3500 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3501
3502         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3503         request to emit calls to insn extractors as functions rather than
3504         branches to inline blocks.
3505         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3506         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3507
3508         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3509         to extractor clauses.
3510
3511 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3512
3513         * decode.scm (-distinguishing-bit-population): Significantly
3514         improve popularity heuristic.  Renamed from
3515         (-mask-bit-population): Gone.
3516         (-population-above-threshold): Sort new bit numbers in order of
3517         popularity.
3518         (-population-top-few): Allow up to three more bits to be selected
3519         than requested.  Correct selection order to prefer better bits.
3520         Correct bug in fewer-than-requested case.  Keep threshold as
3521         floating-point.
3522         (decode-best-get-bits): Pass also the insn-values.
3523
3524         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3525         future optimization.
3526
3527         * utils.scm (message): Format nested lists better.
3528
3529 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3530
3531         * dev.scm: Add srcdir to %load-path.
3532
3533         * rtx-funcs.scm (subword): Mode of argument can be different
3534         than mode of result, so don't use OP0 to specify argument's mode.
3535
3536 2000-11-02  Ben Elliston  <bje@redhat.com>
3537
3538         * doc/porting.texi (Building a GAS test suite): Document my change
3539         to gas-build.sh.
3540
3541 2000-11-01  Ben Elliston  <bje@redhat.com>
3542
3543         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3544
3545 2000-10-31  Ben Elliston  <bje@redhat.com>
3546
3547         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3548         with no command line arguments if the gas build directory can be
3549         determined.
3550
3551 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3552
3553         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3554         op-ifld -> op-ifield.
3555
3556 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3557
3558         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3559
3560 2000-10-13  matthew green  <mrg@cygnus.com>
3561
3562         * utils-cgen.scm (get-ifetch): Move from here ...
3563         * sim.scm (get-ifetch): ... to here.
3564         * sid.scm (get-ifetch): Copy and port to c++.
3565
3566 2000-10-06  Dave Brolley  <brolley@redhat.com>
3567
3568         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3569         ifld-start + ifld-word-offset.
3570         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3571         the field is beyond the base number of bits.
3572         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3573         (gen-extract-ifields): Ditto.
3574         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3575         characters in the regular expression.
3576
3577 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3578
3579         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3580         preprocessor constant.
3581
3582 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3583
3584         * slib/logical.scm: New file from slib.  Provides robust bitwise
3585         logical operations for large integers.
3586         * read.scm: maybe-load it.
3587
3588 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3589
3590         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3591         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3592         single-isa predicate, but support keep-isa filtering.
3593
3594 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3595
3596         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3597         statement-expression and comma-expression contexts.
3598         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3599
3600 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3601
3602         * decode.scm (-population-top-few): Signal error gracefully if
3603         decoding is about to become ambiguous.
3604
3605 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3606
3607         * doc/rtl.texi (decode-assist): Describe this field as optional.
3608
3609 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3610
3611         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3612         with decode proc.
3613
3614 2000-09-05  Dave Brolley  <brolley@redhat.com>
3615
3616         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3617         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3618
3619 2000-08-29  Dave Brolley  <brolley@redhat.com>
3620
3621         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3622         adata-integral-insn is true for this architecture.
3623
3624 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3625
3626         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3627         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3628         * rtl-c.scm (-c-rtl-get): Improve an error message.
3629         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3630
3631 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3632
3633         * Makefile.in (DIST_COMMON): Regenerated.
3634         * ifield.scm (<derived-ifield> needed-iflds): New method.
3635         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3636         sfmts built from <derived-ifield>s.
3637         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3638         type symbol 'derived-ifield, not an unparseable string.
3639         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3640         (-sfmt-contents): Add tracing.
3641
3642         From Doug Evans <dje@transmeta.com>:
3643         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3644         C code.
3645
3646 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3647
3648         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3649         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3650         (-rtl-c-get): Rename from rtl-c-get.
3651         (rtl-c-get): New fn for getter logging.
3652
3653 2000-07-28  Ben Elliston  <bje@redhat.com>
3654
3655         * NEWS: Update.
3656
3657 2000-07-25  Ben Elliston  <bje@redhat.com>
3658
3659         * doc/credits.texi (Credits): Add Frank Eigler.
3660
3661 2000-07-24  Dave Brolley  <brolley@redhat.com>
3662
3663         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3664         fully.
3665         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3666         (<keyword>): Initialize all elements fully.
3667         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3668         fully.
3669         (-gen-mach-table-defns): Ditto.
3670         (-gen-ifld-defns): Ditto.
3671         (-gen-operand-table): Ditto.
3672         (-gen-insn-table): Ditto.
3673         (-gen-cpu-open): Nothing to do for the mach table.
3674
3675 2000-07-13  Ben Elliston  <bje@redhat.com>
3676
3677         * doc/version.texi (UPDATED): Update.
3678
3679 2000-07-05  Ben Elliston  <bje@redhat.com>
3680
3681         * configure.in (AC_PATH_PROG): Remove.
3682         * configure: Regenerate.
3683         * Makefile.am (GUILE): Locate guile dynamically.
3684         * Makefile.in: Regenerate.
3685         * doc/Makefile.in: Likewise.
3686
3687 2000-07-03  Ben Elliston  <bje@redhat.com>
3688
3689         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3690         * opc-itab.scm (cgen-opc.c): Likewise.
3691
3692 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3693
3694         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3695         guile 1.4 compatibility.
3696         (rtx-env-dump): Comment out buggy display calls.
3697
3698 2000-06-15  matthew green  <mrg@redhat.com>
3699
3700         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3701
3702 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3703
3704         * Makefile.in: Regenerated.
3705
3706         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3707         (gen-ifld-defns): Ditto.
3708         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3709         * rtl.c (rtl-finish!): Ditto.
3710         * opc-itab.scm (-gen-ifield-decls): Ditto.
3711         * opcodes.scm (gen-switch): Exclude derived operands.
3712         * operand.scm (op-iflds-used): Expand derived operands.
3713         (hw-index-derived): New dummy function to create dummy object.
3714         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3715         constructor.  Set object's hw-name and index fields.
3716         (-anyof-merge-subchoices): Set instance object's index also.
3717         (-anyof-name): New helper function.
3718         (anyof-merge-semantics): Correct replacement of operand names in
3719         anyof instance.
3720         (op-ifield): Tolerate derived-operands and their funny indices better.
3721         * ifield.scm (ifld-known-values): Expand derived ifields.
3722         (non-multi-ifields, non-derived-ifields): New utility functions.
3723         (ifld-decode-mode): Tolerate objects with unbound decode field.
3724         * iformat.scm (compute-insn-length): Expand derived ifields.
3725         (compute-insn-base-mask): Ditto.
3726         * insn.scm (insn-base-ifields): Remove.
3727         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3728         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3729         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3730         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3731         (-frag-test-data): Ditto.
3732         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3733         (-gen-sem-switch-engine); Ditto.
3734         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3735         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3736         (-gen-record-args): Tolerate unbound op-ifield.
3737         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3738         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3739         Exclude multi-insns.
3740         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3741         * utils-sim.scm (op-extract?): Handle derived operands.
3742
3743         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3744         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3745         * hardware.scm (hardware-for-mode): New function.
3746
3747         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3748         cleaning up decode tables.
3749         (mask-superset?): Little helper function for above.
3750         * decode.scm (-build-decode-table-entry): Call it.
3751         (-opcode-slots): Add some more tracing.
3752         * arm.cpu: Disable decode-splits construct due to implementation
3753         conflict with `filter-harmlessly-ambiguous-insns'
3754
3755         * decode.scm (-population-top-few): New function for better decode
3756         bit generation.  Includes minor helper functions.
3757         (decode-get-best-bits): Call it instead.
3758         (OLDdecode-get-best-bits): Renamed previous version of above.
3759
3760
3761 2000-06-13  Ben Elliston  <bje@redhat.com>
3762
3763         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3764         for the Guile library directory.
3765         * configure: Regenerate.
3766         * Makefile.in, doc/Makefile.in: Regenerate.
3767
3768         * Makefile.in, doc/Makefile.in: Regenerate.
3769         * configure.in: Remove unnecessary tests. Move to version 1.0.
3770         * acconfig.h, config.in: Remove.
3771         * configure, aclocal.m4: Regenerate.
3772         * doc/stamp-vti, doc/version.texi: Likewise.
3773         * AUTHORS: New file.
3774
3775 2000-06-07 Ben Elliston  <bje@redhat.com>
3776
3777         * fixup.scm (symbol-bound?): Reduce debugging output.
3778
3779 2000-06-02  matthew green  <mrg@redhat.com>
3780
3781         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3782         a given instruction, replacing derived fields with their subfields.
3783         (insn-value): Use `insn-base-ifields' to find all constant values.
3784         (multi-insn-instantiate!): Comment some debug messages.
3785
3786 2000-06-01  Ben Elliston  <bje@redhat.com>
3787
3788         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3789         symbol names used in a (c-call ..) rtx.
3790
3791         * sim-test.scm (build-test-set): Return (()) for an instruction
3792         with no operands, so it too is included in the generated test set.
3793
3794 2000-05-31  Ben Elliston  <bje@redhat.com>
3795
3796         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3797         (sim-test): Likewise.
3798         * Makefile.in: Regenerate.
3799
3800 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3801
3802         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3803         stack traceback, in an order that resembles gdb's `bt'.
3804
3805 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3806
3807         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3808         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3809         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3810         multi insns.
3811         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3812         virtual functions.
3813         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3814         * iformat.scm (ifmt-expanded-ifields): Gone.
3815         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3816         work.
3817         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3818         ifmt entries.
3819
3820         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3821         code.
3822
3823 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3824
3825         * sid.scm (with-any-profile?): New function clone.
3826
3827 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3828
3829         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3830
3831 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3832
3833         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3834         (-multi-ifield-read): Parse them.
3835         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3836         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3837         (multi-ifield gen-extract): Add decode hook.
3838         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3839
3840         * insn.scm (syntax-break-out): More correctly handle \-escaped
3841         syntax characters.
3842         (syntax-make-elements): Ditto.
3843         * opc-itab.scm (compute-syntax): Ditto.
3844
3845 2000-05-17  Ben Elliston  <bje@redhat.com>
3846
3847         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3848
3849 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3850
3851         * gas-test.scm (build-test-set): Return (()) for an instruction
3852         with no operands, so it too is included in the generated test set.
3853
3854 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3855
3856         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3857         IFMT_OPERANDS and SYNTAX_BYTES.
3858
3859 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3860
3861         * sim.scm (with-any-profile?): New function.
3862         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3863         to decide whether or not to include profiling counters.
3864
3865 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3866
3867         Fuller derived-operand support for opcodes.
3868         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3869         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3870         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3871         (gen-operand-table): Omit derived- and anyof- operands from table.
3872         (gen-insn-table): Omit multi-insns from table.
3873         * iformat.scm (ifmt-expanded-fields): New function to expand
3874         subfields of derived-ifields.
3875         (ifmt-compute!): Ignore remaining multi-insns.
3876         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3877         multi-insns.
3878         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3879         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3880         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3881         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3882         (gen-switch): Omit anyof-operands.
3883         * operand.scm (-anyof-syntax): New function.
3884         (-anyof-merge-syntax): Call it.
3885         * utils.scm (collect): New idiomatic function.
3886
3887 2000-05-10  Ben Elliston  <bje@redhat.com>
3888
3889         * m68k.cpu: New file (work in progress).
3890
3891 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3892
3893         * Makefile.am (all-local): New target.  Create stamp-cgen.
3894         * Makefile.in: Regenerated.
3895         * doc/Makefile.in: Regenerated.
3896
3897 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3898
3899         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3900         (-operand-parse-setter): Ditto.
3901         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3902         for CACHE-ADDR operands.
3903         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3904         trace entries.  Widen byte-wide values for printing.
3905         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3906         Widen byte-wide values for printing.  Hexify memory addresses.
3907
3908 2000-04-23  matthew green  <mrg@redhat.com>
3909
3910         * m32r.cpu: Fix a typo.
3911
3912 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3913
3914         * ia64.cpu (define-model): Change merced to Itanium.
3915         (f-qp): Change quilifying to qualifying.
3916         (movbr_ph, movbr_pvec): Delete.
3917         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3918
3919 2000-04-07  Ben Elliston  <bje@redhat.com>
3920
3921         * doc/porting.texi (Building a simulator test suite): Clarify
3922         where generated test cases are placed.
3923
3924 2000-04-07  Ben Elliston  <bje@redhat.com>
3925
3926         * Makefile.am (gas-test): Remove dependency on `cgen'.
3927         (sim-test): Ditto.
3928         * Makefile.in: Regenerate.
3929
3930 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3931
3932         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3933         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3934         type reconfiguration.
3935         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3936         with-profile?.
3937
3938 2000-03-30  Ben Elliston  <bje@redhat.com>
3939
3940         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3941
3942 2000-03-24  Ben Elliston  <bje@redhat.com>
3943
3944         * Makefile.am (stamp-cgen): Reinstate target.
3945         * Makefile.in: Regenerate.
3946
3947 2000-03-22  Ben Elliston  <bje@redhat.com>
3948
3949         * slib/ppfile.scm: Remove; unused.
3950         * slib/defmacex.scm: Likewise.
3951
3952 2000-03-21  Ben Elliston  <bje@redhat.com>
3953
3954         * doc/internals.texi (Source file overview): Document.
3955
3956         * Makefile.am (GUILEDIR): Remove.
3957         (CGEN): Ditto. Callers use $(GUILE) instead.
3958         (GUILEFLAGS): Ditto.
3959         (CGENFILES): Ditto.
3960         (APPDESCFILES): Ditto.
3961         (OPCODESFILES): Ditto.
3962         (SIMFILES): Ditto.
3963         (pkgdata_SCRIPTS): Ditto.
3964         (stamp-cgen): Remove target.
3965         * Makefile.in: Regenerate.
3966
3967         * configure.in: Remove header and library tests.
3968         * configure: Regenerate.
3969         * config.in: Likewise.
3970
3971 2000-03-20  Ben Elliston  <bje@redhat.com>
3972
3973         * read.scm: Cease loading "hob-sup.scm".
3974         * utils.scm: Inherit the fastcall family of procedures (for now).
3975         * hob-sup.scm: Remove.
3976
3977 2000-03-20  Ben Elliston  <bje@redhat.com>
3978
3979         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3980         * configure: Regenerate.
3981         * gdbinit.in: Remove.
3982
3983 2000-03-17  Ben Elliston  <bje@redhat.com>
3984
3985         * Makefile.am (CGEN): Use guile, not cgen.
3986         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3987         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3988         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3989         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3990         (HOB_OBJS): Likewise.
3991         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3992         (CGENOBJS): Likewise.
3993         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3994         (hobbit, hobbit.o, hobbit.c): Remove targets.
3995         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3996         (CLEANFILES): Update.
3997         * acconfig.h (WITH_HOBBIT): Remove.
3998         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3999         option --with-cgen-hobbit.
4000         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
4001         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
4002         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
4003         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
4004         * Makefile.in: Regenerate.
4005         * config.in: Likewise.
4006         * aclocal.m4: Likewise.
4007         * configure: Likewise.
4008         * README (Hobbit support): Remove.
4009         * doc/internals.texi (Conventions): Do not mention Hobbit.
4010         * doc/porting.texi (Supported Guile versions): Likewise.
4011
4012 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
4013
4014         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4015         callback convention to new sid sidutil::basic_cpu code.
4016         (-gen-sfrag-engine-fn): Ditto.
4017         * sid.scm (-create-virtual-insns!): Ditto.
4018         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4019         mode.
4020         (cxmake-skip): Implement properly for pbb mode.
4021
4022 2000-03-03  Ben Elliston  <bje@redhat.com>
4023
4024         * doc/internals.texi: New file.
4025
4026 2000-02-29  Ben Elliston  <bje@redhat.com>
4027
4028         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4029         * doc/porting.texi: Formatting tweaks.
4030
4031 2000-02-25  Nick Clifton  <nickc@cygnus.com>
4032
4033         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4034         field.
4035
4036 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4037
4038         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4039         mode.
4040
4041 2000-02-23  Andrew Haley  <aph@cygnus.com>
4042
4043         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4044         instruction.
4045
4046 2000-02-24  Ben Elliston  <bje@redhat.com>
4047
4048         * doc/rtl.texi (Derived operands): Add some cindex entries.
4049
4050 2000-02-23  Ben Elliston  <bje@redhat.com>
4051
4052         * ia32.cpu (dndo): Move general purpose macro from here ..
4053         * simplify.inc (dndo): .. to here.
4054
4055 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4056
4057         * arm.cpu (h-tbit): Add c-call setter function.
4058         (h-mbits): Ditto.
4059
4060 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4061
4062         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4063         (-frag-cost-compute!): Ditto.
4064         * utils.scm (copyright-cygnus): Add Y2K.
4065         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4066
4067 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4068
4069         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4070         flags field of the CGEN_CPU_TABLE structure.
4071
4072 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4073
4074         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4075         All references updated.
4076
4077 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4078
4079         * ia32.cpu: Rewrite addressing mode support.
4080
4081         * ifield.scm (<ifield>): New member `follows'.
4082         (ifld-known-values): New proc.
4083         (<ifield>): New method set-word-offset!.
4084         (ifld-set-word-offset!): New proc.
4085         (ifld-new-word-offset): New proc.
4086         (<ifield>): New method next-word.
4087         (<multi-ifield>): New method next-word.
4088         (ifld-next-word): New proc.
4089         (ifld-precedes?): New proc.
4090         (-ifield-parse): New args word-offset,word-length,follows.
4091         All callers updated.  Handle CISC-style vs RISC-style ifields.
4092         (-ifield-read): Recognize word-offset,word-length,follows specs.
4093         (-ifld-parse-follows): New proc.
4094         (-multi-ifield-make-default-insert): New proc.
4095         (-multi-ifield-make-default-extract): New proc.
4096         (-multi-ifield-parse): Provide default values for insert,extract
4097         handlers if not specified.
4098         (<derived-ifield>): New class.
4099         (derived-ifield?): New predicate.
4100         (ifld-derived-operand?): New predicate.
4101         (f-anyof): New global.
4102         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4103         (f-derived,ifld-derived?): Delete.
4104         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4105         * insn.scm (-sub-insn-ifields): New proc.
4106         (-sub-insn-make!): New proc.
4107         (multi-insn-instantiate!): Provide initial implementation.
4108         (-insn-parse): If insn contains "anyof" operands, create a
4109         <multi-insn> object instead of a plain <insn>.
4110         (-parse-insn-format-symbol): Rewrite derived operand handling.
4111         Add anyof operand handling.
4112         (-parse-insn-format-ifield-spec): Rewrite.
4113         (-parse-insn-format-operand-spec): Delete.
4114         (-parse-insn-format-list): Delete support for `(operand value)'.
4115         (anyof-operand-format?): Replaces derived-operand-format?.
4116         * operand.scm (-operand-parse-getter): Improve error messages.
4117         (-operand-parse-setter): Ditto.
4118         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4119         ifield-assertion.
4120         (<anyof-operand>): Change baseclass from <derived-operand> to
4121         <operand>.  Delete member values.  New members base-ifield,choices.
4122         (anyof-operand?): New predicate.
4123         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4124         (-derived-operand-parse): Rewrite.
4125         (-derived-operand-read): Rewrite.
4126         (-anyof-parse-choice): New proc.
4127         (-anyof-operand-parse): Rewrite.
4128         (-anyof-operand-read,define-anyof-operand): New procs.
4129         (<anyof-value>): Rewrite.
4130         (-anyof-initial-known): New proc.
4131         (anyof-satisfies-assertions?): New proc.
4132         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4133         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4134         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4135         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4136         (-anyof-value-from-derived): New proc.
4137         (-anyof-all-choices-1,anyof-all-choices): New procs.
4138         (operand-init!): Create define-anyof-operand reader command.
4139
4140         * insn (syntax-break-out): Take syntax as argument instead of insn.
4141         All callers updated.
4142         (syntax-make): Move here, from ???.
4143
4144         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4145         bitrange-foo. All uses updated.
4146         (bitrange-next-word): New proc.
4147
4148         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4149
4150         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4151         (rtx-make-const,rtx-make-enum): New procs.
4152         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4153         (rtx-mem-addr,rtx-mem-sel): New procs.
4154         (rtx-change-address): New proc.
4155         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4156         (rtx-make-set,rtx-single-set?): New procs.
4157         (rtx-combine): New proc.
4158
4159         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4160         (rtx-traverse-with-locals): Ditto.
4161         (-rtx-traverse,-rtx-traverse-*): Ditto.
4162
4163         * rtl.scm (define-subr): New proc.
4164         (rtl-init!): Create reader command `define-subr'.
4165
4166         * cos.c (_object_mi_p): Ensure argument is an object.
4167         (indent): New function.
4168         (_object_print_elms): Add pretty-printing support.
4169         (_object_print): Ditto.
4170
4171         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4172         (*floats-s->c-fun-table*): Ditto.
4173         * hobbit.c,hobbit.h: Rebuild.
4174         * hob-sup.c (fastcall7): New proc.
4175         * hob-sup.h (fastcall7): Declare.
4176         * hob-sup.scm (fastcall7): New macro.
4177
4178         * mach.scm (<arch>): New member subr-list.
4179         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4180         (arch-finish!): Reverse recorded subr list.
4181
4182         * read.scm (debug-env): New global.
4183         (debug-var-names,debug-var,debug-repl-env): New procs.
4184         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4185         (debug-quit): Renamed from `continue'.
4186
4187         * simplify.inc (dsmf): New pmacro.
4188
4189         * utils.scm (plus-scan): New proc.
4190         (split-bits): Rewrite.
4191         (split-value): New proc.
4192
4193 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4194
4195         * doc/Makefile.am (DOCFILES): Add notes.texi.
4196         * doc/Makefile.in: Rebuild.
4197
4198 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4199
4200         * ifield.scm (ifld-derived?): New proc.
4201         (f-derived): New global.
4202         (ifield-builtin!): Create ifield f-derived.
4203         (<multi-insn>): New class.
4204         (multi-insn?): New predicate.
4205         (multi-insn-instantiate!): New proc.
4206         (-insn-parse): Create <multi-insn> objects for insns with derived
4207         ifields.
4208         (-parse-insn-format-symbol): Handle derived ifields.
4209         (-parse-insn-format-ifield-spec): New proc.
4210         (-parse-insn-format-operand-spec): New proc.
4211         (-parse-insn-format-list): Simplify.
4212         (-parse-insn-format): No longer allow (ifield-object value) spec.
4213         (derived-operand-format?): New proc.
4214         (insn-alias?): New proc.
4215         (non-alias-insns): Rewrite.
4216         (insn-real?): Renamed from real-insn?, all callers updated.
4217         (virutal-insns): Rewrite.
4218         (multi-insns): New proc.
4219         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4220         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4221         Return #f if operand doesn't have an index or if index is not an
4222         ifield.
4223         (hw-index-anyof): New proc.
4224         (-operand-parse): Allow integer indices.
4225         (<derived-operand>): New class.
4226         (derived-operand?): New predicate.
4227         (<anyof-operand>): New class.
4228         (<anyof-value>): New class.
4229         (-anyof-parse-value,-anyof-operand-parse): New procs.
4230         (-derived-operand-parse,-derived-operand-read): New procs.
4231         (define-derived-operand,define-full-derived-operand): New procs.
4232         (operand-init!): New reader command define-derived-operand.
4233
4234         * utils.scm (list-take): Handle negative amount.
4235         (element?): Rewrite.
4236
4237 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4238
4239         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4240
4241 1999-10-04  Richard Henderson  <rth@cygnus.com>
4242
4243         * ia64.cpu: Checkpoint.
4244
4245 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4246
4247         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4248
4249         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4250         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4251
4252 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4253
4254         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4255         PC returned by sim_engine_invalid_insn.
4256
4257 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4258
4259         * ia32.cpu: New file.
4260
4261 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4262
4263         * utils.scm (bit-set?): Fix off by one error.
4264
4265         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4266
4267         * rtl.scm (hw): Check for valid hardware element before trying to
4268         get its mode.
4269
4270         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4271         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4272         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4273         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4274         compute_operand2_foo.
4275
4276         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4277         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4278         Call delayed_branch/branch methods instead of assigning to `vpc'.
4279         (<hw-pc>,cxmake-skip): Call skip method.
4280         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4281         (<pc>,cxmake-skip): Ditto.
4282         (-create-virtual-insns!): Ditto.
4283         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4284         (op:write): Ditto.
4285         (op:record-profile): Specify #:output-language "c++".
4286         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4287         @arch@_insn_attr.
4288         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4289         Define enums here.
4290         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4291         (gen-semantic-code): Ditto.
4292         (-gen-sem-case,-gen-sfrag-code): Ditto.
4293         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4294         (cgen-cpu.h): File is now #included by main cpu class, rather than
4295         subclassing.
4296         (cgen-defs.h): New proc.
4297         (-gen-scache-semantic-fn): Change result type to sem_status.
4298         New local `status'.  Call done_cti_insn/done_insn method at end.
4299         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4300         cgen-ops.h.
4301         (cgen-sem-switch.cxx): Ditto.
4302         * sid-decode.scm (-gen-idesc-decls): Update return type of
4303         @prefix@_sem_fn.
4304         (cgen-decode.h): Add using namespace @arch@.
4305         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4306
4307         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4308         (estate-output-language-c?,estate-output-language-c++?): New procs.
4309         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4310         (estate-make-for-normal-rtl-c++): New proc.
4311         (rtl-c++-parsed,rtl-c++): New proc.
4312         (s-c-call): Invoke cpu class method if c++.
4313         (join): Use s-c-raw-call.
4314
4315         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4316         (nop): Rewrite.
4317
4318         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4319         * rtl.scm (<eval-state>): New member `modifiers'.
4320         (<eval-state>,vmake!): Handle #:modifiers.
4321         (estate-with-modifiers): New proc.
4322
4323         * rtl.scm (rtx-side-effects?): New proc.
4324         (rtx-canonical-bool): Don't change expr if it has side effects.
4325         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4326         better.
4327
4328 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4329
4330         * sim.scm (gen-scache-type): Fix typo in last patch.
4331
4332 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4333
4334         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4335
4336 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4337
4338         * sid.scm (<hw-pc>,cxmake-skip): New method.
4339         (<pc>,cxmake-skip): New method.
4340
4341         * decode.scm (decode-build-table): Delete args startbit,index-list.
4342         All callers updated.
4343         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4344         All callers updated.
4345         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4346         to decode-get-best-bits.
4347         * sid-decode.scm (-gen-decode-fn): Ditto.
4348
4349         * hardware.scm (hw-bits): New proc.
4350         (-hw-parse): New arg layout.  All callers updated.
4351         (define-full-hardware): New arg layout.  All callers updated.
4352         (-hw-validate-layout): New proc.
4353         (-hw-create-[gs]etter-from-layout): New procs.
4354         (<hw-register>,parse!): Handle layout spec.
4355         * types.scm (type-bits): New proc.
4356
4357         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4358         UNARY, BINARY, TRINARY rtxs.
4359
4360         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4361         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4362         Support '- as "unused spot" indicator.
4363
4364 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4365
4366         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4367
4368 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4369
4370         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4371
4372         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4373         construction.
4374         (tstate-make): New arg `depth'.  All callers updated.
4375         (tstate-depth,tstate-set-depth!): New procs.
4376         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4377         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4378         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4379
4380 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4381
4382         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4383         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4384         * utils-sim.scm: Decoder generator support moved here.
4385         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4386         (-gen-decoder-switch): Sort entries for more fall-throughs.
4387
4388         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4389         * Makefile.in: Rebuild.
4390         * sim-test.scm (build-sim-testcase): Add logging message.
4391         * dev.scm (cload): Recognize SIM-TEST application.
4392         (load-stest): Set APPLICATION to SIM-TEST.
4393
4394         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4395
4396         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4397         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4398         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4399
4400         * insn.scm (syntax-break-out): Handle ${foo}.
4401
4402 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4403
4404         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4405         (bin_PROGRAMS): Define.
4406         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4407         (cgen-hob.c): Prepend $(srcdir)/ here.
4408         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4409         (libcpu_a_SOURCES): Delete.
4410         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4411         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4412         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4413         Add AC_CHECK_LIB(guile,main).
4414         * Makefile.in: Rebuild.
4415         * doc/Makefile.in: Rebuild.
4416         * aclocal.m4: Rebuild.
4417         * config.in: Rebuild.
4418         * configure: Rebuild.
4419
4420 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4421
4422         Rename rtx functions from name: to name, accept optional leading
4423         modifier and mode.
4424         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4425         * attr.scm (-attr-eval): Update.
4426         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4427         (<hw-register>,mode-ok?): Disallow VOID.
4428         (<hw-immediate>,mode-ok?): Disallow VOID.
4429         (<hw-address>,mode-ok?): Disallow VOID.
4430         * mode.scm (mode-name?): New proc.
4431         (VOID): Renamed from VM.
4432         (DFLT): Renamed from DM.
4433         (mode-builtin!): Update.
4434         * opcodes.scm (<ifield>,gen-insert): Update.
4435         (<ifield>,gen-extract): Update.
4436         (<multi-ifield>,gen-insert,gen-extract): Update.
4437         * operand.scm (op:mode): Update.
4438         (<pc>,make!): Update.
4439         (op:new-mode): Update.
4440         (-operand-read): Update.
4441         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4442         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4443         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4444         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4445         (rtx-make): Call -rtx-munge-mode&options.
4446         (rtx accessors): Rewrite.
4447         (rtx-pretty-name): Update.
4448         (-rtx-traverse-*): Update.
4449         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4450         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4451         (-rtx-make-traverse-table): Update.
4452         (-rtx-traverse-operands): Update.
4453         (-rtx-option?,-rtx-option-list?): New procs.
4454         (-rtx-munge-mode&options): New proc.
4455         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4456         (-rtx-traverse): Update.
4457         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4458         (rtx-compile-time-constant?): Update.
4459         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4460         (rtx-value): Update.
4461         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4462         * rtx-funcs.scm (*): Update.
4463         * rtl-c.scm (rtl-c-get): Update.
4464         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4465         (s-c-call,s-c-raw-call): Update.
4466         (s-boolifop,s-convop,s-if,s-cond): Update.
4467         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4468         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4469         (s-parallel,s-sequence): Update.
4470         (rtl-c-build-table): Update.
4471         * sem-frags.scm (-frag-hash-compute!): Update.
4472         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4473         for temporary bug compatibility with previous version.
4474         (-frag-expr-locals,-frag-expr-stmts): Update.
4475         (-frag-compute-desired-frags,-frag-pick-best): Update.
4476         * semantics.scm (-simplify-expr-fn): Update.
4477         (rtx-simplify): Update.
4478         (-rtx-ref-type): Update.  Account for modifiers.
4479         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4480         (-build-ifield-operand!): Update.
4481         (-build-known-values): Update.
4482         (semantic-compile): Update.
4483         (-gen-reg-access-defns): Update.
4484         (gen-semantic-code,-gen-sem-case): Update.
4485         (-gen-sfrag-code,-gen-sfrag-case): Update.
4486         * sim-cpu (gen-semantic-code): Update.
4487         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4488         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4489         (-hw-cxmake-get): Update.
4490         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4491         (<hw-index>,cxmake-get): Update.
4492         (<operand>,gen-type,gen-read,cxmake-get): Update.
4493         (<operand>,gen-set-quiet,gen-set-trace): Update.
4494         (<pc>,cxmake-get): Update.
4495         (sim-finish!): Update.
4496         * utils-gen.scm (-gen-ifld-extract-base): Update.
4497         (-gen-ifld-extract-beyond): Update.
4498         (gen-multi-ifld-extract): Update.
4499         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4500         * sid.scm (<hw-pc>,gen-write): Update.
4501         (-gen-decode-insn-globals): Update.
4502         (-hw-cxmake-get): Update.
4503         (<hw-register>,cxmake-get-raw): Update.
4504         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4505         (<hw-index>,cxmake-get): Update.
4506         (<operand>,gen-type,gen-read,cxmake-get): Update.
4507         (<operand>,gen-set-quiet,gen-set-trace): Update.
4508         (<pc>,cxmake-get): Update.
4509         (-create-virtual-insns!): Update.
4510         (-decode-split-build-assertion): Update.
4511         * *.cpu: Update.
4512         * simplify.inc: Update.
4513
4514 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4515
4516         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4517         Prefix queue function name with sim_ instead of @cpu@_.
4518
4519         * sim.scm (-with-parallel-only?): New global.
4520         (option-init!): Initialize it.
4521         (option-set!): Set it.
4522         (with-parallel-only?): New proc.
4523         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4524         and writeback markers if with-parallel-only.
4525         (-gen-idesc-init-fn): Update.
4526         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4527         with-generic-write.
4528
4529 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4530
4531         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4532         with the invalid insn handler.
4533
4534         * utils.scm (list-maybe-ref): New proc.
4535
4536         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4537         define-arch.
4538         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4539
4540         * i960.cpu (test*-*): Delete `expr' arg.
4541         (test-op,branch-op): Update.
4542
4543 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4544
4545         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4546         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4547         updated.
4548         (gen-reg-access-defn): Ditto.
4549         (-gen-hw-addr): Rewrite.
4550         (-op-gen-queued-write): Rewrite.
4551         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4552         (-gen-scache-semantic-fn): Handle with-generic-write.
4553         (-gen-no-scache-semantic-fn): Ditto.
4554
4555 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4556
4557         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4558
4559         * sim.scm (-with-generic-write?): New global.
4560         (option-init!): Initialize it.
4561         (option-set!): Set it.
4562         (with-generic-write?): New proc.
4563         (-gen-hw-addr): New proc.
4564         (-op-gen-queued-write): New proc.
4565         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4566
4567         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4568         turned off.
4569         (-gen-sem-switch): Preserve existing with-parallel? value.
4570         (-gen-sem-parallel-switch): Ditto.
4571         (-gen-write-case): Add /indent support.
4572         (cgen-write.c): Rewrite.
4573
4574         * utils.scm (-current-print-state): New global.
4575         (make-print-state): New proc.
4576         (pstate-indent,pstate-set-indent!): New procs.
4577         (pstate-cmd?,pstate-cmd-do): New procs.
4578         (/indent): New global.
4579         (/indent-set,/indent-add): New procs.
4580         (string-write): Set -current-print-state.
4581         (-string-write): New arg pstate, all callers updated.
4582         Handle print-state commands.
4583         (-string-list-flatten): New proc.
4584         (string-list->string): Use it.
4585
4586         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4587         (-gen-sem-fn-table-entry): New proc.
4588         (-gen-semantic-fn-table): New proc.
4589         (-gen-scache-semantic-fn): Make fn static.
4590         (-gen-no-scache-semantic-fn): Ditto.
4591         (cgen-semantics.c): Define macro SEM_FN_NAME.
4592         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4593         FAST,FULL.  Update @cpu@_insn_sem contents.
4594         (-gen-semf-fn-name): Delete.
4595         (-gen-sem-fn-decls): Delete.
4596         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4597         @cpu@_semf_init_idesc_table.
4598         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4599         handlers here.
4600         (cgen-decode.h): Print sfmt enum.
4601         * sid-decode.scm (-gen-semf-fn-name): Delete.
4602         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4603
4604         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4605         (ifmt-compute!): Ditto.
4606         * sim-decode.scm (-gen-decoder-switch): Ditto.
4607         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4608         (-gen-decoder-switch): Ditto.
4609
4610         * insn.scm (insn-virtual?): New proc.
4611
4612         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4613         convert to string.
4614         * mach.scm (<arch>): attr-list is now a pair of lists.
4615         (current-attr-list): Rewrite.
4616         (current-attr-add!,current-attr-lookup): Rewrite.
4617         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4618
4619 1999-08-06  Richard Henderson  <rth@cygnus.com>
4620
4621         * ia64.cpu: Initial checkpoint.
4622
4623 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4624
4625         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4626         (pmacros-init!): Update .apply help string.
4627
4628 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4629
4630         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4631         (<hw-pc>,cxmake-skip): New method.
4632         (<pc>,cxmake-skip): New method.
4633         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4634         (gen-argbuf-type): New member `skip_count'.
4635         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4636         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4637
4638         * utils-sim.scm: New file.
4639         * dev.scm (load-sim): Load it.
4640         (load-sid): Load it.
4641         * cgen-sid.scm: Load it.
4642         * cgen-sim.scm: Load it.
4643         * iformat.scm (<sformat>): New member sbuf, not initialized by
4644         default make.
4645         * rtx-funcs.scm (skip): Rewrite.
4646         * rtl-c.scm (skip): Rewrite.
4647         * m32r.cpu (sc,snc): Update `skip' usage.
4648         * mode.scm (mode-real-mode): New proc.
4649         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4650         Distinguish fragments by the <sformat-abuf> they use.
4651         * sim.scm (gen-profile-index-type): Delete.
4652         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4653         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4654         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4655         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4656         (-gen-argbuf-elm): Rewrite.
4657         (-gen-argbuf-hw-elm): Delete.
4658         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4659         of each sfmt.
4660         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4661         (sim-init!): Initialize them.
4662         (sim-analyze-insns!): Set them.
4663         (current-sbuf-list): New proc.
4664         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4665         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4666         * sim-model.scm (-gen-model-insn-fn): Ditto.
4667         * sim-decode.scm (-gen-extract-decls): Delete.
4668         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4669         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4670         sim.scm.
4671         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4672         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4673         (-gen-op-extract,-gen-op-trace-extract): New procs.
4674         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4675         gen-sfmt-argvars-foo and rewrite.
4676         (-gen-record-args): Rewrite.
4677         (-gen-extract-case): Tweak.
4678         * sid.scm (gen-profile-index-type): Delete.
4679         (ifield argbuf support): Move to utils-sim.scm.
4680         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4681         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4682         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4683         (-sim-sformat-argbuf-list): New global.
4684         (sim-init!): Initialize it.
4685         (sim-analyze-insns!): Set it.
4686         (current-sbuf-list): New proc.
4687         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4688         (-gen-argbuf-hw-elm): Delete.
4689         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4690         of each sfmt.
4691         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4692         (-gen-extract-decls): Delete.
4693         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4694         sid.scm.
4695         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4696         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4697         (-gen-op-extract,-gen-op-trace-extract): New procs.
4698         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4699         gen-sfmt-argvars-foo and rewrite.
4700         (-gen-record-args): Rewrite.
4701         (-gen-extract-case): Tweak.
4702
4703         * cgen-gh.c (gh_putc,gh_puts): New functions.
4704         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4705         * cos.c (_object_print_elms,_object_print): Use them.
4706         * hob-sup.c (fastcall_print): Use them.
4707         * configure.in: Check for scm_gen_puts, scm_puts.
4708         * config.in: Rebuild.
4709         * configure: Rebuild.
4710         * aclocal.m4: Rebuild.
4711         * Makefile.in: Rebuild.
4712
4713         * dev.scm (load-opc): Use load instead of maybe-load.
4714         (load-gtest,load-sim,load-stest): Ditto.
4715         (load-sid): Ditto.
4716
4717 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4718
4719         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4720         up to avoid g++ 'goto crosses initialization' warning.
4721         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4722         (-gen-sfrag-case): Update use of NEXT_FRAG.
4723
4724 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4725
4726         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4727
4728         * read.scm: Load sem-frags.scm.
4729         * sem-frags.scm (*): Lots rewritten.
4730         * sid.scm (-with-sem-frags?): New global
4731         (with-sem-frags?): New proc.
4732         (option-init!): Initialize -with-sem-frags?.
4733         (option-set!): Recognize with-sem-frags.
4734         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4735         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4736         if asked to.
4737         (-gen-sfrag-engine-decls): New proc.
4738         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4739         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4740         (-gen-sfrag-engine): New proc.
4741         (-gen-sem-case): Emit setup-semantics if specified.
4742         (-gen-sem-switch-engine): Update init/use of computed goto label.
4743         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4744         from local vars.
4745         (-gen-idesc-decls): Replace sem_address with cgoto.
4746         (-gen-scache-decls): Rewrite definition of `execute' member.
4747         * arm.cpu (arm isa): Enable decode-splits.
4748         * arm7.cpu (multiply insns): Rename result to mul-result.
4749
4750         Rename decode-specialize to decode-split.
4751         * decode.scm (*): Update.
4752         * insn.scm (*): Update.
4753         * mach.scm (*): Update.
4754         * sid.scm (*): Update.
4755
4756 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4757
4758         Record objects as a smob.
4759         * cos.c (scm_tc16_object): New static global.
4760         (cos_init): Initialize it.
4761         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4762         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4763         (_object_tag): Delete.
4764         (_object_make_smob): New function.
4765         (_object_make_x,_object_make_with_values_x): Rewrite.
4766         (_object_elements,_object_class_desc): Rewrite.
4767         (_object_copy,object_p): Rewrite.
4768         (_object_specialize): Rewrite.
4769         (_object_print_elms,_object_print): New functions.
4770         (object_smob): New static global.
4771         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4772
4773         * cos.c (_make_x_symbol): New static global.
4774         (object_make): Use it.
4775         (cos_init): Initialize it.
4776
4777 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4778
4779         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4780         instead to determine whether to use FLD macro.
4781         (<rtl-c-eval-state>): New member ifield-var?.
4782         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4783         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4784         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4785
4786         * rtl.scm (rtx-sequence-assq-locals): New proc.
4787
4788         * cos.scm (-object-error): Don't crash on non-objects.
4789
4790         * Makefile.am (CLEANFILES): Add hobbit.
4791         * Makefile.in: Rebuild.
4792
4793         * rtl-c.scm (s-c-call): Delete unnecessary code.
4794
4795 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4796
4797         * rtl-c.scm (ifield): Always reference value via `FLD'.
4798
4799         * cos.c (elm_bound_p): Return problem SCM boolean values.
4800
4801         * utils-cgen.scm (display-argv): New proc.
4802         * cgen-opc.scm (cgen): Call it.
4803         * cgen-sim.scm (cgen): Ditto.
4804         * cgen-gas.scm (cgen): Ditto.
4805         * cgen-stest.scm (cgen): Ditto.
4806         * cgen-sid.scm (cgen): Ditto.
4807
4808 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4809
4810         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4811         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4812         (-gen-extract-switch): Initialize result to 1.
4813         * opcodes.scm (gen-ifield-default-type): New proc.
4814         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4815         updated.
4816         (<hw-index>,gen-insert): Handle non-ifield indices.
4817         (<hw-index>,gen-extract): Ditto.
4818         (<hw-asm>,gen-parse): Ditto.
4819         (<hw-asm>,gen-print): Ditto.
4820         (<keyword>,gen-parse): Ditto.
4821         (<keyword>,gen-print): Ditto.
4822         (<operand>,gen-fget): Ditto.
4823         (<operand>,gen-fset): Ditto.
4824
4825         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4826         (-gen-hw-index): Ditto.
4827         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4828         (-gen-hw-index): Ditto.
4829
4830         * sem-frags.scm: New file.
4831
4832         * attr.scm (attr-parse): Add better checking of input.
4833
4834         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4835         All uses updated.
4836         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4837
4838         * ifield.scm (ifld-nil?): New proc.
4839
4840         * operand.scm (<operand>): New members getter,setter.
4841         (<operand>,make!): New args getter,setter.  All uses updated.
4842         (op:getter,op:setter): New procs.
4843         (<hw-index>,field-start): Return 0 for non-ifield indices.
4844         (<hw-index>,field-length): Return 0 for non-ifield indices.
4845         (-operand-parse-getter,-operand-parse-setter): New procs.
4846         (-operand-parse): New args getter,setter.  All callers updated.
4847         Always use hw-index-scalar for scalar operands.
4848         (-operand-read): Handle getter,setter.
4849         (define-full-operand): New args getter,setter.  All uses updated.
4850         * semantics.scm (-build-ifield-operand!): Update.
4851         (-build-index-of-operand!): Update.
4852         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4853         * simplify.inc (define-normal-operand): Update.
4854
4855         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4856         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4857         (s-binop,s-cmpop,s-convop): Ditto.
4858         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4859         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4860         (fcc-tests): New insn-enum.
4861         (fcc-value): Rename from fcc-type.
4862         * sparcfpu.cpu: New file.  All fp support moved here.
4863
4864         * rtl.scm (<rtx-func>): New member class.
4865         (rtx-class-*?): New procs.
4866         (def-rtx-node): New arg class.  All callers updated.
4867         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4868         * rtx-funcs.scm (*): Specify class.
4869
4870         * utils-cgen.scm (context-make-reader): New proc.
4871
4872         * utils.scm (assert-fail-msg): New variable.
4873         (assert): Use it.
4874         (list-drop,list-tail-drop): New procs.
4875
4876 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4877
4878         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4879         CGEN_MIN_INSN_SIZE deleted on March 22.
4880
4881         * ifield.scm (<ifield>,needed-iflds): New method.
4882         (<multi-ifield>,needed-iflds): New method.
4883         (ifld-needed-iflds): New proc.
4884         (multi-ifield?): New proc.
4885         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4886         (-sfmt-search-key): Include insn length in key.
4887         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4888         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4889         (-ifmt-lookup-ifmt!): Compute key here.
4890         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4891         All callers updated.
4892         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4893         All callers updated.
4894         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4895         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4896         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4897         to ifmt-build.
4898         * operand.scm (op-iflds-used): New proc.
4899         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4900         and sim-cpu.scm.
4901         And from sid.scm,sid-cpu.scm as well.
4902         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4903         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4904         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4905         (gen-extracted-ifld-value): Ditto.
4906         (-extract-chunk-specs): Ditto.
4907         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4908         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4909         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4910         (-extract-insert-subfields): New function.
4911         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4912         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4913         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4914         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4915         gen-extract-foo.
4916         (-gen-no-scache-semantic-fn): Ditto.
4917         (-gen-sem-case): Ditto.
4918         (-gen-read-case): Update calls to gen-define-ifields,
4919         gen-extract-ifields.
4920         * sim-decode.scm (-gen-record-args): Update.
4921         (-gen-sfmt-argvars-assigns): Update.
4922         (-gen-extract-case): Update.
4923         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4924         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4925         gen-extract-foo.
4926         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4927         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4928         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4929         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4930         gen-define-ifields, gen-extract-ifields.
4931         (-gen-record-args): Update.
4932         (gen-sfmt-argvars-assigns): Update.
4933         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4934         with gen-define-ifields.  Ditto for gen-extract-foo.
4935         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4936         procs rather than method calls.
4937
4938 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4939
4940         * sid.scm (-create-virtual-insns!): New local `context', pass it
4941         to insn-read.
4942
4943         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4944         (operand name) not (operand object), (local name) not (local object).
4945         (rtx-traverse-with-locals): New proc.
4946         (-compile-expr-fn): New proc.
4947         (rtx-compile): Rewrite.
4948         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4949         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4950         (rtl-c-set-trace): Ditto.
4951         (operand define-fn): Recognize operand name argument.
4952         (local define-fn): Recognize sequence temp name argument.
4953         * rtx-funcs.scm (operand): Argument is operand name, not object,
4954         so call current-op-lookup.
4955         (local): Similarily, so call rtx-temp-lookup.
4956
4957         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4958         (rtx-operand?): Ditto.
4959         (rtx-pretty-name): Ditto.
4960         (rtx-local-obj): Flag symbol argument as an error.
4961         (rtx-local-name): New proc.
4962         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4963
4964         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4965
4966         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4967         updated.
4968
4969         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4970         (and: QI rd #xff).
4971
4972         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4973         (*floats-s->c-fun-table*): Ditto.
4974         * hobbit.c,hobbit.h: Rebuild.
4975         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4976         * semantics.scm (rtx-simplify): Use /fastcall-make.
4977
4978         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4979
4980         * insn.scm (<insn>): Delete members condition, compiled-condition.
4981         (<insn>,make!): Update
4982         (<insn> getters,setters): Update.
4983         (-insn-parse,insn-read,define-full-insn): Update.
4984         * minsn.scm (minsn-make-alias): Update.
4985         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4986         (ifmt-compute!): Ditto.
4987         * sim.scm (sim-finish!): Update.
4988         * simplify.inc: (define-normal-insn): Update.
4989         * sid-cpu.scm (gen-semantic-code): Update.
4990
4991         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4992         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4993         (ifmt-compute!): Ditto.
4994
4995 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4996
4997         * minsn.scm (minsn-compute-iflds): Print better error message for
4998         missing ifields.
4999
5000 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
5001
5002         * rtl.scm (tstate->estate): Don't copy over expr-fn.
5003
5004         * Makefile.am (HOBFLAGS): New variable.
5005         (cgen-hob.c): Use it.
5006         (hobbit.c): Use it.
5007         (libcpu_a_SOURCES): Add hob-sup.c.
5008         (hob-sup.o): New rule.
5009         * Makefile.in: Rebuild.
5010         * cgen.c: #include hob-sup.h.
5011         (cgen_init_c): Call hobbit_init_support.
5012         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5013         (*special-scm->c-functions*): Add them.
5014         (display-c-expression): Handle *c-symbol*.
5015         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5016         (*floats-s->c-fun-table*): Ditto.
5017         (normalize): Recognize /fastcall-make.
5018         (normalize-fastcall-make): New proc.
5019         * hobbit.c,hobbit.h: Rebuild.
5020         * hob-sup.scm: New file.
5021         * hob-sup.c: New file.
5022         * hob-sup.h: New file.
5023         * read.scm: Load hob-sup.scm.
5024         * rtl.scm (-rtx-name-list): New variable.
5025         (rtx-name-list): New proc.
5026         (rtx-lookup): Try symbol first.
5027         (def-rtx-node): Add name to -rtx-name-list.
5028         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5029         (-rtx-traverse-anymode): New proc.
5030         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5031         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5032         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5033         (-rtx-traverse-{symornum,object}): New procs.
5034         (-rtx-make-traverse-table): Rewrite.
5035         (-rtx-traverse-operands): Rewrite arg-types handling.
5036         Handle #f result of traverser.
5037         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5038         Move debug handling here.
5039         (-rtx-traverse-debug): Delete.
5040         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5041         for each rtx.
5042         * semantics.scm (semantic-compile:process-expr!): Fix call to
5043         -rtx-traverse.
5044         * utils.scm (map1-improper): New proc.
5045
5046 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5047
5048         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5049         (h-mbits): Ditto.
5050         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5051         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5052         (<operand>,cxmake-get): Tweak.
5053         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5054
5055 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5056
5057         * thumb.cpu (dnti): Delete timing spec.
5058         (all insn): Update.
5059
5060         * arm.cpu (arm isa): New fields condition, setup-semantics.
5061         (thumb isa): New field setup-semantics.
5062         (h-gr): Add attribute CACHE-ADDR.
5063         * arm7.cpu (dnai): Delete condition.
5064         (eval-cond): Delete.
5065
5066         * mach.scm (<isa>): New member setup-semantics.
5067         (-isa-parse-setup-semantics): New proc.
5068         (-isa-parse): New arg setup-semantics.
5069         (-isa-read): Recognize setup-semantics.
5070
5071         * sid-cpu.scm (gen-extract-fields): Split into two:
5072         gen-extract-ifields, gen-extract-ifmt-ifields.
5073         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5074         tracing begin/end messages (done by caller now).
5075         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5076         tracing begin/end messages (done by x-before,x-after virtual insns).
5077         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5078         end so don't have to look it up again next time.
5079         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5080         (-decode-expr-ifield-tracking-key): New proc.
5081         (-decode-expr-ifield-tracking): New proc.
5082         (-decode-expr-ifield-values-used): New proc.
5083         (-decode-expr-ifield-mark-used!): New proc.
5084         (-gen-decode-expr-set-itype): New proc.
5085         (-gen-decode-expr-entry): Rewrite.
5086         (-gen-decode-table-entry): New proc.
5087         (-gen-decoder-switch): Use it.
5088         (-gen-virtual-insn-finder): New proc.
5089         (-gen-argbuf-elm): Move here from sid.scm.
5090         (-gen-argbuf-hw-elm): Ditto.
5091         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5092         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5093         conditional-execution isas.
5094         (-gen-decode-fn): Record conditional-exec ifield.
5095         * sid.scm (-current-pbb-engine?): New global.
5096         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5097         (<ifield>,gen-ifld-extract): New arg `indent'.
5098         (<multi-ifield>,gen-ifld-extract): Ditto.
5099         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5100         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5101         (-gen-arch-model-decls): Only scan real insns.
5102         (scache-engine-insns,pbb-engine-insns): New procs.
5103         (-create-virtual-insns!): New proc.
5104         (sim-finish!): Call it.
5105         (-decode-specialize-insn?): New proc.
5106         (-decode-specialize-build-assertion): New proc.
5107         (-decode-specialize-insn-1): New proc.
5108         (-decode-specialize-insn): New proc.
5109         (-fill-sim-insn-list!): New proc.
5110         (sim-analyze!): Create copies of insns to be specialized.
5111         * utils-cgen.scm (obj-set-name!): New proc.
5112
5113         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5114         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5115         semantic-attrs.
5116         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5117         sformats.
5118         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5119         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5120         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5121         (attr): Rewrite test for insn owner.
5122         (member): New rtx function.
5123         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5124         as separate function.
5125         (rtx-ifield?,rtx-ifield-name): New procs.
5126         (rtx-operand-obj): Rewrite.
5127         (rtx-operand-name): New proc.
5128         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5129         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5130         (tstate-make): New args owner, known.  All callers updated.
5131         (tstate-known-lookup): New proc.
5132         (rtx-traverse): New arg owner.  All callers updated.
5133         (rtx-make-bool): New proc.
5134         (rtl-find-ifields): Rewrite.
5135         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5136         * semantics.scm: ... here.
5137         (rtx-const-equal,rtx-const-list-equal): New procs.
5138         (-build-known-values): New proc.
5139         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5140         (semantic-attrs): Ditto.
5141         * rtx-funcs.scm (member,number-list): New rtx functions.
5142
5143         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5144         Rewrite.  Delete arg `all-attrs'. All callers updated.
5145         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5146         updated.
5147         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5148
5149         * decode.scm (subdtable-add): Handle `expr' entries.
5150         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5151         (exprtable-entry-*): Update.
5152         (exprtable-entry-iflds): New proc.
5153         (exprentry-cost): New proc.
5154         (exprtable-sort,-gen-exprtable-name): New procs.
5155         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5156         (exprtable-*): Update.
5157         (-build-decode-table-entry): Don't issue collision warning if all are
5158         specialized insns.  Sort exprtable entries before building table.
5159
5160         * read.scm (-reader-process-expanded-1): Move pretty printing of
5161         input to logging level 4.
5162
5163         * utils.scm (string-list->string): New proc.
5164
5165         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5166         semantics.
5167         (insn-read): Delete leading '-' in name.  All callers updated.
5168         (real-insn?): New proc.
5169         (real-insns): Rewrite.
5170         (insn-has-ifield?): New proc.
5171         (insn-builtin!): Create insn attribute SPECIALIZED.
5172
5173         * mach.scm (<arch>): Delete member app-data.
5174         (current-raw-insn-list): New proc.
5175         (insn-list-car,insn-list-splice!): New procs.
5176         (<decode-specialize>): New class.
5177         (-isa-parse-decode-specialize): New proc.
5178         (-isa-parse-decode-specializes): New proc.
5179         (<isa>): New members `condition', `decode-specializes'.
5180         (-isa-parse-condition): New proc.
5181         (-isa-parse): New args condition, decode-specializes.
5182         (-isa-read): Recognize condition, decode-specializes.
5183         (-isa-add-decode-specialize!): New proc.
5184         (modify-isa): New proc.
5185         (isa-conditional-exec?,state-conditional-exec?): New procs.
5186         (arch-init!): New reader command `modify-isa'.
5187
5188         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5189         (mode-signed,mode-unsigned?): New procs.
5190
5191 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5192
5193         * types.scm (<array>): New method get-shape.
5194         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5195         onto type.
5196         (hw-shape,hw-num-elms): New procs.
5197         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5198         if there's more than 255 registers.
5199         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5200
5201         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5202         with get/set specs.
5203
5204 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5205
5206         * cgen-sid.scm (sim-arguments): Add -X.
5207         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5208         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5209         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5210         Simplify by supporting pbb engine only.
5211         (-gen-sem-switch-init): New proc.
5212         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5213         (cgen-sem-switch.cxx): New proc.
5214         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5215         with with-pbb?.  Support dual scache/pbb engines.
5216         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5217         Support dual scache/pbb engines.
5218         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5219         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5220         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5221
5222 1999-05-10  Ben Elliston  <bje@cygnus.com>
5223
5224         * arm7.cpu: Remove coprocessor related fields, operands and insn
5225         definitions for now. Take the undefined instruction trap instead.
5226         (ldmda-wb): New instruction.
5227         (ldmib-wb): Likewise.
5228         (ldmdb-wb): Likewise.
5229         (stmdb-wb): Likewise.
5230         (stmib-wb): Likewise.
5231         (stmda-wb): Likewise.
5232
5233 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5234
5235         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5236         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5237
5238         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5239         hobbit can't handle optional third arg.
5240
5241 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5242
5243         * arm.cpu (h-tbit): Delete set spec.
5244         (h-mbits): Don't call arm_mbits_set in set spec.
5245         * arm.sim: New file.
5246         * hardware.scm (modify-hardware): New proc.
5247         (hardware-init!): Add modify-hardware command.
5248         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5249         (-hw-gen-set-quiet): Ditto.
5250         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5251         hardware attribute.  Load $arch.sim file if present.
5252         * utils-cgen.scm (keyword-list?): New proc.
5253         (keyword-list->arg-list,arg-list-validate-name): New procs.
5254         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5255
5256         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5257
5258         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5259         @cpu@_cpu_cgen.
5260
5261         * attr.scm (obj-prepend-atlist!): New proc.
5262
5263         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5264
5265         * sid.scm (<operand>,profilable?): Use op:type.
5266         * sim.scm (<operand>,profilable?): Use op:type.
5267
5268 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5269
5270         * utils.scm (find-index,find): Be more stack friendly.
5271
5272         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5273         (bic-imm): Ditto.
5274
5275 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5276
5277         * arm.cpu (h-gr-usr): New hardware element.
5278         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5279         (arm-mode): New keyword.
5280         (h-mbits): Add set spec.
5281         (h-spsr): Implement get/set specs.
5282
5283         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5284         (-reader-process-expanded-1): Pretty print logging output.
5285
5286         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5287         (cgen-cpu.h): Print enums before hardware elements.
5288         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5289         * sid-decode.scm (cgen-decode.cxx): Ditto.
5290         * sid-model.scm (cgen-model.cxx): Ditto.
5291
5292         * utils-cgen.scm (context-error): Accept variable number of
5293         trailing args.
5294
5295         * rtx-funcs.scm (error:): New rtx function.
5296         * rtl-c.scm (s-case-vm): New proc.
5297         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5298         (s-case): Simplify, handle non-VM result.
5299         (error:): New rtx function.
5300
5301 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5302
5303         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5304         (test-hi,test-ls): Fix cbit handling.
5305         (shift-type,h-operand2-shifttype): Move here ...
5306         * arm7.cpu: ... from here.
5307         (set-cond,set-cond-maybe,dnix): Delete, unused.
5308         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5309         * arm.cpu: ... to here.
5310         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5311         (alu-cmn): Use set-add-flags.
5312         (alu-tst): Use set-zn-flags.
5313         (alu-cmp): Use set-sub-flags.
5314         (lsl,lsr,asr): Set condition codes.
5315         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5316         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5317         alu-shift-op.
5318         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5319         All callers updated.
5320         (sub-sp): Rename from add-sp-neg.
5321         (f-lbwl-offset): Delete.
5322         (f-lbwl-hi,f-lbwl-lo): New ifields.
5323         (lbwl-hi,lbwl-lo): Update.
5324         (bl-hi): Add 4 to pc.
5325         (push-reg,pop-reg): Simplify.
5326         (push,push-lr): Push registers in correct order.
5327         (pop,pop-pc): Pop registers in correct order.
5328         (save-reg-inc,load-reg-inc): Simplify.
5329         (ldmia): Save registers in correct order.
5330
5331 1999-04-30  Ben Elliston  <bje@cygnus.com>
5332
5333         * arm7.cpu (f-op-hdt): Remove; unused.
5334         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5335         (f-ror-imm8): New multi-ifield.
5336         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5337         callers updated.
5338         (f-uimm12): New field.
5339         (ror-imm8): New operand.
5340         (uimm12): Likewise.
5341         (hdt-offset8): Reinstate operand.
5342         (offset4-hi,offset4-lo): Remove.
5343         (set-cond): Remove macro; unused.
5344         (set-cond-maybe): Likewise.
5345         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5346         (store-word/byte): Likewise.
5347         (load-halfword): Use hdt-offset8 multifield operand instead of two
5348         4-bit operands that are explicitly combined by semantic code.
5349         (do-halfword-store): Bug fix. Set address when not preindexing.
5350         (store-halfword): Also use hdt-offset8 operand.
5351         (arith-op): Avoid clobbering source registers when one of them is
5352         the destination register.
5353         (arith-imm-op): Likewise.
5354         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5355         (teq-imm): Likewise.
5356         (ldm-p): Rename to ldmdb.
5357         (stm-pw): Rename to stmdb-wb.
5358         (multi-action): New macro; test reg-list bits and execute a
5359         semantic fn if the bit is set.
5360         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5361         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5362         (all insns): Use dnai entries for simplicity rather than dni.
5363         (*): Use short-form of (const ..).
5364
5365 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5366
5367         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5368         member eval to evaluator.
5369         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5370         (tstate-make): Delete arg op-fn.  All callers updated.
5371         (tstate-op-fn,tstate-set-op-fn!): Delete.
5372         (rtx-traverse): Delete op-fn arg.  All callers updated.
5373         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5374         split out of -simplify-for-compilation.
5375
5376         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5377         (cgen_DEPENDENCIES): Add stamp-cgen.
5378         (stamp-cgen): New rule.
5379         * Makefile.in: Rebuild.
5380
5381         * rtl-c.scm (enum:): Define emitter for.
5382         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5383         enums as well.
5384         (rtx-constant-value,rtx-enum-value): New procs.
5385         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5386         (rtx-compile-time-constant?): Return #t for enums.
5387         (rtx-true?,rtx-false?): Handle enums.
5388         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5389         building result by hand.
5390         (rtx-simplify-eq-attr-insn): Ditto.
5391         * rtx-funcs.scm (enum:,enum): New rtx functions.
5392
5393         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5394         aliases-analyzed?.
5395         (arch-analyze-insns!): New proc.
5396         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5397         of calling ifmt-compute! directly.
5398         * sid.scm (-sim-insns-analyzed?): Delete.
5399         (sim-analyze!): Call arch-analyze-insns! instead of calling
5400         ifmt-compute! directly.
5401         * sim.scm (-sim-insns-analyzed?): Delete.
5402         (sim-analyze!): Call arch-analyze-insns! instead of calling
5403         ifmt-compute! directly.
5404
5405         * utils.scm (string-take-with-filler): New proc.
5406         (string-take): Use it.
5407
5408         * pgmr-tools.scm: New file.
5409         * read.scm: Load it.
5410         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5411
5412         * insn.scm (insn-base-mask): Renamed from insn:mask.
5413         All callers updated.
5414         (insn-base-mask-length): Renamed from insn:mask-length.
5415         All callers updated.
5416         (insn-foo): Renamed from insn:foo.  All callers updated.
5417         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5418         * iformat.scm (compute-insn-base-mask-length): Renamed from
5419         compute-insn-mask-length.  All callers updated.
5420         (compute-insn-base-mask): Renamed from compute-insn-mask.
5421         All callers updated.
5422
5423         * enum.scm (-enum-parse-prefix): New proc.
5424         (<enum>,make!): Don't parse enum values here.
5425         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5426         (define-full-insn-enum): Ditto.
5427         (enum-vals-upcase): New proc.
5428         * hardware.scm (define-keyword): Make enum prefix uppercase.
5429         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5430
5431         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5432         (<ifield>,field-extract): New method.
5433         (<multi-ifield>,field-extract): New method.
5434         (ifld-extract): New proc.
5435         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5436         (ifld-extract-fn-name): Renamed from ifld-extract.
5437
5438         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5439         All callers updated.
5440
5441         * ifield.scm (ifld-lsb0?): New proc.
5442         (sort-ifield-list): New arg up?.  All callers updated.
5443         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5444         rather than global state.
5445
5446 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5447
5448         * insn.scm (pretty-print-insn-format): New proc.
5449
5450         * Makefile.in: Rebuild.
5451         * aclocal.m4: Rebuild
5452         * configure: Rebuild.
5453
5454 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5455
5456         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5457         * configure: Rebuild.
5458         * aclocal.m4: Rebuild.
5459         * Makefile.in: Rebuild.
5460         * doc/Makefile.in: Rebuild.
5461         * doc/version.texi: Rebuild.
5462
5463 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5464
5465         * utils.scm (bits->bools): New proc.
5466
5467 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5468
5469         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5470         subfield's gen-ifld-extract-decl method.
5471
5472 1999-04-23  Ben Elliston  <bje@cygnus.com>
5473
5474         * arm7.cpu (ldrsh-pu): Remove.
5475         (do-halfword-load): New pmacro.
5476         (load-halfword): Likewise.
5477         (do-halfword-store): Likewise.
5478         (store-halfword): Likewise.
5479         (strh-*): New instructions.
5480         (ldrsb-*): Likewise.
5481         (ldrh-*): Likewise.
5482         (ldrsh-*): Likewise.
5483
5484 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5485
5486         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5487         fields.
5488
5489         * arm7.cpu (do-word/byte-store): Fix typo.
5490
5491 1999-04-22  Ben Elliston  <bje@cygnus.com>
5492
5493         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5494         register is the program counter (R15).
5495
5496         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5497         (str-*): Implement using store-word-byte. Remove older versions.
5498         (bic): Use the `inv' rtx for obtaining bitwise complements.
5499         (bic-imm): Likewise.
5500         (mvn): Likewise.
5501         (mvn-imm): Likewise.
5502         (store-indev-reg): Remove crufty pmacro.
5503         (load-indiv-reg): Likewise.
5504         (ldm-p): Reverse the order of register processing for decrement.
5505         (stm-p): Likewise.
5506         (stbi): Remove; handled by the str-* insns.
5507
5508 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5509
5510         * thumb.cpu (cmp): Fix carry bit computation.
5511         (alu-cmp): Ditto.
5512
5513 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5514
5515         * arm.cpu (h-tbit): Specify set spec.
5516         (h-cpsr): Ditto.
5517         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5518         (set-sub-flags): Interpret "carry bit" as a borrow.
5519         (all sub/cmp insns): Carry bit is actually a borrow bit.
5520         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5521         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5522         .pmacro instead.
5523         (hireg-add,hireg-cmp,hireg-move): Ditto.
5524
5525         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5526         (-CGEN-LANG-VERSION): Ditto.
5527
5528 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5529
5530         * pmacros.scm (-pmacro-make): New arg `default-values',
5531         all callers updated.
5532         (-pmacro-default-values): New proc.
5533         (-pmacro-process-keyworded-args): New proc.
5534         (-pmacro-process-args): New proc.
5535         (-pmacro-invoke): Process arguments before expanding macro.
5536         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5537         (define-pmacro): Handle default values specified in arg list.
5538         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5539         (rtx-boolif-op-arg[01]): New procs.
5540         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5541         (rtx-simplify): Handle not,orif,andif.
5542         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5543         * utils.scm (alist-copy): New proc.
5544         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5545         (ldr*): Rewrite.
5546         (swi): Explicitly set pc.
5547
5548         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5549
5550 1999-04-17  Ben Elliston  <bje@cygnus.com>
5551
5552         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5553         correctly adjusts the program counter now.
5554
5555         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5556         (f-signed?): Rename from `f-hdt-signed?'.
5557         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5558         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5559         (f-hdt-offset8): Use new field names.
5560         (ldr): Use `imm12' field, not `offset12', since we do our own
5561         address arithmetic.
5562         (str, str-*): Likewise.
5563         (ldu-*): Remove most; better not implemented than broken.
5564         (ldrh*): Likewise.
5565         (ldrsh-pu): New insn.
5566         (stri): Likewise.
5567         (stri-p): Likewise.
5568         (stbi): Likewise.
5569         (ldm-p): Likewise; replace (load-indiv-reg) version.
5570
5571 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5572
5573         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5574         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5575         (*): Explicitly specify mode in c-call.
5576         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5577         (arith-op): Ditto.
5578         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5579         (arith-imm-op): New pmacro.
5580         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5581         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5582
5583 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5584
5585         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5586
5587         * rtl.scm (rtl-find-ifields): Implement.
5588
5589         * utils-gen.scm: New file.
5590         * read.scm: Load it.
5591         * desc.scm: Move generic attribute code to utils-gen.scm.
5592         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5593         * Makefile.in: Rebuild.
5594
5595         * arm7.cpu (R15-OFFSET): New attribute.
5596         (dnai): New pmacro.
5597         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5598         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5599         for reg-shift version.
5600         (arith-op): Ditto.
5601         (data processing insns): Reorganize.  Use dnai.
5602
5603         * attr.scm (attr-kind): New proc.
5604         (attr-list-enum-list): Rewrite.
5605         (-attr-sort): Split result into two lists, bools and non-bools.
5606         (current-attr-list-for): Update.
5607
5608         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5609         * sid-cpu.scm (-gen-attr-decls): New proc.
5610         (-gen-insn-attr-decls): New proc.
5611         (cgen-desc.h): New proc.
5612         (cgen-cpu.h): Put everything in @cpu@ namespace.
5613         (gen-parallel-exec-type): Change prefix of parexec struct from
5614         @cpu@ to @prefix@.
5615         (-gen-trace-record-type): Ditto for trace_record struct.
5616         (-gen-write-case): Update.
5617         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5618         @prefix@.  Update scache struct references.
5619         (-gen-sem-case): Update scache struct references.
5620         (-gen-sem-switch-fn): Update idesc struct reference.
5621         Update insn_type enum reference.
5622         (cgen-write.cxx): Update scache,argbuf references.
5623         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5624         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5625         from @cpu@ to @prefix@.
5626         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5627         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5628         from @CPU@ to @PREFIX@.
5629         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5630         from @CPU@ to @PREFIX@.
5631         (-gen-decode-insn-globals): Generate insn attributes.
5632         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5633         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5634         semantic fn typedef.
5635         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5636         Change prefix of scache struct from @cpu@ to @prefix@.
5637         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5638         Change prefix of idesc struct from @cpu@ to @prefix@.
5639         Change prefix of insn_type enum from @cpu@ to @prefix@.
5640         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5641         from @cpu@ to @prefix@.
5642         (-gen-scache-decls): Change prefix of scache struct from
5643         @cpu@ to @prefix@.  Update idesc struct name.
5644         Update decode,execute methods.
5645         (-gen-extract-case): Update to type name changes.
5646         (-gen-decode-fn): Ditto.
5647         (cgen-decode.h): Put everything in @cpu@ namespace (except
5648         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5649         (cgen-decode.cxx): Add using namespace @cpu@.
5650         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5651         model_mark_get/set from @cpu@ to @prefix@.
5652         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5653         @prefix@.
5654         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5655         of model_insn_before/after from @cpu@ to @prefix@.
5656         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5657         Update insn_word type name.
5658         (-gen-model-timing-table): Update INSN_TIMING struct name.
5659         (-gen-model-init-fn): Update MODEL_DATA struct name.
5660         (-gen-mach-defns): Update name of init_idesc_table fn.
5661         (cgen-model.cxx): Add using namespace @cpu@.
5662         * sid.scm (gen-cpu-class): Delete.
5663         (gen-attr-type): New proc.
5664         (gen-obj-attr-sid-defn): New proc.
5665         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5666         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5667         @CPU@ to @PREFIX@.
5668         (gen-cpu-insn-enum): Update name of insn enum.
5669         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5670         (bx-hs): Ditto.
5671         (swi): Rename @cpu@_swi to @prefix@_swi.
5672
5673         * decode.scm (-build-decode-table-entry): Remove heuristic for
5674         distinguishing insns, and use insn ifield-assertion specs.
5675
5676         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5677         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5678         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5679         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5680         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5681         all callers updated.
5682         (gen-attr-name): New proc
5683         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5684         (gen-obj-attr-defn): Delete num_nonbools count.
5685
5686         * iformat.scm (ifmt-analyze): Handle insn-condition.
5687         (ifmt-compute!): Ditto.
5688         * insn.scm (<insn>): Specify default value for condition,
5689         post-cond-trap,compiled-condition,compiled-semantics.
5690         (<insn>,make!): New arg condition.
5691         (<insn>): Add getters for condition,compiled-condition.
5692         (-insn-parse): New arg condition, all callers updated.
5693         (-insn-read): Recognize condition spec.
5694         (define-full-insn): New arg condition.
5695         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5696         * semantics.scm (semantic-compile): Change arg sem-code to
5697         sem-code-list.
5698         (semantic-attrs): Ditto.
5699         * sim.scm (sim-finish!): Update calls to define-full-insn.
5700         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5701         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5702         * sid.scm (sim-finish!): Update call to define-full-insn.
5703
5704 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5705
5706         * Makefile.am (sim-cpu): Allow specification of ISA.
5707         * Makefile.in: Rebuild.
5708
5709 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5710
5711         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5712
5713 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5714
5715         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5716
5717         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5718
5719         * attr.scm (atlist?): New proc.
5720         (-attr-eval): Rewrite.
5721         (attr-parse): New proc.
5722         (atlist-parse): Use it.
5723
5724         * decode.scm (exprtable-entry-make): New proc.
5725         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5726         (exprtable-make,exprtable-insns): New procs.
5727
5728         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5729         All uses updated.
5730         (hardware-builtin!): Make h-memory a vector.
5731
5732         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5733         All callers updated.
5734         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5735
5736         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5737         All uses updated.
5738         (-insn-parse): Set semantics to #f if not specified.
5739         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5740         if simulator.
5741         (-parse-insn-format): Recognize `=' iformat spec.
5742
5743         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5744         (isa-max-insn-bitsize): Ditto.
5745
5746         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5747         rtl-c-with-alist.
5748         (<ifield>,gen-extract): Ditto.
5749         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5750         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5751         (gen-define-ifmt-ifields): New proc.
5752         (gen-semantic-code): Rewrite.
5753         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5754         (-gen-decoder-switch): Handle expression tables.
5755         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5756         gen-define-fields.
5757         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5758         instead of gen-define-fields.
5759         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5760         callers updated.
5761         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5762         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5763         (-gen-ifld-extract-beyond): Ditto.
5764         (<multi-ifield>,gen-ifld-extract): Ditto.
5765         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5766         rtl evaluation code.
5767         (op:read): Build an <eval-state> to pass to gen-read.
5768         (op:write): Build an <eval-state> to pass to gen-write.
5769         (op:record-profile): Build an <eval-state> to pass to
5770         gen-record-profile.
5771         * sim-cpu.scm (gen-semantic-code): Rewrite.
5772         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5773         rtl-c-with-alist.
5774         (-gen-ifld-extract-beyond): Ditto.
5775         (<multi-ifield>,gen-ifld-extract): Ditto.
5776         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5777         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5778         rtl evaluation code.
5779         (op:read): Build an <eval-state> to pass to gen-read.
5780         (op:write): Build an <eval-state> to pass to gen-write.
5781         (op:record-profile): Build an <eval-state> to pass to
5782         gen-record-profile.
5783
5784         * operand.scm (<operand>): Give `selector' default value of #f.
5785         Give `num' default value of -1.  Give `cond?' default value of #f.
5786         (op:new-mode): Delete arg `set?', all uses updated.
5787
5788         * read.scm (reader-error): Handle #f return from port-filename.
5789         (-init-parse-cpu!): Call rtl-c-init!.
5790         (reader-install-builtin!): Call rtl-builtin!.
5791
5792         * rtl-c.scm: New file.
5793         * semantics.scm: New file.
5794         * read.scm: Load them.
5795         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5796         to semantics.scm.
5797         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5798         type,eval,num.
5799         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5800         (-rtx-num-text,-rtx-max-num): New globals.
5801         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5802         (-rtx-macro-lookup): New proc.
5803         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5804         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5805         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5806         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5807         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5808         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5809         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5810         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5811         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5812         (rtx-pretty-name): New proc.
5813         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5814         (rtx-traverse-*): Rewrite rtx traversing.
5815         (rtx-eval-*): Rewrite rtx evaluation.
5816         (rtx-compile): New proc.
5817         (rtx-simplify): New proc.
5818         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5819         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5820         (ifield,index-of): Rewrite.
5821         (name): Renamed from `operand:'.
5822         (operand,xop,local): New rtx's.
5823         (current-insn): Rewrite.
5824         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5825         (cgen-hob.h): Remove rule for.
5826         (cgen-hob.o): Depend on cgen-hob.c only.
5827         * Makefile.in: Rebuild.
5828
5829         * utils-cgen.scm (vmake): New proc.
5830         (<context>): New class.
5831         (context-make-prefix,context-error): New procs.
5832
5833 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5834
5835         * i960.cpu: Add some ??? comments.
5836         (xnor, ornot): New instructions.
5837         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5838
5839 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5840
5841         * cos.scm (-object-error): Print better error message.
5842
5843         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5844         (-pmacro-env-ref): Renamed from -env-ref.
5845
5846 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5847
5848         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5849         (h-pc): Delete.
5850         (hardware-builtin!): Delete h-pc builtin.
5851         * arm.cpu (h-pc): Define.
5852         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5853         * arm7.cpu (set-logical-cc-maybe): Delete.
5854         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5855         (data processing insns): Rewrite.
5856         * m32r.cpu (h-pc): Define.
5857         * fr30.cpu (h-pc): Define.
5858         * i960.cpu (h-pc): Define.
5859         * sparc.cpu (h-pc): Define.
5860
5861         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5862         (s-parallel): Replace do {...} while (0) with {...}.
5863         (s-sequence): Ditto.
5864
5865         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5866         consistent.
5867         (-gen-write-case,-gen-sem-case): Ditto.
5868         (-gen-sem-case): Only specify `written' if profiling or
5869         parallel-write-back.
5870         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5871         (-gen-sem-switch-fn): New proc.
5872         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5873         based on with-sem-switch option.
5874         * sid-decode.scm (-gen-decode-insn-globals): Only define
5875         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5876         addresses in idesc_table if !with-sem-switch.
5877         (-gen-sem-fn-decls): Rewrite.
5878         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5879         member based on with-sem-switch.  Only define
5880         `idesc_table_initialized_p' member if with-sem-switch.
5881         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5882         * sid.scm (-with-sem-switch?): New variable.
5883         (option-init!): Initialize it.
5884         (option-set!): Set it.
5885         (with-sem-switch?): New proc.
5886         (-op-gen-set-trace): Only emit `written' reference if profiling.
5887         (sim-finish!): Use h_pc_set to set pc.
5888
5889 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5890
5891         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5892         All callers updated.
5893         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5894
5895         * sid.scm (gen-argbuf-type): Delete.
5896         (-gen-argbuf-fields-union): Move to ...
5897         * sid-decode.scm: ... here.
5898
5899         * read.scm (-reader-process-expanded-1): New proc.
5900         (-reader-process-expanded): Call it to catch nested begin's.
5901         (reader-process): Move `begin' handling to -reader-process-expanded.
5902
5903         * insn.scm (-insn-read): Fix name of `format' spec.
5904
5905         * pmacros.scm (.pmacro): New builtin.
5906         (scan-symbol): If procedure macro, return macro rather than its symbol.
5907         (check-macro): Don't do lookup, instead check if (car expr) is
5908         macro object.
5909         (scan-list): Handle .pmacro.
5910         (scan): No longer re-examine text for another macro invocation.
5911         (-pmacro-build-lambda): New proc.
5912         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5913         another, fetch the other's value (rather than doing it during
5914         expansion).
5915
5916 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5917
5918         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5919         * Makefile.in: Rebuild.
5920
5921         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5922         (-fill-slot!): Simplify.
5923         (-build-slots): Simplify.
5924
5925         * dev.scm (load-sid): Don't load sid-arch.scm.
5926
5927         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5928         switch's.
5929         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5930         switch's.
5931
5932 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5933
5934         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5935         * decode.scm: ... here.  New file.
5936         * sid-decode.scm: Use decoder computation code in decode.scm.
5937         * read.scm: Load decode.scm.
5938
5939         * arm.cpu (arm710 model): Add u-exec function unit.
5940         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5941         Add get/set specs to redirect reg 15 to h-pc.
5942         (h-*): Indicate for both ARM and THUMB isas.
5943         (cbit,nbit,vbit,zbit): Ditto.
5944         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5945         (h-cpsr): Make virtual.  Add get/set specs.
5946         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5947         (h-spsr): New virtual reg.
5948         * arm7.cpu (shift-type): New explicitly defined keyword.
5949         (h-operand2-shifttype): Use it.
5950         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5951         All callers updated.  Don't set cbit.
5952         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5953         shift-type enum as case choices.  Set cbit.
5954         (and,orr,eor,add-imm): Uncomment out.
5955         (undefined): Temporarily comment out.
5956         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5957         (lda-pc,lda-sp): Ditto.
5958         (ldr-pc): Rename from ldr.
5959         (cbranch): Mark insns as being thumb insns.
5960
5961         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5962
5963         * cgen-sid.scm: Don't load sid-arch.scm.
5964         (sim-arguments): Delete unused entries.
5965         * sid-arch.scm: Delete.
5966
5967         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5968         (<insn>,ifld-assertions): New member.
5969         (<insn>,make!): New arg ifld-assertions, all callers updated.
5970         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5971         (insn:fields): Delete.
5972         (-insn-parse): New arg ifld-assertions.  All callers updated.
5973         (-insn-read,define-insn): New procs.
5974         (define-full-insn): New arg ifld-assertions.  All callers updated.
5975         (insn-init!): New comment define-insn.
5976
5977         * model.scm (-model-parse): Ensure at least one unit specified.
5978
5979         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5980         (<c-expr-temp>,get-name): New method.
5981         (-rtx-make-current-closure,s-closure): New proc.
5982         (hw:): Wrap rtx indices in a closure.
5983         (-gen-case-prefix): New proc.
5984         (s-case): Simplify.
5985         * rtx-funcs.scm (case:): Fix call to s-case.
5986         (closure): New rtx func.
5987
5988         * hardware.scm (<hardware-base>): New member isas-cache.
5989         (<hardware-base>,get-isas): New method.
5990         (hardware-builtin): Indicate for all isas.
5991         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5992         * mach.scm (current-arch-mach-name-list): Return list of names.
5993         (current-isa-mach-name-list): Ditto.
5994         (define-arch): Install builtin objects here.
5995         * read.scm (keep-atlist?): Only keep if both mach and isa are
5996         being kept.
5997         (keep-mach-atlist?): New proc.
5998         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5999         (reader-install-builtin!): Renamed from -install-builtin!.
6000         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
6001         -gen-cpu-reg-access-defns.  Rewrite.
6002         (gen-reg-access-defn): Delete.
6003         (-gen-hardware-struct): New proc.
6004         (-gen-hardware-types): Simplify.  Add multiple-isa support.
6005         (gen-semantic-fn,-gen-all-semantics): Delete.
6006         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
6007         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6008         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6009         Call sem-analyze-insns!.
6010         (cgen-semantics.cxx): Add multiple-isa support.
6011         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6012         (-gen-scache-decls,-gen-decode-fn): Ditto.
6013         (cgen-decode.h): Call sem-analyze-insns!.
6014         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6015         * sid.scm (-with-multiple-isa?): New variable.
6016         (option-init!): Initialize it.
6017         (option-set!): Set it.
6018         (with-multiple-isa?): New proc.
6019         (gen-cpu-ref): New arg isas.  All callers updated.
6020         (gen-cpu-class): New proc.
6021         (*-get-macro,*-set-macro): Delete.
6022         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6023         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6024         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6025         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6026         (-sim-insns-analyzed): New global variable.
6027         (sim-init!): Reset it.
6028         (sim-analyze-insns!): New proc.
6029         (sim-analyze!): Don't do instruction analysis here.
6030         (sim-finish!): Specify isa of x-invalid insn.
6031         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6032
6033 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
6034
6035         * thumb.cpu (cpu,mach,model): Delete.
6036         (dntf): New pmacro.  Use it for all field definitions.
6037         (dntop): New pmacro.  Use it for all operand definitions.
6038         (asr): Correct field list.
6039         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6040
6041         * utils-cgen.scm (define-getters): New macro to simplify
6042         writing class accessors.
6043         (define-setters): Ditto.
6044         (sanitize): Recognize isa elements.
6045
6046         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6047         state-parallel-exec?.
6048         * sid-model.scm (*): Ditto.
6049         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6050         state-decode-assist.
6051
6052         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6053         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6054         * sim-decode.scm (-gen-decode-switch): Ditto.
6055
6056         * sim-arch.scm (-regs-for-access-fns): Delete.
6057         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6058         (-gen-arch-reg-access-defns): Delete.
6059
6060         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6061         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6062         with state-parallel=exec?.
6063         (cgen-*): Call sim-analyze-insns! here.
6064         * sim-decode.scm (cgen-*): Ditto.
6065         * sim-model.scm (cgen-*): Ditto.
6066         * sim.scm (-sim-insns-analyzed): New global variable.
6067         (sim-init!): Reset it.
6068         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6069         already done the analysis.
6070
6071         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6072         MACH struct.
6073
6074         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6075         (arm arch): Update isa spec.
6076         (arm,thumb isas): Define.
6077         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6078         (arm7tdmi mach): Add isa spec.
6079         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6080         `const' on word number.
6081         * fr30.cpu (fr30 arch): Update isa spec.
6082         (fr30 isa): Define.
6083         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6084         moved to isa spec.
6085         * i960.cpu (i960 arch): Update isa spec.
6086         (i960 isa): Define.
6087         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6088         liw-insns,parallel-insns moved to isas spec.
6089         * m32r.cpu (m32r arch): Update isas spec.
6090         (m32r isa): Define.
6091         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6092         liw-insns,parallel-insns moved to isa spec.
6093         * sparc.cpu (sparc arch): Update isas spec.
6094         (sparc isa): Define.
6095         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6096         decode-assist moved to isa spec.
6097         * sparc64.cpu (sparc64 cpu): Ditto.
6098         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6099         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6100         (-gen-mach-table-defns): Output mach table.
6101         (-gen-hash-defines): Delete insn size macros, except for
6102         CGEN_MAX_INSN_SIZE.
6103         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6104         (cgen-desc.h): Define MAX_ISAS.
6105         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6106         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6107         (arch-* accessors): Renamed from arch:*.  All callers updated.
6108         (current-arch-isa-name-list): New proc.
6109         (-arch-parse-isas): Renamed from -arch-parse-isa.
6110         (def-isa-attr!): Rewrite.
6111         (<iframe>): New class.
6112         (<itype>): New class.
6113         (<isa>): Rewrite.
6114         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6115         (isa-integral-insn?,isa-parallel-exec?): New procs.
6116         (-isa-parse,-isa-read,define-isa): New proc.
6117         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6118         liw-insns moved to <isa>.
6119         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6120         (-cpu-parse,-cpu-read): Update.
6121         (state-*): Renamed from state:*.  All callers updated.
6122         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6123         not cpu.
6124         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6125         (state-decode-assist): New proc.
6126         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6127         (-adata-set-derived!): Rewrite.
6128         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6129         callers updated.
6130         (arch-init!): Add define-isa command.
6131         * read.scm (<reader>): Default keep-isa member to (all).
6132         (reader-* accessors): Renamed from reader:*.  All callers updated.
6133         (-keep-isa-set!): Call string->symbol on isa name list.
6134         (keep-isa-validate!): Rewrite.
6135         (current-isa): New proc.
6136         (keep-isa?): Recognize "all".
6137         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6138         Call -keep-isa-set!.
6139         (cmd-if): Recognize keep-isa?.
6140         (cpu-load): New arg keep-isa.  All callers updated.
6141         (-opt-spec-update): New proc.
6142         (common-arguments): First arg is string, not symbol.
6143         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6144
6145         * rtl.scm (rtx-get): Default mode of string arg is INT.
6146
6147         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6148
6149         * rtx-funcs.scm (join:): Pass cpu to handler.
6150
6151         * configure.in (guile_include_dir): Delete.
6152         * configure: Rebuild.
6153         * Makefile.in: Rebuild.
6154         * doc/Makefile.in: Rebuild.
6155
6156         * sid-cpu.scm (-extract-chunk-specs): New proc.
6157         (gen-define-fields): Use it.
6158         (-extract-chunk): New proc.
6159         (-gen-extract-beyond-var-list): Use it.
6160         (gen-extract-fields): Simplify.
6161
6162 1999-03-22  Ben Elliston  <bje@cygnus.com>
6163
6164         * arm7.cpu (ldri-p): New instruction.
6165         (swi): Do not vector through 0x8 yet--there is nothing there.
6166         (addi): Reinstate.
6167         (movi): Likewise.
6168         (all): Use (const x) in subreg expressions.
6169
6170 1999-03-19  Ben Elliston  <bje@cygnus.com>
6171
6172         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6173         (smlal): Likewise.
6174
6175 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6176
6177         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6178         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6179         * sim-cpu.scm (-extract-chunk-specs): New proc.
6180         (gen-define-fields): Use it.
6181         (-extract-chunk): New proc.
6182         (-gen-extract-beyond-var-list): Use it.
6183         (gen-extract-fields): Simplify.
6184
6185         Port to guile 1.3.1.
6186         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6187         (LIBIBERTY): New var.
6188         (HOB_OBJS): Add cgen-gh.o.
6189         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6190         * Makefile.in: Rebuild.
6191         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6192         * config.in: Rebuild.
6193         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6194         libncurses, libtermcap.
6195         Add checks for needed functions in guile 1.2 not in guile 1.3,
6196         and vice versa.  Add test for 3 argument scm_make_vector.
6197         * configure: Rebuild.
6198         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6199         definitions if guile doesn't have them.
6200         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6201         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6202         with gh_vector_set_x.
6203         (cgh_qsort): Replace gh_list_length with gh_length.
6204         * cgen-gh.h: Add decls for added functions.
6205         (cgh_qsort): Don't declare if IN_HOBBIT.
6206         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6207         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6208         scm_make_vector with gh_make_vector.
6209         * cos.scm: Use vector-length instead of length on vectors.
6210         * dev.scm (cload): Make varargs proc with keyword/value args.
6211         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6212         provide version that works with guile 1.2 or 1.3.
6213         Include private copy of scmhob.h.
6214         * scmhob.h: New file.  Keep our own copy for now.
6215
6216 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6217
6218         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6219         plain text.
6220         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6221         (-cx-temp-dump-stack): Pretty up output.
6222
6223         * arm.cpu: comment out thumb.cpu until isa support ready.
6224         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6225         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6226         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6227
6228         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6229
6230 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6231
6232         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6233         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6234
6235         * operand (op:new-mode): Improve error message.
6236
6237         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6238         * arm7.cpu: New file.
6239
6240 1999-03-12  Ben Elliston  <bje@cygnus.com>
6241
6242         * arm.cpu: Lots of minor fixes after desk checking.
6243
6244 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6245
6246         * thumb.cpu: snapshot of current work
6247
6248         * rtl.scm (rtx-get): Tweak error message.
6249
6250 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6251
6252         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6253         * Makefile.in: Rebuild.
6254
6255         * cos.c (cos_vector_copy): New function.
6256         (_object_copy): Use it.
6257
6258         * mode.scm (mode:eq?): Clean up.
6259         * rtl.scm (cx-new-mode): Copy attributes.
6260         (rtx-get): Don't make copy if <c-expr> with identical mode.
6261
6262         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6263         add new isas spec.
6264         (gr-names): h-gr register names moved here.
6265         (h-gr): Update.
6266         (cr-names): h-cr register names moved here.
6267         (h-cr): update.
6268         (dr-names): h-dr register names moved here.
6269         (h-dr): update.
6270         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6271         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6272         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6273         add new isas spec.
6274         * m32r.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): Update.
6278         (cr-names): h-cr register names moved here.
6279         (h-cr): update.
6280         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6281         (h-accums,h-psw): Ditto.
6282         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6283         add new isas spec.
6284         (gr-names): h-gr register names moved here.
6285         (h-gr-indices): Delete.
6286         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6287         (sparc64 h-gr): Ditto.
6288         (h-y): Add get/set specs.
6289         (fp regs): Rewrite.
6290         (fp operands): Rewrite.
6291         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6292         (h-tbr,h-cwp,h-wim): Ditto.
6293         * sparc64.cpu (h-fpsr): Add get/set specs.
6294         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6295         (fp-ld-op): New arg `dest', all callers updated.
6296         (*): Replace `make-di' with `join'.
6297
6298         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6299         present.
6300         (gen-semantic-code): Save/restore rtl generator state.
6301         (cgen-cpu.h): Call rtl-gen-init!.
6302         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6303         (-gen-ifld-extract-beyond): Ditto.
6304         (<multi-ifield>,gen-ifld-extract): Ditto.
6305         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6306         `gstate'.
6307         (-hw-gen-set-quiet-pc): Ditto.
6308         (<hw-pc>,gen-write): Ditto.
6309         (-hw-cxmake-get): Ditto.  Call getter function if present.
6310         (<hw-register>,cxmake-get-raw): New method.
6311         (<hw-register>,gen-set-quiet-raw): New method.
6312         (-hw-gen-set-quiet): New arg `gstate'.
6313         (hw-fun-access?): Delete.
6314         (gen-reg-access-defn): Output function contents.
6315         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6316         invocation.
6317         (-gen-hw-index): Ditto.
6318         (op:read): Update gen-read invocation.
6319         (op:write): Update gen-write invocation.
6320         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6321         operands.
6322         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6323         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6324         (<unit>,gen-profile-code): Update to sim.scm version.
6325
6326         * sim-arch.scm (-regs-for-access-fns): New proc.
6327         (-biggest-reg-mode): New proc.
6328         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6329         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6330         virtual regs separately.
6331         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6332         get/set specs.
6333         (gen-semantic-code): Save/restore rtl generator state.
6334         (cgen-cpu.h): Call rtl-gen-init!.
6335         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6336         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6337         renamed to mach-bfd-name.
6338         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6339         (-gen-ifld-extract-beyond): Ditto.
6340         (<multi-ifield>,gen-ifld-extract): Ditto.
6341         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6342         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6343         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6344         `gstate'.
6345         (hw-fun-access?): Delete.
6346         (-hw-gen-set-quiet-pc): New arg `gstate'.
6347         (<hw-register>,gen-get-macro): Rewrite.
6348         (<hw-register>,gen-set-macro): Rewrite.
6349         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6350         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6351         (<hw-register>,cxmake-get-raw): New method.
6352         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6353         (<hw-register>,gen-set-quiet-raw): New method.
6354         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6355         invocation.
6356         (-gen-hw-index): Ditto.
6357         (<hw-index>): New arg `gstate'.
6358         (-gen-hw-selector): Update call to rtx-c.
6359         (<pc>): New arg `gstate'.
6360         (op:read): Update gen-read invocation.
6361         (op:write): Update gen-write invocation.
6362         (<operand>,cxmake-get): Handle raw-reg.
6363         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6364         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6365         (<operand>,gen-set-quiet): Handle raw-reg.
6366         (<operand>,gen-set-trace): Handle raw-reg.
6367         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6368
6369         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6370         cgen_operand_type enum.
6371         (gen-operand-table): Add operand type enum.  Replace pointer to
6372         hardware element with its enum.  Null terminate table.
6373         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6374         Build operand table.
6375         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6376         * mach.scm (<arch-data>): New member `isas'.
6377         (adata-isas): New accessor.
6378         (<isa>): New class.
6379         (isa-default-insn-word-bitsize): New accessor.
6380         (isa-enum): New proc.
6381         (current-arch-default-insn-word-bitsize): Delete.
6382         (current-isa-list,current-isa-lookup): New procs.
6383         (-arch-parse-isa): New proc.
6384         (-arch-parse): Rewrite.
6385         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6386         (define-arch): Define ISA attribute.
6387         (def-isa-attr!,isa-supports?): New procs.
6388         (<mach>): New member `isas'.
6389         (mach-isas): New accessor.
6390         (-mach-parse): New arg `isas', all callers updated.
6391         (-mach-read): Recognize `isas'.
6392         (arch-finish!): Rewrite.
6393         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6394         @arch@_cgen_get_{int,vma}_operand.
6395         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6396         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6397         of pointer to table entry.
6398         * opcodes.scm (gen-switch): Handle multiply defined operands.
6399         * operand.scm (op-sort): New proc.
6400
6401         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6402         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6403         (hw-enum): Accept symbol argument.
6404         (hardware-builtin!): Delete attribute FUN-ACCESS.
6405         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6406
6407         * attr.scm (atlist-source-form): New proc.
6408         (attr-builtin!): New attr `PRIVATE'.
6409         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6410         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6411         if they have `PRIVATE' attribute.
6412         (gen-hw-table-defns): Output definitions of explicitly defined
6413         keyword tables.
6414         * hardware.scm (<keyword>): New member print-name.  Rename member
6415         `value' to `values', all uses updated.
6416         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6417         (keyword-parse): Rewrite.
6418         (-keyword-read): New proc.
6419         (define-keyword): New proc.
6420         (-hw-parse-keyword): New proc.
6421         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6422         `extern-keyword'.
6423         (-hw-parse-values): Ditto.
6424         (-hw-parse-get,-hw-parse-set): Rewrite.
6425         (hardware-init!): Add new comment define-keyword.
6426         * mach.scm (<arch>): New member `kw-list'.
6427         (arch:kw-list,arch_set-kw-list!): New accessors.
6428         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6429
6430         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6431         * mode.scm (mode-class-integral?): New proc.
6432         (mode-class-float?,mode-class-numeric?): New procs.
6433         (mode-integral?,mode-float?,mode-numeric?): New procs.
6434         (mode-compatible?): New proc.
6435         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6436         rtx-c-with-alist.
6437         (<ifield>,gen-extract): Ditto.
6438         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6439         (<gstate>): New class.
6440         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6441         (gstate-context,gstate-set-context!): New accessors.
6442         (gstate-macro?,gstate-set-macro?!): New accessors.
6443         (gstate-make,gstate-copy): New procs.
6444         (-rtl-current-gstate): New global.
6445         (current-gstate-simulator?): New proc.
6446         (current-gstate-context,current-gstate-macro?): New procs.
6447         (current-gstate,current-gstate-set!): New procs.
6448         (rtl-gen-init!): Rewrite.
6449         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6450         (tstate-make): New arg `gstate', all callers updated.
6451         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6452         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6453         (tstate-gstate,tstate-set-gstate!): New accessors.
6454         (tstate-copy): New proc.
6455         (tstate-new-cond?,tstate-new-set?): Rewrite.
6456         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6457         (rtx-traverse): New arg `gstate', all callers updated.
6458         (rtx-strdump): New proc.
6459         (-simplify-for-compilation): New arg `gstate', all callers updated.
6460         (semantic-in-out-operands): Ditto.
6461         (semantic-attrs): Ditto.
6462         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6463         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6464         (rtx-value): Rewrite.
6465         (<c-expr>,gen-name): New method.
6466         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6467         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6468         (cx-new-mode): New proc.
6469         (-rtx-c-with-tstate): New proc.
6470         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6471         callers updated.
6472         (-rtx-mode): Rewrite.
6473         (-rtx-mode-compatible?): New proc.
6474         (<c-expr-temp>): New member `value'.
6475         (cx-temp:value): New accessor.
6476         (<c-expr-temp>,make!): Override default method.
6477         (<c-expr-temp>,cxmake-get): Rewrite.
6478         (<c-expr-temp>,gen-set-quiet): Rewrite.
6479         (<c-expr-temp>,gen-set-trace): Rewrite.
6480         (gen-temp-defs): Use cx-temp:value.
6481         (record-temp!): New arg value, all callers updated.
6482         (cx-temp:cx:make): Delete.
6483         (-cx-temp-dump-stack): New proc.
6484         (rtx-get): New arg `gstate', all callers updated.  Do mode
6485         compatibility checks.  Ensure result has specified mode.
6486         (rtx-set-quiet): New arg `gstate', all callers updated.
6487         (rtx-set-trace): Ditto.
6488         (s-c-call): New arg `tstate', all callers updated.
6489         (s-c-raw-call): Ditto.
6490         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6491         (s-cmpop,s-if,e-if): Ditto.
6492         (s-subreg): New proc.
6493         (-par-new-temp!): New proc.
6494         (-par-next-temp!): Rewrite.
6495         (-par-replace-set-dests): Use -par-new-temp!.
6496         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6497         (s-sequence): Use -rtx-c-with-state.
6498         * rtx-funcs.scm (*): Update.
6499         (raw-reg:): New rtx function.
6500         (make-di): Delete.
6501         (join:,subreg:): New rtx functions.
6502
6503         * insn.scm (<insn>): New members pre-cond-trap, condition,
6504         post-cond-trap, compiled-condition.
6505
6506         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6507
6508         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6509
6510         * utils-cgen.scm (parse-symbol): New proc.
6511         (parse-string): New proc.
6512         (gen-get-macro,gen-set-macro): New arg `index-args'.
6513         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6514         Prepend \ to newlines.
6515
6516         * utils.scm (alist-remove-duplicates): Delete.
6517
6518         * sid.scm (sim-init!): Delete private debugging code.
6519
6520 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6521
6522         * cgen-sid.scm: New file for C++ simulator application.
6523         * sid-arch.scm: Ditto.
6524         * sid-cpu.scm: Ditto.
6525         * sid-decode.scm: Ditto.
6526         * sid-model.scm: Ditto.
6527         * sid.scm: Ditto.
6528         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6529
6530 1999-03-05  Ben Elliston  <bje@cygnus.com>
6531
6532         * arm.cpu: New file.
6533
6534 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6535
6536         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6537         * Makefile.in: Rebuild.
6538
6539         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6540         (-attr-parse): Validate default value.
6541
6542         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6543         (-CGEN-LANG-VERSION): Ditto.
6544         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6545         (<reader>): New member keep-isa plus accessors.
6546         (-keep-isa-set!,keep-isa-validate!): New procs.
6547         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6548         (common-arguments): New variable.
6549         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6550         (-debug-repl,continue): New procs.
6551         (-cgen,cgen): New procs.
6552         * cgen-gas.scm: Rewrite.
6553         * cgen-opc.scm: Rewrite.
6554         * cgen-sim.scm: Rewrite.
6555         * cgen-stest.scm: Rewrite.
6556
6557         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6558         (gas-test-finish!): Call opcodes-finish!.
6559         (gas-test-analyze!): Call opcodes-analyze!.
6560         (<hw-asm>): New method test-data.
6561         (<operand>,testdata): Rewrite.
6562         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6563         (sim-test-finish!): Call opcodes-finish!.
6564         (sim-test-analyze!): Call opcodes-analyze!.
6565         (<hw-asm>): New method test-data.
6566         (<operand>,testdata): Rewrite.
6567
6568 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6569
6570         * fixup.scm (reverse!): Define if missing.
6571         * *.scm: Use reverse! instead of list-reverse!.
6572
6573         * utils.scm (leading-id-char?): New proc.
6574         (id-char?): Rewrite.
6575         (chars-until-delimiter): New proc.
6576         * opc-itab.scm (extract-syntax-operands): Rewrite.
6577         (strip-mnemonic): Rewrite.
6578         (compute-syntax): Rewrite.
6579
6580         * pmacros.scm (-pmacro-substr): New proc.
6581         (pmacros-init!): Add builtin .substr.
6582
6583 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6584
6585         * thumb.cpu: New file.
6586
6587 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6588
6589         * Makefile.am (CGENCFLAGS): New variable.
6590         (WITH_HOBBIT): Use automake conditional.
6591         (CGEN_HOB_SRC): New variable.
6592         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6593         (*.o): Compile with CGENCFLAGS.
6594         (cgen-hob.c): Simplify.
6595         (cgen-nohob.c): New rule.
6596         (hobbit): Renamed from hob.x.
6597         (CLEANFILES): Add cgen-nohob.c.
6598         * Makefile.in: Rebuild.
6599         * doc/Makefile.in: Rebuild.
6600         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6601         (WITH_HOBBIT): Use AM_CONDITIONAL.
6602         * configure: Rebuild.
6603         * aclocal.m4: Rebuild.
6604
6605         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6606         with string-write-map.
6607
6608         * sim-cpu.scm (hw-need-storage?): New proc.
6609         (-gen-hardware-types): Use it.
6610         (gen-parallel-exec-elm): Call op-save-index?.
6611
6612         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6613
6614         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6615         UNSIGNED attribute.
6616         (-gen-ifld-extract-beyond): Ditto.
6617         (<integer>): Delete all references.
6618         (<sim-hardware>): Delete.
6619         (hw-profilable?): New proc.
6620         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6621         (<hw-register>): Rename method get-index-mode to save-index?.
6622         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6623         (<hw-register>,gen-sym-decl): Make virtual.
6624         (<hw-memory>,gen-sym-decl): Make virtual.
6625         (<hw-memory>): Rename method get-index-mode to save-index?.
6626         (<hw-address>,gen-sym-decl): Make virtual.
6627         (<operand>): New method save-index?.
6628         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6629
6630         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6631         prefix added.  All uses updated.
6632
6633         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6634         rather than pointer to table entry.
6635
6636         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6637         Remove all hw-asm,op-asm support.
6638         (-gen-parse-number,-gen-parse-address): New procs.
6639         (<keyword>,gen-parse): Redo function name computation.
6640         (<keyword>,gen-print): Ditto.
6641         (<operand>,gen-function-name): Rewrite.
6642         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6643         (opcodes-init!): Delete call to add-parser!.
6644
6645         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6646         Define enum using hardware semantic name.
6647         (-gen-hw-decl,-gen-hw-defn): New procs.
6648         (gen-hw-table-decls): Use -gen-hw-decl.
6649         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6650         CGEN_HW_ENTRY structs.
6651         (gen-operand-table): Output hw's enum, not pointer to table entry.
6652         (-gen-cpu-open): Build table of selected hardware elements.
6653
6654         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6655         (<hardware> support): Delete.
6656         (<hw-asm>): Delete, moved to hardware.scm.
6657         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6658         (<hw-asm>,gen-table-entry): New method.
6659         (<hw-asm>,parse!): Delete.
6660         (<keyword>,gen-table-entry): New method.
6661         (<keyword>,parse!): Delete.
6662         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6663         for gen-decl,gen-defn,gen-ref,gen-init.
6664         (desc-init!): Don't create parser for operand asm specs.
6665
6666         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6667         * ifield.scm (<ifield>): New member `mode'.
6668         (<ifield>,make!): New arg `mode'.
6669         (ifld-mode): Rewrite.
6670         (ifld-hw-type): Rewrite.
6671         (<ifield>,min-value): Rewrite.
6672         (<ifield>,max-value): Rewrite.
6673         (-ifield-parse): New arg `mode'.
6674         (-ifield-read): Update.
6675         (define-full-ifield): New arg `mode'.
6676         (define-full-multi-ifield): Ditto.
6677         (-multi-ifield-parse): Ditto.
6678         (-multi-ifield-read): Update.
6679         (define-full-multi-ifield): New arg `mode'.
6680         (ifield-builtin!): Update definition of f-nil.
6681         * simplify.inc (define-normal-ifield): Update call to
6682         define-full-ifield.
6683         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6684         (define-normal-hardware): Delete arg asm.  New args indices, values,
6685         handlers.  Update call to define-full-hardware.
6686         (define-simple-hardware,dsh): New pmacros.
6687         (define-normal-operand): Update call to define-full-operand.
6688         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6689         Specify INT/UINT mode instead.
6690         (h-gr,h-cr): Use "indices" instead of "asm".
6691         (h-dr,h-ps): Update keyword syntax.
6692         (h-r13,h-r14,h-r15): Ditto.
6693         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6694         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6695         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6696         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6697         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6698         Specify INT/UINT mode instead.
6699         (h-gr): Use "indices" instead of "asm".
6700         (h-cc): Update keyword syntax.
6701         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6702         Specify INT/UINT mode instead.
6703         (h-hi16,h-slo16,h-ulo16): Update.
6704         (h-gr,h-cr): Use "indices" instead of "asm".
6705         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6706         (h-accums): Update keyword syntax.
6707         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6708         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6709         Specify INT/UINT mode instead.
6710         (h-gr-indices): New pmacro.
6711         (h-gr32,h-gr64): Split up from h-gr.
6712         (h-a): Update type spec.  Use values instead of asm spec.
6713         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6714         (h-y,h-annul-p): Ditto.
6715         (h-asr): Update keyword spec.
6716         (h-lo10,h-lo13,h-hi22): Update.
6717         (get-freg-spec,set-freg-spec): New pmacros.
6718         (h-fr32,h-fr64): Split up from h-fr.
6719         (rdd): Comment out get/set specs.
6720         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6721         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6722         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6723         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6724         UNSIGNED.  Specify INT/UINT mode instead.
6725         (h-*): Use dsh instead of dnh where appropriate.
6726         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6727         (h-p,h-membarmask): Ditto.
6728         (membarmask): Use "handlers" instead of "asm".
6729
6730         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6731         values,handlers,getters,setters plus accessors.
6732         (hw-mode-ok?,hw-default-mode): New procs.
6733         (<hardware-base>): Rename method new-mode to mode-ok?
6734         (<hardware-base>): New method get-index-mode.
6735         (hw-index-mode): New proc.
6736         (pc?): Delete, moved to operand.scm.
6737         (address?): New proc.
6738         (<hardware>): Delete.
6739         (<hw-asm>): Definition moved here from desc.scm.
6740         (keyword-parse): New proc.
6741         (hardware-parsers): Delete.
6742         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6743         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6744         (-hw-parse-get,-hw-parse-set): New procs.
6745         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6746         indices,values,handlers,get,set.  Rewrite.
6747         (-hw-read-extra): Delete.
6748         (-hw-read): Update.
6749         (define-hardware): Don't add object if not selected.
6750         (define-full-hardware): Ditto.
6751         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6752         (<hw-register>): Member `type' moved to baseclass.  Delete member
6753         hw-asm.
6754         (<hw-register>,parse!): Rewrite.
6755         (<hw-register>): Delete methods get-rank,get-mode.
6756         (<hw-register>): Method new-mode renamed to mode-ok?
6757         (<hw-register>): New method get-index-mode.
6758         (<hw-pc>,parse!): Rewrite.
6759         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6760         (<hw-memory>,parse!): Rewrite.
6761         (<hw-memory>): Delete methods get-rank,get-mode.
6762         (<hw-memory>): Method new-mode renamed to mode-ok?
6763         (<hw-memory>): New method get-index-mode.
6764         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6765         hw-asm.
6766         (<hw-immediate>,parse!): Rewrite.
6767         (<hw-immediate>): Delete methods get-rank,get-mode.
6768         (<hw-immediate>): Method new-mode renamed to mode-ok?
6769         (<hw-address>): Delete member hw-asm.
6770         (<hw-address>,parse!): Rewrite.
6771         (<hw-address>): Delete methods get-rank,get-mode.
6772         (<hw-address>): Method new-mode renamed to mode-ok?
6773         (hw-profilable?): Delete.
6774         (hardware-init!): Delete hardware-parsers reference.
6775         Update argument specs of command define-full-hardware.
6776         (hardware-builtin!): Update definitions of hardware builtins.
6777         * operand.scm (<operand>): New members hw-name,mode-name.
6778         Delete member op-asm.  New member handlers.
6779         (<operand>,make!): Update.
6780         (op:hw-name,op:mode-name,op:handlers): New procs.
6781         (op:type): Rewrite.
6782         (op:mode): Rewrite.
6783         (<operand>): New method get-index-mode.
6784         (<pc>,make!): Update.
6785         (op:new-mode): Rewrite.
6786         (operand-parsers): Delete.
6787         (-operand-parse): Rewrite.  Return #f if insn not selected.
6788         (-op-read-extra): Delete.
6789         (-operand-read): Update.
6790         (define-operand,define-full-operand): Update.
6791         (operand-init!): Delete operand-parsers reference.
6792         Update syntax of define-full-operand command.
6793
6794         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6795         (define-full-insn): Update.
6796         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6797         (define-full-minsn): Update.
6798
6799         * mode.scm (<mode>): New member class.
6800         (mode:class): New proc.
6801         (mode?): Rewrite.
6802         (-mode-parse): New arg class.
6803         (define-full-mode): Update.
6804         (mode-find): Rewrite.
6805         (mode-make-int,mode-make-uint): New procs.
6806         (mode-init!): Update syntax of define-full-mode command.
6807         (mode-builtin!): Update definitions of builtin modes.
6808
6809         * model.scm (<profile>): Delete.
6810
6811         * read.scm (keep-atlist?): New proc.
6812         (keep-multiple?): New proc.
6813         (<parser-list>): Delete.
6814         (add-parser!,parse-spec!): Delete.
6815
6816         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6817         (def-rtx-syntax-node): Ditto.
6818         (-rtx-traverse-debug?): New variable.
6819         (tstate-make): New proc.
6820         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6821         (tstate-new-cond?,tstate-new-set?): New procs.
6822         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6823         tstate.  All callers updated.
6824         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6825         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6826         (-build-operand!): Replace arg cond? with tstate.
6827         (-build-reg-operand!,-build-mem-operand!): Ditto.
6828         (-build-index-of-operand!): Update making of <operand> object.
6829         (s-ifield): New arg tstate.  All callers updated.
6830         (hw:): New arg tstate.  All callers updated.  Replace call to
6831         current-hw-lookup with current-hw-sem-lookup-1.
6832         (s-index-of): New arg tstate.  All callers updated.
6833         (reg:,mem:): Ditto.
6834         (-rtx-use-sem-fn?): New proc.
6835         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6836         semantic cover fns.
6837         (s-convop): Only use semantic mode when using semantic cover fns.
6838         (s-cmpop): Call -rtx-use-sem-fn?.
6839         (s-cond,s-case): New arg tstate.  All callers updated.
6840         (s-parallel,s-sequence): Ditto.
6841
6842         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6843
6844         * types.scm (<scalar>): Rewrite implementation.
6845         (<integer>): Delete.
6846         (parse-type): Rewrite.
6847
6848         * utils-cgen.scm (parse-handlers): New proc.
6849
6850         * utils.scm (!=): New proc.
6851
6852 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6853
6854         * pmacros.scm (-pmacro-expand): Fix typo.
6855
6856 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6857
6858         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6859         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6860         * i960.cpu (build-hex2): New pmacro.
6861         (insn-opcode): Simplify.
6862         (insn-opcode2): Ditto.
6863
6864         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6865         * cgen-stest.scm (catch-with-backtrace): Ditto.
6866
6867 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6868
6869         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6870         All callers updated.
6871         (-pmacro-invoke): New proc.
6872         (-pmacro-sym,-pmacro-str): New procs.
6873         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6874         (pmacros-init!): Install builtins .iota, .map, .apply.
6875         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6876         (h-fr): Simplify register name spec.
6877         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6878         * utils.scm (num-args-ok?): New proc.
6879
6880 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6881
6882         * pmacros.scm (-pmacro-error): New proc.
6883         (-pmacro-expand): Use it.
6884         (-pmacro-splice): New proc.
6885         (pmacros-init!): Install new builtin .splice.
6886
6887         * sparc.cpu: Include sparc64.cpu when appropriate.
6888         (f-mmask,f-simm11): Moved to sparc64.cpu.
6889         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6890         (ANNUL attribute): Delete.
6891         (test-* pmacros): New arg cc, all callers updated.
6892         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6893         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6894         atomic-opc.
6895         (ldstub,swap): Moved to sparccom.cpu.
6896         * sparc64.cpu: Add more insns.
6897
6898 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6899
6900         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6901         CGEN_ATTR_VALUE.
6902         (cgen-sem-switch.c): Ditto.
6903         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6904         moved to cgen-engine.h.
6905         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6906         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6907         global.  Cache attributes and insn length in IDESC.
6908         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6909         @cpu@_opcode renamed to @cpu@_get_idata.
6910         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6911         done later underneath sim_resume.
6912         (@mach@_mach): Record @cpu@_prepare_run.
6913         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6914         updated.
6915         (-hw-gen-set-quiet-pc): Ditto.
6916         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6917         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6918         (<hw-addr>,cxmake-get): Ditto.
6919         (<hw-iaddr>,cxmake-get): Ditto.
6920         (<pc>,cxmake-get): Ditto.
6921         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6922         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6923         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6924         (<hw-pc>,gen-write): Use hw-selector-default.
6925         (<hw-register>,gen-write): Ditto.
6926         (<hw-memory>,gen-write): Ditto.
6927         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6928         (-gen-hw-selector): New proc.
6929
6930         * desc.scm: New file.
6931         * desc-cpu.scm: New file.
6932         * opcodes.scm: Split up into several smaller files.
6933         * opc-asmdis.scm: New file.
6934         * opc-ibld.scm: New file.
6935         * opc-itab.scm: New file.
6936         * opc-opinst.scm: New file.
6937         * Makefile.am (desc): New target.
6938         (opcodes): Update args to cgen-opc.scm.
6939         * Makefile.in: Rebuild.
6940         * aclocal.m4: Rebuild.
6941         * config.in: Rebuild.
6942         * configure.in: Update arg to AC_INIT.
6943         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6944         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6945         AC_PROG_INSTALL.
6946         * configure: Rebuild.
6947         * cgen-gas.scm: Update files to load.
6948         * cgen-opc.scm: Ditto.  Reorganize option letters.
6949         * cgen-sim.scm: Update files to load.
6950         * cgen-stest.scm: Ditto.
6951         * dev.scm (cload): New app "DESC".
6952         (load-opc): Update files to load.
6953         (load-gtest,load-sim,load-stest): Ditto.
6954
6955         * attr.scm (bool-attr?): New proc.
6956         (attr-list-enum-list): New proc.
6957         (-attr-sort): Rewrite.
6958         (attr-builtin!): Give ALIAS attribute a fixed index.
6959         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6960         calculate attribute enum list.
6961         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6962
6963         * insn.scm (-insn-parse): Renamed from parse-insn.
6964
6965         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6966         (-hw-read): Ditto.
6967
6968         * mode.scm (-mode-parse): Renamed from parse-mode.
6969
6970         * operand.scm (<operand>): New member `selector'.
6971         (<operand>,make!): Use default selector.
6972         (hw-selector-default): New variable.
6973         (hw-selector-default?): New proc.
6974
6975         * pmacros.scm (pmacros-init!): New proc.
6976         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6977         (-env-set!): Delete.
6978         (-pmacro-expand): New proc apply-macro.
6979         Use it in scan-list,scan.  Scan list first, then see if macro
6980         invocation.
6981         (define-pmacro): Rewrite.
6982         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6983
6984         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6985         selected if (current-mach) seen.
6986         (rtx?): Renamed from rtx-uneval?, all callers updated.
6987         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6988         updated.
6989         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6990         selector, all callers updated.
6991         (hw:): New arg selector, all callers updated.  Delete old comments
6992         and code.
6993         (reg:,mem:): Handle selectors
6994         * rtx-funcs.scm (reg:): Handle selectors.
6995
6996         * read.scm: Renamed from cpu.scm.
6997         (<command>): New class.
6998         (<reader>): New member commands.
6999         (reader-add-command!): New proc.
7000         (reader-lookup-command): New proc.
7001         (reader-error,-reader-process-expanded,reader-process): New procs.
7002         (reader-read-file!): New proc.
7003         (include): Call reader-read-file!.
7004         (cmd-if): New proc.
7005         (cpu-load): Call reader-read-file!.
7006         * utils.scm (num-args): New proc.
7007         * simplify.inc: New file.
7008         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
7009         procs.  Move define-normal-foo procs (and abbreviated forms) to
7010         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
7011         routines.
7012         * fr30.cpu: Include simplify.inc.
7013         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7014         * i960.cpu: Include simplify.inc.
7015         * m32r.cpu: Include simplify.inc.
7016         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7017         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7018         * sparc.cpu: Include simplify.inc.
7019         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7020         * utils-cgen.scm (parse-error): Moved to read.scm.
7021         (sanitize): Rewrite.
7022         (utils-init!): New proc.
7023
7024 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
7025
7026         * sparc.cpu: New file.
7027         * sparc32.cpu: New file.
7028         * sparc64.cpu: New file.
7029         * sparccom.cpu: New file.
7030         * sparc.opc: New file.
7031
7032 1999-01-27  Frank Eigler  <fche@cygnus.com>
7033
7034         * utils.scm (gen-copyright): New proc.
7035
7036 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7037
7038         Parameterize rtl parsing, rather than having lots of little handlers.
7039         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7040         Delete member traverse.
7041         (rtx:set-traverse!): Delete.
7042         (-rtx-valid-types,-rtx-valid-matches): New variables.
7043         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7044         instead of expression.  All callers updated.
7045         (def-rtx-node): New args arg-types,arg-modes.
7046         (def-rtx-syntax-node): Ditto.
7047         (def-rtx-dual-mode): Ditto.
7048         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7049         All callers updated.
7050         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7051         All callers updated.
7052         (rtx-macro-expand): New proc.
7053         (-rtx-traverse-check-args): Delete.
7054         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7055         an rtx specific traverser.
7056         (-rtx-any-mode?,-rtx-symornum?): New procs.
7057         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7058         (-rtx-traverse-no-mode): Delete.
7059         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7060         (-rtx-traverse-operands): Rewrite.
7061         (-rtx-traverse-expr): Rewrite.
7062         (rtx-traverse): Don't expand macros here, leave for caller to do.
7063         (rtx-simplify): Delete.
7064         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7065         attributes.
7066         (rtx-true?,rtx-false?): Ditto.
7067         (-rtx-ref-type): Set dest is operand 1 now.
7068         (-simplify-for-compilation): New proc.
7069         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7070         Expand macros before calling rtx-traverse.  Sort operands by name
7071         to avoid unnecessary semantic formats.
7072         (semantic-attrs): New proc.
7073         (rtx-uneval?): Handle (<rtx-func> ...).
7074         (s-boolifop): Delete arg mode.  All callers updated.
7075         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7076         (eq-attr): New arg obj.
7077         (eq-attr:): Delete.
7078         * m32r.cpu (rach): Update calls to andif.
7079
7080         * minsn.scm (-minsn-parse-expansion): Renamed from
7081         parse-minsn-expansion.
7082         (-minsn-parse): Renamed from parse-minsn.
7083         (-minsn-read): Renamed from read-minsn.
7084         (def-minsn): Don't check APPLICATION here.
7085         (def-full-minsn): New proc.
7086         (define-macro-insn): Check APPLICATION here.  Expand macros.
7087         (define-normal-macro-insn): Ditto.
7088
7089         * utils.scm (word-value): New arg start-lsb?.
7090         (word-mask,word-extract): Ditto.
7091         (split-bits,powers-of-2): Use integer-expt instead of expt.
7092         (bit-set?): Handle 32 bit values (which are bignums).
7093         (cg-logand,cg-logxor): New functions.
7094         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7095         (<ifield>,field-value): Update call to word-value.
7096         (<ifield>,min-value): Use integer-expt instead of expt.
7097         (<ifield>,max-value): Ditto.
7098
7099         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7100
7101         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7102
7103         Compute raw instruction format in addition to semantic based format.
7104         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7105         (<iformat> accessors): Rename accessors to ifmt-*.
7106         (<sformat>): New class.
7107         (fmt-enum): Renamed from fmt:enum.
7108         (-ifmt-search-key): Rewrite.
7109         (-sfmt-search-key): New proc.
7110         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7111         Compute iformat and sformat search keys.
7112         (ifmt-build): Update.
7113         (sfmt-build): New proc.
7114         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7115         (ifmt-compute!): Compute instruction format <iformat> based on
7116         instruction fields alone.  Compute new semantic format <sformat>
7117         based on instruction fields and semantic information.
7118         (ifmt:lookup): Delete.
7119         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7120         (current-sfmt-list): New proc.
7121         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7122         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7123         (insn-length,insn-length-bytes): Update.
7124         (insn:mask-length,insn:mask): Update.
7125         (insn-lookup-op): Update.
7126         * gas-test.scm (gas-test-analyze!): Update.
7127         (gen-gas-test): Ditto.
7128         * sim-test.scm (sim-test-analyze!): Update.
7129         (gen-sim-test): Ditto.
7130         * opcodes.scm (gen-operand-instance-table): Update.
7131         (gen-operand-instance-ref): Ditto.
7132         (max-operand-instances): Use heuristic if semantics not parsed.
7133         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7134         (opcodes-analyze!): Only scan semantics of building operand instance
7135         tables.
7136         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7137         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7138         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7139         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7140         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7141         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7142         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7143
7144         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7145         New arg lsb0?  All callers updated.
7146         (decode-bits): New arg lsb0?.  All callers updated.
7147         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7148         of expt.
7149         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7150         (build-slots): Call integer-expt instead of expt.
7151         (build-decode-table-entry): Handle crossing word boundaries better.
7152         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7153         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7154
7155         * enum.scm (define-enum): Rewrite.
7156         (define-normal-enum): Ditto.
7157         (def-full-insn-enum): New proc.
7158         (define-normal-insn-enum): Rewrite.
7159
7160         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7161         valid C.
7162         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7163
7164         * dev.scm: Add sid support.
7165
7166         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7167         (CLEANFILES): Add tmp-*.
7168         * Makefile.in: Rebuild.
7169
7170         * doc/Makefile.am: New file.
7171         * doc/Makefile.in: New file.
7172         * doc/cgen.texi: New file.
7173         * Makefile.am (SUBDIRS): Define.
7174         * Makefile.in: Rebuild.
7175         * configure.in: Create doc/Makefile.
7176         * configure: Rebuild.
7177
7178 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7179
7180         * insn.scm (insn:syn): Delete.
7181
7182 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7183
7184         * fr30.cpu (model fr30-1): Add state variables load-regs,
7185         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7186         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7187         (model m32rx): Ditto.
7188         (addi): Simplify function unit usage spec.
7189         (ld-plus): Rewrite operand names in function unit usage spec.
7190         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7191         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7192         overridden.  Allow operand to appear in input and output spec.
7193         (<insn>,gen-profile-code): string-append -> string-list.
7194
7195         * ifield.scm (define-ifield): Call pmacro-expand.
7196         (define-full-ifield,define-normal-ifield): Ditto.
7197         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7198
7199         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7200         with-scache and without-scache cases.
7201
7202 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7203
7204         * fr30.cpu (fr30-1): Add state variable h-gr.
7205         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7206         (all insns): First pass at providing cycle counts.
7207         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7208         when initializing unit output operands, ditto for input operands.
7209
7210         * insn.scm (insn-length,insn-length-bytes): New procs.
7211         * mach.scm (-adata-set-derived!): Use them.
7212         * sim-cpu.scm (-gen-sem-case): Ditto.
7213
7214         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7215         (-gen-write-case): Ditto.
7216         (gen-semantic-fn): Ditto.  Split into two:
7217         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7218         in non-scache case.
7219         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7220         scache/no-scache appropriately.  All callers updated.
7221         (-gen-sem-case): PCADDR->IADDR.
7222         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7223
7224         * sim-decode.scm (*): Replace string-append,string-map with
7225         string-list,string-list-map where the result is sufficiently large.
7226         (-gen-decode-insn-table): Go back to simple version for non-scache
7227         case: just record IDESC in decoder tables and leave field extraction
7228         to the caller.
7229         (-gen-decode-switch): Ditto.
7230         (-gen-decode-fn): Ditto.
7231         (-gen-extract-decls): Only emit format enum if with-scache?.
7232         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7233         non-scache case.
7234         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7235         (-gen-insn-timing): Ditto.
7236         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7237         with-scache case.
7238
7239         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7240         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7241
7242 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7243
7244         * cpu.scm (keep-mach-validate!): New proc.
7245         (include): New proc.
7246
7247         * mach.scm (current-arch-mach-name-list): New proc.
7248         (-parse-arch-machs): Always return canonical form.
7249         (def-arch): Validate user specified machs to be kept.
7250         (def-mach-attr!): Simplify.
7251
7252         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7253         (option-init!): Initialize it.
7254         (option-set!): Set it.
7255         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7256         output operand instance tables.
7257         (cgen-opc.in): Only output operand instance tables if asked to.
7258
7259         * sim.scm (option-init!,option-set!): Clarify returned value.
7260
7261         * sim.scm (gen-mach-bfd-name): Move from here.
7262         * utils-cgen.scm: To here.
7263
7264 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7265
7266         * fr30.cpu (ilm): Fix comment field.
7267         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7268         compute it.
7269
7270         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7271         (rtx-true?, rtx-false?): New procs.
7272         * rtx-funcs.scm (annul): Rename vpc to pc.
7273         (-rtx-traverse-if): Improve determination of whether then/else parts
7274         are conditionally executed.
7275
7276         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7277         outer level.
7278         (gen-argbuf-type): Simplify generated definition (big sem_fields
7279         union moved outside).
7280
7281 1999-01-11  Ben Elliston  <bje@cygnus.com>
7282
7283         * doc/porting.texi: New file.
7284
7285         * doc/intro.texi: New file.
7286         (Layout): Use @example to insert preformatted ASCII text (such as
7287         diagrams). @code is inappropriate here.
7288
7289 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7290
7291         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7292
7293         * m32r.opc (print_hash): Cast dis_info.
7294
7295         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7296         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7297         get/set macros.
7298
7299 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7300
7301         * i960.cpu (f-br-disp): Remove RELOC attribute.
7302         (f-ctrl-disp): Ditto.
7303         (callx-disp): set-quiet -> set for (reg h-gr 2).
7304         (callx-indirect,callx-indirect-offset): Ditto.
7305
7306         * Makefile.am (gas-test): Fix dependencies.
7307         * Makefile.in: Rebuild.
7308         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7309         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7310         (gas-test-analyze!): Use syntax-break-out.
7311         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7312         (sim-test-analyze!): Use syntax-break-out.
7313         (cgen-build.sh): Use gen-file-name.
7314         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7315         * insn.scm (syntax-break-out): New proc.
7316         * utils.scm (gen-file-name): New proc.
7317
7318         * fixup.scm (nil,<?,<=?,>?): Delete.
7319
7320         * utils.scm (count-true): Rewrite.
7321
7322         * slib/sort.scm: Move sort.scm to slib directory.
7323         * cpu.scm: Update.
7324
7325         * iformat.scm (ifmt-compute!): Record empty format.
7326
7327         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7328         internal procs outside.  Handle expression register numbers.
7329         Handle index-of.
7330
7331         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7332
7333         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7334         every register.
7335         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7336         (gen-semantic-fn,-gen-sem-case): Ditto.
7337         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7338         (cgen-semantics.c): Ditto.
7339         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7340         (gen-ifmt-argvars-defns): New proc.
7341         (gen-ifmt-argvars-assigns): New proc.
7342         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7343         (-gen-decode-fn): Handle non-with-scache case.
7344         (cgen-decode.c): Define WANT_CPU to @cpu@.
7345         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7346         (cgen-model.c): Define WANT_CPU to @cpu@.
7347         * sim.scm (gen-ifld-extract-argvar): New proc.
7348         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7349         with FUN-ACCESS specified.
7350         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7351         (<hw-register>,gen-extract): New arg local?.
7352         (<hw-address>,gen-extract): Ditto.
7353         (-hw-cxmake-get): Handle non-with-scache case.
7354         (-hw-gen-set-quiet): Ditto.
7355         (<hw-address>,cxmake-get): Handle non-with-scache case.
7356         (gen-op-extract-argvar): New proc.
7357         (<operand>,gen-record-profile): Rewrite.
7358         (<operand>,gen-profile-code): Rewrite.
7359         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7360         (gen-argbuf-fields-union): New proc.
7361         (gen-argbuf-type): Use it.  Handle non-scache case.
7362
7363         * *.scm: class:foo procs renamed to class-foo.
7364         * attr.scm (<attribute>): New member `for'.
7365         (-attr-parse): New first value in list for default if
7366         none specified.
7367         (non-bool-attr-list,attr:add!): Delete.
7368         (def-attr): Use current-attr-add!.
7369         (atlist-attr-value-no-default): New proc.
7370         (attr-lookup-default): Handle boolean attributes.
7371         (gen-attr-enum): New proc.
7372         (-attr-remove-meta-attrs-alist): New proc.
7373         (attr-nub): New proc.
7374         (current-attr-list-for): New proc.
7375         (current-{ifld,hw,op,insn}-attr-list): New procs.
7376         (attr-builtin!): New proc.
7377         * cpu.scm (keep-obj?): Rewrite.
7378         (-init-parse-cpu!): Call arch-init!.
7379         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7380         (-finish-parse-cpu!): Call arch-finish!.
7381         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7382         (def-enum,def-full-enum): Use current-enum-add!.
7383         (gen-obj-list-enums): New proc.
7384         * hardware.scm (hw:add!,hw:lookup): Delete.
7385         (def-hardware,def-hardware-ext): Use current-hw-add!.
7386         (hw:std-attrs,hw:attr-list): Delete.
7387         (hardware-builtin!): Define builtin hardware attributes.
7388         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7389         (def-ifield,def-full-ifield): Use current-ifld-add!.
7390         (ifld:std-attrs,ifld:attr-list): Delete.
7391         (ifield-builtin!): New proc.
7392         * insn.scm (insn:add!,insn:lookup): Delete.
7393         (def-full-insn): Use current-insn-add!.
7394         (insn:std-attrs): Delete.
7395         (insn-builtin!): New proc.
7396         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7397         minsn-list.
7398         (<arch-data>): New member machs.
7399         (current-attr-list,current-enum-list): New procs.
7400         (current-op-list,current-minsn-list): New procs.
7401         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7402         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7403         Ditto.
7404         (-parse-arch-machs): New proc.
7405         (-arch-parse): New arg machs, all callers updated.
7406         (-arch-read): Handle machs spec.
7407         (def-arch): Define MACH attribute here.
7408         (mach-init!,mach-finish!): Not here.
7409         (cpu:add!,cpu:lookup): Delete.
7410         (def-cpu): Use current-cpu-add!.
7411         (<mach>): New member bfd-name.
7412         (-mach-parse): New arg bfd-name, all callers updated.
7413         (-mach-read): Handle bfd-name spec.
7414         (mach:add!,mach:lookup): Delete.
7415         (def-mach): Use current-mach-add!.
7416         (def-mach-attr!): New proc.
7417         (arch-init!): New proc.
7418         (arch-finish!): New proc.  Reverse all object lists here.
7419         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7420         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7421         (define-normal-macro-insn): Ignore minsn if mach not kept.
7422         * mode.scm (mode-builtin!): New proc.
7423         * model.scm (model:add!,model:lookup): Delete.
7424         (def-model): Use current-model-add!.
7425         * opcodes.scm (insn:attr-list): Delete.
7426         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7427         (gen-attr-table-defn): Emit value for default.
7428         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7429         (op:attr-list): Delete.
7430         (gen-operand-decls,gen-insn-decls): New proc.
7431         (compute-insn-attr-list): Delete.
7432         (cgen-opc.h): Reorganize and simplify.
7433         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7434         (def-operand,def-full-operand): Use current-op-add!.
7435         (op:std-attrs): Delete.
7436         (operand-enum): Delete.
7437         (operand-builtin!): Define builtin operand attrs.
7438         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7439         (gen-attr-enum-decl): Use gen-obj-list-enums.
7440         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7441         Rewrite.
7442         * fr30.cpu (define-arch): Add machs spec.
7443         (f-i4): SIGNED attribute -> !UNSIGNED.
7444         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7445         (HASH-PREFIX): Define operand attribute.
7446         (NOT-IN-DELAY-SLOT): Define insn attribute.
7447         * i960.cpu (define-arch): Add machs spec.
7448         * m32r.cpu (define-arch): Add machs spec.
7449         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7450         (HASH-PREFIX): Define operand attribute.
7451         (FILL-SLOT): Define insn attribute.
7452
7453 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7454
7455         * fr30.cpu (stilm): Correct mask for and operation.
7456
7457 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7458
7459         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7460         Replace START/EXIT with start/pass.
7461         (gen-sim-test): Delete ".text".
7462
7463 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7464
7465         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7466
7467 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7468
7469         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7470         (h-sbit): Make it FUN-ACCESS.
7471         (h-gr): Reorder so that general regs are always printed by number.
7472
7473 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7474
7475         * i960.cpu (flushreg): Use nop.
7476
7477 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7478
7479         * m32r.cpu (default-alignment): Specify.
7480         * mach.scm (<arch-data>): New member default-alignment.
7481         (adata:default-alignment): New proc.
7482         (current-arch-default-alignment): New proc.
7483         (-arch-parse): New arg default-alignment.
7484         (parse-alignment): New proc.
7485         (-arch-read): Handle default-alignment spec.
7486
7487         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7488
7489         * insn.scm (f-%): Delete.
7490         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7491         be readded if proved useful.
7492         (gen-extract-fields): Ditto.  Use gen-ifetch.
7493         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7494         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7495
7496 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7497
7498         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7499
7500 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7501
7502         * fr30.cpu: Remove stub macros.
7503         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7504         (div2): Don't use addc/subc.
7505
7506 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7507
7508         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7509         if opcodes.
7510
7511 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7512
7513         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7514
7515 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7516
7517         * cpu.scm (keep-all?): New proc.
7518         (assert-keep-all): Use it.
7519         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7520         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7521         Check for spelling errors.
7522
7523 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7524
7525         * rtl.scm (s-convop): Call -rtx-sem-mode.
7526
7527 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7528
7529         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7530         (-parse-hw-profile): Ditto.
7531         (<hw-register>, parse!): Return `void' result.
7532         (<hw-pc>, parse!): Ditto.
7533         (<hw-memory>, parse!): Ditto.
7534         (<hw-immediate>, parse!): Ditto.
7535         (<hw-address>, parse!): Ditto.
7536
7537         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7538         (-ifld-parse-encode-decode): New proc.
7539         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7540         (-multi-ifield-parse): Set encode/decode to #f.
7541         (ifld:decode-mode): New proc.
7542         * utils.scm (nub): Rewrite.
7543         * operand.scm (op-nub): Rewrite.
7544         * sim.scm (<ifield>, gen-type): Rewrite.
7545         (-gen-ifld-argbuf-defn): New proc.
7546         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7547         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7548         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7549         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7550         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7551         New method gen-trace-extract.
7552         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7553         from gen-argbuf-elm, return "" if not caching register address.
7554         Rewrite gen-extract.  New method gen-trace-extract.
7555         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7556         gen-extract, gen-trace-extract, cxmake-get.
7557         (<hw-iaddress>): New method cxmake-get.
7558         (op-needed-iflds): New proc.
7559         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7560         (-gen-op-argbuf-defn): New proc.
7561         (gen-op-extract): Renamed from op:extract.
7562         (gen-op-trace-extract): Renamed from op:trace-extract.
7563         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7564         and rewritten.
7565         (gen-argbuf-elm): Rewrite.
7566         * sim-decode.scm (-gen-record-args): Update.
7567
7568         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7569
7570         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7571         argument position.  Flag symbolic macros in function position as
7572         an error.
7573         (define-pmacro): Handle quoting in definition of symbolic macros.
7574         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7575
7576 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7577
7578         * fr30.opc (parse_register_list): Account for reverse masks
7579         for load and store.
7580         (print_register_list): Ditto.
7581         (parse_low_register_list_ld): New function.
7582         (parse_hi_register_list_ld): New function.
7583         (parse_low_register_list_st): New function.
7584         (parse_hi_register_list_st): New function.
7585         (print_hi_register_list_ld): New function.
7586         (print_hi_register_list_st): New function.
7587         (print_low_register_list_ld): New function.
7588         (print_low_register_list_st): New function.
7589         * fr30.cpu (ldr15dr): Implement workaround.
7590         (ldm0,ldm1,stm0,stm1): Implemented.
7591
7592 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7593
7594         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7595         * configure: Regenerate.
7596         * Makefile.am (WITH_HOBBIT): Update.
7597         (cgen-hob.c): Remove Makefile dependency.
7598         (cgen.o): Depend on cgen-gh.h, config.h.
7599         * Makefile.in: Regenerate.
7600         * aclocal.m4: Regenerate.
7601
7602 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7603
7604         * i960.cpu, i960.opc: New files.
7605
7606 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7607
7608         * fr30.opc (parse_register_number): New function.
7609         (parse_register_list): New function.
7610         (parse_low_register_list): Use parse_register_list.
7611         (parse_hi_register_list): Use parse_register_list.
7612         * fr30.cpu (sth): Fix assembler syntax. Implement more
7613         insns.
7614
7615 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7616
7617         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7618         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7619         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7620         (-op-gen-set-trace-parallel): Ditto.
7621         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7622
7623         * fr30.cpu (call,calld): Fix setting of pc.
7624         (f-op5): Fix start bit number.
7625
7626 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7627
7628         * fr30.cpu (st): Fix operand ordering. Implement more
7629         insns.
7630
7631 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7632
7633         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7634         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7635         (fmt-semantic-operands): Move to sim.scm.
7636         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7637         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7638         (<hw-index>): New method get-name.
7639         (op-profilable?): Moved to sim.scm.
7640         (op-nub): New proc.
7641         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7642         (op-profilable?): Moved here from operand.scm.
7643         (gen-extract-type): Delete.
7644         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7645         (-gen-argfld-ref): New proc.
7646         (-gen-ifld-argfld-name): New proc.
7647         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7648         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7649         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7650         (<hardware-base>): Delete method gen-extract-type.  New method
7651         gen-argbuf-elm.
7652         (<hw-register): Ditto.  Update method gen-extract.
7653         (<operand>, method gen-argbuf-elm): Rewrite.
7654         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7655         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7656         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7657
7658         * sim-decode.scm (-gen-record-args): Tweak.
7659
7660         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7661
7662 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7663
7664         * doc/porting: Fix typo: gas->sim.
7665         * fr30.opc (print_m4): New function.
7666         * fr30.cpu: Implemented many insns.
7667
7668 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7669
7670         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7671
7672         * fr30.cpu (f-rel9): Delete RELOC attribute.
7673         (f-rel12): Add PCREL-ADDR attribute.
7674         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7675         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7676         * fr30.opc (print_label9): Delete.
7677
7678         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7679         code for CTI indicators.
7680         * insn.scm (insn-cti?): Simplify.
7681         * utils-cgen.scm (atlist:cti?): New proc.
7682
7683 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7684
7685         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7686         (f-i20-4,f-i20-16,f-i20): New fields.
7687         (i20): New operand.
7688         (ldi8): Implement.
7689         (ldi20): New insn.
7690         (ldi32m): Delete.
7691         (jmpd): Implement.
7692         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7693         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7694         * mach.scm (arch-data): Ditto.
7695         (current-arch-default-insn-word-bitsize): Renamed from
7696         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7697         (-arch-read): Update.
7698
7699         * hardware.scm (hw:attr-list): Move here ...
7700         * opcodes.scm: ... from here.
7701
7702         * ifield.scm (fld:bitrange): Delete.
7703         (fld:word-offset,fld:word-length): New procs.
7704         (ifield?): Use class-instance.
7705         (<ifield>, method field-start): Rewrite.
7706         (ifld:enum): New proc.
7707         (<ifield>, methods field-mask,field-value): Rewrite.
7708         (-ifield-parse): Rewrite.
7709         (<multi-ifield> support): Rewrite.
7710         (ifld-beyond-base?): Rewrite.
7711         (ifld:std-attrs): New variable.
7712         (ifld:attr-list): New proc.
7713         * iformat.scm (-compute-insn-mask): Rewrite.
7714         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7715         Simplify.
7716         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7717         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7718         onto type.
7719         (<operand>): Ditto.  Forward onto index instead.
7720         (gen-ifld-decls,gen-ifld-defns): New procs.
7721         (ifld:insert,ifld:extract): New procs.
7722         (<ifield>): New methods gen-insert, gen-extract.
7723         (<multi-ifield>): Ditto.
7724         (<hw-index>): Forward gen-insert,gen-extract onto value.
7725         (<hw-asm>): Delete insert/extract support.
7726         (<hw-register,hw-memory,hw-immediate>): Ditto.
7727         (gen-hash-defines): Use string-list.
7728         Define CGEN_MAX_IFMT_OPERANDS.
7729         (gen-switch): Use string-list,string-list-map.
7730         (gen-fget-switch,gen-fset-switch): Use string-list.
7731         (gen-parse-switch,gen-insert-switch): Ditto.
7732         (gen-extract-switch,gen-print-switch): Ditto.
7733         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7734         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7735         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7736         (gen-ivalue-entry): New proc.
7737         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7738         computation.  Use 0 for operand ref table if ALIAS insn.
7739         (gen-minsn-table-entry): Use string-list.
7740         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7741         (gen-opcode-open): Record address of ifield table.
7742         (cgen-opc.h): Call gen-ifld-decls.
7743         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7744         * types.scm (<bitrange>): New members word-offset,word-length.
7745         Delete member total-length.  Delete methods start,mask,value.
7746         (bitrange:word-offset,bitrange:word-length): New procs.
7747         * sim-cpu.scm (gen-define-fields): Simplify.
7748         (gen-extract-fields): Simplify.
7749         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7750         (<ifield>): New methods gen-ifld-extract-decl.
7751         Delete method gen-ifld-extract-beyond.
7752         (<multi-ifield>): New methods gen-ifld-extract-decl.
7753         (<multi-ifield>, method gen-ifld-extract): Implement.
7754         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7755         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7756
7757         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7758         (-rtx-traverse-syntax-no-mode): New proc.
7759         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7760         (s-ifield): New proc.
7761         (s-shop): Don't prepend `unsigned' for unsigned modes.
7762         * rtx-funcs.scm (ifield): New rtx function.
7763         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7764         (delay): New rtx function.
7765         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7766
7767         * cos.scm (-elm-make-method-getter): Fix typo.
7768
7769         * utils.scm (backslash): Handle lists of strings.
7770
7771 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7772
7773         * fr30.cpu (f-rel9): Correct for pc+2.
7774         (label9): Use print_label9.
7775         * fr30.opc (print_label9): New function.
7776
7777 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7778
7779         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7780         * fr30.opc (parse_low_register_list): Renamed.
7781         (parse_hi_register_list): Renamed.
7782         (print_hi_register_list): Renamed.
7783         (print_low_register_list): Renamed.
7784
7785 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7786
7787         * fr30.cpu (f-rel9): Now a pc relative offset.
7788
7789 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7790
7791         * opcodes.scm (op-asm): Move to here, from operands.scm.
7792         (<op-asm>, method parse!): Validate arguments.
7793         (<operand>, method gen-function-name): Fix thinko.
7794         * operand.scm (<operand>, method make!): Don't set op-asm here.
7795         * utils.scm (list-elements-ok?): New proc.
7796
7797         * opcodes.scm: Clean up pass.
7798
7799 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7800
7801         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7802         the fr30_int function.
7803         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7804         (h-dr): Add FUN-ACCESS attribute.
7805
7806 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7807
7808         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7809         for C symbol for models array.
7810
7811 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7812
7813         * fr30.opc (parse_reglist_low): New function.
7814         (parse_reglist_hi): New function.
7815         (print_reglist_low): New function.
7816         (print_reglist_hi): New function.
7817         * fr30.cpu: Finish remaining insn stubs.
7818
7819 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7820
7821         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7822
7823         * fr30.cpu (ldi32m): Don't use for disassembly.
7824
7825 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7826
7827         * fr30.cpu (int): Implement it.
7828
7829 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7830
7831         * rtx-funcs.scm (nop): Fix C code.
7832
7833         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7834
7835         * fr30.cpu (f-i32): New ifield.
7836         (i32): New operand.
7837         (ldi32): New insn.
7838         (ldi32m): New macro insn.
7839         (inte): Provide simple version for now.
7840
7841         * sim-arch.scm: New file.
7842         * sim.scm: Move architecture support generation to sim-arch.scm.
7843         * cgen-sim.scm: Load sim-arch.scm.
7844         * dev.scm: Ditto.
7845
7846         * hardware.scm (pc?) New proc.
7847         (class <hardware-base>): Rewrite method 'pc?.
7848         (class <hardware>): Forward 'pc? to the hardware type.
7849         (class <hw-pc>): New method 'pc?.
7850
7851         Add support for variable length ISAs.
7852         * ifield.scm (ifld-beyond-base?): New proc.
7853         * m32r.cpu: Remove integral-insn? spec.
7854         * mach.scm (arch:derived,arch:set-derived!): New procs.
7855         (arch:app-data,arch:set-app-data!): New procs.
7856         (class <arch>): New members derived, app-data.
7857         (class <cpu>): Delete member integral-insn?.
7858         (cpu:integral-insn?): Delete.
7859         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7860         (-cpu-read): Delete integral-insn? support.
7861         (state:decode-assist): Delete.
7862         (state:int-insn?): Delete.
7863         (<derived-arch-data>): New class.
7864         (-adata-set-derived!): New proc.
7865         (mach-finish!): Call it.
7866         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7867         (gen-operand-instance): Add COND_REF support.
7868         (gen-operand-instance-table): Ditto.
7869         (gen-hash-defines): Update.
7870         (gen-extract-switch): Update type of `insn_value' arg.
7871         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7872         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7873         updated.
7874         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7875         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7876         beyond the base insn (for large insns).
7877         (-gen-extract-beyond-var-list): New proc.
7878         (gen-extract-fields): Handle large insns.
7879         (-gen-write-case): Update sem_arg computation.
7880         Update initial vpc computation.
7881         (gen-semantic-fn): Ditto.  Update type of `insn'.
7882         (-gen-sem-case): Update sem_arg computation.
7883         Update initial vpc computation.
7884         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7885         (-gen-extract-word): New proc.
7886         (<ifield>): New method gen-ifld-extract-beyond.
7887         (gen-ifld-extract-beyond): New proc.
7888         * types.scm (bitrange-overlap?): New proc.
7889
7890         * utils.scm (bits->bytes): New proc.
7891         (bytes->bits): New proc.
7892
7893         Move extraction support into decoder.
7894         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7895         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7896         support to sim-decode.scm.
7897         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7898         be array of IDESC,FMT entries.  Make the array const.
7899         (-gen-gcc-label-table): Make array const.
7900         (-gen-decode-switch): Branch to extraction code after insn has been
7901         identified.
7902         (-gen-decode-insn-globals): Delete extract handler from
7903         @cpu@_insn_sem.
7904         (gen-decode-fn): Add extraction support.
7905         (-gen-sem-fn-decls): Delete extraction fn decls.
7906         (-gen-idesc-decls): Update @cpu@_decode decl.
7907         (-gen-idesc-init-fn): Delete extraction support.
7908         (-gen-extract-decls): New proc.
7909
7910         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7911         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7912
7913         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7914         All callers updated.
7915         (table-entry:make): Record insn value as insn object, not name.
7916         All uses updated.
7917
7918         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7919         collision with C function.
7920         (path_dirname): Similarily.
7921         * hobbit.c,hobbit.h: Rebuild.
7922
7923 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7924
7925         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7926
7927 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7928
7929         * fr30.cpu: Implement more instruction stubs.
7930
7931 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7932
7933         * fr30.cpu: Implement more instruction stubs.
7934
7935 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7936
7937         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7938
7939         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7940
7941         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7942         (op:std-attrs): Ditto.
7943         * opcodes.scm (gen-operand-instance): Ditto.
7944         (gen-switch): Ditto.
7945         * m32r.cpu (condbit,accum): Update.
7946         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7947
7948 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7949
7950         * enum.scm (-enum-read): Fix typo.
7951
7952         * iformat.scm (-ifmt-search-key): Simplify a little.
7953
7954 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7955
7956         * doc/porting: semantics.c -> sem.c.
7957         * Makefile.in: Regenerate.
7958         * fr30.cpu (add): Change ADD to add. Add more registers and set
7959         status bits on 'add' instruction.
7960
7961 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7962
7963         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7964         of 0.
7965
7966 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7967
7968         * minsn.scm (minsn:enum): Update, call current-arch-name.
7969
7970         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7971
7972         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7973         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7974         (ARCH,CGEN,CGENFLAGS): New variables.
7975         (gas-test,sim-test): New rules.
7976         * Makefile.in: Rebuild.
7977         * configure.in (arch): Define.
7978         * configure: Rebuild.
7979
7980         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7981         * All .scm files: Ditto.
7982
7983         * dev.scm: Fix gas-test call to cpu-load.
7984         * gas-test.scm: Clean up pass to remove bit-rot.
7985         * sim-test.scm: Ditto.
7986
7987         * enum.scm (read-enum): Fix typo in `vals' handling.
7988
7989         * hardware.scm (-parse-hw-type): Fix typo.
7990         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7991         (def-hardware,define-normal-hardware): Ditto.
7992
7993         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7994         (display-var): Use it.
7995         * hobbit.c: Rebuild.
7996         * hobbit.h: Rebuild.
7997
7998         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7999         avoid hobbit problem.
8000         * mach.scm (-cpu-read): Rename local `parallel-insns' to
8001         `parallel-insns-' to avoid hobbit problem.
8002
8003 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
8004
8005         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
8006         (parse_slo16,parse_ulo16): Ditto.
8007         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8008
8009 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
8010
8011         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8012         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8013         * Makefile.in: Rebuild.
8014         * insn.scm (define-normal-insn): Expand pmacros.
8015         * mode.scm (<mode>): New member `host?'.  All uses updated.
8016         (mode:host?): New proc.
8017         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8018         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8019         (define-rtx-dual-mode): Ditto.
8020         (s-index-of): New proc.
8021         (s-unop): Use plain C for host mode operations.
8022         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8023         * rtx-funcs.scm (index-of): New rtx function.
8024         * sim.scm (<hw-index>): New method cxmake-get.
8025
8026 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
8027
8028         * sim-cpu.scm (-gen-engine-decls): Delete.
8029
8030 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
8031
8032         * doc/rtl (Example): Correct Typo.
8033         * doc/porting: Add 'make dep' step to opcodes port instructions.
8034         * fr30.opc: New file.
8035         * fr30.cpu: New file.
8036
8037 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8038
8039         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8040         * Makefile.am (GUILEINCDIR): New variable.
8041         (INCLUDES): Use it.
8042         * configure: Regenerate.
8043         * Makefile.in: Ditto.
8044         * aclocal.m4: Ditto.
8045
8046 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8047
8048         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8049         (cgen-semantics.c): Ditto.
8050         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8051         * sim-model.scm (cgen-model.c): Ditto.
8052         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8053         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8054
8055         * opcodes.scm (read-cpu.opc): Handle empty file.
8056
8057         * cos.scm (-elm-make-method-setter): Fix typo.
8058
8059         * cpu.scm (-init-parse-cpu!): Call types-init!.
8060         (-finish-parse-cpu!): Call types-finish!.
8061         * ifield.scm (<ifield>): Delete members start,length.
8062         New member bitrange.
8063         (<ifield>, methods field-start,field-length): Update.
8064         (fld:start): New arg insn-len.  All callers updated.
8065         (<ifield>, methods field-mask,field-value): Update.
8066         (-ifield-parse): Update.
8067         (ifield-init!): Update.
8068         * iformat.scm (compute-insn-length): Simplify.
8069         (compute-insn-mask): Update.
8070         * insn.scm (insn:value): Update.
8071         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8072         (current-arch-default-insn-bitsize): New proc.
8073         (current-arch-insn-lsb0?): New proc.
8074         (-arch-parse,-arch-read): Update.
8075         (<cpu>): New member file-transform.
8076         (-cpu-parse,-cpu-read): Update.
8077         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8078         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8079         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8080         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8081         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8082         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8083         * operand.scm (op:start): Update call to field-start method.
8084         * sim-decode.scm (opcode-slots): New arg lsb0?.
8085         (fill-slot!,build-slots): Ditto.
8086         (build-decode-table-entry,build-decode-table-guts): Ditto.
8087         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8088         (gen-decode-fn): Ditto.
8089         (cgen-decode.c): Update call to gen-decode-fn.
8090         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8091         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8092         (cgen-cpuall.h): Call -gen-cpuall-includes.
8093         * types.scm (<bitrange>): New class.
8094         (types-init!,types-finish!): New procs.
8095         * utils-cgen.scm (parse-number): New proc.
8096         (parse-boolean): New proc.
8097         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8098         (word-mask): Rewrite.
8099         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8100         (m32rxf): New field `file-transform'.
8101         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8102
8103         * hobbit.h: Fix include file name.
8104
8105 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8106
8107         * slib: New directory of slib files used by cgen/hobbit.
8108         * hobbit.scm: New file.
8109         * hobbit.c: New file.
8110         * hobbit.h: New file.
8111         * hobscmif.h: New file.
8112         * hob-main.c: New file.
8113         * hobslib.scm: New file.
8114         * hob.sh: New file.
8115         * Makefile.am: Add support for compiling hobbit, and using compiled
8116         version of hobbit to compile cgen.
8117         * Makefile.in: Regenerate.
8118         * configure.in: Support --with-hobbit.
8119         * configure: Regenerate.
8120         * acconfig.h (WITH_HOBBIT): Add.
8121         * config.in: Regenerate.
8122
8123         * rtl.scm: New file, was cdl-c.scm.
8124         Definition of rtx funcs moved to rtx-funcs.scm.
8125         (semantic-in-out-operands): Rewrite to compute object form of
8126         semantic code.
8127         * rtx-funcs.scm: New file.
8128
8129         * cgen-gh.c: #include "config.h".
8130         (gh_cadddr,gh_cddddr): New fns.
8131         (cgh_vector_to_list): New fn.
8132         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8133         (cgh_init): Prefix qsort procs with "cgh-".
8134         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8135         * cgen.c: #include "config.h".
8136
8137         * attr.scm (bitset-attr?): New proc.
8138         (<bitset-attribute>, method parse-value): Value syntax changed from
8139         (val1 val2 ...) to val1,val2,....
8140         (<bitset-attribute>): New method gen-value.
8141         (<integer-attribute>): New method gen-value.
8142         (<enum-attribute>): New method gen-value.
8143         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8144         (<reader>): New class.
8145         (CURRENT-ARCH,CURRENT-READER): New globals.
8146         (keep-mach?): Move here from mach.scm.
8147         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8148         (<arch>): New class.
8149         (<arch-data>): New class.
8150         (<cpu>): Make subclass of <ident>.
8151         (*ENDIAN* variables): Delete.
8152         (process-state-vars): Delete.
8153         (mach-finish!): Add `base' value to MACH attribute.
8154         * hardware.scm (<hardware>): Make subclass of <ident>.
8155         (hw:std-attrs): New global.
8156         (hw-profilable?): New proc.
8157         * ifield.scm (<ifield>): Make subclass of <ident>.
8158         (sort-ifield-list): Move here from iformat.scm.
8159         * iformat.scm (<iformat>): Renamed from <insn-format>.
8160         Make subclass of <ident>.
8161         (-ifmt-search-key): Include cti? in categorization of formats.
8162         (ifmt-analyze): Compile semantics (turn to object form).
8163         * insn.scm (<insn>): Make subclass of <ident>.
8164         New member compiled-semantics.
8165         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8166         * mode.scm (<mode>): Make subclass of <ident>.
8167         (UBI): Delete.
8168         * model.scm (<unit>): Make subclass of <ident>.
8169         New members inputs,outputs.
8170         (<model>): Make subclass of <ident>.  New member state.
8171         (-unit-parse): Parse inputs,outputs.
8172         (<iunit>): New class.
8173         (-insn-timing-parse-model): New proc.
8174         (parse-insn-timing): Function unit spec rewritten.
8175         * operand.scm (<operand>): Make subclass of <ident>.
8176         New members sem-name,num,cond?  New method gen-pretty-name.
8177         (hw-index-scalar): New global.
8178         (op-nub-hw): Move here from rtl.scm.
8179         (op:lookup-sem-name,op-profilable?): New procs.
8180         * pmacros.scm: Rewrite to pass through hobbit.
8181         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8182         * utils.scm (logit): Make a macro.
8183         (bit-set?): Rewrite.
8184         (high-part): Rewrite.
8185
8186         * m32r.cpu (define-arch): Move to top of file.
8187         (cpu family m32rbf): Renamed from m32rb.
8188         (model m32r/d): Function unit spec rewritten.
8189         (all insns): Ditto.  Replace UBI with BI.
8190
8191         * opcodes.scm (gen-attr-table-decls): Declare
8192         @arch@_cgen_hw_attr_table.
8193         (gen-attr-table-defns): Generate hw attribute table.
8194
8195         * sim-cpu.scm (-gen-engine-decls): New proc.
8196         (-gen-model-decls): New proc.
8197         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8198         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8199         (-gen-record-profile-args): Simplify.
8200         (-gen-parallel-sem-case): Delete.
8201         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8202         New local `written'.  Delete profiling code.
8203         (-gen-sem-case): Ditto.
8204         (-uncond-written-mask,-any-cond-written?): New procs.
8205         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8206         parallelly or serially, and write-back handlers for all parallel insns.
8207         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8208         support to initialization of struct insn_sem.
8209         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8210         (-gen-insn-sem-type): Add parallel write-back support to struct
8211         insn_sem.
8212         (-gen-idesc-init-fn): Add support for virtual insns.
8213         Add parallel write-back support.
8214         * sim-model.scm (gen-model-profile-fn): Delete
8215         (-gen-model-fn-decls): New proc.
8216         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8217         (-gen-model-init-fn): New proc.
8218         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8219         members in @mach@_init_cpu.
8220         (cgen-model.c): Generate model handlers for each insn.
8221         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8222         (<hw-pc>): New method gen-write.
8223         (<hw-register>, method gen-write): New arg `mode'.
8224         (<hw-register>): Delete method gen-record-profile!.
8225         New method gen-profile-index-type.
8226         (<hw-memory>, method gen-write): New arg `mode'.
8227         (<hw-address>, method gen-extract): Delete.
8228         (<hw-address>, method gen-write): New arg `mode'.
8229         (<hw-index>, method get-write-index): Rewrite.
8230         (<pc>, method cxmake-get-direct): Delete.
8231         (<pc>): New method cxmake-get.  Comment out methods
8232         gen-set-quiet,gen-set-trace.
8233         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8234         gen-profile-index-type,gen-profile-code.
8235         Delete method gen-pretty-name.  Rewrite method gen-write.
8236         Delete method cxmake-get-direct.
8237         (-op-gen-set-trace): Update `written'.
8238         (-op-gen-set-trace-parallel): Ditto.
8239         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8240         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8241         insns and their write-back handlers.
8242         (insn-op-lookup): New proc.
8243         (<unit>): New method gen-profile-code.
8244         (<iunit>): New method gen-profile-code.
8245         (gen-argbuf-elm): Add profiling elements.
8246         (gen-argbuf-type): Define cti insns separately in their own struct.
8247         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8248         insns.  Move semantic entries here from struct scache.
8249         Delete everything from struct scache except argbuf.
8250         (<insn>, method gen-profile-locals): Rewrite.
8251         (<insn>, method gen-profile-code): Rewrite.
8252         (sim-finish!): Create virtual pbb insns.
8253
8254 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8255
8256         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8257         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8258         (h-psw,h-bpsw,h-bbpsw): Define.
8259         (rte,trap): Handle bbpc,bbpsw.
8260         * opcodes.scm (max-operand-instances): Fix typo.
8261         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8262         hardware elements to be fun-access.
8263         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8264
8265 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8266
8267         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8268
8269 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8270
8271         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8272
8273 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8274
8275         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8276         architecture name.
8277         (mach m32r): Update.
8278
8279         * mach.scm (mach:supports?): New proc.
8280         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8281         gen-reg-access-{decls,defns}.
8282         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8283         (gen-mach-bfd-name): New proc.
8284         (gen-arch-reg-access-{decls,defns}): New procs.
8285         (cgen-arch.[ch]): Output register access cover fns.
8286
8287         * hardware.scm (hardware-builtin!): Set print handlers for
8288         h-addr,h-iaddr.
8289         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8290         `od'.
8291         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8292         (my_print_insn): Ditto.  Delete args buf, buflen.
8293         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8294         (-hw-asm-specs): Add `handlers' spec.
8295         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8296         `normal-hw-asm'.
8297         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8298         print.
8299         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8300         (<hw-asm>, parse!): New method.
8301         (gen-insn-table-entry): Print semantics.
8302         (gen-opcode-open): Renamed from gen-opcode-table.
8303
8304         * utils.scm (string-write): No longer a macro.
8305         (-string-write): Handle procedure args.
8306         * opcodes.scm: Update all calls to string-write.
8307         * sim-cpu.scm: Ditto.
8308         * sim-decode.scm: Ditto.
8309         * sim-model.scm: Ditto.
8310         * sim.scm: Ditto.
8311
8312 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8313
8314         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8315         (-gen-insn-builders,-gen-insn-builder): New procs.
8316
8317 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8318
8319         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8320         (gen-opcode-table): Properly terminate comment.
8321
8322 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8323
8324         * Version 0.6.0.
8325         Clean up pass over everything, so starting fresh.