OSDN Git Service

*** empty log message ***
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-12-17  Doug Evans  <dje@sebabeach.org>
2
3         * mep.opc: Apply patches from opcodes to compile with -Wshadow.
4         mep-asm.c now regenerates correctly again.
5         
6         * gen-all: Add support for building gcc/newlib.
7         Specify --prefix and install all built tools.
8
9 2009-12-16  Doug Evans  <dje@sebabeach.org>
10
11         * sim.scm (/op-gen-written-update): Disable operand number is too
12         large warning, for now.
13
14 2009-12-11  Nick Clifton  <nickc@redhat.com>
15
16         * cpu/fr30.opc: Fix shadowed variable warnings.
17
18 2009-12-10  Doug Evans  <dje@sebabeach.org>
19
20         * gen-all: Rewrite.  Build more ports.  Split out building of sid.
21
22 2009-11-23  Doug Evans  <dje@sebabeach.org>
23
24         * hardware.scm (hw-pc?): New function.
25         * ifield.scm (ifld-signed?): New function.
26         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
27         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
28         (insn-cti?): New function.
29         * rtl.scm (/hw): Create <pc> object for pcs.
30         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
31         All callers updated.  Watch for sets to the pc.
32         (semantic-attrs): Watch for sets to the pc.
33         * sid.scm (<pc> cxmake-get): Handle raw-reg.
34         * sim.scm (<pc> cxmake-get): Handle raw-reg.
35         (<operand> cxmake-get): Add debugging printf.
36         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
37         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
38         (/gen-extract-word): Ditto.
39
40         * utils.scm (gen-c-hex-constant): New function.
41         * utils-sim.scm (/gen-decode-insn-entry): Call it.
42
43 2009-11-22  Doug Evans  <dje@sebabeach.org>
44
45         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
46         * read.scm (parse-error-continuable): New function.
47         (define /continuable-error-found?): New variable.
48         (/init-reader!): Initialize it.
49         (/finish-reader!): New function.
50         (cpu-load): Call it.
51         * utils-cgen.scm (obj-list-nub): New function.
52
53         * mach.scm (<derived-arch-data>): New member large-insn-word?.
54         (/adata-set-derived!): Set it.
55         (adata-large-insn-word?): New function.
56         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
57         here.
58         * sim-cpu.scm (cgen-cpu.h): #include it here.
59         (/gen-cpu-defines): Define CGEN_INSN_WORD.
60         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
61         CGEN_INSN_INT.
62         * sim-decode.scm (/gen-idesc-decls): Ditto.
63         (/gen-extract-case, /gen-decode-fn): Ditto.
64         * sim-model.scm (/gen-model-insn-fn): Ditto.
65         * sim.scm (gen-argbuf-type): Ditto.
66
67         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
68         (s-sequence): Call it.
69
70 2009-11-21  Doug Evans  <dje@sebabeach.org>
71
72         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
73         non-VOID-mode expressions with multiple statements.
74
75         * sim.scm (/operand-number-elaboration-written?): New variable.
76         (/op-gen-written-update op): New function.
77         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
78
79         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
80
81         * operand.scm (op-nub): Delete.
82
83         * dev-utils.scm: New file.
84         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
85         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
86         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
87         /loaded-file-record!, maybe-load): Delete.
88         Load cgen files directly instead of via maybe-load.
89
90 2009-11-14  Doug Evans  <dje@sebabeach.org>
91
92         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
93         expressions used in a void context.
94
95         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
96
97         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
98         * cpu/xc16x.opc: Ditto.
99
100 2009-11-12  Doug Evans  <dje@sebabeach.org>
101
102         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
103
104         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
105         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
106
107 2009-11-11  Doug Evans  <dje@sebabeach.org>
108
109         * html.scm (gen-insn-docs): Add logging message.
110
111 2009-11-05  Doug Evans  <dje@sebabeach.org>
112
113         * utils-cgen.scm (gen-set-macro2): New function.
114         * sim.scm (<hw-register> gen-get-macro): Call it.
115
116         * co-for-gen-all: New file.
117
118         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
119
120         * utils.scm (reduce): Delete.
121
122         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
123
124         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
125         regarding PREFIX attribute handling.
126
127         * operand.scm (<hw-index>): Add enum to possible types, all uses
128         updated.
129         (hw-index-constant?, hw-index-constant-value): New functions.
130         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
131         hw-index-enum-obj): New functions.
132         (/operand-parse): Handle enum indices.
133         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
134         hw-index-constant-value.
135         * rtl.scm (rtx-constant-value): Fix handling of enums.
136         * rtx-funcs.scm (enum): Ditto.
137         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
138         currently supported here.
139
140 2009-11-02  Doug Evans  <dje@sebabeach.org>
141
142         Specify isa(s) when doing ifield, operand, insn lookups.
143         ACU = all callers updated.
144         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
145         * enum.scm (define-full-insn-enum): Pass isa-name-list to
146         current-ifld-lookup.
147         * html.scm (get-insn-properties): Pass isa-name-list to
148         current-op-lookup.
149         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
150         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
151         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
152         (/parse-insn-format, syntax-break-out): Ditto.
153         * mach.scm (obj-filter-by-isa): New function.
154         (current-ifld-lookup): New optional arg maybe-isa-name-list.
155         (/ifld-already-defined?, /op-already-defined?): Simplify.
156         (current-op-lookup): New optional arg maybe-isa-name-list.
157         (current-insn-lookup): New arg isa-name-list, ACU.
158         (/insn-already-defined?, /minsn-already-defined?): Simplify.
159         (current-minsn-lookup): New arg isa-name-list, ACU.
160         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
161         current-op-lookup.
162         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
163         (gen-syntax-entry): Ditto.
164         * operand.scm (/operand-parse): Pass isa-name-list to
165         current-ifld-lookup.
166         (/derived-parse-encoding): New arg isa-name-list, ACU.
167         (/derived-parse-ifield-assertion): Ditto.
168         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
169         (/anyof-parse-choice): Ditto.
170         (anyof-satisfies-assertions?): Pass context to rtx-solve.
171         (/anyof-merge-syntax): New arg container, ACU.
172         (operand-builtin!): Add pc to all isas.
173         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
174         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
175         (rtl-c-parsed, rtl-c++-parsed): Ditto.
176         (rtl-c): New arg isa-name-list, ACU.
177         (rtl-c-expr, rtl-c++): Ditto.
178         (closure): New arg isa-name-list, ACU.
179         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
180         (/cstate-isas): New function.
181         (/rtx-canon-symbol-list): New function.
182         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
183         updated.
184         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
185         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
186         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
187         (rtx-canonicalize): New arg isa-name-list, ACU.
188         (rtx-canonicalize-stmt): Delete.
189         (tstate-make): New arg isas, ACU.
190         (tstate-isas, tstate--set-isas!): New functions.
191         (tstate-env-stack): Renamed from tstate-env, ACU.
192         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
193         (tstate-make-closure): Renamed from tstate-new-env, new arg
194         isa-name-list, ACU.
195         (/rtx-traverse-env): Delete.
196         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
197         SUMBOLLIST.
198         (/rtx-traverse): Include conditional flag in dump output.
199         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
200         (<eval-state>): New member isas.  Rename env to env-stack.
201         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
202         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
203         to env-stack.
204         (estate-make-for-eval): Provide #:isas.
205         (estate-make-closure): Renamed from estate-new-env.  New arg
206         isa-name-list, ACU.
207         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
208         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
209         (/rtx-trim-for-doc): Handle closures.
210         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
211         SYMBOLLIST.
212         (rtx-env-var-list): Delete.
213         (rtx-env-make): Handle already-compiled environments.
214         (rtx-var-alist-to-env): New function.
215         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
216         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
217         (rtx-operand-obj): New arg isa-name-list, ACU.
218         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
219         functions.
220         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
221         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
222         (/frag-compute-desired-frags): Minor simplification.
223         (/frag-pick-best): Ditto.
224         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
225         (/gen-sfrag-code): Update.
226         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
227         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
228         * utils.scm (non-null-intersection?): New function.
229
230         * gen-all (do_src): Manually run cgen-all for sid.
231
232 2009-11-01  Doug Evans  <dje@sebabeach.org>
233
234         * gen-all: New file.
235
236         * rtl-traverse.scm (/rtx-canon): Issue better error message for
237         invalid rtx function names.
238
239 2009-10-28  Doug Evans  <dje@sebabeach.org>
240
241         * cos.scm (object-assign!): New function.
242         * mode.scm (/mode-set-word-params!): Call it.
243
244 2009-10-25  Doug Evans  <dje@sebabeach.org>
245
246         Record bitset attributes internally as a list.
247         Record rtx attribute values internally as ((rtx-expr)).
248         * attr.scm (bitset-attr?): Delete, unused.
249         (<bitset-attribute> parse-value): Rewrite.
250         (/attr-parse): Rewrite bitset default value processing.
251         (/attr-read): Pick out values of scalar attributes to distinguish
252         them from bitset values which are a list.
253         Fix spelling errors for processing of default values.
254         Handle string attributes.
255         (bitset-attr->list): Delete, all callers updated.
256         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
257         All callers updated.
258         (atlist-source-form): Rewrite.
259         * hardware.scm (<hardware-base> 'get-isas): Update recognition
260         of all isas.
261         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
262         -> (ISA foo bar).
263         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
264         values are now lists.
265         * mach.scm (def-isa-attr!): Update, bitset attribute values,
266         including the default, are now lists.
267         (all-isas-attr-value): Result is now a list.
268         * doc/rtl.texi: Clean up pass over attribute docs.
269
270         Change internal representation of rtx attribute values.
271         * attr.scm (/attr-val-is-rtx?): New function.
272         (attr-value): Call it.
273         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
274         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
275         Disallow rtx values for bitset attributes.
276         (/attr-read): Record rtx in default value as ((rtx-expr)).
277         (/attr-eval): Update.
278
279 2009-10-24  Doug Evans  <dje@sebabeach.org>
280
281         * gen-all-doc: Add sh.cpu.
282         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
283         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
284
285         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
286         (/gen-sfrag-case): Ditto.
287         * sim-cpu.scm (/gen-sem-case): Ditto.
288
289         * doc/rtl.texi: Add note that different ifields, operands, insns,
290         and minsns may occur with the same name in different isas.
291         Add note on the canonical form of rtl expressions.
292
293 2009-10-23  Doug Evans  <dje@sebabeach.org>
294
295         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
296         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
297
298         * decode.scm: Tweak various comments.
299         (/opcode-slots): Add FIXME.
300         (/build-decode-table-guts): Add assert.
301         * utils-sim.scm (/gen-set-itype-and-extract): New function.
302         (/gen-bracketed-set-itype-and-extract): New function.
303         (/gen-decode-default-entry): Rewrite.
304         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
305         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
306         updated.  Don't unnecessarily emit check for whether all opcode bits
307         have been examined.
308         (/gen-decode-expr-set-itype): Delete.
309         (/gen-decode-expr-entry): Update.
310         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
311         updated.  Keep track of decoder tables used thus far.
312         (/gen-decoder-switch): Ditto.
313         * utils.scm (word-bit-value): New function.
314
315 2009-10-14  Doug Evans  <dje@sebabeach.org>
316
317         * ifield.scm (<ifield>, value): Provide default initial value.
318         (ifield-encode-mode): Delete
319         (ifield-decode-mode): Delete duplicate definition.
320         (<derived-ifield>, 'make!): Initialize members encode, decode.
321         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
322         ifld-encode-mode.
323         (<multi-ifield>, 'gen-insert): Ditto.
324         
325 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
326
327         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
328         for @foo@_init_idesc_table.
329
330 2009-09-30  Doug Evans  <dje@sebabeach.org>
331
332         * doc/intro.texi: Mention SID.
333         * doc/sim.texi: Ditto.
334         * doc/porting.text (Doing a simulator port): Add some text.
335
336 2009-09-27  Doug Evans  <dje@sebabeach.org>
337
338         * cos.scm (/class-table): New global.
339         (/class-uid, /class-set-uid!): New functions.
340         (/class-parent-name): Renamed from /class-parents.
341         (/class-make!): Change parents arg to parent-name, all callers updated.
342         Assign uid to class.
343         (/class-lookup-uid): New function.
344         (/class-parent-classes): Rewrite.
345         (/class-mi?): Delete.
346         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
347         Delete.
348         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
349         (/class-compute-class-desc, class-desc-dump): Update.
350         (/object-make!): Update.
351         (/object-make-with-values!): Delete arg class-desc, all callers
352         updated.
353         (/object-copy): Delete arg top?, all callers updated.
354         (/object-specialize): Delete.
355         (/object-elements, /object-top-class): Delete.
356         (/object-class-name, /object-class-desc): Update.
357         (/object-class-uid): New function.
358         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
359         class-make, /class-subclass? /class-lookup-element,
360         Update.
361         (/elm-delta, elm-list): Delete.
362         (/elm-make-method-getter, elm-get, elm-xget): Update.
363         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
364         (elm-make-getter, elm-make-setter): Update.
365         (/method-lookup-next): Update.
366         (send): Don't specialize class passed to method.
367         (send-next): New arg class-name, all callers updated.
368         (/class-parent, /class-parent-via-path, object-parent): Delete.
369         (class-cons-parent!, class-append-parent!): Delete.
370         (object-reset!): Init /class-table.
371
372         * cos.scm (/object-debug-classes): Delete.
373         (/object-debug-elements, /object-debug-methods): Delete.
374
375         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
376         (method-proc): Delete.
377         (method-make-virtual!, method-make-virtual-forward!): Delete.
378         * ifield.scm (<ifield> field-start): Update.
379         (<ifield> field-length, pretty-print): Update.
380         (<multi-ifield> field-length, field-start, pretty-print): Update.
381         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
382         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
383         (<array> gen-sym-defn): Ditto.
384         (<hardware-base> gen-defn): Renamed from gen-defn.
385         (<hw-register> gen-type): Update.
386         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
387         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
388         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
389         (<hw-immediate> gen-type): Update.
390         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
391         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
392         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
393         (<array> gen-sym-defn): Ditto.
394         (<hardware-base> gen-defn): Renamed from gen-defn.
395         (<hw-register> gen-type): Update.
396         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
397         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
398         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
399         (<hw-immediate> gen-type): Update.
400         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
401
402 2009-09-25  Doug Evans  <dje@sebabeach.org>
403
404         * operand.scm (/anyof-merge-setter): Handle set-quiet.
405         * rtl.scm (rtx-single-set?): Handle set-quiet.
406
407         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
408         rtl-cover-fns?, macro?.  All callers updated.
409         (estate-make-for-normal-rtl-c): Delete, have all callers call
410         estate-make-for-rtl-c directly.
411         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
412         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
413
414         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
415         replaces /par-replace-set-dests.
416         (/par-replace-set-src-expr-fn): New function, replaces
417         /par-replace-set-srcs.
418         (s-parallel): Rewrite.
419
420         * rtl.scm (rtx-pretty-strdump): New function.
421         * rtl-traverse.scm (/rtx-canon-error): Use it.
422         (<eval-state>): New member outer-expr.
423         (estate-error): Include outer expression in error message if present.
424
425 2009-09-23  Doug Evans  <dje@sebabeach.org>
426
427         * xc16x.cpu (h-cr): New hardware.
428         (muls): Comment out parts that won't compile, add fixme.
429         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
430         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
431         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
432
433         Rewrite rtl processing to require it to be "canonicalized" first,
434         and write a full canonicalizer / expression checker.
435         Remove all appearances of DFLT in canonical rtl.
436         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
437         then rtx-simplify.
438         * iformat.scm (ifmt-analyze) Use canonical semantics.
439         * insn (<insn>): New member canonical-semantics.
440         * mach.scm (<arch>): New member multi-insns-instantiated?.
441         (/instantiate-multi-insns!): New function.
442         (/canonicalize-insns!): New function.
443         (arch-analyze-insns!): Canonicalize insn semantics before processing
444         them.
445         * mode.scm (/mode-set-word-params!): New function.
446         (mode-void?): New function.
447         (mode-compatible?): VOID is compatible with VOID.
448         (/mode-word-sizes-defined?): New global.
449         (mode-set-word-modes!): Use/set it.
450         (mode-ensure-word-sizes-defined): Update.
451         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
452         Redo WI/UWI/AI/IAI handling.
453         (op:new-mode): No longer accept DFLT.
454         (<derived-operand> constructor): Ensure all fields are initialized.
455         (<anyof-operand> constructor): Ditto.
456         (/derived-parse-ifield-assertion): Delete arg `args'.
457         All callers updated.
458         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
459         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
460         (rtl-c-expr, rtl-c++): Ditto.
461         (/rtl-c-get): Use mode of operand, not containing expression.
462         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
463         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
464         estate-for-insn? instead.
465         (s-unop): Use mode of expression, not first operand.
466         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
467         (s-sequence): Remove DFLT support.
468         (ifield): Use mode of expression, not UINT.
469         (pc): Comment out, unused.
470         (int-attr): New rtx kind.
471         (attr): Deprecate.
472         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
473         * rtl-traverse.scm (/rtx-canon-debug?): New global.
474         (/make-cstate): New function.
475         (/cstate-context, /cstate-outer-expr): New functions.
476         (/rtx-canon-error): New function.
477         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
478         /rtx-get-last-cond-case-rtx): New functions.
479         (/rtx-canon-*): New functions.
480         (/rtx-canner-table, /rtx-operand-canoners): New globals.
481         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
482         (/rtx-option, /rtx-option-list?): Rewrite.
483         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
484         Rewritten, all callers updated.
485         (/rtx-canon-expr, /rtx-canon): New functions.
486         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
487         (rtx-canonicalize-stmt): New function.
488         (tstate-make): Remove arg `set?'.  All callers updated.
489         (tstate-new-set?): Delete.
490         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
491         moved to /rtx-canon-*.
492         (/rtx-traverse-normal-operand): New function.
493         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
494         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
495         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
496         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
497         Ditto.
498         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
499         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
500         (/rtx-make-traverser-table): Update.
501         (/rtx-traverse-operands): Remove mode processing, now done during
502         canonicalization.
503         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
504         (/rtx-traverse): Ditto.
505         (rtx-init-traverser-tables!): New function.
506         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
507         (rtx-verify-no-dflt-modes): New function.
508         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
509         (rtx-simplify-insn): Use insn-canonical-semantics.
510         (rtx-canonicalize): Moved to rtl-traverse.scm.
511         (/compile-expr-fn, rtx-compile): Delete.
512         (/rtx-trim-rtx-list): New function.
513         (/rtx-trim-for-doc): Handle set, if.
514         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
515         (/rtx-valid-mode-types): Update.
516         (/rtx-valid-matches): Update.
517         (/rtx-find-matchexpr-index): New function.
518         (rtx-lookup): Require rtx-kind to be the rtx name.
519         (def-rtx-node): New arg result-mode, all callers updated.
520         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
521         (rtx-lazy-sem-mode): Delete.
522         (/rtx-closure-make): New arg `mode', all callers updated.
523         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
524         (rtx-operand-obj): Rewrite.
525         (rtx-make-xop): New functions.
526         (/hw): Renamed from `hw', all callers updated.
527         Use the correct mode instead of DFLT for the index.
528         (rtl-builtin!): Call rtx-init-traversal-tables!.
529         (rtl-finish!): Update.
530         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
531         Update mode arg-type.
532         (pc): Comment out.
533         (int-attr): New rtx kind.
534         (attr): Deprecate.
535         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
536         (/frag-cost-compute!): Ditto.
537         * semantics.scm (/build-operand!): Delete args op-name, op.
538         New arg op-expr.  All callers updated.
539         (/build-mem-operand!): Remove DFLT support.
540         (semantic-compile): Update process-expr!, mode arg deleted.
541         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
542         rtl-c++ calls.
543         (/gen-sem-case, /gen-sfrag-code): Ditto.
544         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
545         (/op-gen-set-trace): New function.  If not doing profiling, or using
546         the pbb engine, call /op-gen-set-quiet.
547         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
548         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
549         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
550         * utils.scm (find-first-index): New function.
551         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
552
553         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
554         to COMPARE.
555         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
556
557 2009-09-21  Doug Evans  <dje@sebabeach.org>
558
559         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
560         All callers updated.  Add FIXME.
561         (all rtx functions): Rename local estate to *estate*.  It's an
562         artificial argument added to the rtx, so make it stand out.
563
564         * openrisc.cpu (or32 isa): Fix setup-semantics.
565
566         * rtl.scm (rtx-class-*?): Delete, unused.
567         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
568
569         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
570         (init-reader!): Set /CGEN-RTL-VERSION to default.
571
572         * read.scm (cpu-load): Print load parameters.
573
574         * dev.scm (load-doc): Set verbose-level to 2.
575
576 2009-09-20  Doug Evans  <dje@sebabeach.org>
577
578         * rtl.scm (rtx-strdump): Use write instead of display.
579
580 2009-09-17  Doug Evans  <dje@sebabeach.org>
581
582         * utils-cgen.scm (obj-csv-names): New function.
583         * utils-sim.scm (/sfmt-contents): Use it in logging message.
584
585 2009-09-12  Doug Evans  <dje@sebabeach.org>
586
587         Clean up pass of mode handling.
588         Make use of mode name vs <mode> object more consistent and clear.
589         * hardware.scm (/keyword-read): Default mode to the mode name,
590         not the <mode> object.
591         (/hw-parse-indices): Parse mode name and pass mode object to
592         <hw-asm> constructor.
593         (/hw-parse-values): Ditto.
594         (<hw-register> parse!): Pass mode name to /hw-parse-indices
595         and /hw-parse-values.
596         (<hw-memory> parse!): Ditto.
597         (<hw-address> parse!): Ditto.
598         * mode.scm (/mode-table): New global, replaces mode-list.
599         Modes stored in hashtable instead of list.
600         (/mode-class-table): New global.
601         (mode-list-non-alias-values): Update.
602         (mode:eq?, mode-compatible?, mode:add!): Update.
603         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
604         (mode-maybe-lookup): New function.
605         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
606         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
607         (mode-find, mode-set-word-modes!): Update
608         (mode-ensure-word-sizes-defined): Update.
609         (/sort-mode-classes!): New function.
610         (mode-builtin!): Update.  Sort mode classes here.
611         (mode-finish!): Sort mode classes here too.
612         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
613         All callers updated.
614         (rtl-c-set-quiet): Allow mode to be name of object.
615         (rtl-c-set-trace): Ditto.
616         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
617         <mode> object.  All callers updated.
618         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
619         (rtx-lazy-sem-mode): Ditto.
620         (<rtx-temp> make!): Assert mode arg is a <mode> object.
621         (rtx-env-make): Allow var-list modes to be name or object.
622         * sem-frags.scm (/frag-expr-assq-locals): New function.
623         (/frag-compute-locals!): Call it.
624         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
625         All callers updated.
626         * semantics.scm (/build-mem-operand!): Handle mode aliases.
627
628         * sim-test.scm (*): Symbols no longer can be passed to string-append.
629
630 2009-09-10  Doug Evans  <dje@sebabeach.org>
631
632         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
633         Improve error message for missing or too many bits.
634         (/insn-parse): Don't verify iformat for virtual insns.
635         
636         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
637         non-multi-insns.
638         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
639         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
640         * sid.scm (pbb-engine-insns): Ditto.
641         * sim-decode.scm (cgen-decode.c): Ditto.
642
643 2009-09-09  Doug Evans  <dje@sebabeach.org>
644
645         * rtl-traverse.scm: Comment tweaks.
646         * rtl-xform.scm: Comment and reformatting tweaks.
647         * doc/rtl.texi: Add text to docs on ifield-assertions.
648
649         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
650         saving.
651
652         Add support for controlling warnings/errors.
653         Add tests for iformat description errors.
654         * dev.scm (cload): New option #:diag.
655         * read.scm (<reader>): New member verify-iformat?.
656         (/parse-diagnostic, parse-warning): New functions.
657         (parse-error): Guts moved to /parse-diagnostic.
658         (/set-diagnostic-options!): New function.
659         (cpu-load): New arg diagnostic-options, all callers updated.
660         Recognize -w diagnostic-option-list.
661         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
662         (ifld-simple-ifields, ifields-simple-ifields): New function.
663         * insn.scm (/parse-insn-format-iflds): New function.
664         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
665         New arg isa, all callers updated.  Do some basic validation of the
666         ifield list if requested.
667         * mach.scm (/sanity-check-insns): Improve error message text.
668         * doc/running.texi: Document -w option.
669         * doc/porting.texi: Document #:trace, #:diag options to cload.
670
671         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
672
673         * dev.scm (*): Change default verbosity level to 2.
674
675         * ifield.scm (<ifield> pretty-print): New method.
676         (ifld-pretty-print): New function.
677         (<multi-ifield> pretty-print): New method.
678
679         * ifield.scm (<ifield> field-start): Delete word-len arg.
680         All callers updated.
681         (ifld-start): Ditto.
682         (<multi-ifield> field-start): Ditto.
683         * operand.scm (<hw-index> field-start): Ditto.
684
685         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
686         total-bitsize.  All callers updated.
687         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
688         New member /insn-base-value.
689         (insn-base-value): New function.
690         * mach.scm (/sanity-check-insns): New function.
691         (arch-analyze-insns!): Call it.
692
693 2009-09-08  Doug Evans  <dje@sebabeach.org>
694
695         * iformat.scm (ifields-base-ifields): Simplify.
696         (compute-insn-length): Simplify, call ifields-base-ifields.
697         (compute-insn-base-mask): Ditto.
698         * ifield.scm (ifld-known-values): Ditto.
699         (ifld-base-ifields): Ditto.
700         * insn.scm (insn-value): Ditto.
701         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
702
703 2009-09-08  DJ Delorie  <dj@redhat.com>
704
705         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
706         preprocessor macro, not an enum.
707
708 2009-09-08  Doug Evans  <dje@sebabeach.org>
709
710         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
711         to string-append.
712         (*): Remove trailing ":" from error messages passed to estate-error.
713
714 2009-09-07  Doug Evans  <dje@sebabeach.org>
715
716         * types.scm (<struct>): Delete.
717
718         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
719         updated.
720         (/pmacro-loc-error): New function.
721
722         * mach.scm (/isa-parse-decode-assist): New function.
723         (/isa-parse): Call it.
724
725         * decode.scm (/get-subopcode-value): New function.
726         (/opcode-slots): Call it.
727         (/fill-slot!): Add logging message.
728
729         * cos.scm (/object-error): Convert symbols to strings before passing
730         to string-append.
731
732         * read.scm (rtl-version-equal?): New function.
733         (rtl-version-at-least?, rtl-version-older?): New functions.
734
735         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
736         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
737         rtl versions >= 0.9.
738         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
739
740 2009-09-03  Doug Evans  <dje@sebabeach.org>
741
742         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
743         is simple.
744
745 2009-09-01  DJ Delorie  <dj@redhat.com>
746
747         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
748         (parse_unsigned16_range): Likewise.
749         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
750         isa.
751
752 2009-09-01  Doug Evans  <dje@sebabeach.org>
753
754         Pmacro .equals -> .equal?
755         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
756         -pmacro-builtin-equals.  All callers updated.
757         (pmacros-init!): Rename .equals to .equal?.
758         * doc/pmacros.texi: Update.
759         * testsuite/pmacros-1.test: Update.
760
761         * doc/porting.texi: Work around texi2html bug where it doesn't
762         properly escape <> inside double-quotes inside @code.
763
764         * doc/porting.texi (Doing an opcodes port): Add step to specify
765         the .opc file.
766
767 2009-08-29  Doug Evans  <dje@sebabeach.org>
768
769         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
770         rtl version 0.7.
771         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
772
773 2009-08-27  Doug Evans  <dje@sebabeach.org>
774
775         Add do-count rtl function.
776         * rtl-c.scm (s-do-count): New function.
777         (do-count): New rtl handler.
778         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
779         (-rtx-make-traverser-table): Add ITERATION.
780         * rtl.scm (rtx-make-iteration-limit-var): New function.
781         (rtx-env-make-iteration-locals): New function.
782         * rtx-funcs.scm (do-count): New rtl function.
783         * cpu/play.cpu: Add do-count-test insn.
784         * doc/rtl.texi: Add docs on do-count.
785
786 2009-08-26  Doug Evans  <dje@sebabeach.org>
787
788         * read.scm (parse-error): Change error message output format
789         to match context-owner-error.
790         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
791         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
792         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
793         (operand): Call estate-error instead of context-error.
794         (local, delay): Ditto.
795         (ref, attr): Call estate-error instead of error.
796         * rtl-traverse.scm (tstate-error): New function.
797         (-rtx-traverse-error): Call tstate-error instead of context-error.
798         (-rtx-traverse-operands, -rtx-traverse): Ditto.
799         (estate-error): New function.
800         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
801         instead of error.
802         (e-if): Call estate-error instead of error.
803         * rtx-funcs.scm (error): Call estate-error instead of context-error.
804         (member): Ditto.
805         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
806         Rewrite to call context-owner-error.
807         (context-owner-error): New function.
808
809         * ifield.scm (<ifield> constructor): New arg `location',
810         all callers updated.
811         * insn.scm (<insn> constructor): Ditto.
812         (<multi-insn> constructor): Ditto.
813         * minsn.scm (<macro-insn> constructor): Ditto.
814         * operand.scm (<operand> constructor): Ditto.
815         * utils-cgen.scm (builtin-location): New function.
816         (<source-ident>): Fix default value of member `location'.
817         (source-ident?): New function.
818
819         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
820         (estate-push-env, estate-with-modifiers): Ditto.
821         (estate-deepen): New function.
822
823 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
824
825         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
826         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
827         routines.
828
829 2009-08-25  Doug Evans  <dje@sebabeach.org>
830
831         * doc/pmacros.texi (pmacro default argument values): Add text.
832
833 2009-08-23  Doug Evans  <dje@sebabeach.org>
834
835         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
836         Rename member prefix -> name-prefix.
837         (<keyword> getters): Update.
838         (-keyword-parse): Update.  Default enum-prefix to NAME-.
839         (-keyword-read): Update.  Don't compute default value for
840         enum-prefix here.
841         (define-keyword): Update.
842         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
843         * read.scm (cgen-rtl-version): New function.
844         (-supported-rtl-versions): Add (0 8).
845         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
846         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
847         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
848         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
849         Update, print-name -> enum-prefix, make uppercase.
850         Remove unnecessary name-prefix spec.
851         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
852         * cpu/ip2k.cpu (register-names): Ditto.
853         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
854         * cpu/sparc.cpu (gr-names): Ditto.
855         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
856         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
857         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
858         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
859         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
860         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
861         prefix -> name-prefix.
862         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
863         Update, print-name -> enum-prefix, make uppercase.
864         (drc-names, xf-names): Ditto.
865         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
866         * doc/rtl.texi (Keywords): New section.
867         (hardware indices): Update text.
868         (rtl versions): Add 0.8.
869
870         Add define-rtl-version.
871         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
872         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
873         (cgen-lang-fixlevel): Delete.
874         (-supported-rtl-versions): New variable.
875         (-cmd-define-rtl-version): New function.
876         (init-reader!): New command define-rtl-version.
877         (-cgen): Add rtl version to --version output.
878         * doc/rtl.texi: Document rtl version support.
879         * cpu/play.cpu: Add define-rtl-version.
880
881 2009-08-22  Doug Evans  <dje@sebabeach.org>
882
883         * Makefile.am (OPTIONS): Define.
884         (desc): Just generate <arch>-desc.[ch] files.
885         * Makefile.in: Regenerate.
886         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
887         no .opc file.
888         (cgen-desc.c): Similarly.
889         * gen-all-desc: New file.
890         * opcodes.scm (opc-file-provided?): New function.
891
892         * mach.scm (current-*-add!): Update calls to parse-error.
893         * operand.scm (op:new-mode): Update call to parse-error.
894         * utils-cgen.scm (make-obj-context): New function.
895
896         * NEWS: Copy over entries from 1.1 branch.
897
898 2009-08-20  Doug Evans  <dje@sebabeach.org>
899
900         * gas-test.scm (<keyword> test-data): Catch invalid requests,
901         flag a warning and compensate.
902         (<hw-address test-data): Tweak for readability.
903         (<hw-iaddress test-data): Ditto.
904         (cgen-build.sh): Convert symbols to strings before passing to
905         string-append.
906         (cgen-allinsn.exp): Ditto.
907
908         * doc/pmacros.texi (.splice): Add more text.
909
910 2009-08-19  Doug Evans  <dje@sebabeach.org>
911
912         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
913         distinguish from 1.1.
914         * configure: Regenerate.
915         * read.scm (-CGEN-VERSION): Update.
916         * doc/version.texi: Update.
917
918         New builtin .pmacro?.
919         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
920         (pmacros-init!): Add .pmacro?.
921         * doc/pmacros.text: Document .pmacro?.
922         * testsuite/pmacros-1.test: Test .pmacro?.
923
924         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
925         of a pmacro begins before its arguments are evaluated, improves
926         readability.
927
928         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
929         * testsuite/pmacros-1.test: Ditto.  Add better tests.
930
931         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
932         in assembler syntax.
933         (Operands): Similarly.
934
935 2009-08-18  Doug Evans  <dje@sebabeach.org>
936
937         * ifield.scm (ifld-encode-mode): Add FIXME.
938         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
939         modes.
940         (<ifield> gen-extract): Similarly.
941
942         * read.scm (parse-error): Handle #f for context-location.
943         * utils-cgen.scm (unspecified-location): Fix building of
944         single-location.
945
946         * doc/rtl.texi: Document how to write hex and boolean values.
947
948         * gas-test.scm (<hw-asm> test-data): Handle () values.
949         (<keyword> test-data): Convert symbols to strings before passing
950         to string-append.
951         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
952         result for scalars.
953
954         * operand.scm (hw-index-scalar): Set `name'.
955         (hw-index-anyof, hw-index-derived): Ditto.
956
957 2009-08-17  Doug Evans  <dje@sebabeach.org>
958
959         * pmacros.scm (-pmacro-builtin-internal-test): New function.
960         (pmacros-init!): Add .internal-test.
961         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
962         * testsuite/testsuite.cpu (internal-verify): New pmacro.
963         * doc/pmacros.text: Document .internal-test.
964
965         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
966         (parse-comment): Allow numbers.
967         * doc/porting.texi: Document that names and comments may be lists.
968
969         * insn.scm (-insn-parse): Fix typo.
970
971         Rename .eval -> .exec.  Add new .eval.
972         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
973         (-pmacro-builtin-eval): New function.
974         (pmacros-init!): Add .exec.
975         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
976         * testsuite/location-1.test: Update.
977         * testsuite/pmacros-1.test: Add test for .eval.
978
979 2009-08-16  Doug Evans  <dje@sebabeach.org>
980
981         * doc/porting.texi: Remove support for Guile 1.4.
982
983         * read.scm (current-reader-location): Return unspecified location
984         if reader hasn't been initialized yet.
985
986 2009-08-13  Doug Evans  <dje@sebabeach.org>
987
988         * dev.scm: Document tracing options.
989
990         * pmacros.scm (pmacro-dump): New function.
991         (check-pmacro): Tweak debugging output.
992         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
993         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
994
995         Add .let* pmacro builtin.
996         * pmacros.scm (-pmacro-builtin-let*): New function.
997         (pmacros-init!): Add .let*.
998         * doc/pmacros.texi: Document .let*.
999         * testsuite/pmacros-1.test: Test .let*.
1000
1001 2009-08-12  Doug Evans  <dje@sebabeach.org>
1002
1003         Clean up cpu file parsing, pass context consistently instead of the
1004         old "errtxt" argument.
1005         NOTE: ACU == "All Callers Updated".
1006         * attr.scm (-parse-simple-attribute): Renamed from
1007         parse-simple-attribute, ACU.
1008         (-attr-parse): Change errtxt argument to context, ACU.
1009         (-attr-read): Ditto.
1010         (atlist-parse): Ditto.  Put context arg first.
1011         (attr-parse): Use parse-error instead of context-error.
1012         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1013         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1014         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1015         `context' arg is now a <context> object.  ACU.
1016         (-keyword-read): `context' arg is now a <context> object.  ACU.
1017         (-hw-parse-indices): Change errtxt argument to context, ACU.
1018         (-hw-parse-values, -hw-parse-handlers): Ditto.
1019         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1020         (-hw-validate-layout, -hw-create-getter-from-layout,
1021         -hw-create-setter-from-layout): Ditto.
1022         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1023         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1024         (<hw-address>:parse!): Ditto.
1025         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1026         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1027         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1028         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1029         * insn.scm (-insn-parse, -insn-read): Ditto.
1030         (parse-syntax): Ditto.  Put context arg first.
1031         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1032         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1033         (-parse-insn-format): Ditto.
1034         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1035         (-arch-parse-isas): Ditto.
1036         (-isa-read): Add context arg, ACU.
1037         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1038         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1039         context, ACU.
1040         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1041         (minsn-make-alias): Ditto.
1042         * mode.scm (-mode-parse): Ditto.
1043         (parse-mode-name): Ditto.  Put context arg first.
1044         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1045         errtxt argument to context, ACU.
1046         (-unit-parse, -model-parse, -model-read): Ditto.
1047         * operand.scm (-operand-parse-getter): Use parse-error instead of
1048         context-error.
1049         (-operand-parse-setter): Ditto.
1050         (-operand-parse): Change errtxt argument to context, ACU.
1051         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1052         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1053         * read.scm (reader-error): Delete.  Use parse-error instead.
1054         (parse-error): Change errtxt argument to context, ACU.  Split args
1055         argument into expr and maybe-help-text.
1056         (-reader-process-expanded-1!): Reorganize.
1057         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1058         * types.scm (parse-type): Ditto.
1059         * utils-cgen.scm (single-location->simple-string): New function.
1060         (<context>): Replace members file,lineno with location.
1061         (make-prefix-context): Renamed from context-make-prefix, ACU.
1062         (make-current-context): New function.
1063         (context-append, context-append-name): New functions.
1064         (context-make-reader): Delete.
1065         (parse-name): Change errtxt argument to context, ACU.
1066         Put context arg first.
1067         (parse-comment): Ditto.
1068         (parse-number): Change errtxt argument to context, ACU.
1069         (arg-list-validate-name, arg-list-check-no-args,
1070         arg-list-symbol-arg): Ditto.
1071
1072         * read.scm (-cmd-if): Don't assume test is a list.
1073
1074         * html.scm (get-insn-properties): Delete errtxt, unused.
1075
1076 2009-08-11  Doug Evans  <dje@sebabeach.org>
1077
1078         * doc/rtl.texi (hardware types): Add pc.
1079
1080 2009-08-07  Doug Evans  <dje@sebabeach.org>
1081
1082         Add -t option for tracing things like commands, pmacro expansion.
1083         * dev.scm (cload): New arg #:trace.
1084         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1085         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1086         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1087         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1088         (-reader-process-expanded-1!): Trace commands if requested.
1089         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1090         (-set-trace-options!): New function.
1091         (-init-reader!): New function.
1092         (cpu-load): New arg trace-options, all callers updated.
1093         Call -init-reader! and -set-trace-options!.
1094         (cgen-usage): Improve output formatting.
1095         (common-arguments): New option -t.
1096         (-cgen): Process -t.
1097         * utils-cgen.scm (single-location->string): Renamed from
1098         pretty-print-single-location.  All callers updated.
1099         (location->string): Renamed from pretty-print-location.
1100         All callers updated.
1101         (source-properties-location->string): New function.
1102         * doc/running.texi: Document -t.
1103
1104 2009-08-06  Doug Evans  <dje@sebabeach.org>
1105
1106         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1107         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1108         * utils.scm: ... here.
1109
1110 2009-08-05  Doug Evans  <dje@sebabeach.org>
1111
1112         Track source location better, for better error messages.
1113         * pmacros.scm (-pmacro-eval): Delete, unused.
1114         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1115         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1116         (scan-list, scan): Ditto.
1117         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1118         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1119         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1120         (scan-list1): New function.
1121         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1122         * read.scm (<reader>): New member `location'.
1123         (-reader-lookup-command): Renamed from reader-lookup-command,
1124         all callers updated.
1125         (reader-error): Rewrite to produce better source location info.
1126         (current-reader-location): New function.
1127         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1128         All callers updated.  Record source location of expression.
1129         (reader-process-expanded!): Renamed from reader-process-expanded.
1130         All callers updated.
1131         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1132         All callers updated.  Record source location of define-pmacro.
1133         * utils-cgen.scm (<location>): New class.
1134         (single-location): New (pseudo) class.
1135         (pretty-print-single-location, pretty-print-location): New functions.
1136         (location-top, location-push-single, location-push): New functions.
1137         (unspecified-location, current-input-location): New functions.
1138         (location-property): New object property.
1139         (location-property-set!): New function.
1140         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1141         All uses updated.
1142         * testsuite/location-1.test: New testcase.
1143         * testsuite/run-tests.sh: Fix fail count handling.
1144         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1145         to expect cgen to fail.
1146
1147         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1148
1149         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1150         (-cmd-if): Renamed from cmd-if.  All callers updated.
1151         Use reader-process-expanded! on then/else clauses instead of eval1.
1152
1153 2009-07-22  Doug Evans  <dje@sebabeach.org>
1154
1155         * modes.scm (TI,OI): New modes.
1156         * types.scm (parse-type): Improve error checking.  Don't hardwire
1157         mode names here.
1158         * utils.scm (non-negative-integer?): New function.
1159
1160         * pmacros.scm (-pmacro-builtin-find): New predicate.
1161         (pmacros-init!): Add .find.
1162         * doc/pmacros.tex: Document .find.
1163         * testsuite/pmacros-1.test: Test .find.
1164
1165 2009-07-20  Doug Evans  <dje@sebabeach.org>
1166
1167         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1168         commented out printfs.
1169         * rtl.scm (rtl-finish!): Whitespace tweaks.
1170         * model.scm (parse-insn-timing): Tweak logging message.
1171         * operand.scm: Comment and whitespace tweaks.
1172         (op:type): Tweak error message.
1173         (op-ifield): Tweak logging message.
1174         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1175         * read.scm: Whitespace cleanup.
1176         * utils.scm: Whitespace cleanup.
1177
1178 2009-07-19  Doug Evans  <dje@sebabeach.org>
1179
1180         Fix binding of nested pmacro parameters.
1181         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1182         All callers updated.
1183         (-pmacro-bulid-lambda): Ditto.
1184         * doc/pmacros.texi: Update.
1185         * testsuite/pmacros-1.test: Add testcase.
1186
1187         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1188         calculation.
1189         (-multi-ifield-make-default-extract): Ditto.
1190
1191         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1192         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1193         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1194         Define.
1195         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1196         * doc/rtl.texi: Update.
1197
1198         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1199
1200         Rename builtin boolean pmacros, for consistency with rtl.
1201         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1202         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1203         * doc/pmacros.texi: Update.
1204         * testsuite/pmacros-1.test: Update.
1205
1206 2009-07-17  Doug Evans  <dje@sebabeach.org>
1207
1208         Use hash tables to record ifields, operands, insns, macro-insns.
1209         * attr.scm (attr-builtin!): Tweak some comments.
1210         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1211         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1212         <ident>.
1213         (<multi-ifield>): New constructor.
1214         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1215         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1216         <ident>.
1217         (-sub-insn-make!): Add hack to avoid differences in generated code.
1218         (multi-insn-instantiate!): Add total number of multi-insns to
1219         logging message.
1220         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1221         minsn-list to foo-table.  New member next-ordinal.
1222         Update getters/setters.
1223         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1224         New functions.
1225         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1226         (-make-ident-object-table, -ident-object-table->list,
1227         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1228         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1229         -ifld-already-defined?): Rewrite.
1230         (current-op-list, current-op-add! current-op-lookup,
1231         -op-already-defined?): Rewrite.
1232         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1233         (current-insn-list, current-insn-add! current-insn-lookup,
1234         -insn-already-defined?): Rewrite.
1235         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1236         -minsn-already-defined?): Rewrite.
1237         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1238         (MAX-VIRTUAL-INSNS): Define.
1239         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1240         Update use of arch-insn-list.
1241         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1242         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1243         minsn-list.
1244         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1245         <ident>.  New constructor.
1246         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1247         <ident>.
1248         * sid.scm (-virtual-insn-add!): New function.
1249         (-create-virtual-insns!): Call it.
1250         (-fill-sim-insn-list!): Rewrite.
1251         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1252         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1253         * utils-cgen.scm (<ordered-ident>): New class.
1254         (obj-ordinal, obj-set-ordinal!): New functions.
1255         (add-ident-methods!): Delete.
1256
1257         * model.scm (parse-insn-timing): Change logging message to level 3.
1258
1259 2009-07-16  Doug Evans  <dje@sebabeach.org>
1260
1261         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1262         add a link to define-normal-insn-enum.
1263
1264         * doc/porting.texi (Conventions): Add docs on writing integers.
1265
1266         * cpu/simplify.inc (*): One line doc strings don't need \n.
1267         (df): Invoke define-full-ifield instead of claiming it's an alias.
1268         (dno): Define.
1269         (dnop): Mark as deprecated.
1270
1271         * cpu/play.cpu: Add example of hardware `layout'.
1272         * doc/porting.tex: Add docs on simplify.inc.
1273         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1274         and other things.
1275
1276         * ifield.scm: Whitespace/formatting cleanup.
1277
1278         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1279
1280         * read.scm (parse-error): Don't print single entry args as a list.
1281         (-reader-process-expanded-1): Convert symbol to string for
1282         string-append.
1283
1284         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1285
1286 2009-07-15  Doug Evans  <dje@sebabeach.org>
1287
1288         * cpu/simplify.inc (dno): New pmacro.
1289         * doc/porting.texi: Add section on simplify.inc.
1290         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1291
1292 2009-07-15  Doug Evans  <devans@sourceware.org>
1293
1294         * gen-all-doc: Generate index.html.
1295
1296 2009-07-13  Doug Evans  <dje@sebabeach.org>
1297
1298         Extend pmacro language, add testsuite.
1299         * Makefile.am (SUBDIRS): Add testsuite.
1300         * Makefile.in: Regenerate.
1301         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1302         testsuite/test-utils.sh.
1303         * configure: Regenerate.
1304         * dev.scm (cload): Handle testsuite app.
1305         (load-testsuite): New function.
1306         * pmacros.scm: (-pmacro-debug?): New global.
1307         (-smacro-table): New global.
1308         (-smacro-lookup, -smacro-set!): New functions.
1309         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1310         (-pmacro-syntactic-form?): New function.
1311         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1312         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1313         (-pmacro-expected-non-negative-integer): New function.
1314         (-pmacro-verify-non-negative-integer): New function.
1315         (-pmacro-expand-expr-list): New function.
1316         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1317         (-pmacro-process-args): Renamed from -pmacro-invoke.
1318         (-pmacro-apply, -smacro-apply): New functions.
1319         (-pmacro-expand): Rewrite syntactic form processing.
1320         (-pmacro-build-lambda): Reformat.
1321         (define-pmacro): Watch for more errors in definition.
1322         (pmacro-debug): New function.
1323         (pmacro-trace): Set/reset -pmacro-debug?.
1324         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1325         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1326         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1327         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1328         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1329         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1330         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1331         (pmacros-init!): Initialize -smacro-table.
1332         Rewrite pmacro initialization.
1333         * read.scm (reader-process-expanded): Renamed from
1334         -reader-process-expanded.  All callers updated.
1335         Recognize () as a no-op.
1336         (cpu-load): Tweak logging messages.
1337         * utils.scm (message): Add comment.
1338         * cpu/play.cpu: Add some instructions to play with .let.
1339         * doc/cgenint.texi: Move some debugging related docs to here from
1340         cgen.texi.
1341         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1342         * testsuite/Makefile.am: New file.
1343         * testsuite/Makefile.in: New file.
1344         * testsuite/test-utils.sh.in: New file.
1345         * testsuite/run-tests.sh: New file.
1346         * testsuite/testsuite.cpu: New file.
1347         * testsuite/pmacros-1.test: New file.
1348
1349         * decode.scm: Comment and formatting tweaks.
1350         (-build-decode-table-guts): Add more data to logging message.
1351
1352 2009-07-12  Doug Evans  <dje@sebabeach.org>
1353
1354         Delete files that now live in ../cpu.
1355         * cpu/iq10.cpu: Delete.
1356         * cpu/iq2000.cpu: Delete.
1357         * cpu/iq2000.opc: Delete.
1358         * cpu/iq2000m.cpu: Delete.
1359         * cpu/m32r.cpu: Delete.
1360         * cpu/m32r.opc: Delete.
1361
1362 2009-07-09  Doug Evans  <dje@sebabeach.org>
1363
1364         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1365         All callers updated.  Work around -ve shifts by referencing the
1366         entire value.
1367
1368         * utils.scm (message): Handle pairs.
1369
1370 2009-07-08  DJ Delorie  <dj@redhat.com>
1371
1372         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1373         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1374         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1375         written to.
1376
1377 2009-07-07  Doug Evans  <dje@sebabeach.org>
1378
1379         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1380         * cpu/play.opc: New file.
1381
1382         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1383         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1384         * doc/rtl.texi (Instructions): Update.
1385
1386         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1387         (opc-arguments, -OPC): Call set-opc-file-path!.
1388         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1389         (set-opc-file-path!): New function.
1390         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1391
1392         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1393         before passing to gen-c-args.
1394
1395 2009-07-06  DJ Delorie  <dj@redhat.com>
1396
1397         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1398         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1399         unspecified accesses to control registers.
1400
1401 2009-07-01  DJ Delorie  <dj@redhat.com>
1402
1403         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1404         unspecified accesses to control registers.
1405
1406         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1407         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1408
1409 2009-06-27  Doug Evans  <dje@sebabeach.org>
1410
1411         * gen-all-intrinsics: New file.
1412
1413 2009-06-24  Doug Evans  <dje@sebabeach.org>
1414
1415         * All *.scm files: Update copyright year.
1416         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1417
1418 2009-06-23  DJ Delorie  <dj@redhat.com>
1419
1420         * intrinsics.scm: Updates to support IVC2.
1421         (belongs-to-group?): Check IVC2 slots.
1422         (-slots-attribute): New.
1423         (targets::attributes): Add SLOTS.
1424         (target:add-well-known-intrinsics): Add CPMOV.
1425         (md-insn): Add CPTYPE and CRET?.
1426         (add-md-insn): Likewise.
1427         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1428         duplicate insns with different bit patterns.
1429         (write-cgen-insn?): Add cret? support.
1430         (intrinsics.h): Add vector types.
1431         (runtime-op): Add vector support.
1432         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1433
1434         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1435         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1436         (h-cr-ivc2): Default to typeless.
1437         (h-ccr-ivc2): Fix register width.
1438         (SLOTS): Fix values and default.
1439         (ivc2_*): Add control register names.
1440         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1441
1442         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1443         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1444
1445 2009-06-22  Doug Evans  <dje@sebabeach.org>
1446
1447         * semantics.scm (insn-build-known-values): Fix typo in comment.
1448
1449 2009-06-21  Doug Evans  <dje@sebabeach.org>
1450
1451         * rtl-xform.scm (rtx-simplify-insn): New function.
1452         * html.scm (gen-insn-docs): Call it.
1453         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1454         * iformat.scm (ifmt-analyze): Minor simplification.
1455
1456         * semantics.scm (semantic-compile): Change arg sem-code-list to
1457         sem-code.
1458         (semantic-attrs): Ditto.
1459         * iformat.scm (ifmt-analyze): Update.
1460         (ifmt-compute!): Update.
1461         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1462         rtl-xform.scm.
1463         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1464         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1465         * semantics.scm (rtx-simplify): Ditto.
1466         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1467         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1468         (-simplify-expr-fn): Move to rtl-xform.scm.
1469         (-solve-expr-fn, rtx-solve): Ditto.
1470         * rtl-xform.c: New file.
1471         * read.scm: Load it.
1472
1473         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1474         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1475         (-rtx-traverse, rtx-traverse): Ditto.
1476
1477 2009-06-20  Doug Evans  <dje@sebabeach.org>
1478
1479         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1480
1481         * configure.in: Update version to 1.1.
1482         * configure: Regenerate.
1483         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1484
1485 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1486             Doug Evans  <dje@sebabeach.org>
1487
1488         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1489         (cgen-desc.c): Ditto.
1490         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1491         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1492         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1493         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1494         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1495         (cgen-cpuall.h, cgen-ops.c): Ditto.
1496         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1497         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1498         (cgen-sem-switch.c): Ditto.
1499         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1500         * sim-model.c (cgen-model.c): Ditto.
1501
1502 2009-06-18  Doug Evans  <dje@sebabeach.org>
1503
1504         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1505
1506         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1507
1508         * dev.scm (cload): Change #:arch argument to take the path to the
1509         .cpu file instead of just the name of the architecture.
1510         * read.scm (arch-path): Remove trailing '/'.
1511         (cpu-load): Set `arch-path' to directory of .cpu file.
1512         (-cgen): Don't set `arch-path' here.
1513         (include): Update.
1514         * doc/porting.texi: Update.
1515
1516 2009-06-14  Doug Evans  <dje@sebabeach.org>
1517
1518         * gen-all-doc: Use files in ../cpu where possible.
1519
1520         * Makefile.am (ARCHFILE): Fix path.
1521         * Makefile.in: Regenerate.
1522         * html.scm: Use "pre" instead of "plaintext".
1523
1524         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1525         * doc/app.texi: Cleanup pass.
1526         * doc/cgen.texi: Cleanup pass.
1527         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1528         * doc/intro.texi: Cleanup pass.
1529         * doc/mdate-sh: New file.
1530         * doc/opcodes.texi: Cleanup pass.
1531         * doc/pmacros.texi: Cleanup pass.
1532         * doc/porting.texi: Cleanup pass.
1533         * doc/rtl.texi: Cleanup pass.
1534         * doc/running.texi: Cleanup pass.  Document more runtime options.
1535         * doc/stamp-vti: Update.
1536         * doc/version.texi: Update.
1537
1538         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1539         (GUILE): Fix definition.
1540         * Makefile.in: Regenerate with automake 1.9.6.
1541         * aclocal.m4: Regenerate with aclocal 1.9.6.
1542         * configure.in (AC_PREREQ): Set to 2.59.
1543         (GENINSRC_NEVER): Define.
1544         * configure: Regenerate with autoconf 2.59.
1545         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1546         (cgen.info,cgen.dvi): Delete.
1547         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1548         (noinst_TEXINFOS): Add cgenint.texi.
1549         (DOCFILES): Add missing files.
1550         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1551         * doc/Makefile.in: Regenerate with automake 1.9.6.
1552
1553         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1554
1555         * attr.scm: Removing trailing whitespace.
1556         * cgen-intrinsics.scm: Ditto.
1557         * cgen-sim.scm: Ditto.
1558         * cos.scm: Ditto.
1559         * enum.scm: Ditto.
1560         * guile.scm: Ditto.
1561         * sim.scm: Ditto.
1562
1563 2009-05-28  DJ Delorie  <dj@redhat.com>
1564
1565         * cpu/mep.opc (parse_signed16_range): New.
1566         (parse_unsigned16_range): New.
1567         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1568
1569 2009-05-26  DJ Delorie  <dj@redhat.com>
1570
1571         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1572         accumulator names.
1573         (f-ivc2-ccrn-c3hi): New.
1574         (f-ivc2-ccrn-c3lo): New.
1575         (f-ivc2-ccrn-c3): New.
1576         (ivc2c3ccrn): Use it.
1577
1578 2009-05-22  DJ Delorie  <dj@redhat.com>
1579
1580         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1581         (mep_config_map): Regenerate.
1582
1583         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1584         ivc2-specific names.
1585         (simm8p20): New.
1586         (cmovc): move to after field definitions, use ivc2-specific
1587         register names.
1588         (cpmovi_b_P0S_P1): New.
1589         
1590 2009-05-19  DJ Delorie  <dj@redhat.com>
1591
1592         * cpu/mep.opc: Regenerate configuration.
1593         (parse_cdisp10): Only check CPU flags, not COP flags.
1594         (check_configured_mach): Likewise.
1595
1596 2009-05-13  DJ Delorie  <dj@redhat.com>
1597
1598         * intrinsics.scm (insns.md): Add RTL predicates.
1599         (intrinsics.h): Remove old C intrinsics.
1600
1601 2009-04-29  DJ Delorie  <dj@redhat.com>
1602
1603         * mep-ivc2.cpu: New.
1604         * mep-core.cpu: Regenerated.  Add support for deferred register
1605         writes.
1606         (SLOT): Add IVC2 slot types.
1607         (sim-syscall): Rename to something more appropriate.
1608         * mep-ext-cop.cpu: Regenerate.
1609         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1610         (print_slot_insn): New.
1611         (mep_examine_ivc2_insns): New.
1612         (mep_print_insn_set_ivc2_mode): New.
1613         (mep_print_insn): Support IVC2 slotting.
1614         
1615 2009-04-20  DJ Delorie  <dj@redhat.com>
1616
1617         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1618         (guess-mode): Drop COP* syntax.
1619         (need-insn): Add "--syscall--" to the list.
1620         (enum-type): Drop COP* syntax.
1621         (intrinsics.h): Likewise.
1622         (intrinsic-protos.h): Change file header to allow it to be
1623         included.
1624
1625 2009-04-17  DJ Delorie  <dj@redhat.com>
1626
1627         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1628         (lhucpm1): Limit to C5 mach.
1629         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1630         * cpu/mep-core.cpu (extend-cdisp10): New.
1631         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1632         
1633 2009-04-08  DJ Delorie  <dj@redhat.com>
1634
1635         * cpu/mep-c5.cpu: New.
1636         * cpu/mep-core.cpu: Add C5 support.
1637         * cpu/mep.opc: Likewise.
1638
1639 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1640
1641         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1642         about calling memset with a zero length.
1643
1644 2009-02-03  DJ Delorie  <dj@redhat.com>
1645
1646         * cpu/mep-core.cpu: Update to new MeP configuration.
1647         * cpu/mep-ext-cop.cpu: Likewise.
1648         * cpu/mep.opc: Likewise.
1649
1650 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1651
1652         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1653
1654 2008-06-17  Dave Brolley  <brolley@redhat.com>
1655
1656         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1657         (h-gr): Likewise.
1658
1659 2007-11-13  Dave Brolley  <brolley@redhat.com>
1660
1661         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1662
1663 2007-11-05  Dave Brolley  <brolley@redhat.com>
1664
1665         * intrinsics.scm,cgen-intrinsics.scm: New application which
1666         generates code to support intrinsic functions for insns in the
1667         mep architecture in gcc.
1668
1669 2007-09-21  Dave Brolley  <brolley@redhat.com>
1670
1671         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1672         (rn3us): CDATA attribute now LONG.
1673         
1674 2007-08-21  Dave Brolley  <brolley@redhat.com>
1675
1676         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1677         than 32 bits.
1678
1679 2007-07-05  Nick Clifton  <nickc@redhat.com>
1680
1681         * utils.scm (copyright-fsf): Update copyright notice to refer to
1682         the GPL version 3.
1683
1684 2007-05-22  Nick Clifton  <nickc@redhat.com>
1685
1686         * doc/cgen.texi: Use @copying around the copyright notice.
1687         * doc/internals.texi: Likewise.
1688
1689 2007-02-05  Dave Brolley  <brolley@redhat.com>
1690
1691         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1692
1693 2007-02-05  Dave Brolley  <brolley@redhat.com>
1694
1695         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1696         in the generated code for @arch@_cgen_init_asm if it is defined.
1697
1698         * Contribute the following changes:
1699         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1700
1701         * attr.scm (<string-attribute>): New attribute class.
1702         (attr-kind): Handle <string-attribute>.
1703         (parse-simple-attribute): New function.
1704         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1705         (<bitset-attribute> 'parse-value): Likewise.
1706         (<boolean-attribute> 'parse-value): Likewise.
1707         (<enum-attribute> 'parse-value): Likewise.
1708         (<string-attribute> 'parse-value): New function.
1709         (-attr-parse): Handle <string-attribute>.
1710         (-attr-read): Likewise.
1711         (<string-attribute> 'gen-value-for-defn-raw): New function.
1712         (<string-attribute> 'gen-value-for-defn): New function.
1713
1714 2006-11-07  Dave Brolley  <brolley@redhat.com>
1715
1716         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1717         necessary.
1718
1719 2006-10-18  Dave Brolley  <brolley@redhat.com>
1720
1721         * Contribute the following changes:
1722
1723         2006-07-11  Dave Brolley  <brolley@redhat.com>
1724
1725         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1726         (movcol): New insn.
1727         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1728         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1729         hardware or memory mode which was used.
1730         * sid-cpu.scm (hw-need-write-stack?): New function.
1731         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1732         identify hardware which uses write stacks.
1733         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1734         Initialized to an empty list.
1735         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1736         hw-need-write-stack?.
1737         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1738         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1739         (used-in-delay-rtl?): New method of <hardware-base>.
1740         (hw-used-in-delay-rtl?): New function.
1741
1742         2006-06-20  Dave Brolley  <brolley@redhat.com>
1743
1744         * sid.scm (gen-attr-type): Removed.
1745         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1746         (SH2a-MACH): Add sh5.
1747         (sh2a-nofpu-models): Add units for sh5.
1748         (sh2a-fpu-models): Likewise.
1749
1750         2006-06-15  Dave Brolley  <brolley@redhat.com>
1751
1752         * cpu/sh-sim.cpu: New file.
1753         * cpu/sh-sid.cpu: New file.
1754         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1755         (All fields): Remap for (insn-lsb0? #f)
1756         (All insns): Add timing specs.
1757         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1758         'xattrs' and .splice it in.
1759         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1760         (h-frc,h-drc): Add PROFILE attribute.
1761         (h-fpccr): Removed.
1762         (h-vbr): New hardware.
1763         (All fields): Remap for (insn-lsb0? #f)
1764         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1765         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1766         (fpscr): Use h-fpscr.
1767         (fsdm,fsdn): Use h-fsd.
1768         (dshci): Add xtiming argument and splice it in.
1769         (dr,xd): pmacros removed.
1770         (All insns): Add timing specs, *-MACH attribibutes,
1771         SH4{A}-GROUP attributes.
1772         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1773         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1774         we're being processed for sim or sid.
1775         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1776         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1777         (define-isa compact): Add (isa-parallel-insns 2).
1778         (define-isa media): Add (isa-parallel-insns 2). Add
1779         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1780         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1781         sh4a, sh4al
1782         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1783         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1784         (SH4al-MACH, SH5-MACH): New pmacros.
1785         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1786         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1787         (sh5-media-fp-units, common-model, common-model-with-fp) 
1788         (sh3-model, sh3e-model): New pmacros.
1789         (define-model sh2): New model.
1790         (define-model sh2e): New model.
1791         (define-model sh3): New model.
1792         (define-model sh3e): New model.
1793         (define-model sh2a-nofpu): New model.
1794         (define-model sh2a-fpu): New model.
1795         (define-model sh4-nofpu): New model.
1796         (define-model sh4): New model.
1797         (define-model sh4a-nofpu): New model.
1798         (define-model sh4a): New model.
1799         (define-model sh4al): New model.
1800         (define-model sh5-media): New model.
1801         (define-model sh5): Add all units.
1802         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1803         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1804         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1805         (h-pc): Add PROFILE attribute.
1806         (h-fr): Likewise.
1807         (h-tr): Likewise.
1808         (h-gr,h-grc): Likewise.
1809         (h-cr): Set h-sr in setter.
1810         (h-frbit): Get/Set h-fpscr.
1811         (h-szbit,h-prbit): Likewise.
1812         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1813         Add getter and setter.
1814         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1815         Adjust getter and setter.
1816         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1817         Adjust getter and setter.
1818         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1819         (h-fsd,h-fmov): New hardware.
1820
1821 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1822
1823         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1824         doc/notes.texi, doc/porting.texi, doc/running.texi,
1825         doc/sim.texi: Fix some typos.
1826
1827 2006-07-14  Dave Brolley  <brolley@redhat.com>
1828
1829         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1830         hardware or memory mode which was used.
1831         * sid-cpu.scm (hw-need-write-stack?): New function.
1832         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1833         identify hardware which uses write stacks.
1834         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1835         Initialized to an empty list.
1836         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1837         hw-need-write-stack?.
1838         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1839         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1840         (used-in-delay-rtl?): New method of <hardware-base>.
1841         (hw-used-in-delay-rtl?): New function.
1842
1843 2006-06-20  Dave Brolley  <brolley@redhat.com>
1844
1845         * sid.scm (gen-attr-type): Removed.
1846
1847 2006-05-10  Dave Brolley  <brolley@redhat.com>
1848
1849         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1850         support for (if (application-is? <appname>) (...) (...)).
1851         (-cgen): Add trailing "/" to arch-path.
1852         * utils.scm (dirname): Removed. dirname is a primitive function.
1853
1854 2006-05-09  Dave Brolley  <brolley@redhat.com>
1855
1856         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1857         'entire_insn' not 'base_insn'.
1858         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1859         is null.
1860         * sim.scm (-gen-arch-model-decls): Likewise.
1861         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1862         abuf->written if profiling.
1863         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1864         object->string om the mode.
1865         (-hw-gen-write-stack-decl): Likewise.
1866         * read.scm (include): Use arch-path as file location.
1867         (arch-path): Define it with a default setting.
1868         (-cgen): Update arch-path when "-a" option is specified.
1869         * utils.scm (dirname): New function.
1870
1871 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1872
1873         * configure.in: Remove AC_ARG_PROGRAM.
1874         * configure: Regenerate with autoconf 2.59.
1875
1876 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1877
1878         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1879         SIMULATOR.
1880
1881 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1882
1883         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1884         or an error message otherwise.
1885         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1886         Fix up comments to correctly describe the functions.
1887
1888 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1889             Anil Paranjape   <anilp1@kpitcummins.com>
1890             Shilin Shakti    <shilins@kpitcummins.com>
1891
1892         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1893         CPU description.
1894         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1895
1896 2006-02-10  Nick Clifton  <nickc@redhat.com>
1897
1898         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1899
1900 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1901
1902         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1903         for concatenation.
1904         (-hw-gen-write-stack-decl): Likewise.
1905
1906 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1907
1908         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1909         non-(adata-integral-insn? CURRENT-ARCH) case.
1910
1911 2005-10-28  Dave Brolley  <brolley@redhat.com>
1912
1913         Contribute the following changes:
1914         2005-09-19  Dave Brolley  <brolley@redhat.com>
1915
1916         * attr.scm (gen-value-for-defn-raw): New methods.
1917         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1918         gen-value-for-defn-raw.
1919         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1920
1921         2002-12-13  Dave Brolley  <brolley@redhat.com>
1922
1923         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1924         (-gen-attr-accessors): New function.
1925         (gen-obj-attr-defn): Update terminating initializer.
1926         (gen-obj-attr-end-defn): New function.
1927         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1928         * sid-cpu.scm (cgen-desc.h): Generate code to include
1929         "opcode/cgen-bitset.h"
1930         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1931         name.
1932         * desc.scm ('gen-defn): Update terminating initializer.
1933         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1934         terminatinig initializer.
1935         (gen-hw-decls): Ditto.
1936         (gen-operand-decls): Ditto.
1937         (gen-insn-decls): Ditto.
1938         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1939         (gen-insn-table): Update terminating initializer.
1940         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1941         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1942         * attr.scm (charmask-bytes): New function.
1943         (bitset-attr->charmask): New function.
1944         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1945         differences for SID-SIMULATOR.
1946         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1947         (<enum-attribute>): Ditto.
1948
1949 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1950
1951         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1952
1953 2005-10-24  DJ Delorie  <dj@redhat.com>
1954
1955         * operand.scm (-anyof-merge-syntax): Print a more useful error
1956         message.
1957
1958 2005-10-19  Nick Clifton  <nickc@redhat.com>
1959
1960         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1961         patch.
1962
1963 2005-10-18  Andreas Schwab  <schwab@suse.de>
1964
1965         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1966
1967 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1968
1969         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1970         size.
1971
1972 2005-08-02  Dave Brolley  <brolley@redhat.com>
1973
1974         * rtl-c.scm (s-unop): Don't dereference
1975         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1976         (s-binop, s-convop, s-cmpop): Likewise.
1977
1978 2005-07-29  Dave Brolley  <brolley@redhat.com>
1979
1980         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1981         if with-profile or with-parallel-write.
1982         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1983         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1984         string-append.
1985
1986 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1987
1988         * cpu/fr30.opc (print_register_list): Correct format strings.
1989         * cpu/ip2k.opc: Likewise.
1990
1991 2005-07-05  Nick Clifton  <nickc@redhat.com>
1992
1993         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1994         unsigned in order to avoid compile time warnings about sign
1995         conflicts.
1996
1997 2005-07-01  Nick Clifton  <nickc@redhat.com>
1998
1999         * desc-cpu.scm: Update to ISO C90 function declaration style.
2000         * opc-asmdis.scm: Likewise.
2001         * opc-ibld.scm: Likewise.
2002         * opc-itab.scm: Likewise.
2003         * cpu/fr30.opc: Likewise.
2004         * cpu/i960.opc: Likewise.
2005         * cpu/ip2k.opc: Likewise.
2006         * cpu/iq2000.opc: Likewise.
2007         * cpu/m32r.opc: Likewise.
2008         * cpu/openrisc.opc: Likewise.
2009         * cpu/sh.opc: Likewise.
2010         * cpu/sparc.opc: Likewise.
2011         * cpu/xstormy16.opc: Likewise.
2012
2013 2005-06-15  Dave Brolley  <brolley@redhat.com>
2014
2015         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2016         (cgen-cpu.h): Call it.
2017
2018         Contributed on behalf of Graydon Hoare
2019         2001-06-05  graydon hoare  <graydon@redhat.com>
2020
2021         * utils.scm (foldl): Define.
2022         (foldr): Define.
2023         (filter): Define.
2024         (union): Define.
2025         (intersection): Simplify.
2026         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2027         (-op-gen-delayed-set-maybe-trace): Define.
2028         (<operand> 'gen-set-{quiet,trace}): Delegate to
2029         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2030         up and needs cleaning.
2031         (-with-parallel?): Hardwire with-parallel to #t.
2032         (<operand> 'cxmake-get): Replace with lookahead-aware code
2033         * sid-decode.scm: Remove per-insn writeback fns.
2034         (-gen-idesc-decls): Redefine sem_fn type.
2035         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2036         with write stack stuff.
2037         (cgen-write.cxx): Replace per-insn writebacks with single write
2038         stack writeback. Add write stack reset function.
2039         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2040         stack stuff.
2041         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2042         estate attribute set.
2043         (delay): Set #:delayed attribute to calculated delay, update
2044         maximum delay of cpu, check (delay ...) usage.
2045         * operand.scm (<operand>): Add delayed slot to <operand>.
2046         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2047         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2048         * doc/rtl.texi (Expressions): Add section on (delay ...).
2049
2050 2005-06-13  Jim Blandy  <jimb@redhat.com>
2051
2052         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2053         as well as strings.
2054
2055 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2056
2057         * doc/porting.texi: Change all mention of md_apply_fix3 and
2058         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2059         respectively.
2060
2061 2005-05-18  Dave Brolley  <brolley@redhat.com>
2062
2063         * utils-sim.scm (-gen-decode-default-entry): New function.
2064         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2065         code to check that all opcodes bits match.
2066         (-gen-decoder-switch): Use -gen-decode-default-entry.
2067
2068 2005-05-16  Jim Blandy  <jimb@redhat.com>
2069
2070         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2071         fetched by one of our GETIMEM* methods.
2072         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2073         base-insn-sized chunks.
2074
2075 2005-05-10  Nick Clifton  <nickc@redhat.com>
2076
2077         * Update the address and phone number of the FSF organization in
2078         the GPL notices in the following files:
2079         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2080         cpu/powerpc.cpu, slib/random.scm
2081
2082 2005-05-06  Jim Blandy  <jimb@redhat.com>
2083
2084         * pprint.scm, cos-pprint.scm: Add documentation.
2085
2086         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2087
2088         * pprint.scm, cos-pprint.scm: New files.
2089
2090 2005-04-04  Nick Clifton  <nickc@redhat.com>
2091
2092         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2093         avoid a compile time warning.
2094
2095 2005-03-18  Nick Clifton  <nickc@redhat.com>
2096
2097         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2098         "percent-operand" from "%operand" as the latter confuses xgettext
2099         into thinking that it is a C printf formating directive, which
2100         prevents proper translation.
2101
2102 2005-02-23  Nick Clifton  <nickc@redhat.com>
2103
2104         * opcodes.scm (gen-parse-number): Add a cast to the desired
2105         pointer signed'ness in order to prevent compile time warnings.
2106         * cpu/ip2k.opc: Fixed compile time warnings about differing
2107         signed'ness of pointers passed to functions.
2108         * cpu/iq2000.opc: Likewise.
2109         * cpu/m32r.opc: Likewise.
2110         * cpu/openrisc.opc: Likewise.
2111         * cpu/xstormy16.opc: Likewise.
2112
2113 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2114
2115         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2116         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2117
2118 2005-02-16  Dave Brolley  <brolley@redhat.com>
2119
2120         * utils.scm: Update copyright years.
2121         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2122         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2123         * operand.scm (-derived-operand-parse): Move logit message from level 1
2124         to level 2.
2125
2126 2005-02-15  Nick Clifton  <nickc@redhat.com>
2127
2128         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2129         prevent compile time warning messages.
2130         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2131         * utils-gen.scm (attr-int-gen-defn): Likewise.
2132         (attr-gen-defn): Likewise.
2133         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2134         (print_dollarhex16): Remove unused function.
2135
2136 2005-02-15  Jim Blandy  <jimb@redhat.com>
2137
2138         * guile.scm (cgen-call-with-debugging): Doc fix.
2139
2140         Make backtraces work more reliably.
2141         * guile.scm: Set up debugging parameters, and enable debugging and
2142         source positions while loading.
2143         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2144         functions.
2145         * read.scm: Don't set debugging parameters here.
2146         (catch-with-backtrace): Function deleted.
2147         (-cgen): Simply note the presence or absence of the -b option.
2148         Pass the flag to cgen-call-with-debugging, so debugging is turned
2149         off here if the user didn't request it, for faster computation.
2150         (cgen): Call cgen-debugging-stack-start here, instead of
2151         catch-with-backtrace.
2152
2153         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2154         trailing -s.
2155         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2156         Don't write out the trailing -s here.
2157         * Makefile.in: Regenerated.
2158         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2159         fixup.scm here; let the caller decide which Scheme's customization
2160         file to preload.
2161         * dev.scm: Load guile.scm, not fixup.scm.
2162         * fixup.scm: Deleted; contents have all moved to guile.scm.
2163         * README: Doc fix.
2164
2165         * guile.scm (debug-write): New function.
2166
2167 2005-02-14  Jim Blandy  <jimb@redhat.com>
2168
2169         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2170         transformer procedure, not eval.  Transformer procedures take one
2171         argument.
2172
2173 2005-02-11  Nick Clifton  <nickc@redhat.com>
2174
2175         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2176         to 'bfd_vma *' in order avoid compile time warning message.
2177
2178 2005-02-09  Jim Blandy  <jimb@redhat.com>
2179
2180         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2181         corresponding change in the sim/common directory.)
2182
2183 2005-02-07  Jim Blandy  <jimb@redhat.com>
2184
2185         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2186         changes in the opcodes directory.)
2187
2188         * guile.scm: New file, containing Guile-specific definitions and
2189         adaptations.  This is loaded by the app-specific shell scripts.
2190         Initially identical to fixup.scm.
2191         * cgen-sid.scm: Don't load fixup.scm here.
2192
2193         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2194         latter is a macro.
2195
2196 2005-01-27  Jim Blandy  <jimb@redhat.com>
2197
2198         * utils.scm (string/symbol->append): Renamed from 'concat'.
2199         * opcodes.scm (gen-switch): Use new name.
2200         * insn.scm (-sub-insn-make!): Same.
2201         * rtl.scm (rtx-dump): Same.
2202         * semantics.scm (semantic-compile): Same.
2203
2204 2005-01-20  Jim Blandy  <jimb@redhat.com>
2205
2206         * opcodes.scm (gen-switch): Use concat instead of string-map.
2207
2208         * utils.scm (concat): New function.
2209         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2210         * rtl.scm (rtx-dump): Same.
2211         * semantics.scm (semantic-compile): Same.
2212
2213 2004-12-16  Jim Blandy  <jimb@redhat.com>
2214
2215         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2216         applied to symbols.  Process everything as strings, and then
2217         convert to a symbol at the end.
2218
2219         * read.scm (debug-repl): Temporarily redirect input and output to
2220         /dev/tty while we debug, so we don't interfere with whatever CGEN
2221         is reading or writing.
2222         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2223         New functions.
2224
2225 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2226
2227         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2228         will work with newer versions of guile.
2229
2230 2004-10-27  Nick Clifton  <nickc@redhat.com>
2231
2232         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2233         * cpu/iq2000.cpu: Likewise.
2234
2235 2004-07-21  DJ Delorie  <dj@redhat.com>
2236
2237         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2238
2239 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2240
2241         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2242         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2243
2244 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2245
2246         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2247
2248 2004-03-22  Dave Brolley  <brolley@redhat.com>
2249
2250         * utils.scm (copyright-fsf): Update copyright years.
2251         (copyright-red-hat): Ditto.
2252         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2253         code.
2254         (-op-gen-set-trace-parallel): Ditto.
2255
2256 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2257
2258         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2259         disassembling codes for 0x*2 addresses.
2260
2261 2004-01-29  Dave Brolley  <brolley@redhat.com>
2262
2263         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2264         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2265         in the extra bit positions.
2266
2267 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2268
2269         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2270
2271 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2272
2273         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2274         "short" being 16 bit.
2275         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2276         internationalize error message.
2277         (parse_lo16): Likewise.  Remove useless code.
2278
2279 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2280
2281         * cpu/m32r.cpu : Add new model m32r2.
2282         Add new instructions.
2283         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2284         Changed PIPE attr of push from O to OS.
2285         Care for Little-endian of M32R.
2286         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2287         Care for Little-endian of M32R.
2288         (parse_slo16): signed extension for value.
2289
2290 2003-10-26  Dave Brolley  <brolley@redhat.com>
2291
2292         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2293         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2294         (-gen-extract-fn): Call -gen-record-profile-args.
2295
2296 2003-10-21  Dave Brolley  <brolley@redhat.com>
2297
2298         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2299         a static const int.
2300         * decode.scm (-opcode-slots): Correct typo in logit call.
2301
2302 2003-10-09  Jim Blandy  <jimb@redhat.com>
2303
2304         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2305         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2306
2307         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2308
2309 2003-10-06  Dave Brolley  <brolley@redhat.com>
2310
2311         * gen-all-doc: Add fr550.
2312
2313 2003-09-11  Doug Evans  <dje@sebabeach.org>
2314
2315         * Makefile.am (ARCHFILE): New var.
2316         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2317         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2318         * Makefile.in: Regenerate.
2319
2320 2003-09-08  Dave Brolley  <brolley@redhat.com>
2321
2322         On behalf of Doug Evans <dje@sebabeach.org>
2323         Pass in paths to input files, instead of assuming they live in
2324         $srcdir/cpu.  Plus misc. option processing cleanup.
2325         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2326         Add pre-process pass to all options.
2327         * cgen-gas.scm (gas-arguments): Ditto.
2328         * cgen-sid.scm (sim-arguments): Ditto.
2329         * cgen-sim.scm (sim-arguments): Ditto.
2330         * cgen-stest.scm (stest-arguments): Ditto.
2331         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2332         (-opc-file-path): New global.
2333         (opc-file-path): New fn.
2334         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2335         All callers updated.
2336         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2337         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2338         Replace srcdir arg with opc-file.  All callers updated.
2339         * read.scm (-opt-spec-update): Delete.
2340         (opt-get-first-pass,opt-get-second-pass): New fns.
2341         (-cgen): Process application-specific arguments in two passes.
2342
2343 2003-08-29  Dave Brolley  <brolley@redhat.com>
2344
2345         * cpu/frv.cpu: Removed.
2346         * cpu/frv.opc: Removed.
2347
2348 2003-08-21  Nick Clifton  <nickc@redhat.com>
2349
2350         * cpu/frv.cpu (mbtoh): Replace input parameter to
2351         u-media-dual-expand and u-media-dual-btoh with output parameter.
2352         (cmbtoh): Add profiling hack.
2353
2354 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2355
2356         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2357
2358 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2359
2360         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2361         the elements for the END record of CGEN_OPINST, silencing warnings.
2362
2363 2003-07-15  Doug Evans  <dje@sebabeach.org>
2364
2365         Add guile 1.6.4 support.
2366         - empty list must be quoted
2367         - string functions have stricter type checking
2368         - eval now takes a second argument
2369         - symbol-bound? is deprecated
2370         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2371         (bitset-attr->list): Ensure arg to string-cut is a string.
2372         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2373         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2374         * cos.scm (-class-list): Must quote empty list.
2375         (-class-parent-classes,-class-compute-class-desc): Ditto.
2376         (class-make,make,object-reset!): Ditto.
2377         (method-make-make!): Call eval1 instead of eval.
2378         (method-make-forward!,method-make-virtual-forward!): Ditto.
2379         * decode.scm (subdtable-add): Use stringsym-append instead of
2380         string-append.
2381         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2382         (-build-decode-table-entry): Fetch string name of insn.
2383         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2384         (-gen-mach-table-defns): Ditto for mach.
2385         (gen-ifld-defns): Ditto for ifld.
2386         (gen-hw-table-defns): Ditto for hw.
2387         (gen-operand-table): Ditto for op.
2388         (gen-insn-table-entry): Ditto for insn.
2389         * desc.scm (gen-attr-table-defn): Ditto for attr.
2390         (<keyword>,gen-defn): Don't pass symbols to string-append.
2391         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2392         symbol-append.
2393         (enum-vals-upcase): Use symbol-upcase to build result.
2394         (-enum-parse): Use stringsym-append to build errtxt.
2395         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2396         (eval1): New function.
2397         (symbol-bound?): Provide own version if >= guile 1.6.
2398         * hardware.scm (define-keyword): Use string-append instead of
2399         symbol-append.
2400         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2401         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2402         before using.
2403         (gen-list-entry): Handle either symbol or string `name' arg.
2404         (gen-obj-doc-header): Fetch string name of `o' arg.
2405         (define-cpu-intro): Ditto for cpu.
2406         (gen-mach-intro): Ditto for mach.
2407         (gen-model-intro): Ditto for model.
2408         (gen-isa-intro): Ditto for isa.
2409         (gen-machine-doc-1): Ditto for isa.
2410         (gen-reg-doc-1): Convert mach to string first.
2411         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2412         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2413         to string first.
2414         (gen-insn-categories): Fetch string name of mach.  Convert
2415         enum-val-name to string first.
2416         (gen-insn-docs): Fetch string name of mach.
2417         * ifield.scm (ifld-ilk): Result is a string.
2418         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2419         Fetch string name of ifld.
2420         (-sfmt-search-key): Similarily for ifld and op.
2421         * insn.scm (syntax-make): Fetch string name of syntax element.
2422         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2423         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2424         * mode.scm (mode:c-type): Result is a string.
2425         (mode:enum): Fetch string name of mode.
2426         (-mode-parse): Use stringsym-append to build errtxt.
2427         * model.scm (model:enum): Fetch string name of model.
2428         (-model-parse): Use stringsym-append to build errtxt.
2429         (parse-insn-timing): Must quote empty list.
2430         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2431         (-gen-minsn-opcode-entry): Ditto.
2432         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2433         convert to string.
2434         (read-cpu.opc): Convert current-arch-name to a string before using.
2435         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2436         (<derived-operand>): Must quote empty list.
2437         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2438         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2439         of ifld.
2440         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2441         (-pmacro-sym): Must convert symbols to strings before passing to
2442         string-append.
2443         (-pmacro-str): Ditto.
2444         (pmacros-init!): Use eval1 instead of eval.
2445         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2446         (keep-isa-atlist?): Ditto.
2447         (cmd-if): Use eval1 instead of eval.
2448         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2449         (-rtl-c-get): Fetch string name of src.
2450         (s-unop): Ditto for mode.
2451         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2452         (-gen-par-temp-defns,subword): Ditto.
2453         (join): Use stringsym-append instead of string-append.
2454         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2455         (rtx-traverse-debug): Fetch string name of rtx-obj.
2456         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2457         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2458         (rtx-pretty-name): Result is a string.
2459         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2460         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2461         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2462         before using.
2463         (-gen-sfrag-case): Fetch string name of user.
2464         * sid-model.scm (unit:enum): Fetch string name of unit.
2465         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2466         (<hw-memory>,gen-set-quiet): Ditto.
2467         (gen-mode-defs): Ditto.
2468         (sim-finish!): Convert current-arch-name to a string before using.
2469         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2470         (-gen-no-scache-semantic-fn): Ditto.
2471         (cgen-defs.h): Fetch string name of isa.
2472         (cgen-read.c): Convert current-arch-name to a string before using.
2473         (cgen-write.c): Ditto.
2474         * sim-model.scm (unit:enum): Fetch string name of unit.
2475         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2476         (-gen-model-timing-table): Fetch string name of model.
2477         (-gen-mach-model-table): Ditto.
2478         (-gen-mach-defns): Fetch string name of mach.
2479         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2480         (<hw-memory>,cxmake-get): Fetch string name of mode.
2481         (<hw-memory>,gen-set-quiet): Ditto.
2482         (gen-mode-defs): Ditto.
2483         (sim-finish!): Must quote empty list.
2484         * utils-cgen.scm (<ident>): Must quote empty list.
2485         (obj:str-name): New fn.
2486         (parse-comment): Result is a string.
2487         (parse-symbol): Result is a symbol.
2488         (parse-string): Result is a string.
2489         (keyword-list?): Convert arg to string before calling string-ref.
2490         (keyword-list->arg-list): Ditto.
2491         (gen-attr-name): Convert attr-name to string first.
2492         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2493         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2494         (gen-define-ifmt-ifields): Ditto for fld.
2495         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2496         map-over-string.
2497         (gen-file-name): Ditto.
2498         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2499         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2500         (reduce): Call eval1 instead of eval.
2501         * cpu/m32r.cpu (addi): Don't use `#.'.
2502
2503         * gen-all-sim: Fix some typos.
2504
2505 2003-07-08  Doug Evans  <dje@sebabeach.org>
2506
2507         * gen-all-doc: Ensure run from cgen src dir.
2508         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2509         * gen-all-sid: Similarily, in ./tmp-sid.
2510         * gen-all-sim: Similarily, in ./tmp-sim.
2511
2512 2003-06-20  Doug Evans  <dje@sebabeach.org>
2513
2514         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2515
2516 2003-06-19  Doug Evans  <dje@sebabeach.org>
2517
2518         * mach.scm (-ifld-already-defined?): New proc.
2519         (current-ifld-add!): Use it.
2520         (-op-already-defined?): New proc.
2521         (current-op-add!): Use it.
2522         (-insn-already-defined?): New proc.
2523         (current-insn-add!): Use it.
2524         (-minsn-already-defined?): New proc.
2525         (current-minsn-add!): Use it.
2526         (obj-isa-list): New proc.
2527         (isa-supports?): Use it.
2528
2529 2003-06-10  Doug Evans  <dje@sebabeach.org>
2530
2531         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2532         * cpu/m32r.cpu (all insns): Ditto.
2533
2534         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2535         "unspecified".
2536
2537         * gen-all-doc: Split arm and frv docs up a bit.
2538
2539         * cpu/arm.cpu: Add IDOC attribute.
2540         * cpu/frv.cpu: Ditto.
2541         * cpu/i960.cpu: Ditto.
2542         * cpu/openrisc.cpu: Ditto.
2543         * cpu/xstormy16.cpu: Ditto.
2544         * cpu/m32r.cpu: Ditto.
2545         (all insns): Explicitly specify IDOC attribute.
2546
2547         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2548         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2549         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2550         * Makefile.in: Regenerate.
2551         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2552         (-attr-read): Defer computing default value until we know the type.
2553         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2554         (<attr-list>:attr-present?): New method.
2555         (atlist-attr-present?,obj-attr-present?): New fns.
2556         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2557         (attr-builtin!): New insn attr IDOC.
2558         * cgen-doc.scm (doc-arguments): New args -I,-N.
2559         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2560         Support comment as fourth element of enum value.
2561         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2562         * html.scm (gen-html-header): New arg kind, all callers updated.
2563         (gen-table-of-contents): New arg insn-file, all callers updated.
2564         (gen-list-entry,gen-doc-header): New fn.
2565         (get-operands): Delete.
2566         (gen-iformat-table): Rewrite.
2567         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2568         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2569         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2570         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2571         (get-insns-for-category,gen-categories-insn-lists): New fns.
2572         (gen-insn-docs): Simplify each insn's semantics first.
2573         Print insn tables sorted by IDOC categories.
2574         (*insn-html-file-name*): New global.
2575         (cgen-insn.html): New fn.
2576         (cgen-all): Update.
2577         * insn.scm (<insn>): Create a setter for the `tmp' member.
2578         * semantics.scm (insn-build-known-values): Renamed from
2579         -build-known-values.  All callers updated.
2580
2581         * rtl.scm: Move traveral/evaluation support to ...
2582         * rtl-traverse.scm: New file.
2583         * read.scm: Maybe-load rtl-traverse.scm.
2584
2585         * rtl.scm (-rtx-valid-types): Add SETRTX.
2586
2587         * rtx-funcs.scm (nop,parallel): Fix mode.
2588
2589         * utils.scm (eqv-lookup-index): New fn.
2590         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2591
2592         * dev.scm (load-doc): Set APPLICATION.
2593
2594 2003-06-10  Dave Brolley  <brolley@redhat.com>
2595
2596         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2597         * sid-decode.scm: Generate #include of config.h into
2598         @prefix@-decode.cxx.
2599         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2600
2601 2003-06-07  Doug Evans  <dje@sebabeach.org>
2602
2603         * gen-all-sid: New file.
2604         * gen-all-opcodes: New file.
2605
2606 2003-06-05  Nick Clifton  <nickc@redhat.com>
2607
2608         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2609         version of the FRinti operand.
2610         (FRintjeven): Likewise for FRintj.
2611         (FRintkeven): Likewise for FRintk.
2612         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2613         media-quad-arith-sat-semantics, media-quad-arith-sat,
2614         conditional-media-quad-arith-sat, mdunpackh,
2615         media-quad-multiply-semantics, media-quad-multiply,
2616         conditional-media-quad-multiply, media-quad-complex-i,
2617         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2618         conditional-media-quad-multiply-acc, munpackh,
2619         media-quad-multiply-cross-acc-semantics, mdpackh,
2620         media-quad-multiply-cross-acc, mbtoh-semantics,
2621         media-quad-cross-multiply-cross-acc-semantics,
2622         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2623         media-quad-cross-multiply-acc-semantics, cmbtoh,
2624         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2625         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2626         cmhtob): Use new operands.
2627         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2628         (parse_even_register): New function.
2629
2630 2003-06-04  Doug Evans  <dje@sebabeach.org>
2631
2632         Better handling of 64 bit and mixed 32/64 bit architectures.
2633         * hardware.scm (hw-update-word-modes!): New fn.
2634         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2635         hw-update-word-modes!.
2636         (state-word-bitsize): Replace FIXME with requested check.
2637         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2638         * mode.scm (mode-find): Ignore INT,UINT.
2639         (-mode-word-sizes-kind): New global.
2640         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2641         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2642         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2643         of mode-list to ...
2644         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2645         unusable, correct values set later.
2646         (mode-finish!): Remove cruft.
2647         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2648         * opcodes.scm (opcodes-init!): Ditto.
2649         * rtx-funcs.scm (annul): Fix mode of pc.
2650         * cpu/ia64.cpu: Remove cruft that sets word modes.
2651         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2652
2653 2003-06-03  Nick Clifton  <nickc@redhat.com>
2654
2655         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2656         immediate value not unsigned.
2657
2658 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2659
2660         * cpu/sh.cpu: Amend comments to refer to SuperH.
2661         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2662         * cpu/sh64-media.cpu: Likewise.
2663         (Saturation): Update manual reference.
2664
2665 2003-05-15  Doug Evans  <dje@sebabeach.org>
2666
2667         * Makefile.am (srcroot): New var.
2668         (html): New rule.
2669         * Makefile.in: Regenerate.
2670         * cgen-doc.scm: New file.
2671         * html.scm: New file.
2672         * gen-all-doc: New file.
2673         * dev.scm (cload): Handle DOC application.
2674         (load-doc): New fn.
2675         * machs.scm (machs-for-cpu): New fn.
2676         * model.scm (models-for-cpu): New fn.
2677         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2678         All uses updated.
2679         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2680         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2681
2682         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2683         (-gen-decode-bits): Instead put in better fix here.
2684
2685         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2686
2687 2003-05-01  DJ Delorie  <dj@redhat.com>
2688
2689         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2690         word accesses.
2691         (set-alignfix-mem): Likewise.
2692
2693 2003-04-16  Dave Brolley  <brolley@redhat.com>
2694
2695         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2696         * utils.scm (copyright-fsf): Update generate copyright years.
2697         (copyright-cygnus): Ditto.
2698         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2699         operands.
2700         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2701         here.
2702         (<operand>'gen-profile-code): New parameter 'when'.
2703         (<iunit>'gen-profile-code): Ditto.
2704         (<insn>'gen-profile-code): Ditto.
2705         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2706         'insn_reference' for the 'after' function.
2707         * model.scm (unit:enum): Moved to sim-model.scm.
2708         * sim-model.scm (unit:enum): Moved from model.scm.
2709         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2710         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2711         * sid-model.scm (unit:enum): New version for sid.
2712         (gen-model-class-name): New function.
2713         (gen-model-unit-fn-decl): New function.
2714         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2715         (gen-model-unit-fn-name): New parameter 'when'.
2716         (-gen-model-insn-fn-name): Ditto.
2717         (-gen-model-insn-qualified-fn-name): New function.
2718         (-gen-model-insn-fn-decl): New function.
2719         (-gen-model-insn-fn-decls): New function.
2720         (-gen-model-insn-fn): New parameter 'when'. Call
2721         -gen-model-insn-qualified-fn-name.
2722         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2723         functions for modelling insn before and after execution.
2724         (-gen-model-class-decls): New function.
2725         (" (gen-model-class-name model) "): New function.
2726         (gen-model-classes): New function.
2727         (-gen-insn-timing): Generate functions for modelling insn before and after
2728         execution.
2729         (-gen-insn-unit-timing): Generate class-qualified names.
2730         (-gen-model-timing-table): Ditto.
2731         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2732         not needed (yet) by sid.
2733         (cgen-model.h): New function.
2734
2735 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2736
2737         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2738         * cpu/sh64-compact.cpu: Likewise.
2739         * cpu/sh64-media.cpu: Likewise.
2740
2741 2003-03-21  DJ Delorie  <dj@redhat.com>
2742
2743         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2744         which indicates if the sign flag is set from bit 15 or 7.
2745         Adjust all callers.
2746         (set-psw): New argument ws, propogate it.
2747         (set-psw-nowrite): Likewise.
2748         (set-mem-psw): Likewise.
2749         (set-psw-carry): Likewise.  Use temporaries to prevent
2750         prematurely overwriting needed inputs.
2751         (set-psw-rrotate17): Fix logic.
2752         (shrgrgr): Preserve carry for zero-bit shifts.
2753         (shrgrimm): Likewise.
2754         (shlgrgr): Likewise.
2755         (shlgrimm): Likewise.
2756         (asrgrgr): Likewise.
2757         (asrgrimm): Likewise.
2758         (reset): New.
2759
2760 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2761
2762         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2763
2764 2002-03-05  DJ Delorie  <dj@redhat.com>
2765
2766         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2767         prematurely overwriting needed inputs.
2768         (set-psw-sub): Likewise.
2769
2770 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2771
2772         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2773
2774 2003-02-18  DJ Delorie  <dj@redhat.com>
2775
2776         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2777         (movlmemimm): Just mask the address.
2778         (movhmemimm): Likewise.
2779         (movlmemgr): Likewise.
2780         (movhmemgr): Likewise.
2781         (set-psw): Always set the psw last.
2782         (set-psw-carry): Likewise.
2783         (set-psw-add): Likewise.
2784         (set-psw-sub): Likewise.
2785
2786         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2787         of 16 patterns from the set-psw-rotate17 function.
2788         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2789         movgriipostincgr, movgriipredecgr): Set psw correctly.
2790         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2791         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2792         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2793
2794 2003-02-11  Dave Brolley  <brolley@redhat.com>
2795
2796         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2797         @arch@_cgen-ifld_table.
2798         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2799         @arch@_cgen-ifld_table.
2800
2801 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2802
2803         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2804
2805 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2806
2807         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2808         empty ISAs.
2809
2810 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2811
2812         * utils-gen.scm (attr-int-gen-defn): Define.
2813
2814 2002-12-21  Doug Evans  <dje@sebabeach.org>
2815
2816         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2817         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2818
2819         * dev.scm (cload): Update location of .cpu files.
2820
2821 2002-12-19  Doug Evans  <dje@sebabeach.org>
2822
2823         * utils-sim.scm (gen-profile-sym): New fn.
2824         (<operand>,sbuf-profile-sym): New method.
2825         (<operand>,sbuf-profile-elm): Use it.
2826         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2827         of hardcoding symbol name.
2828         (<operand>,gen-profile-code): Ditto.
2829         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2830         symbol name.
2831
2832         * mode.scm (mode-sem-mode): New fn.
2833         * operand.scm (op:new-mode): Update. mode-name.
2834         (op-natural-mode?) New fn.
2835         * rtl.scm (hw): Set hw-name,mode-name.
2836
2837         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2838         Instead do:
2839         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2840         as size of IDESC-TABLE-VAR.
2841         (@prefix@_init_idesc_table): Ditto.
2842         * sim-model.scm (-gen-mach-defns): Ditto.
2843         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2844
2845         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2846
2847         * insn.scm (-parse-insn-format-symbol): Improve error message.
2848         (-parse-insn-format): Ditto.
2849
2850         * gen-all-sim: New script.
2851
2852 2002-12-16  DJ Delorie  <dj@delorie.com>
2853
2854         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2855
2856 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2857
2858         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2859         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2860         (parse_immediate16): Handle immediate16 values, which now include
2861         @hi(label) and @lo(label)
2862
2863 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2864
2865         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2866         Add braces and cast for union field.
2867         (gen-multi-ifield-nodes): Add braces and cast for union field.
2868         (cgen_operand_table): Similarly fix sentinel.
2869         (cgen_cpu_close): Constify "insns".  Formatting.
2870         (cgen-desc.c): Include xregex.h.
2871         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2872         Prototype.
2873         <opc.c>: Include safe-ctype.h.
2874         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2875         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2876         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2877         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2878         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2879         (parse_addr16): Correct type of "value".  Formatting.
2880         (parse_addr16_p): Likewise.
2881         (parse_addr16_cjp): Likewise.
2882         (parse_lit8): Likewise.
2883         (parse_bit3): Formatting.
2884         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2885         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2886         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2887         print_decimal.
2888         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2889         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2890         (print_dollarhex8): Likewise.
2891         (print_dollarhex16): Likewise.
2892         (print_dollarhex_addr16h): Likewise.
2893         (print_dollarhex_addr16l): Likewise.
2894         (print_dollarhex_p): Likewise.
2895         (print_dollarhex_cj): Likewise.
2896         (print_decimal): Likewise.
2897         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2898
2899 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2900
2901         * doc/rtl.texi (Model variants): Mention current limitations for
2902         unit inputs and outputs.
2903         (Hardware elements) <attribute PROFILE>: Be slightly more
2904         verbose.
2905         (Instructions) <timing>: input/output overrides have a direction
2906         operand.
2907
2908 2002-11-25  DJ Delorie  <dj@redhat.com>
2909
2910         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2911
2912 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2913
2914         * cpu/iq10.cpu: New file.
2915         * cpu/iq2000.cpu: Likewise.
2916         * cpu/iq2000.opc: Likewise.
2917         * cpu/iq2000m.cpu: Likewise.
2918
2919 2002-11-19  DJ Delorie  <dj@redhat.com>
2920
2921         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2922
2923 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2924
2925         * dev.scm: Call getenv with a string, not a symbol.
2926
2927 2002-10-08  Doug Evans  <dje@transmeta.com>
2928             Hans-Peter Nilsson  <hp@axis.com>
2929
2930         * types.scm (bitrange-overlap?): Handle lsb0?.
2931
2932 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2933
2934         From Robert Cragie <rcc@jennic.com>:
2935         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2936
2937 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2938             Ben Elliston  <bje@redhat.com>
2939             John Healy  <jhealy@redhat.com>
2940             Jeff Johnston  <jjohnstn@redhat.com>
2941             Alan Lehotsky  <alehotsky@redhat.com>
2942             Ubicom Inc. <SupportDesk@ubicom.com>
2943
2944         * cpu/ip2k.cpu: New file.
2945         * cpu/ip2k.opc: Likewise.
2946
2947 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2948
2949         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2950
2951 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2952
2953         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2954         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2955         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2956         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2957         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2958         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2959         (-sthi-byte): If there is a single byte to store, store it at
2960         proper address.
2961         (sthil, sthiq): Fix big-endian behaviour.
2962         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2963         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2964         (saturate): Use Dimode to check if saturation operation is required.
2965         (usaturate): Likewise.
2966         (mpermw): Fix mask.
2967         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2968         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2969         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2970         (msadubq): Fix subword index in second operand of first subtraction.
2971
2972 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2973
2974         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2975         code.
2976
2977 2002-06-18  Dave Brolley  <brolley@redhat.com>
2978
2979         * cpu/frv.cpu: New cpu description.
2980         * cpu/frv.opc: New cpu support code.
2981
2982 2002-05-21  Dave Brolley  <brolley@redhat.com>
2983
2984         * decode.scm (-opcode-slots): Don't consider bits beyond the
2985         length of the insn.
2986
2987 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2988
2989         * cpu/powerpc.cpu: New file.
2990
2991 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2992
2993         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2994
2995 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2996
2997         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2998         results are expanded recursively.
2999
3000 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
3001
3002         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3003         call scan-symbol on it, to enable recursive macro-expansion.
3004
3005 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
3006
3007         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3008         for multiple-isa configurations.
3009         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3010
3011 2002-02-04  Ben Elliston  <bje@redhat.com>
3012
3013         * cpu/sh.cpu, cpu/sh.opc: New files.
3014         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3015
3016 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
3017
3018         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3019         (Enumerated constants): Mention that an ifield must not specify a
3020         multi-ifield.
3021         (Instruction operands): Ditto for index.
3022         (Expressions) <parallel>: Remove misplaced mention of local
3023         variables.
3024         <if>: Mention that mode must be specified and non-VOID when the
3025         result is used.
3026
3027 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3028
3029         * doc/porting.texi: When referring to *.opc, mention they are in
3030         the cpu subdir.  Call top-level directory toplevel, not devo.
3031         Close string in define-normal-insn example.
3032
3033         * doc/pmacros.texi: Fix .substr typo to .substring.
3034         Mention that .sym expansions are not further expanded.
3035
3036 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3037
3038         * desc-cpu.scm (ifld-number-cache): Add.
3039         (ifld-number): Add.
3040         (gen-maybe-multi-ifld-of-op): Add.
3041         (gen-maybe-multi-ifld): Add.
3042         (gen-multi-ifield-nodes): Add.
3043         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3044
3045 2002-01-10  matthew green  <mrg@redhat.com>
3046
3047         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3048         (gr-Rb-names): ... to this.
3049         (h-Rb): New hardware piece.
3050         (h-Rbj): Use gr-Rb-names.
3051         (Rb): Use h-Rb.
3052         (holdx): New instruction.
3053
3054 2002-01-07  Ben Elliston  <bje@redhat.com>
3055
3056         * utils.scm (package-cygnus-simulators): Rename from this ..
3057         (package-red-hat-simulators): .. to this.
3058         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3059         * sid-cpu.scm (cgen-desc.h): Likewise.
3060         (cgen-cpu.h): Likewise.
3061         (cgen-defs.h): Likewise.
3062         (cgen-write.cxx): Likewise.
3063         (cgen-semantics.cxx): Likewise.
3064         (cgen-sem-switch.cxx): Likewise.
3065         * sid-decode.scm (cgen-decode.h): Likewise.
3066         (cgen-decode.cxx): Likewise.
3067         * sid-model.scm (cgen-model.cxx): Likewise.
3068         * sid.scm (option-set!): Likewise.
3069         * sim.scm (option-set!): Likewise.
3070
3071 2002-01-07  Ben Elliston  <bje@redhat.com>
3072
3073         * utils.scm (copyright-fsf): Add 2002.
3074         (copyright-cygnus): Rename to copyright-red-hat.
3075         (copyright-red-hat): Add 2002.
3076         (CURRENT-COPYRIGHT): Update comment.
3077         * opcodes.scm (option-set!): Update callers.
3078         * sid-model.scm (cgen-model.cxx): Likewise.
3079         * sid-cpu.scm: Likewise.
3080         * sid-decode.scm: Likewise.
3081         * sid.scm (option-set!): Handle "redhat" as an option for
3082         "copyright"; use copyright-red-hat.
3083         * sim.scm (option-set!): Likewise.
3084
3085 2002-01-03  Dave Brolley  <brolley@redhat.com>
3086
3087         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3088         number of insns in the list.  Update the population count function to
3089         identify and prioritize 3 catgories of useful bits.
3090         (-population-top-few): Don't consider bits with a population count of
3091         zero.
3092         (-build-decode-table-entry): Don't call
3093         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3094         identical insns at the next tree level.
3095         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3096         this function is no longer used.
3097         (filter-non-specialized-ambiguous-insns): New function.
3098         (filter-identical-ambiguous-insns): New function.
3099         (find-identical-insn): New function.
3100         (filter-harmlessly-ambiguous-insns): Removed.
3101
3102 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3103             matthew green  <mrg@redhat.com>
3104             Frank Ch. Eigler  <fche@redhat.com>
3105             Nick Clifton  <nickc@cambridge.redhat.com>
3106
3107         * cpu/xstormy16.cpu: New file.
3108         * cpu/xstormy16.opc: New file.
3109
3110 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3111
3112         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3113
3114 2001-11-14  Dave Brolley  <brolley@redhat.com>
3115
3116         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3117         of the field being extracted.
3118
3119 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3120
3121         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3122         (cos ...) and (sin ..) rtx.
3123
3124 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3125
3126         * desc-cpu.scm: Do not include ctype.h in generated desc
3127         files.  They will inherit safe-ctype.h instead.
3128
3129 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3130
3131         * desc-cpu.scm: Add missing function prototypes (for generated
3132         C files).  Fix compile time warning messages about unused
3133         parameters (for generated C files).
3134         * opc-asmdis.scm: The same.
3135         * opc-ibld.c: The same.
3136         * opc-itab.scm: The same.
3137         * cpu/fr30.opc: The same.
3138         * cpu/m32r.opc: The same.
3139         * cpu/openrisc.opc: The same.
3140
3141 2001-09-17  graydon hoare  <graydon@redhat.com>
3142
3143         * insn.scm (syntax-break-out): Correct logic in handling escaped
3144         syntax characters.
3145
3146 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3147
3148         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3149         call @arch@_cgen_build_insn_regex now that regex support is in
3150         libiberty.
3151
3152 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3153
3154         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3155         (mask-superset?): Look for strict supersets to allow rejection of
3156         duplicate insns.
3157
3158 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3159
3160         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3161         (cgen-desc.h): Call it.
3162         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3163         decode-size.
3164         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3165         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3166
3167 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3168
3169         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3170         mach->cpu insn-chunk-bitsize.
3171         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3172         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3173         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3174         (-cpu-parse, -cpu-read): Parse/initialize it.
3175         * doc/rtl.texi (define-cpu): Document it.
3176
3177 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3178
3179         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3180
3181 2001-07-06  Ben Elliston  <bje@redhat.com>
3182
3183         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3184
3185 2001-07-05  Ben Elliston  <bje@redhat.com>
3186
3187         * README: Update.
3188
3189         * read.scm (include): Include files from srcdir/cpu.
3190         (-cgen): Likewise for loading .cpu files.
3191         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3192         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3193         * *.opc: Likewise.
3194         * simplify.inc: Likewise.
3195
3196 2001-07-04  Ben Elliston  <bje@redhat.com>
3197
3198         * read.scm (include): Log "Including file" message at level 1,
3199         rather than outputting it with (display).
3200         (cpu-load): Log "Loading cpu description" and "Processing cpu
3201         description" messages at levels 1 and 2, respectively, rather than
3202         using (display).
3203
3204 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3205
3206         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3207         CGEN_KEYWORD_ENTRY initializers.
3208
3209         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3210         (<operand> 'test-data): Involve both the index and the hardware
3211         in testcase generation.
3212         (<hw-indx> 'test-data): Generate test data from the underlying
3213         object.
3214         (<ifield> 'test-data): Generate test data by computing bit
3215         patterns for the field, then decoding them.
3216         (<hw-address> 'test-data): Allow for new calling convention.
3217         (<hw-iaddress> 'test-data): Likewise.
3218         (<keyword> 'test-data): Convert index values into keywords.
3219         (<hw-asm> 'test-data): Convert index values into integer strings.
3220
3221         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3222
3223 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3224
3225         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3226         is required for multi-mode hw types (memory).
3227
3228 2001-05-11  Ben Elliston  <bje@redhat.com>
3229
3230         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3231         when generating allinsn.d from objdump output. Without it, the
3232         testsuite will treat $ as the regular expression for end of line.
3233
3234 2001-05-09  Ben Elliston  <bje@redhat.com>
3235
3236         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3237         with `cgen_cpu_open'; documentation had become out of date.
3238         * doc/rtl.texi (Instruction operands): Likewise.
3239
3240 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3241
3242         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3243         various-base-length instruction sets.
3244
3245 2001-04-02  Ben Elliston  <bje@redhat.com>
3246
3247         * sid-cpu.scm (-last-insn): New function.
3248         (-gen-sem-switch-engine): Loop through idesc while less than or
3249         equal to the last instruction enum, not less than the MAX enum.
3250         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3251         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3252         table's size to be the last instruction enum plus one, not
3253         @PREFIX@_INSN_MAX.
3254         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3255         instruction onto the instruction list.
3256
3257         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3258         using the size of the table and its elements.
3259         (-gen-decode-insn-globals): Define the idesc table's size to be
3260         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3261         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3262         last instruction enum plus one, not @CPU@_INSN_MAX.
3263
3264 2001-03-28  Ben Elliston  <bje@redhat.com>
3265
3266         * doc/version.texi (UPDATED, EDITION): Update.
3267         * doc/stamp-vti: Likewise.
3268
3269 2001-03-26  Ben Elliston  <bje@redhat.com>
3270
3271         * doc/credits.texi (Credits): Update.
3272
3273         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3274         specified prefix and, if necessary, escape `$' in gas-build.sh to
3275         prevent unwanted shell variable expansion.
3276
3277 2001-03-24  Ben Elliston  <bje@redhat.com>
3278
3279         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3280         (<keyword>,test-data): Likewise.
3281         (<hw-address>,test-data): Likewise.
3282         (<hw-iaddress>,test-data): Likewise.
3283         (-collate-test-set): New function.
3284         (build-test-set): Use it.
3285         (gen-gas-test): Generate five test cases per instruction.
3286         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3287
3288         * read.scm: Load "slib/random" if random is not defined.
3289         * slib/random.scm: New file.
3290
3291         * utils.scm: Remove comments about the Hobbit compiler.
3292         (copyright-cygnus): Add 2001.
3293         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3294         (package-gnu-simulators): Tidy.
3295
3296 2001-03-23  Ben Elliston  <bje@redhat.com>
3297
3298         * cgen-gas.scm: Inline documentation improvements.
3299
3300 2001-03-21  Ben Elliston  <bje@redhat.com>
3301
3302         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3303         given in a syntax string is undefined.
3304
3305         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3306         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3307
3308 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3309
3310         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3311         for arg_type CGEN_CPU_OPEN_BFDMACH.
3312
3313 2001-03-20  Ben Elliston  <bje@redhat.com>
3314
3315         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3316         instruction onto the instruction list. Define MAX_INSNS to be the
3317         value of the last instruction enum plus one.
3318
3319 2001-03-14  Nick Clifton  <nickc@redhat.com>
3320
3321         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3322
3323 2001-03-05  Dave Brolley  <brolley@redhat.com>
3324
3325         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3326         if the number of ifields is greater than zero.
3327
3328 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3329
3330         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3331         Emit LIKELY/UNLIKELY branch probability hints.
3332         * sid-decode.cpu (-gen-record-args): Ditto.
3333
3334 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3335
3336         * desc-cpu.scm (-gen-hash-defines): Rename
3337         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3338
3339 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3340
3341         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3342         writeback tracking.
3343         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3344         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3345         if unnecessary.
3346         * sid.scm (<operand> gen-write): Use unsigned long long expression
3347         for writeback.
3348         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3349         (<unit> gen-profile-code): Ditto.
3350
3351 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3352
3353         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3354         (regno ...) rtx.
3355
3356 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3357
3358         * operand.scm (<operand> pretty-sem-name): New field.
3359         (<operand> make): Initialize it from hw-name.
3360         (op:set-pretty-sem-name!): New function.
3361         (<operand> gen-pretty-name): Default to fetching new field.
3362         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3363         sem-name setting from -rtx-hw-name.
3364
3365 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3366
3367         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3368         its subsequent gen-pretty-name.
3369
3370         * read.scm: Increase thread working stack limit and backtrace
3371         depth limits.
3372
3373 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3374
3375         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3376
3377 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3378
3379         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3380         current insn plus 4.
3381         (h-delay-insn): New hardware register.
3382         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3383         (l-jalr): Likewise.
3384         (l-bal): Likewise.
3385
3386         * openrisc.opc (parse_hi16): Sign extend value.
3387         (parse_lo16): Likewise.
3388
3389 2001-01-06  Ben Elliston  <bje@redhat.com>
3390
3391         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3392         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3393         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3394         (-gen-semantic-fn-table): Likewise.
3395         (-gen-scache-semantic-fn): Likewise.
3396         (-gen-no-scache-semantic-fn): Likewise.
3397         (cgen-read.c): Likewise.
3398         (cgen-sem-switch.c): Likewise.
3399         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3400         is a filename prefix.
3401         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3402         (-gen-decode-insn-globals): Likewise.
3403         (-gen-idesc-decls): Likewise.
3404         (cgen-decode.h): Likewise.
3405         (cgen-decode.c): Likewise.
3406         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3407         (gen-cpu-insn-enum): Likewise.
3408         (sim-finish!): Likewise.
3409
3410 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3411
3412         * openrisc.cpu: New file.
3413         * openrisc.opc: Likewise.
3414
3415 2000-12-12  Ben Elliston  <bje@redhat.com>
3416
3417         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3418
3419 2000-12-07  Ben Elliston  <bje@redhat.com>
3420
3421         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3422         "insn" when there are zero ifields to extract.
3423
3424 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3425
3426         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3427         used by simple/non-scache simulators.
3428         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3429         regardless of with-scache?.
3430         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3431
3432 2000-12-03  Ben Elliston  <bje@redhat.com>
3433
3434         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3435         (cgen-desc.c): Likewise.
3436
3437 2000-12-01  Greg McGary  <greg@mcgary.org>
3438
3439         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3440
3441 2000-12-01  Ben Elliston  <bje@redhat.com>
3442
3443         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3444         definitions if run without with-multipla-isa?.
3445         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3446         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3447
3448 2000-11-24  Ben Elliston  <bje@redhat.com>
3449
3450         * sim-cpu.scm (-gen-hardware-struct): New function.
3451         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3452         hardware elements wich have share one or more ISAs with the ISAs
3453         being kept.
3454
3455         * sim.scm (-with-multiple-isa?): New symbol.
3456         (with-multiple-isa?): New function.
3457         (option-init!): Initialise -with-multiple-isa?.
3458         (option-set!): Handle with-multiple-isa option.
3459
3460 2000-11-21  Ben Elliston  <bje@redhat.com>
3461
3462         * utils.scm (copyright-fsf): Add the year 2000.
3463
3464 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3465
3466         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3467         unneeded "\n\n" from F() macro definition.
3468
3469 2000-11-15  Greg McGary  <greg@mcgary.org>
3470
3471         * utils-cgen.scm (gen-define-with-symcat): New function.
3472         * desc-cpu.scm (gen-ifld-defns): Use it.
3473         (gen-hw-table-defns): Use it.
3474         (-gen-hash-defines): Use it.
3475         (gen-operand-table): Use it.
3476         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3477         * opc-itab.scm (-gen-ifmt-table): Use it.
3478         (-gen-insn-opcode-table): Use it.
3479         (-gen-macro-insn-table): Use it.
3480         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3481         * sim-cpu.scm (cgen-semantics.c): Use it.
3482         (cgen-sem-switch.c): Use it.
3483
3484 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3485
3486         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3487         request to emit calls to insn extractors as functions rather than
3488         branches to inline blocks.
3489         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3490         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3491
3492         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3493         to extractor clauses.
3494
3495 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3496
3497         * decode.scm (-distinguishing-bit-population): Significantly
3498         improve popularity heuristic.  Renamed from
3499         (-mask-bit-population): Gone.
3500         (-population-above-threshold): Sort new bit numbers in order of
3501         popularity.
3502         (-population-top-few): Allow up to three more bits to be selected
3503         than requested.  Correct selection order to prefer better bits.
3504         Correct bug in fewer-than-requested case.  Keep threshold as
3505         floating-point.
3506         (decode-best-get-bits): Pass also the insn-values.
3507
3508         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3509         future optimization.
3510
3511         * utils.scm (message): Format nested lists better.
3512
3513 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3514
3515         * dev.scm: Add srcdir to %load-path.
3516
3517         * rtx-funcs.scm (subword): Mode of argument can be different
3518         than mode of result, so don't use OP0 to specify argument's mode.
3519
3520 2000-11-02  Ben Elliston  <bje@redhat.com>
3521
3522         * doc/porting.texi (Building a GAS test suite): Document my change
3523         to gas-build.sh.
3524
3525 2000-11-01  Ben Elliston  <bje@redhat.com>
3526
3527         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3528
3529 2000-10-31  Ben Elliston  <bje@redhat.com>
3530
3531         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3532         with no command line arguments if the gas build directory can be
3533         determined.
3534
3535 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3536
3537         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3538         op-ifld -> op-ifield.
3539
3540 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3541
3542         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3543
3544 2000-10-13  matthew green  <mrg@cygnus.com>
3545
3546         * utils-cgen.scm (get-ifetch): Move from here ...
3547         * sim.scm (get-ifetch): ... to here.
3548         * sid.scm (get-ifetch): Copy and port to c++.
3549
3550 2000-10-06  Dave Brolley  <brolley@redhat.com>
3551
3552         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3553         ifld-start + ifld-word-offset.
3554         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3555         the field is beyond the base number of bits.
3556         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3557         (gen-extract-ifields): Ditto.
3558         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3559         characters in the regular expression.
3560
3561 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3562
3563         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3564         preprocessor constant.
3565
3566 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3567
3568         * slib/logical.scm: New file from slib.  Provides robust bitwise
3569         logical operations for large integers.
3570         * read.scm: maybe-load it.
3571
3572 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3573
3574         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3575         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3576         single-isa predicate, but support keep-isa filtering.
3577
3578 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3579
3580         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3581         statement-expression and comma-expression contexts.
3582         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3583
3584 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3585
3586         * decode.scm (-population-top-few): Signal error gracefully if
3587         decoding is about to become ambiguous.
3588
3589 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3590
3591         * doc/rtl.texi (decode-assist): Describe this field as optional.
3592
3593 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3594
3595         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3596         with decode proc.
3597
3598 2000-09-05  Dave Brolley  <brolley@redhat.com>
3599
3600         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3601         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3602
3603 2000-08-29  Dave Brolley  <brolley@redhat.com>
3604
3605         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3606         adata-integral-insn is true for this architecture.
3607
3608 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3609
3610         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3611         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3612         * rtl-c.scm (-c-rtl-get): Improve an error message.
3613         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3614
3615 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3616
3617         * Makefile.in (DIST_COMMON): Regenerated.
3618         * ifield.scm (<derived-ifield> needed-iflds): New method.
3619         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3620         sfmts built from <derived-ifield>s.
3621         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3622         type symbol 'derived-ifield, not an unparseable string.
3623         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3624         (-sfmt-contents): Add tracing.
3625
3626         From Doug Evans <dje@transmeta.com>:
3627         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3628         C code.
3629
3630 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3631
3632         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3633         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3634         (-rtl-c-get): Rename from rtl-c-get.
3635         (rtl-c-get): New fn for getter logging.
3636
3637 2000-07-28  Ben Elliston  <bje@redhat.com>
3638
3639         * NEWS: Update.
3640
3641 2000-07-25  Ben Elliston  <bje@redhat.com>
3642
3643         * doc/credits.texi (Credits): Add Frank Eigler.
3644
3645 2000-07-24  Dave Brolley  <brolley@redhat.com>
3646
3647         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3648         fully.
3649         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3650         (<keyword>): Initialize all elements fully.
3651         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3652         fully.
3653         (-gen-mach-table-defns): Ditto.
3654         (-gen-ifld-defns): Ditto.
3655         (-gen-operand-table): Ditto.
3656         (-gen-insn-table): Ditto.
3657         (-gen-cpu-open): Nothing to do for the mach table.
3658
3659 2000-07-13  Ben Elliston  <bje@redhat.com>
3660
3661         * doc/version.texi (UPDATED): Update.
3662
3663 2000-07-05  Ben Elliston  <bje@redhat.com>
3664
3665         * configure.in (AC_PATH_PROG): Remove.
3666         * configure: Regenerate.
3667         * Makefile.am (GUILE): Locate guile dynamically.
3668         * Makefile.in: Regenerate.
3669         * doc/Makefile.in: Likewise.
3670
3671 2000-07-03  Ben Elliston  <bje@redhat.com>
3672
3673         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3674         * opc-itab.scm (cgen-opc.c): Likewise.
3675
3676 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3677
3678         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3679         guile 1.4 compatibility.
3680         (rtx-env-dump): Comment out buggy display calls.
3681
3682 2000-06-15  matthew green  <mrg@redhat.com>
3683
3684         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3685
3686 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3687
3688         * Makefile.in: Regenerated.
3689
3690         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3691         (gen-ifld-defns): Ditto.
3692         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3693         * rtl.c (rtl-finish!): Ditto.
3694         * opc-itab.scm (-gen-ifield-decls): Ditto.
3695         * opcodes.scm (gen-switch): Exclude derived operands.
3696         * operand.scm (op-iflds-used): Expand derived operands.
3697         (hw-index-derived): New dummy function to create dummy object.
3698         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3699         constructor.  Set object's hw-name and index fields.
3700         (-anyof-merge-subchoices): Set instance object's index also.
3701         (-anyof-name): New helper function.
3702         (anyof-merge-semantics): Correct replacement of operand names in
3703         anyof instance.
3704         (op-ifield): Tolerate derived-operands and their funny indices better.
3705         * ifield.scm (ifld-known-values): Expand derived ifields.
3706         (non-multi-ifields, non-derived-ifields): New utility functions.
3707         (ifld-decode-mode): Tolerate objects with unbound decode field.
3708         * iformat.scm (compute-insn-length): Expand derived ifields.
3709         (compute-insn-base-mask): Ditto.
3710         * insn.scm (insn-base-ifields): Remove.
3711         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3712         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3713         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3714         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3715         (-frag-test-data): Ditto.
3716         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3717         (-gen-sem-switch-engine); Ditto.
3718         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3719         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3720         (-gen-record-args): Tolerate unbound op-ifield.
3721         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3722         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3723         Exclude multi-insns.
3724         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3725         * utils-sim.scm (op-extract?): Handle derived operands.
3726
3727         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3728         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3729         * hardware.scm (hardware-for-mode): New function.
3730
3731         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3732         cleaning up decode tables.
3733         (mask-superset?): Little helper function for above.
3734         * decode.scm (-build-decode-table-entry): Call it.
3735         (-opcode-slots): Add some more tracing.
3736         * arm.cpu: Disable decode-splits construct due to implementation
3737         conflict with `filter-harmlessly-ambiguous-insns'
3738
3739         * decode.scm (-population-top-few): New function for better decode
3740         bit generation.  Includes minor helper functions.
3741         (decode-get-best-bits): Call it instead.
3742         (OLDdecode-get-best-bits): Renamed previous version of above.
3743
3744
3745 2000-06-13  Ben Elliston  <bje@redhat.com>
3746
3747         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3748         for the Guile library directory.
3749         * configure: Regenerate.
3750         * Makefile.in, doc/Makefile.in: Regenerate.
3751
3752         * Makefile.in, doc/Makefile.in: Regenerate.
3753         * configure.in: Remove unnecessary tests. Move to version 1.0.
3754         * acconfig.h, config.in: Remove.
3755         * configure, aclocal.m4: Regenerate.
3756         * doc/stamp-vti, doc/version.texi: Likewise.
3757         * AUTHORS: New file.
3758
3759 2000-06-07 Ben Elliston  <bje@redhat.com>
3760
3761         * fixup.scm (symbol-bound?): Reduce debugging output.
3762
3763 2000-06-02  matthew green  <mrg@redhat.com>
3764
3765         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3766         a given instruction, replacing derived fields with their subfields.
3767         (insn-value): Use `insn-base-ifields' to find all constant values.
3768         (multi-insn-instantiate!): Comment some debug messages.
3769
3770 2000-06-01  Ben Elliston  <bje@redhat.com>
3771
3772         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3773         symbol names used in a (c-call ..) rtx.
3774
3775         * sim-test.scm (build-test-set): Return (()) for an instruction
3776         with no operands, so it too is included in the generated test set.
3777
3778 2000-05-31  Ben Elliston  <bje@redhat.com>
3779
3780         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3781         (sim-test): Likewise.
3782         * Makefile.in: Regenerate.
3783
3784 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3785
3786         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3787         stack traceback, in an order that resembles gdb's `bt'.
3788
3789 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3790
3791         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3792         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3793         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3794         multi insns.
3795         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3796         virtual functions.
3797         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3798         * iformat.scm (ifmt-expanded-ifields): Gone.
3799         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3800         work.
3801         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3802         ifmt entries.
3803
3804         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3805         code.
3806
3807 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3808
3809         * sid.scm (with-any-profile?): New function clone.
3810
3811 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3812
3813         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3814
3815 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3816
3817         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3818         (-multi-ifield-read): Parse them.
3819         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3820         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3821         (multi-ifield gen-extract): Add decode hook.
3822         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3823
3824         * insn.scm (syntax-break-out): More correctly handle \-escaped
3825         syntax characters.
3826         (syntax-make-elements): Ditto.
3827         * opc-itab.scm (compute-syntax): Ditto.
3828
3829 2000-05-17  Ben Elliston  <bje@redhat.com>
3830
3831         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3832
3833 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3834
3835         * gas-test.scm (build-test-set): Return (()) for an instruction
3836         with no operands, so it too is included in the generated test set.
3837
3838 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3839
3840         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3841         IFMT_OPERANDS and SYNTAX_BYTES.
3842
3843 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3844
3845         * sim.scm (with-any-profile?): New function.
3846         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3847         to decide whether or not to include profiling counters.
3848
3849 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3850
3851         Fuller derived-operand support for opcodes.
3852         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3853         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3854         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3855         (gen-operand-table): Omit derived- and anyof- operands from table.
3856         (gen-insn-table): Omit multi-insns from table.
3857         * iformat.scm (ifmt-expanded-fields): New function to expand
3858         subfields of derived-ifields.
3859         (ifmt-compute!): Ignore remaining multi-insns.
3860         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3861         multi-insns.
3862         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3863         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3864         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3865         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3866         (gen-switch): Omit anyof-operands.
3867         * operand.scm (-anyof-syntax): New function.
3868         (-anyof-merge-syntax): Call it.
3869         * utils.scm (collect): New idiomatic function.
3870
3871 2000-05-10  Ben Elliston  <bje@redhat.com>
3872
3873         * m68k.cpu: New file (work in progress).
3874
3875 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3876
3877         * Makefile.am (all-local): New target.  Create stamp-cgen.
3878         * Makefile.in: Regenerated.
3879         * doc/Makefile.in: Regenerated.
3880
3881 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3882
3883         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3884         (-operand-parse-setter): Ditto.
3885         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3886         for CACHE-ADDR operands.
3887         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3888         trace entries.  Widen byte-wide values for printing.
3889         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3890         Widen byte-wide values for printing.  Hexify memory addresses.
3891
3892 2000-04-23  matthew green  <mrg@redhat.com>
3893
3894         * m32r.cpu: Fix a typo.
3895
3896 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3897
3898         * ia64.cpu (define-model): Change merced to Itanium.
3899         (f-qp): Change quilifying to qualifying.
3900         (movbr_ph, movbr_pvec): Delete.
3901         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3902
3903 2000-04-07  Ben Elliston  <bje@redhat.com>
3904
3905         * doc/porting.texi (Building a simulator test suite): Clarify
3906         where generated test cases are placed.
3907
3908 2000-04-07  Ben Elliston  <bje@redhat.com>
3909
3910         * Makefile.am (gas-test): Remove dependency on `cgen'.
3911         (sim-test): Ditto.
3912         * Makefile.in: Regenerate.
3913
3914 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3915
3916         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3917         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3918         type reconfiguration.
3919         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3920         with-profile?.
3921
3922 2000-03-30  Ben Elliston  <bje@redhat.com>
3923
3924         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3925
3926 2000-03-24  Ben Elliston  <bje@redhat.com>
3927
3928         * Makefile.am (stamp-cgen): Reinstate target.
3929         * Makefile.in: Regenerate.
3930
3931 2000-03-22  Ben Elliston  <bje@redhat.com>
3932
3933         * slib/ppfile.scm: Remove; unused.
3934         * slib/defmacex.scm: Likewise.
3935
3936 2000-03-21  Ben Elliston  <bje@redhat.com>
3937
3938         * doc/internals.texi (Source file overview): Document.
3939
3940         * Makefile.am (GUILEDIR): Remove.
3941         (CGEN): Ditto. Callers use $(GUILE) instead.
3942         (GUILEFLAGS): Ditto.
3943         (CGENFILES): Ditto.
3944         (APPDESCFILES): Ditto.
3945         (OPCODESFILES): Ditto.
3946         (SIMFILES): Ditto.
3947         (pkgdata_SCRIPTS): Ditto.
3948         (stamp-cgen): Remove target.
3949         * Makefile.in: Regenerate.
3950
3951         * configure.in: Remove header and library tests.
3952         * configure: Regenerate.
3953         * config.in: Likewise.
3954
3955 2000-03-20  Ben Elliston  <bje@redhat.com>
3956
3957         * read.scm: Cease loading "hob-sup.scm".
3958         * utils.scm: Inherit the fastcall family of procedures (for now).
3959         * hob-sup.scm: Remove.
3960
3961 2000-03-20  Ben Elliston  <bje@redhat.com>
3962
3963         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3964         * configure: Regenerate.
3965         * gdbinit.in: Remove.
3966
3967 2000-03-17  Ben Elliston  <bje@redhat.com>
3968
3969         * Makefile.am (CGEN): Use guile, not cgen.
3970         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3971         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3972         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3973         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3974         (HOB_OBJS): Likewise.
3975         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3976         (CGENOBJS): Likewise.
3977         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3978         (hobbit, hobbit.o, hobbit.c): Remove targets.
3979         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3980         (CLEANFILES): Update.
3981         * acconfig.h (WITH_HOBBIT): Remove.
3982         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3983         option --with-cgen-hobbit.
3984         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3985         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3986         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3987         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3988         * Makefile.in: Regenerate.
3989         * config.in: Likewise.
3990         * aclocal.m4: Likewise.
3991         * configure: Likewise.
3992         * README (Hobbit support): Remove.
3993         * doc/internals.texi (Conventions): Do not mention Hobbit.
3994         * doc/porting.texi (Supported Guile versions): Likewise.
3995
3996 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3997
3998         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3999         callback convention to new sid sidutil::basic_cpu code.
4000         (-gen-sfrag-engine-fn): Ditto.
4001         * sid.scm (-create-virtual-insns!): Ditto.
4002         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4003         mode.
4004         (cxmake-skip): Implement properly for pbb mode.
4005
4006 2000-03-03  Ben Elliston  <bje@redhat.com>
4007
4008         * doc/internals.texi: New file.
4009
4010 2000-02-29  Ben Elliston  <bje@redhat.com>
4011
4012         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4013         * doc/porting.texi: Formatting tweaks.
4014
4015 2000-02-25  Nick Clifton  <nickc@cygnus.com>
4016
4017         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4018         field.
4019
4020 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4021
4022         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4023         mode.
4024
4025 2000-02-23  Andrew Haley  <aph@cygnus.com>
4026
4027         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4028         instruction.
4029
4030 2000-02-24  Ben Elliston  <bje@redhat.com>
4031
4032         * doc/rtl.texi (Derived operands): Add some cindex entries.
4033
4034 2000-02-23  Ben Elliston  <bje@redhat.com>
4035
4036         * ia32.cpu (dndo): Move general purpose macro from here ..
4037         * simplify.inc (dndo): .. to here.
4038
4039 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4040
4041         * arm.cpu (h-tbit): Add c-call setter function.
4042         (h-mbits): Ditto.
4043
4044 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4045
4046         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4047         (-frag-cost-compute!): Ditto.
4048         * utils.scm (copyright-cygnus): Add Y2K.
4049         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4050
4051 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4052
4053         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4054         flags field of the CGEN_CPU_TABLE structure.
4055
4056 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4057
4058         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4059         All references updated.
4060
4061 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4062
4063         * ia32.cpu: Rewrite addressing mode support.
4064
4065         * ifield.scm (<ifield>): New member `follows'.
4066         (ifld-known-values): New proc.
4067         (<ifield>): New method set-word-offset!.
4068         (ifld-set-word-offset!): New proc.
4069         (ifld-new-word-offset): New proc.
4070         (<ifield>): New method next-word.
4071         (<multi-ifield>): New method next-word.
4072         (ifld-next-word): New proc.
4073         (ifld-precedes?): New proc.
4074         (-ifield-parse): New args word-offset,word-length,follows.
4075         All callers updated.  Handle CISC-style vs RISC-style ifields.
4076         (-ifield-read): Recognize word-offset,word-length,follows specs.
4077         (-ifld-parse-follows): New proc.
4078         (-multi-ifield-make-default-insert): New proc.
4079         (-multi-ifield-make-default-extract): New proc.
4080         (-multi-ifield-parse): Provide default values for insert,extract
4081         handlers if not specified.
4082         (<derived-ifield>): New class.
4083         (derived-ifield?): New predicate.
4084         (ifld-derived-operand?): New predicate.
4085         (f-anyof): New global.
4086         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4087         (f-derived,ifld-derived?): Delete.
4088         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4089         * insn.scm (-sub-insn-ifields): New proc.
4090         (-sub-insn-make!): New proc.
4091         (multi-insn-instantiate!): Provide initial implementation.
4092         (-insn-parse): If insn contains "anyof" operands, create a
4093         <multi-insn> object instead of a plain <insn>.
4094         (-parse-insn-format-symbol): Rewrite derived operand handling.
4095         Add anyof operand handling.
4096         (-parse-insn-format-ifield-spec): Rewrite.
4097         (-parse-insn-format-operand-spec): Delete.
4098         (-parse-insn-format-list): Delete support for `(operand value)'.
4099         (anyof-operand-format?): Replaces derived-operand-format?.
4100         * operand.scm (-operand-parse-getter): Improve error messages.
4101         (-operand-parse-setter): Ditto.
4102         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4103         ifield-assertion.
4104         (<anyof-operand>): Change baseclass from <derived-operand> to
4105         <operand>.  Delete member values.  New members base-ifield,choices.
4106         (anyof-operand?): New predicate.
4107         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4108         (-derived-operand-parse): Rewrite.
4109         (-derived-operand-read): Rewrite.
4110         (-anyof-parse-choice): New proc.
4111         (-anyof-operand-parse): Rewrite.
4112         (-anyof-operand-read,define-anyof-operand): New procs.
4113         (<anyof-value>): Rewrite.
4114         (-anyof-initial-known): New proc.
4115         (anyof-satisfies-assertions?): New proc.
4116         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4117         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4118         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4119         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4120         (-anyof-value-from-derived): New proc.
4121         (-anyof-all-choices-1,anyof-all-choices): New procs.
4122         (operand-init!): Create define-anyof-operand reader command.
4123
4124         * insn (syntax-break-out): Take syntax as argument instead of insn.
4125         All callers updated.
4126         (syntax-make): Move here, from ???.
4127
4128         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4129         bitrange-foo. All uses updated.
4130         (bitrange-next-word): New proc.
4131
4132         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4133
4134         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4135         (rtx-make-const,rtx-make-enum): New procs.
4136         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4137         (rtx-mem-addr,rtx-mem-sel): New procs.
4138         (rtx-change-address): New proc.
4139         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4140         (rtx-make-set,rtx-single-set?): New procs.
4141         (rtx-combine): New proc.
4142
4143         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4144         (rtx-traverse-with-locals): Ditto.
4145         (-rtx-traverse,-rtx-traverse-*): Ditto.
4146
4147         * rtl.scm (define-subr): New proc.
4148         (rtl-init!): Create reader command `define-subr'.
4149
4150         * cos.c (_object_mi_p): Ensure argument is an object.
4151         (indent): New function.
4152         (_object_print_elms): Add pretty-printing support.
4153         (_object_print): Ditto.
4154
4155         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4156         (*floats-s->c-fun-table*): Ditto.
4157         * hobbit.c,hobbit.h: Rebuild.
4158         * hob-sup.c (fastcall7): New proc.
4159         * hob-sup.h (fastcall7): Declare.
4160         * hob-sup.scm (fastcall7): New macro.
4161
4162         * mach.scm (<arch>): New member subr-list.
4163         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4164         (arch-finish!): Reverse recorded subr list.
4165
4166         * read.scm (debug-env): New global.
4167         (debug-var-names,debug-var,debug-repl-env): New procs.
4168         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4169         (debug-quit): Renamed from `continue'.
4170
4171         * simplify.inc (dsmf): New pmacro.
4172
4173         * utils.scm (plus-scan): New proc.
4174         (split-bits): Rewrite.
4175         (split-value): New proc.
4176
4177 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4178
4179         * doc/Makefile.am (DOCFILES): Add notes.texi.
4180         * doc/Makefile.in: Rebuild.
4181
4182 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4183
4184         * ifield.scm (ifld-derived?): New proc.
4185         (f-derived): New global.
4186         (ifield-builtin!): Create ifield f-derived.
4187         (<multi-insn>): New class.
4188         (multi-insn?): New predicate.
4189         (multi-insn-instantiate!): New proc.
4190         (-insn-parse): Create <multi-insn> objects for insns with derived
4191         ifields.
4192         (-parse-insn-format-symbol): Handle derived ifields.
4193         (-parse-insn-format-ifield-spec): New proc.
4194         (-parse-insn-format-operand-spec): New proc.
4195         (-parse-insn-format-list): Simplify.
4196         (-parse-insn-format): No longer allow (ifield-object value) spec.
4197         (derived-operand-format?): New proc.
4198         (insn-alias?): New proc.
4199         (non-alias-insns): Rewrite.
4200         (insn-real?): Renamed from real-insn?, all callers updated.
4201         (virutal-insns): Rewrite.
4202         (multi-insns): New proc.
4203         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4204         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4205         Return #f if operand doesn't have an index or if index is not an
4206         ifield.
4207         (hw-index-anyof): New proc.
4208         (-operand-parse): Allow integer indices.
4209         (<derived-operand>): New class.
4210         (derived-operand?): New predicate.
4211         (<anyof-operand>): New class.
4212         (<anyof-value>): New class.
4213         (-anyof-parse-value,-anyof-operand-parse): New procs.
4214         (-derived-operand-parse,-derived-operand-read): New procs.
4215         (define-derived-operand,define-full-derived-operand): New procs.
4216         (operand-init!): New reader command define-derived-operand.
4217
4218         * utils.scm (list-take): Handle negative amount.
4219         (element?): Rewrite.
4220
4221 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4222
4223         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4224
4225 1999-10-04  Richard Henderson  <rth@cygnus.com>
4226
4227         * ia64.cpu: Checkpoint.
4228
4229 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4230
4231         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4232
4233         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4234         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4235
4236 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4237
4238         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4239         PC returned by sim_engine_invalid_insn.
4240
4241 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4242
4243         * ia32.cpu: New file.
4244
4245 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4246
4247         * utils.scm (bit-set?): Fix off by one error.
4248
4249         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4250
4251         * rtl.scm (hw): Check for valid hardware element before trying to
4252         get its mode.
4253
4254         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4255         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4256         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4257         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4258         compute_operand2_foo.
4259
4260         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4261         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4262         Call delayed_branch/branch methods instead of assigning to `vpc'.
4263         (<hw-pc>,cxmake-skip): Call skip method.
4264         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4265         (<pc>,cxmake-skip): Ditto.
4266         (-create-virtual-insns!): Ditto.
4267         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4268         (op:write): Ditto.
4269         (op:record-profile): Specify #:output-language "c++".
4270         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4271         @arch@_insn_attr.
4272         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4273         Define enums here.
4274         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4275         (gen-semantic-code): Ditto.
4276         (-gen-sem-case,-gen-sfrag-code): Ditto.
4277         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4278         (cgen-cpu.h): File is now #included by main cpu class, rather than
4279         subclassing.
4280         (cgen-defs.h): New proc.
4281         (-gen-scache-semantic-fn): Change result type to sem_status.
4282         New local `status'.  Call done_cti_insn/done_insn method at end.
4283         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4284         cgen-ops.h.
4285         (cgen-sem-switch.cxx): Ditto.
4286         * sid-decode.scm (-gen-idesc-decls): Update return type of
4287         @prefix@_sem_fn.
4288         (cgen-decode.h): Add using namespace @arch@.
4289         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4290
4291         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4292         (estate-output-language-c?,estate-output-language-c++?): New procs.
4293         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4294         (estate-make-for-normal-rtl-c++): New proc.
4295         (rtl-c++-parsed,rtl-c++): New proc.
4296         (s-c-call): Invoke cpu class method if c++.
4297         (join): Use s-c-raw-call.
4298
4299         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4300         (nop): Rewrite.
4301
4302         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4303         * rtl.scm (<eval-state>): New member `modifiers'.
4304         (<eval-state>,vmake!): Handle #:modifiers.
4305         (estate-with-modifiers): New proc.
4306
4307         * rtl.scm (rtx-side-effects?): New proc.
4308         (rtx-canonical-bool): Don't change expr if it has side effects.
4309         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4310         better.
4311
4312 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4313
4314         * sim.scm (gen-scache-type): Fix typo in last patch.
4315
4316 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4317
4318         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4319
4320 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4321
4322         * sid.scm (<hw-pc>,cxmake-skip): New method.
4323         (<pc>,cxmake-skip): New method.
4324
4325         * decode.scm (decode-build-table): Delete args startbit,index-list.
4326         All callers updated.
4327         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4328         All callers updated.
4329         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4330         to decode-get-best-bits.
4331         * sid-decode.scm (-gen-decode-fn): Ditto.
4332
4333         * hardware.scm (hw-bits): New proc.
4334         (-hw-parse): New arg layout.  All callers updated.
4335         (define-full-hardware): New arg layout.  All callers updated.
4336         (-hw-validate-layout): New proc.
4337         (-hw-create-[gs]etter-from-layout): New procs.
4338         (<hw-register>,parse!): Handle layout spec.
4339         * types.scm (type-bits): New proc.
4340
4341         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4342         UNARY, BINARY, TRINARY rtxs.
4343
4344         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4345         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4346         Support '- as "unused spot" indicator.
4347
4348 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4349
4350         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4351
4352 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4353
4354         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4355
4356         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4357         construction.
4358         (tstate-make): New arg `depth'.  All callers updated.
4359         (tstate-depth,tstate-set-depth!): New procs.
4360         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4361         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4362         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4363
4364 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4365
4366         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4367         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4368         * utils-sim.scm: Decoder generator support moved here.
4369         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4370         (-gen-decoder-switch): Sort entries for more fall-throughs.
4371
4372         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4373         * Makefile.in: Rebuild.
4374         * sim-test.scm (build-sim-testcase): Add logging message.
4375         * dev.scm (cload): Recognize SIM-TEST application.
4376         (load-stest): Set APPLICATION to SIM-TEST.
4377
4378         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4379
4380         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4381         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4382         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4383
4384         * insn.scm (syntax-break-out): Handle ${foo}.
4385
4386 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4387
4388         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4389         (bin_PROGRAMS): Define.
4390         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4391         (cgen-hob.c): Prepend $(srcdir)/ here.
4392         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4393         (libcpu_a_SOURCES): Delete.
4394         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4395         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4396         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4397         Add AC_CHECK_LIB(guile,main).
4398         * Makefile.in: Rebuild.
4399         * doc/Makefile.in: Rebuild.
4400         * aclocal.m4: Rebuild.
4401         * config.in: Rebuild.
4402         * configure: Rebuild.
4403
4404 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4405
4406         Rename rtx functions from name: to name, accept optional leading
4407         modifier and mode.
4408         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4409         * attr.scm (-attr-eval): Update.
4410         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4411         (<hw-register>,mode-ok?): Disallow VOID.
4412         (<hw-immediate>,mode-ok?): Disallow VOID.
4413         (<hw-address>,mode-ok?): Disallow VOID.
4414         * mode.scm (mode-name?): New proc.
4415         (VOID): Renamed from VM.
4416         (DFLT): Renamed from DM.
4417         (mode-builtin!): Update.
4418         * opcodes.scm (<ifield>,gen-insert): Update.
4419         (<ifield>,gen-extract): Update.
4420         (<multi-ifield>,gen-insert,gen-extract): Update.
4421         * operand.scm (op:mode): Update.
4422         (<pc>,make!): Update.
4423         (op:new-mode): Update.
4424         (-operand-read): Update.
4425         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4426         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4427         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4428         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4429         (rtx-make): Call -rtx-munge-mode&options.
4430         (rtx accessors): Rewrite.
4431         (rtx-pretty-name): Update.
4432         (-rtx-traverse-*): Update.
4433         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4434         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4435         (-rtx-make-traverse-table): Update.
4436         (-rtx-traverse-operands): Update.
4437         (-rtx-option?,-rtx-option-list?): New procs.
4438         (-rtx-munge-mode&options): New proc.
4439         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4440         (-rtx-traverse): Update.
4441         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4442         (rtx-compile-time-constant?): Update.
4443         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4444         (rtx-value): Update.
4445         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4446         * rtx-funcs.scm (*): Update.
4447         * rtl-c.scm (rtl-c-get): Update.
4448         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4449         (s-c-call,s-c-raw-call): Update.
4450         (s-boolifop,s-convop,s-if,s-cond): Update.
4451         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4452         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4453         (s-parallel,s-sequence): Update.
4454         (rtl-c-build-table): Update.
4455         * sem-frags.scm (-frag-hash-compute!): Update.
4456         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4457         for temporary bug compatibility with previous version.
4458         (-frag-expr-locals,-frag-expr-stmts): Update.
4459         (-frag-compute-desired-frags,-frag-pick-best): Update.
4460         * semantics.scm (-simplify-expr-fn): Update.
4461         (rtx-simplify): Update.
4462         (-rtx-ref-type): Update.  Account for modifiers.
4463         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4464         (-build-ifield-operand!): Update.
4465         (-build-known-values): Update.
4466         (semantic-compile): Update.
4467         (-gen-reg-access-defns): Update.
4468         (gen-semantic-code,-gen-sem-case): Update.
4469         (-gen-sfrag-code,-gen-sfrag-case): Update.
4470         * sim-cpu (gen-semantic-code): Update.
4471         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4472         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4473         (-hw-cxmake-get): Update.
4474         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4475         (<hw-index>,cxmake-get): Update.
4476         (<operand>,gen-type,gen-read,cxmake-get): Update.
4477         (<operand>,gen-set-quiet,gen-set-trace): Update.
4478         (<pc>,cxmake-get): Update.
4479         (sim-finish!): Update.
4480         * utils-gen.scm (-gen-ifld-extract-base): Update.
4481         (-gen-ifld-extract-beyond): Update.
4482         (gen-multi-ifld-extract): Update.
4483         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4484         * sid.scm (<hw-pc>,gen-write): Update.
4485         (-gen-decode-insn-globals): Update.
4486         (-hw-cxmake-get): Update.
4487         (<hw-register>,cxmake-get-raw): Update.
4488         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4489         (<hw-index>,cxmake-get): Update.
4490         (<operand>,gen-type,gen-read,cxmake-get): Update.
4491         (<operand>,gen-set-quiet,gen-set-trace): Update.
4492         (<pc>,cxmake-get): Update.
4493         (-create-virtual-insns!): Update.
4494         (-decode-split-build-assertion): Update.
4495         * *.cpu: Update.
4496         * simplify.inc: Update.
4497
4498 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4499
4500         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4501         Prefix queue function name with sim_ instead of @cpu@_.
4502
4503         * sim.scm (-with-parallel-only?): New global.
4504         (option-init!): Initialize it.
4505         (option-set!): Set it.
4506         (with-parallel-only?): New proc.
4507         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4508         and writeback markers if with-parallel-only.
4509         (-gen-idesc-init-fn): Update.
4510         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4511         with-generic-write.
4512
4513 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4514
4515         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4516         with the invalid insn handler.
4517
4518         * utils.scm (list-maybe-ref): New proc.
4519
4520         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4521         define-arch.
4522         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4523
4524         * i960.cpu (test*-*): Delete `expr' arg.
4525         (test-op,branch-op): Update.
4526
4527 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4528
4529         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4530         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4531         updated.
4532         (gen-reg-access-defn): Ditto.
4533         (-gen-hw-addr): Rewrite.
4534         (-op-gen-queued-write): Rewrite.
4535         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4536         (-gen-scache-semantic-fn): Handle with-generic-write.
4537         (-gen-no-scache-semantic-fn): Ditto.
4538
4539 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4540
4541         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4542
4543         * sim.scm (-with-generic-write?): New global.
4544         (option-init!): Initialize it.
4545         (option-set!): Set it.
4546         (with-generic-write?): New proc.
4547         (-gen-hw-addr): New proc.
4548         (-op-gen-queued-write): New proc.
4549         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4550
4551         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4552         turned off.
4553         (-gen-sem-switch): Preserve existing with-parallel? value.
4554         (-gen-sem-parallel-switch): Ditto.
4555         (-gen-write-case): Add /indent support.
4556         (cgen-write.c): Rewrite.
4557
4558         * utils.scm (-current-print-state): New global.
4559         (make-print-state): New proc.
4560         (pstate-indent,pstate-set-indent!): New procs.
4561         (pstate-cmd?,pstate-cmd-do): New procs.
4562         (/indent): New global.
4563         (/indent-set,/indent-add): New procs.
4564         (string-write): Set -current-print-state.
4565         (-string-write): New arg pstate, all callers updated.
4566         Handle print-state commands.
4567         (-string-list-flatten): New proc.
4568         (string-list->string): Use it.
4569
4570         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4571         (-gen-sem-fn-table-entry): New proc.
4572         (-gen-semantic-fn-table): New proc.
4573         (-gen-scache-semantic-fn): Make fn static.
4574         (-gen-no-scache-semantic-fn): Ditto.
4575         (cgen-semantics.c): Define macro SEM_FN_NAME.
4576         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4577         FAST,FULL.  Update @cpu@_insn_sem contents.
4578         (-gen-semf-fn-name): Delete.
4579         (-gen-sem-fn-decls): Delete.
4580         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4581         @cpu@_semf_init_idesc_table.
4582         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4583         handlers here.
4584         (cgen-decode.h): Print sfmt enum.
4585         * sid-decode.scm (-gen-semf-fn-name): Delete.
4586         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4587
4588         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4589         (ifmt-compute!): Ditto.
4590         * sim-decode.scm (-gen-decoder-switch): Ditto.
4591         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4592         (-gen-decoder-switch): Ditto.
4593
4594         * insn.scm (insn-virtual?): New proc.
4595
4596         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4597         convert to string.
4598         * mach.scm (<arch>): attr-list is now a pair of lists.
4599         (current-attr-list): Rewrite.
4600         (current-attr-add!,current-attr-lookup): Rewrite.
4601         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4602
4603 1999-08-06  Richard Henderson  <rth@cygnus.com>
4604
4605         * ia64.cpu: Initial checkpoint.
4606
4607 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4608
4609         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4610         (pmacros-init!): Update .apply help string.
4611
4612 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4613
4614         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4615         (<hw-pc>,cxmake-skip): New method.
4616         (<pc>,cxmake-skip): New method.
4617         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4618         (gen-argbuf-type): New member `skip_count'.
4619         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4620         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4621
4622         * utils-sim.scm: New file.
4623         * dev.scm (load-sim): Load it.
4624         (load-sid): Load it.
4625         * cgen-sid.scm: Load it.
4626         * cgen-sim.scm: Load it.
4627         * iformat.scm (<sformat>): New member sbuf, not initialized by
4628         default make.
4629         * rtx-funcs.scm (skip): Rewrite.
4630         * rtl-c.scm (skip): Rewrite.
4631         * m32r.cpu (sc,snc): Update `skip' usage.
4632         * mode.scm (mode-real-mode): New proc.
4633         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4634         Distinguish fragments by the <sformat-abuf> they use.
4635         * sim.scm (gen-profile-index-type): Delete.
4636         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4637         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4638         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4639         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4640         (-gen-argbuf-elm): Rewrite.
4641         (-gen-argbuf-hw-elm): Delete.
4642         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4643         of each sfmt.
4644         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4645         (sim-init!): Initialize them.
4646         (sim-analyze-insns!): Set them.
4647         (current-sbuf-list): New proc.
4648         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4649         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4650         * sim-model.scm (-gen-model-insn-fn): Ditto.
4651         * sim-decode.scm (-gen-extract-decls): Delete.
4652         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4653         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4654         sim.scm.
4655         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4656         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4657         (-gen-op-extract,-gen-op-trace-extract): New procs.
4658         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4659         gen-sfmt-argvars-foo and rewrite.
4660         (-gen-record-args): Rewrite.
4661         (-gen-extract-case): Tweak.
4662         * sid.scm (gen-profile-index-type): Delete.
4663         (ifield argbuf support): Move to utils-sim.scm.
4664         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4665         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4666         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4667         (-sim-sformat-argbuf-list): New global.
4668         (sim-init!): Initialize it.
4669         (sim-analyze-insns!): Set it.
4670         (current-sbuf-list): New proc.
4671         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4672         (-gen-argbuf-hw-elm): Delete.
4673         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4674         of each sfmt.
4675         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4676         (-gen-extract-decls): Delete.
4677         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4678         sid.scm.
4679         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4680         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4681         (-gen-op-extract,-gen-op-trace-extract): New procs.
4682         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4683         gen-sfmt-argvars-foo and rewrite.
4684         (-gen-record-args): Rewrite.
4685         (-gen-extract-case): Tweak.
4686
4687         * cgen-gh.c (gh_putc,gh_puts): New functions.
4688         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4689         * cos.c (_object_print_elms,_object_print): Use them.
4690         * hob-sup.c (fastcall_print): Use them.
4691         * configure.in: Check for scm_gen_puts, scm_puts.
4692         * config.in: Rebuild.
4693         * configure: Rebuild.
4694         * aclocal.m4: Rebuild.
4695         * Makefile.in: Rebuild.
4696
4697         * dev.scm (load-opc): Use load instead of maybe-load.
4698         (load-gtest,load-sim,load-stest): Ditto.
4699         (load-sid): Ditto.
4700
4701 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4702
4703         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4704         up to avoid g++ 'goto crosses initialization' warning.
4705         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4706         (-gen-sfrag-case): Update use of NEXT_FRAG.
4707
4708 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4709
4710         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4711
4712         * read.scm: Load sem-frags.scm.
4713         * sem-frags.scm (*): Lots rewritten.
4714         * sid.scm (-with-sem-frags?): New global
4715         (with-sem-frags?): New proc.
4716         (option-init!): Initialize -with-sem-frags?.
4717         (option-set!): Recognize with-sem-frags.
4718         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4719         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4720         if asked to.
4721         (-gen-sfrag-engine-decls): New proc.
4722         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4723         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4724         (-gen-sfrag-engine): New proc.
4725         (-gen-sem-case): Emit setup-semantics if specified.
4726         (-gen-sem-switch-engine): Update init/use of computed goto label.
4727         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4728         from local vars.
4729         (-gen-idesc-decls): Replace sem_address with cgoto.
4730         (-gen-scache-decls): Rewrite definition of `execute' member.
4731         * arm.cpu (arm isa): Enable decode-splits.
4732         * arm7.cpu (multiply insns): Rename result to mul-result.
4733
4734         Rename decode-specialize to decode-split.
4735         * decode.scm (*): Update.
4736         * insn.scm (*): Update.
4737         * mach.scm (*): Update.
4738         * sid.scm (*): Update.
4739
4740 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4741
4742         Record objects as a smob.
4743         * cos.c (scm_tc16_object): New static global.
4744         (cos_init): Initialize it.
4745         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4746         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4747         (_object_tag): Delete.
4748         (_object_make_smob): New function.
4749         (_object_make_x,_object_make_with_values_x): Rewrite.
4750         (_object_elements,_object_class_desc): Rewrite.
4751         (_object_copy,object_p): Rewrite.
4752         (_object_specialize): Rewrite.
4753         (_object_print_elms,_object_print): New functions.
4754         (object_smob): New static global.
4755         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4756
4757         * cos.c (_make_x_symbol): New static global.
4758         (object_make): Use it.
4759         (cos_init): Initialize it.
4760
4761 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4762
4763         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4764         instead to determine whether to use FLD macro.
4765         (<rtl-c-eval-state>): New member ifield-var?.
4766         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4767         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4768         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4769
4770         * rtl.scm (rtx-sequence-assq-locals): New proc.
4771
4772         * cos.scm (-object-error): Don't crash on non-objects.
4773
4774         * Makefile.am (CLEANFILES): Add hobbit.
4775         * Makefile.in: Rebuild.
4776
4777         * rtl-c.scm (s-c-call): Delete unnecessary code.
4778
4779 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4780
4781         * rtl-c.scm (ifield): Always reference value via `FLD'.
4782
4783         * cos.c (elm_bound_p): Return problem SCM boolean values.
4784
4785         * utils-cgen.scm (display-argv): New proc.
4786         * cgen-opc.scm (cgen): Call it.
4787         * cgen-sim.scm (cgen): Ditto.
4788         * cgen-gas.scm (cgen): Ditto.
4789         * cgen-stest.scm (cgen): Ditto.
4790         * cgen-sid.scm (cgen): Ditto.
4791
4792 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4793
4794         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4795         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4796         (-gen-extract-switch): Initialize result to 1.
4797         * opcodes.scm (gen-ifield-default-type): New proc.
4798         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4799         updated.
4800         (<hw-index>,gen-insert): Handle non-ifield indices.
4801         (<hw-index>,gen-extract): Ditto.
4802         (<hw-asm>,gen-parse): Ditto.
4803         (<hw-asm>,gen-print): Ditto.
4804         (<keyword>,gen-parse): Ditto.
4805         (<keyword>,gen-print): Ditto.
4806         (<operand>,gen-fget): Ditto.
4807         (<operand>,gen-fset): Ditto.
4808
4809         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4810         (-gen-hw-index): Ditto.
4811         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4812         (-gen-hw-index): Ditto.
4813
4814         * sem-frags.scm: New file.
4815
4816         * attr.scm (attr-parse): Add better checking of input.
4817
4818         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4819         All uses updated.
4820         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4821
4822         * ifield.scm (ifld-nil?): New proc.
4823
4824         * operand.scm (<operand>): New members getter,setter.
4825         (<operand>,make!): New args getter,setter.  All uses updated.
4826         (op:getter,op:setter): New procs.
4827         (<hw-index>,field-start): Return 0 for non-ifield indices.
4828         (<hw-index>,field-length): Return 0 for non-ifield indices.
4829         (-operand-parse-getter,-operand-parse-setter): New procs.
4830         (-operand-parse): New args getter,setter.  All callers updated.
4831         Always use hw-index-scalar for scalar operands.
4832         (-operand-read): Handle getter,setter.
4833         (define-full-operand): New args getter,setter.  All uses updated.
4834         * semantics.scm (-build-ifield-operand!): Update.
4835         (-build-index-of-operand!): Update.
4836         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4837         * simplify.inc (define-normal-operand): Update.
4838
4839         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4840         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4841         (s-binop,s-cmpop,s-convop): Ditto.
4842         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4843         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4844         (fcc-tests): New insn-enum.
4845         (fcc-value): Rename from fcc-type.
4846         * sparcfpu.cpu: New file.  All fp support moved here.
4847
4848         * rtl.scm (<rtx-func>): New member class.
4849         (rtx-class-*?): New procs.
4850         (def-rtx-node): New arg class.  All callers updated.
4851         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4852         * rtx-funcs.scm (*): Specify class.
4853
4854         * utils-cgen.scm (context-make-reader): New proc.
4855
4856         * utils.scm (assert-fail-msg): New variable.
4857         (assert): Use it.
4858         (list-drop,list-tail-drop): New procs.
4859
4860 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4861
4862         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4863         CGEN_MIN_INSN_SIZE deleted on March 22.
4864
4865         * ifield.scm (<ifield>,needed-iflds): New method.
4866         (<multi-ifield>,needed-iflds): New method.
4867         (ifld-needed-iflds): New proc.
4868         (multi-ifield?): New proc.
4869         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4870         (-sfmt-search-key): Include insn length in key.
4871         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4872         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4873         (-ifmt-lookup-ifmt!): Compute key here.
4874         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4875         All callers updated.
4876         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4877         All callers updated.
4878         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4879         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4880         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4881         to ifmt-build.
4882         * operand.scm (op-iflds-used): New proc.
4883         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4884         and sim-cpu.scm.
4885         And from sid.scm,sid-cpu.scm as well.
4886         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4887         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4888         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4889         (gen-extracted-ifld-value): Ditto.
4890         (-extract-chunk-specs): Ditto.
4891         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4892         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4893         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4894         (-extract-insert-subfields): New function.
4895         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4896         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4897         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4898         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4899         gen-extract-foo.
4900         (-gen-no-scache-semantic-fn): Ditto.
4901         (-gen-sem-case): Ditto.
4902         (-gen-read-case): Update calls to gen-define-ifields,
4903         gen-extract-ifields.
4904         * sim-decode.scm (-gen-record-args): Update.
4905         (-gen-sfmt-argvars-assigns): Update.
4906         (-gen-extract-case): Update.
4907         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4908         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4909         gen-extract-foo.
4910         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4911         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4912         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4913         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4914         gen-define-ifields, gen-extract-ifields.
4915         (-gen-record-args): Update.
4916         (gen-sfmt-argvars-assigns): Update.
4917         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4918         with gen-define-ifields.  Ditto for gen-extract-foo.
4919         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4920         procs rather than method calls.
4921
4922 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4923
4924         * sid.scm (-create-virtual-insns!): New local `context', pass it
4925         to insn-read.
4926
4927         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4928         (operand name) not (operand object), (local name) not (local object).
4929         (rtx-traverse-with-locals): New proc.
4930         (-compile-expr-fn): New proc.
4931         (rtx-compile): Rewrite.
4932         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4933         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4934         (rtl-c-set-trace): Ditto.
4935         (operand define-fn): Recognize operand name argument.
4936         (local define-fn): Recognize sequence temp name argument.
4937         * rtx-funcs.scm (operand): Argument is operand name, not object,
4938         so call current-op-lookup.
4939         (local): Similarily, so call rtx-temp-lookup.
4940
4941         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4942         (rtx-operand?): Ditto.
4943         (rtx-pretty-name): Ditto.
4944         (rtx-local-obj): Flag symbol argument as an error.
4945         (rtx-local-name): New proc.
4946         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4947
4948         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4949
4950         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4951         updated.
4952
4953         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4954         (and: QI rd #xff).
4955
4956         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4957         (*floats-s->c-fun-table*): Ditto.
4958         * hobbit.c,hobbit.h: Rebuild.
4959         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4960         * semantics.scm (rtx-simplify): Use /fastcall-make.
4961
4962         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4963
4964         * insn.scm (<insn>): Delete members condition, compiled-condition.
4965         (<insn>,make!): Update
4966         (<insn> getters,setters): Update.
4967         (-insn-parse,insn-read,define-full-insn): Update.
4968         * minsn.scm (minsn-make-alias): Update.
4969         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4970         (ifmt-compute!): Ditto.
4971         * sim.scm (sim-finish!): Update.
4972         * simplify.inc: (define-normal-insn): Update.
4973         * sid-cpu.scm (gen-semantic-code): Update.
4974
4975         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4976         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4977         (ifmt-compute!): Ditto.
4978
4979 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4980
4981         * minsn.scm (minsn-compute-iflds): Print better error message for
4982         missing ifields.
4983
4984 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4985
4986         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4987
4988         * Makefile.am (HOBFLAGS): New variable.
4989         (cgen-hob.c): Use it.
4990         (hobbit.c): Use it.
4991         (libcpu_a_SOURCES): Add hob-sup.c.
4992         (hob-sup.o): New rule.
4993         * Makefile.in: Rebuild.
4994         * cgen.c: #include hob-sup.h.
4995         (cgen_init_c): Call hobbit_init_support.
4996         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4997         (*special-scm->c-functions*): Add them.
4998         (display-c-expression): Handle *c-symbol*.
4999         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5000         (*floats-s->c-fun-table*): Ditto.
5001         (normalize): Recognize /fastcall-make.
5002         (normalize-fastcall-make): New proc.
5003         * hobbit.c,hobbit.h: Rebuild.
5004         * hob-sup.scm: New file.
5005         * hob-sup.c: New file.
5006         * hob-sup.h: New file.
5007         * read.scm: Load hob-sup.scm.
5008         * rtl.scm (-rtx-name-list): New variable.
5009         (rtx-name-list): New proc.
5010         (rtx-lookup): Try symbol first.
5011         (def-rtx-node): Add name to -rtx-name-list.
5012         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5013         (-rtx-traverse-anymode): New proc.
5014         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5015         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5016         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5017         (-rtx-traverse-{symornum,object}): New procs.
5018         (-rtx-make-traverse-table): Rewrite.
5019         (-rtx-traverse-operands): Rewrite arg-types handling.
5020         Handle #f result of traverser.
5021         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5022         Move debug handling here.
5023         (-rtx-traverse-debug): Delete.
5024         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5025         for each rtx.
5026         * semantics.scm (semantic-compile:process-expr!): Fix call to
5027         -rtx-traverse.
5028         * utils.scm (map1-improper): New proc.
5029
5030 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5031
5032         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5033         (h-mbits): Ditto.
5034         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5035         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5036         (<operand>,cxmake-get): Tweak.
5037         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5038
5039 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5040
5041         * thumb.cpu (dnti): Delete timing spec.
5042         (all insn): Update.
5043
5044         * arm.cpu (arm isa): New fields condition, setup-semantics.
5045         (thumb isa): New field setup-semantics.
5046         (h-gr): Add attribute CACHE-ADDR.
5047         * arm7.cpu (dnai): Delete condition.
5048         (eval-cond): Delete.
5049
5050         * mach.scm (<isa>): New member setup-semantics.
5051         (-isa-parse-setup-semantics): New proc.
5052         (-isa-parse): New arg setup-semantics.
5053         (-isa-read): Recognize setup-semantics.
5054
5055         * sid-cpu.scm (gen-extract-fields): Split into two:
5056         gen-extract-ifields, gen-extract-ifmt-ifields.
5057         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5058         tracing begin/end messages (done by caller now).
5059         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5060         tracing begin/end messages (done by x-before,x-after virtual insns).
5061         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5062         end so don't have to look it up again next time.
5063         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5064         (-decode-expr-ifield-tracking-key): New proc.
5065         (-decode-expr-ifield-tracking): New proc.
5066         (-decode-expr-ifield-values-used): New proc.
5067         (-decode-expr-ifield-mark-used!): New proc.
5068         (-gen-decode-expr-set-itype): New proc.
5069         (-gen-decode-expr-entry): Rewrite.
5070         (-gen-decode-table-entry): New proc.
5071         (-gen-decoder-switch): Use it.
5072         (-gen-virtual-insn-finder): New proc.
5073         (-gen-argbuf-elm): Move here from sid.scm.
5074         (-gen-argbuf-hw-elm): Ditto.
5075         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5076         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5077         conditional-execution isas.
5078         (-gen-decode-fn): Record conditional-exec ifield.
5079         * sid.scm (-current-pbb-engine?): New global.
5080         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5081         (<ifield>,gen-ifld-extract): New arg `indent'.
5082         (<multi-ifield>,gen-ifld-extract): Ditto.
5083         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5084         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5085         (-gen-arch-model-decls): Only scan real insns.
5086         (scache-engine-insns,pbb-engine-insns): New procs.
5087         (-create-virtual-insns!): New proc.
5088         (sim-finish!): Call it.
5089         (-decode-specialize-insn?): New proc.
5090         (-decode-specialize-build-assertion): New proc.
5091         (-decode-specialize-insn-1): New proc.
5092         (-decode-specialize-insn): New proc.
5093         (-fill-sim-insn-list!): New proc.
5094         (sim-analyze!): Create copies of insns to be specialized.
5095         * utils-cgen.scm (obj-set-name!): New proc.
5096
5097         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5098         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5099         semantic-attrs.
5100         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5101         sformats.
5102         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5103         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5104         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5105         (attr): Rewrite test for insn owner.
5106         (member): New rtx function.
5107         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5108         as separate function.
5109         (rtx-ifield?,rtx-ifield-name): New procs.
5110         (rtx-operand-obj): Rewrite.
5111         (rtx-operand-name): New proc.
5112         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5113         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5114         (tstate-make): New args owner, known.  All callers updated.
5115         (tstate-known-lookup): New proc.
5116         (rtx-traverse): New arg owner.  All callers updated.
5117         (rtx-make-bool): New proc.
5118         (rtl-find-ifields): Rewrite.
5119         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5120         * semantics.scm: ... here.
5121         (rtx-const-equal,rtx-const-list-equal): New procs.
5122         (-build-known-values): New proc.
5123         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5124         (semantic-attrs): Ditto.
5125         * rtx-funcs.scm (member,number-list): New rtx functions.
5126
5127         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5128         Rewrite.  Delete arg `all-attrs'. All callers updated.
5129         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5130         updated.
5131         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5132
5133         * decode.scm (subdtable-add): Handle `expr' entries.
5134         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5135         (exprtable-entry-*): Update.
5136         (exprtable-entry-iflds): New proc.
5137         (exprentry-cost): New proc.
5138         (exprtable-sort,-gen-exprtable-name): New procs.
5139         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5140         (exprtable-*): Update.
5141         (-build-decode-table-entry): Don't issue collision warning if all are
5142         specialized insns.  Sort exprtable entries before building table.
5143
5144         * read.scm (-reader-process-expanded-1): Move pretty printing of
5145         input to logging level 4.
5146
5147         * utils.scm (string-list->string): New proc.
5148
5149         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5150         semantics.
5151         (insn-read): Delete leading '-' in name.  All callers updated.
5152         (real-insn?): New proc.
5153         (real-insns): Rewrite.
5154         (insn-has-ifield?): New proc.
5155         (insn-builtin!): Create insn attribute SPECIALIZED.
5156
5157         * mach.scm (<arch>): Delete member app-data.
5158         (current-raw-insn-list): New proc.
5159         (insn-list-car,insn-list-splice!): New procs.
5160         (<decode-specialize>): New class.
5161         (-isa-parse-decode-specialize): New proc.
5162         (-isa-parse-decode-specializes): New proc.
5163         (<isa>): New members `condition', `decode-specializes'.
5164         (-isa-parse-condition): New proc.
5165         (-isa-parse): New args condition, decode-specializes.
5166         (-isa-read): Recognize condition, decode-specializes.
5167         (-isa-add-decode-specialize!): New proc.
5168         (modify-isa): New proc.
5169         (isa-conditional-exec?,state-conditional-exec?): New procs.
5170         (arch-init!): New reader command `modify-isa'.
5171
5172         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5173         (mode-signed,mode-unsigned?): New procs.
5174
5175 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5176
5177         * types.scm (<array>): New method get-shape.
5178         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5179         onto type.
5180         (hw-shape,hw-num-elms): New procs.
5181         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5182         if there's more than 255 registers.
5183         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5184
5185         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5186         with get/set specs.
5187
5188 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5189
5190         * cgen-sid.scm (sim-arguments): Add -X.
5191         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5192         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5193         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5194         Simplify by supporting pbb engine only.
5195         (-gen-sem-switch-init): New proc.
5196         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5197         (cgen-sem-switch.cxx): New proc.
5198         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5199         with with-pbb?.  Support dual scache/pbb engines.
5200         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5201         Support dual scache/pbb engines.
5202         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5203         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5204         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5205
5206 1999-05-10  Ben Elliston  <bje@cygnus.com>
5207
5208         * arm7.cpu: Remove coprocessor related fields, operands and insn
5209         definitions for now. Take the undefined instruction trap instead.
5210         (ldmda-wb): New instruction.
5211         (ldmib-wb): Likewise.
5212         (ldmdb-wb): Likewise.
5213         (stmdb-wb): Likewise.
5214         (stmib-wb): Likewise.
5215         (stmda-wb): Likewise.
5216
5217 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5218
5219         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5220         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5221
5222         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5223         hobbit can't handle optional third arg.
5224
5225 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5226
5227         * arm.cpu (h-tbit): Delete set spec.
5228         (h-mbits): Don't call arm_mbits_set in set spec.
5229         * arm.sim: New file.
5230         * hardware.scm (modify-hardware): New proc.
5231         (hardware-init!): Add modify-hardware command.
5232         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5233         (-hw-gen-set-quiet): Ditto.
5234         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5235         hardware attribute.  Load $arch.sim file if present.
5236         * utils-cgen.scm (keyword-list?): New proc.
5237         (keyword-list->arg-list,arg-list-validate-name): New procs.
5238         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5239
5240         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5241
5242         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5243         @cpu@_cpu_cgen.
5244
5245         * attr.scm (obj-prepend-atlist!): New proc.
5246
5247         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5248
5249         * sid.scm (<operand>,profilable?): Use op:type.
5250         * sim.scm (<operand>,profilable?): Use op:type.
5251
5252 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5253
5254         * utils.scm (find-index,find): Be more stack friendly.
5255
5256         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5257         (bic-imm): Ditto.
5258
5259 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5260
5261         * arm.cpu (h-gr-usr): New hardware element.
5262         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5263         (arm-mode): New keyword.
5264         (h-mbits): Add set spec.
5265         (h-spsr): Implement get/set specs.
5266
5267         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5268         (-reader-process-expanded-1): Pretty print logging output.
5269
5270         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5271         (cgen-cpu.h): Print enums before hardware elements.
5272         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5273         * sid-decode.scm (cgen-decode.cxx): Ditto.
5274         * sid-model.scm (cgen-model.cxx): Ditto.
5275
5276         * utils-cgen.scm (context-error): Accept variable number of
5277         trailing args.
5278
5279         * rtx-funcs.scm (error:): New rtx function.
5280         * rtl-c.scm (s-case-vm): New proc.
5281         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5282         (s-case): Simplify, handle non-VM result.
5283         (error:): New rtx function.
5284
5285 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5286
5287         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5288         (test-hi,test-ls): Fix cbit handling.
5289         (shift-type,h-operand2-shifttype): Move here ...
5290         * arm7.cpu: ... from here.
5291         (set-cond,set-cond-maybe,dnix): Delete, unused.
5292         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5293         * arm.cpu: ... to here.
5294         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5295         (alu-cmn): Use set-add-flags.
5296         (alu-tst): Use set-zn-flags.
5297         (alu-cmp): Use set-sub-flags.
5298         (lsl,lsr,asr): Set condition codes.
5299         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5300         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5301         alu-shift-op.
5302         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5303         All callers updated.
5304         (sub-sp): Rename from add-sp-neg.
5305         (f-lbwl-offset): Delete.
5306         (f-lbwl-hi,f-lbwl-lo): New ifields.
5307         (lbwl-hi,lbwl-lo): Update.
5308         (bl-hi): Add 4 to pc.
5309         (push-reg,pop-reg): Simplify.
5310         (push,push-lr): Push registers in correct order.
5311         (pop,pop-pc): Pop registers in correct order.
5312         (save-reg-inc,load-reg-inc): Simplify.
5313         (ldmia): Save registers in correct order.
5314
5315 1999-04-30  Ben Elliston  <bje@cygnus.com>
5316
5317         * arm7.cpu (f-op-hdt): Remove; unused.
5318         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5319         (f-ror-imm8): New multi-ifield.
5320         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5321         callers updated.
5322         (f-uimm12): New field.
5323         (ror-imm8): New operand.
5324         (uimm12): Likewise.
5325         (hdt-offset8): Reinstate operand.
5326         (offset4-hi,offset4-lo): Remove.
5327         (set-cond): Remove macro; unused.
5328         (set-cond-maybe): Likewise.
5329         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5330         (store-word/byte): Likewise.
5331         (load-halfword): Use hdt-offset8 multifield operand instead of two
5332         4-bit operands that are explicitly combined by semantic code.
5333         (do-halfword-store): Bug fix. Set address when not preindexing.
5334         (store-halfword): Also use hdt-offset8 operand.
5335         (arith-op): Avoid clobbering source registers when one of them is
5336         the destination register.
5337         (arith-imm-op): Likewise.
5338         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5339         (teq-imm): Likewise.
5340         (ldm-p): Rename to ldmdb.
5341         (stm-pw): Rename to stmdb-wb.
5342         (multi-action): New macro; test reg-list bits and execute a
5343         semantic fn if the bit is set.
5344         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5345         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5346         (all insns): Use dnai entries for simplicity rather than dni.
5347         (*): Use short-form of (const ..).
5348
5349 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5350
5351         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5352         member eval to evaluator.
5353         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5354         (tstate-make): Delete arg op-fn.  All callers updated.
5355         (tstate-op-fn,tstate-set-op-fn!): Delete.
5356         (rtx-traverse): Delete op-fn arg.  All callers updated.
5357         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5358         split out of -simplify-for-compilation.
5359
5360         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5361         (cgen_DEPENDENCIES): Add stamp-cgen.
5362         (stamp-cgen): New rule.
5363         * Makefile.in: Rebuild.
5364
5365         * rtl-c.scm (enum:): Define emitter for.
5366         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5367         enums as well.
5368         (rtx-constant-value,rtx-enum-value): New procs.
5369         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5370         (rtx-compile-time-constant?): Return #t for enums.
5371         (rtx-true?,rtx-false?): Handle enums.
5372         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5373         building result by hand.
5374         (rtx-simplify-eq-attr-insn): Ditto.
5375         * rtx-funcs.scm (enum:,enum): New rtx functions.
5376
5377         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5378         aliases-analyzed?.
5379         (arch-analyze-insns!): New proc.
5380         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5381         of calling ifmt-compute! directly.
5382         * sid.scm (-sim-insns-analyzed?): Delete.
5383         (sim-analyze!): Call arch-analyze-insns! instead of calling
5384         ifmt-compute! directly.
5385         * sim.scm (-sim-insns-analyzed?): Delete.
5386         (sim-analyze!): Call arch-analyze-insns! instead of calling
5387         ifmt-compute! directly.
5388
5389         * utils.scm (string-take-with-filler): New proc.
5390         (string-take): Use it.
5391
5392         * pgmr-tools.scm: New file.
5393         * read.scm: Load it.
5394         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5395
5396         * insn.scm (insn-base-mask): Renamed from insn:mask.
5397         All callers updated.
5398         (insn-base-mask-length): Renamed from insn:mask-length.
5399         All callers updated.
5400         (insn-foo): Renamed from insn:foo.  All callers updated.
5401         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5402         * iformat.scm (compute-insn-base-mask-length): Renamed from
5403         compute-insn-mask-length.  All callers updated.
5404         (compute-insn-base-mask): Renamed from compute-insn-mask.
5405         All callers updated.
5406
5407         * enum.scm (-enum-parse-prefix): New proc.
5408         (<enum>,make!): Don't parse enum values here.
5409         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5410         (define-full-insn-enum): Ditto.
5411         (enum-vals-upcase): New proc.
5412         * hardware.scm (define-keyword): Make enum prefix uppercase.
5413         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5414
5415         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5416         (<ifield>,field-extract): New method.
5417         (<multi-ifield>,field-extract): New method.
5418         (ifld-extract): New proc.
5419         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5420         (ifld-extract-fn-name): Renamed from ifld-extract.
5421
5422         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5423         All callers updated.
5424
5425         * ifield.scm (ifld-lsb0?): New proc.
5426         (sort-ifield-list): New arg up?.  All callers updated.
5427         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5428         rather than global state.
5429
5430 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5431
5432         * insn.scm (pretty-print-insn-format): New proc.
5433
5434         * Makefile.in: Rebuild.
5435         * aclocal.m4: Rebuild
5436         * configure: Rebuild.
5437
5438 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5439
5440         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5441         * configure: Rebuild.
5442         * aclocal.m4: Rebuild.
5443         * Makefile.in: Rebuild.
5444         * doc/Makefile.in: Rebuild.
5445         * doc/version.texi: Rebuild.
5446
5447 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5448
5449         * utils.scm (bits->bools): New proc.
5450
5451 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5452
5453         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5454         subfield's gen-ifld-extract-decl method.
5455
5456 1999-04-23  Ben Elliston  <bje@cygnus.com>
5457
5458         * arm7.cpu (ldrsh-pu): Remove.
5459         (do-halfword-load): New pmacro.
5460         (load-halfword): Likewise.
5461         (do-halfword-store): Likewise.
5462         (store-halfword): Likewise.
5463         (strh-*): New instructions.
5464         (ldrsb-*): Likewise.
5465         (ldrh-*): Likewise.
5466         (ldrsh-*): Likewise.
5467
5468 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5469
5470         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5471         fields.
5472
5473         * arm7.cpu (do-word/byte-store): Fix typo.
5474
5475 1999-04-22  Ben Elliston  <bje@cygnus.com>
5476
5477         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5478         register is the program counter (R15).
5479
5480         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5481         (str-*): Implement using store-word-byte. Remove older versions.
5482         (bic): Use the `inv' rtx for obtaining bitwise complements.
5483         (bic-imm): Likewise.
5484         (mvn): Likewise.
5485         (mvn-imm): Likewise.
5486         (store-indev-reg): Remove crufty pmacro.
5487         (load-indiv-reg): Likewise.
5488         (ldm-p): Reverse the order of register processing for decrement.
5489         (stm-p): Likewise.
5490         (stbi): Remove; handled by the str-* insns.
5491
5492 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5493
5494         * thumb.cpu (cmp): Fix carry bit computation.
5495         (alu-cmp): Ditto.
5496
5497 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5498
5499         * arm.cpu (h-tbit): Specify set spec.
5500         (h-cpsr): Ditto.
5501         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5502         (set-sub-flags): Interpret "carry bit" as a borrow.
5503         (all sub/cmp insns): Carry bit is actually a borrow bit.
5504         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5505         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5506         .pmacro instead.
5507         (hireg-add,hireg-cmp,hireg-move): Ditto.
5508
5509         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5510         (-CGEN-LANG-VERSION): Ditto.
5511
5512 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5513
5514         * pmacros.scm (-pmacro-make): New arg `default-values',
5515         all callers updated.
5516         (-pmacro-default-values): New proc.
5517         (-pmacro-process-keyworded-args): New proc.
5518         (-pmacro-process-args): New proc.
5519         (-pmacro-invoke): Process arguments before expanding macro.
5520         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5521         (define-pmacro): Handle default values specified in arg list.
5522         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5523         (rtx-boolif-op-arg[01]): New procs.
5524         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5525         (rtx-simplify): Handle not,orif,andif.
5526         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5527         * utils.scm (alist-copy): New proc.
5528         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5529         (ldr*): Rewrite.
5530         (swi): Explicitly set pc.
5531
5532         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5533
5534 1999-04-17  Ben Elliston  <bje@cygnus.com>
5535
5536         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5537         correctly adjusts the program counter now.
5538
5539         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5540         (f-signed?): Rename from `f-hdt-signed?'.
5541         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5542         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5543         (f-hdt-offset8): Use new field names.
5544         (ldr): Use `imm12' field, not `offset12', since we do our own
5545         address arithmetic.
5546         (str, str-*): Likewise.
5547         (ldu-*): Remove most; better not implemented than broken.
5548         (ldrh*): Likewise.
5549         (ldrsh-pu): New insn.
5550         (stri): Likewise.
5551         (stri-p): Likewise.
5552         (stbi): Likewise.
5553         (ldm-p): Likewise; replace (load-indiv-reg) version.
5554
5555 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5556
5557         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5558         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5559         (*): Explicitly specify mode in c-call.
5560         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5561         (arith-op): Ditto.
5562         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5563         (arith-imm-op): New pmacro.
5564         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5565         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5566
5567 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5568
5569         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5570
5571         * rtl.scm (rtl-find-ifields): Implement.
5572
5573         * utils-gen.scm: New file.
5574         * read.scm: Load it.
5575         * desc.scm: Move generic attribute code to utils-gen.scm.
5576         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5577         * Makefile.in: Rebuild.
5578
5579         * arm7.cpu (R15-OFFSET): New attribute.
5580         (dnai): New pmacro.
5581         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5582         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5583         for reg-shift version.
5584         (arith-op): Ditto.
5585         (data processing insns): Reorganize.  Use dnai.
5586
5587         * attr.scm (attr-kind): New proc.
5588         (attr-list-enum-list): Rewrite.
5589         (-attr-sort): Split result into two lists, bools and non-bools.
5590         (current-attr-list-for): Update.
5591
5592         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5593         * sid-cpu.scm (-gen-attr-decls): New proc.
5594         (-gen-insn-attr-decls): New proc.
5595         (cgen-desc.h): New proc.
5596         (cgen-cpu.h): Put everything in @cpu@ namespace.
5597         (gen-parallel-exec-type): Change prefix of parexec struct from
5598         @cpu@ to @prefix@.
5599         (-gen-trace-record-type): Ditto for trace_record struct.
5600         (-gen-write-case): Update.
5601         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5602         @prefix@.  Update scache struct references.
5603         (-gen-sem-case): Update scache struct references.
5604         (-gen-sem-switch-fn): Update idesc struct reference.
5605         Update insn_type enum reference.
5606         (cgen-write.cxx): Update scache,argbuf references.
5607         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5608         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5609         from @cpu@ to @prefix@.
5610         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5611         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5612         from @CPU@ to @PREFIX@.
5613         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5614         from @CPU@ to @PREFIX@.
5615         (-gen-decode-insn-globals): Generate insn attributes.
5616         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5617         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5618         semantic fn typedef.
5619         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5620         Change prefix of scache struct from @cpu@ to @prefix@.
5621         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5622         Change prefix of idesc struct from @cpu@ to @prefix@.
5623         Change prefix of insn_type enum from @cpu@ to @prefix@.
5624         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5625         from @cpu@ to @prefix@.
5626         (-gen-scache-decls): Change prefix of scache struct from
5627         @cpu@ to @prefix@.  Update idesc struct name.
5628         Update decode,execute methods.
5629         (-gen-extract-case): Update to type name changes.
5630         (-gen-decode-fn): Ditto.
5631         (cgen-decode.h): Put everything in @cpu@ namespace (except
5632         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5633         (cgen-decode.cxx): Add using namespace @cpu@.
5634         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5635         model_mark_get/set from @cpu@ to @prefix@.
5636         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5637         @prefix@.
5638         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5639         of model_insn_before/after from @cpu@ to @prefix@.
5640         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5641         Update insn_word type name.
5642         (-gen-model-timing-table): Update INSN_TIMING struct name.
5643         (-gen-model-init-fn): Update MODEL_DATA struct name.
5644         (-gen-mach-defns): Update name of init_idesc_table fn.
5645         (cgen-model.cxx): Add using namespace @cpu@.
5646         * sid.scm (gen-cpu-class): Delete.
5647         (gen-attr-type): New proc.
5648         (gen-obj-attr-sid-defn): New proc.
5649         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5650         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5651         @CPU@ to @PREFIX@.
5652         (gen-cpu-insn-enum): Update name of insn enum.
5653         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5654         (bx-hs): Ditto.
5655         (swi): Rename @cpu@_swi to @prefix@_swi.
5656
5657         * decode.scm (-build-decode-table-entry): Remove heuristic for
5658         distinguishing insns, and use insn ifield-assertion specs.
5659
5660         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5661         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5662         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5663         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5664         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5665         all callers updated.
5666         (gen-attr-name): New proc
5667         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5668         (gen-obj-attr-defn): Delete num_nonbools count.
5669
5670         * iformat.scm (ifmt-analyze): Handle insn-condition.
5671         (ifmt-compute!): Ditto.
5672         * insn.scm (<insn>): Specify default value for condition,
5673         post-cond-trap,compiled-condition,compiled-semantics.
5674         (<insn>,make!): New arg condition.
5675         (<insn>): Add getters for condition,compiled-condition.
5676         (-insn-parse): New arg condition, all callers updated.
5677         (-insn-read): Recognize condition spec.
5678         (define-full-insn): New arg condition.
5679         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5680         * semantics.scm (semantic-compile): Change arg sem-code to
5681         sem-code-list.
5682         (semantic-attrs): Ditto.
5683         * sim.scm (sim-finish!): Update calls to define-full-insn.
5684         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5685         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5686         * sid.scm (sim-finish!): Update call to define-full-insn.
5687
5688 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5689
5690         * Makefile.am (sim-cpu): Allow specification of ISA.
5691         * Makefile.in: Rebuild.
5692
5693 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5694
5695         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5696
5697 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5698
5699         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5700
5701         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5702
5703         * attr.scm (atlist?): New proc.
5704         (-attr-eval): Rewrite.
5705         (attr-parse): New proc.
5706         (atlist-parse): Use it.
5707
5708         * decode.scm (exprtable-entry-make): New proc.
5709         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5710         (exprtable-make,exprtable-insns): New procs.
5711
5712         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5713         All uses updated.
5714         (hardware-builtin!): Make h-memory a vector.
5715
5716         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5717         All callers updated.
5718         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5719
5720         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5721         All uses updated.
5722         (-insn-parse): Set semantics to #f if not specified.
5723         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5724         if simulator.
5725         (-parse-insn-format): Recognize `=' iformat spec.
5726
5727         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5728         (isa-max-insn-bitsize): Ditto.
5729
5730         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5731         rtl-c-with-alist.
5732         (<ifield>,gen-extract): Ditto.
5733         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5734         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5735         (gen-define-ifmt-ifields): New proc.
5736         (gen-semantic-code): Rewrite.
5737         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5738         (-gen-decoder-switch): Handle expression tables.
5739         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5740         gen-define-fields.
5741         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5742         instead of gen-define-fields.
5743         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5744         callers updated.
5745         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5746         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5747         (-gen-ifld-extract-beyond): Ditto.
5748         (<multi-ifield>,gen-ifld-extract): Ditto.
5749         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5750         rtl evaluation code.
5751         (op:read): Build an <eval-state> to pass to gen-read.
5752         (op:write): Build an <eval-state> to pass to gen-write.
5753         (op:record-profile): Build an <eval-state> to pass to
5754         gen-record-profile.
5755         * sim-cpu.scm (gen-semantic-code): Rewrite.
5756         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5757         rtl-c-with-alist.
5758         (-gen-ifld-extract-beyond): Ditto.
5759         (<multi-ifield>,gen-ifld-extract): Ditto.
5760         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5761         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5762         rtl evaluation code.
5763         (op:read): Build an <eval-state> to pass to gen-read.
5764         (op:write): Build an <eval-state> to pass to gen-write.
5765         (op:record-profile): Build an <eval-state> to pass to
5766         gen-record-profile.
5767
5768         * operand.scm (<operand>): Give `selector' default value of #f.
5769         Give `num' default value of -1.  Give `cond?' default value of #f.
5770         (op:new-mode): Delete arg `set?', all uses updated.
5771
5772         * read.scm (reader-error): Handle #f return from port-filename.
5773         (-init-parse-cpu!): Call rtl-c-init!.
5774         (reader-install-builtin!): Call rtl-builtin!.
5775
5776         * rtl-c.scm: New file.
5777         * semantics.scm: New file.
5778         * read.scm: Load them.
5779         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5780         to semantics.scm.
5781         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5782         type,eval,num.
5783         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5784         (-rtx-num-text,-rtx-max-num): New globals.
5785         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5786         (-rtx-macro-lookup): New proc.
5787         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5788         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5789         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5790         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5791         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5792         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5793         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5794         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5795         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5796         (rtx-pretty-name): New proc.
5797         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5798         (rtx-traverse-*): Rewrite rtx traversing.
5799         (rtx-eval-*): Rewrite rtx evaluation.
5800         (rtx-compile): New proc.
5801         (rtx-simplify): New proc.
5802         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5803         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5804         (ifield,index-of): Rewrite.
5805         (name): Renamed from `operand:'.
5806         (operand,xop,local): New rtx's.
5807         (current-insn): Rewrite.
5808         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5809         (cgen-hob.h): Remove rule for.
5810         (cgen-hob.o): Depend on cgen-hob.c only.
5811         * Makefile.in: Rebuild.
5812
5813         * utils-cgen.scm (vmake): New proc.
5814         (<context>): New class.
5815         (context-make-prefix,context-error): New procs.
5816
5817 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5818
5819         * i960.cpu: Add some ??? comments.
5820         (xnor, ornot): New instructions.
5821         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5822
5823 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5824
5825         * cos.scm (-object-error): Print better error message.
5826
5827         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5828         (-pmacro-env-ref): Renamed from -env-ref.
5829
5830 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5831
5832         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5833         (h-pc): Delete.
5834         (hardware-builtin!): Delete h-pc builtin.
5835         * arm.cpu (h-pc): Define.
5836         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5837         * arm7.cpu (set-logical-cc-maybe): Delete.
5838         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5839         (data processing insns): Rewrite.
5840         * m32r.cpu (h-pc): Define.
5841         * fr30.cpu (h-pc): Define.
5842         * i960.cpu (h-pc): Define.
5843         * sparc.cpu (h-pc): Define.
5844
5845         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5846         (s-parallel): Replace do {...} while (0) with {...}.
5847         (s-sequence): Ditto.
5848
5849         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5850         consistent.
5851         (-gen-write-case,-gen-sem-case): Ditto.
5852         (-gen-sem-case): Only specify `written' if profiling or
5853         parallel-write-back.
5854         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5855         (-gen-sem-switch-fn): New proc.
5856         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5857         based on with-sem-switch option.
5858         * sid-decode.scm (-gen-decode-insn-globals): Only define
5859         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5860         addresses in idesc_table if !with-sem-switch.
5861         (-gen-sem-fn-decls): Rewrite.
5862         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5863         member based on with-sem-switch.  Only define
5864         `idesc_table_initialized_p' member if with-sem-switch.
5865         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5866         * sid.scm (-with-sem-switch?): New variable.
5867         (option-init!): Initialize it.
5868         (option-set!): Set it.
5869         (with-sem-switch?): New proc.
5870         (-op-gen-set-trace): Only emit `written' reference if profiling.
5871         (sim-finish!): Use h_pc_set to set pc.
5872
5873 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5874
5875         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5876         All callers updated.
5877         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5878
5879         * sid.scm (gen-argbuf-type): Delete.
5880         (-gen-argbuf-fields-union): Move to ...
5881         * sid-decode.scm: ... here.
5882
5883         * read.scm (-reader-process-expanded-1): New proc.
5884         (-reader-process-expanded): Call it to catch nested begin's.
5885         (reader-process): Move `begin' handling to -reader-process-expanded.
5886
5887         * insn.scm (-insn-read): Fix name of `format' spec.
5888
5889         * pmacros.scm (.pmacro): New builtin.
5890         (scan-symbol): If procedure macro, return macro rather than its symbol.
5891         (check-macro): Don't do lookup, instead check if (car expr) is
5892         macro object.
5893         (scan-list): Handle .pmacro.
5894         (scan): No longer re-examine text for another macro invocation.
5895         (-pmacro-build-lambda): New proc.
5896         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5897         another, fetch the other's value (rather than doing it during
5898         expansion).
5899
5900 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5901
5902         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5903         * Makefile.in: Rebuild.
5904
5905         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5906         (-fill-slot!): Simplify.
5907         (-build-slots): Simplify.
5908
5909         * dev.scm (load-sid): Don't load sid-arch.scm.
5910
5911         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5912         switch's.
5913         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5914         switch's.
5915
5916 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5917
5918         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5919         * decode.scm: ... here.  New file.
5920         * sid-decode.scm: Use decoder computation code in decode.scm.
5921         * read.scm: Load decode.scm.
5922
5923         * arm.cpu (arm710 model): Add u-exec function unit.
5924         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5925         Add get/set specs to redirect reg 15 to h-pc.
5926         (h-*): Indicate for both ARM and THUMB isas.
5927         (cbit,nbit,vbit,zbit): Ditto.
5928         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5929         (h-cpsr): Make virtual.  Add get/set specs.
5930         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5931         (h-spsr): New virtual reg.
5932         * arm7.cpu (shift-type): New explicitly defined keyword.
5933         (h-operand2-shifttype): Use it.
5934         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5935         All callers updated.  Don't set cbit.
5936         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5937         shift-type enum as case choices.  Set cbit.
5938         (and,orr,eor,add-imm): Uncomment out.
5939         (undefined): Temporarily comment out.
5940         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5941         (lda-pc,lda-sp): Ditto.
5942         (ldr-pc): Rename from ldr.
5943         (cbranch): Mark insns as being thumb insns.
5944
5945         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5946
5947         * cgen-sid.scm: Don't load sid-arch.scm.
5948         (sim-arguments): Delete unused entries.
5949         * sid-arch.scm: Delete.
5950
5951         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5952         (<insn>,ifld-assertions): New member.
5953         (<insn>,make!): New arg ifld-assertions, all callers updated.
5954         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5955         (insn:fields): Delete.
5956         (-insn-parse): New arg ifld-assertions.  All callers updated.
5957         (-insn-read,define-insn): New procs.
5958         (define-full-insn): New arg ifld-assertions.  All callers updated.
5959         (insn-init!): New comment define-insn.
5960
5961         * model.scm (-model-parse): Ensure at least one unit specified.
5962
5963         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5964         (<c-expr-temp>,get-name): New method.
5965         (-rtx-make-current-closure,s-closure): New proc.
5966         (hw:): Wrap rtx indices in a closure.
5967         (-gen-case-prefix): New proc.
5968         (s-case): Simplify.
5969         * rtx-funcs.scm (case:): Fix call to s-case.
5970         (closure): New rtx func.
5971
5972         * hardware.scm (<hardware-base>): New member isas-cache.
5973         (<hardware-base>,get-isas): New method.
5974         (hardware-builtin): Indicate for all isas.
5975         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5976         * mach.scm (current-arch-mach-name-list): Return list of names.
5977         (current-isa-mach-name-list): Ditto.
5978         (define-arch): Install builtin objects here.
5979         * read.scm (keep-atlist?): Only keep if both mach and isa are
5980         being kept.
5981         (keep-mach-atlist?): New proc.
5982         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5983         (reader-install-builtin!): Renamed from -install-builtin!.
5984         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5985         -gen-cpu-reg-access-defns.  Rewrite.
5986         (gen-reg-access-defn): Delete.
5987         (-gen-hardware-struct): New proc.
5988         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5989         (gen-semantic-fn,-gen-all-semantics): Delete.
5990         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5991         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5992         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5993         Call sem-analyze-insns!.
5994         (cgen-semantics.cxx): Add multiple-isa support.
5995         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5996         (-gen-scache-decls,-gen-decode-fn): Ditto.
5997         (cgen-decode.h): Call sem-analyze-insns!.
5998         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5999         * sid.scm (-with-multiple-isa?): New variable.
6000         (option-init!): Initialize it.
6001         (option-set!): Set it.
6002         (with-multiple-isa?): New proc.
6003         (gen-cpu-ref): New arg isas.  All callers updated.
6004         (gen-cpu-class): New proc.
6005         (*-get-macro,*-set-macro): Delete.
6006         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6007         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6008         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6009         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6010         (-sim-insns-analyzed): New global variable.
6011         (sim-init!): Reset it.
6012         (sim-analyze-insns!): New proc.
6013         (sim-analyze!): Don't do instruction analysis here.
6014         (sim-finish!): Specify isa of x-invalid insn.
6015         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6016
6017 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
6018
6019         * thumb.cpu (cpu,mach,model): Delete.
6020         (dntf): New pmacro.  Use it for all field definitions.
6021         (dntop): New pmacro.  Use it for all operand definitions.
6022         (asr): Correct field list.
6023         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6024
6025         * utils-cgen.scm (define-getters): New macro to simplify
6026         writing class accessors.
6027         (define-setters): Ditto.
6028         (sanitize): Recognize isa elements.
6029
6030         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6031         state-parallel-exec?.
6032         * sid-model.scm (*): Ditto.
6033         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6034         state-decode-assist.
6035
6036         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6037         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6038         * sim-decode.scm (-gen-decode-switch): Ditto.
6039
6040         * sim-arch.scm (-regs-for-access-fns): Delete.
6041         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6042         (-gen-arch-reg-access-defns): Delete.
6043
6044         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6045         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6046         with state-parallel=exec?.
6047         (cgen-*): Call sim-analyze-insns! here.
6048         * sim-decode.scm (cgen-*): Ditto.
6049         * sim-model.scm (cgen-*): Ditto.
6050         * sim.scm (-sim-insns-analyzed): New global variable.
6051         (sim-init!): Reset it.
6052         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6053         already done the analysis.
6054
6055         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6056         MACH struct.
6057
6058         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6059         (arm arch): Update isa spec.
6060         (arm,thumb isas): Define.
6061         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6062         (arm7tdmi mach): Add isa spec.
6063         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6064         `const' on word number.
6065         * fr30.cpu (fr30 arch): Update isa spec.
6066         (fr30 isa): Define.
6067         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6068         moved to isa spec.
6069         * i960.cpu (i960 arch): Update isa spec.
6070         (i960 isa): Define.
6071         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6072         liw-insns,parallel-insns moved to isas spec.
6073         * m32r.cpu (m32r arch): Update isas spec.
6074         (m32r isa): Define.
6075         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6076         liw-insns,parallel-insns moved to isa spec.
6077         * sparc.cpu (sparc arch): Update isas spec.
6078         (sparc isa): Define.
6079         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6080         decode-assist moved to isa spec.
6081         * sparc64.cpu (sparc64 cpu): Ditto.
6082         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6083         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6084         (-gen-mach-table-defns): Output mach table.
6085         (-gen-hash-defines): Delete insn size macros, except for
6086         CGEN_MAX_INSN_SIZE.
6087         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6088         (cgen-desc.h): Define MAX_ISAS.
6089         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6090         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6091         (arch-* accessors): Renamed from arch:*.  All callers updated.
6092         (current-arch-isa-name-list): New proc.
6093         (-arch-parse-isas): Renamed from -arch-parse-isa.
6094         (def-isa-attr!): Rewrite.
6095         (<iframe>): New class.
6096         (<itype>): New class.
6097         (<isa>): Rewrite.
6098         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6099         (isa-integral-insn?,isa-parallel-exec?): New procs.
6100         (-isa-parse,-isa-read,define-isa): New proc.
6101         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6102         liw-insns moved to <isa>.
6103         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6104         (-cpu-parse,-cpu-read): Update.
6105         (state-*): Renamed from state:*.  All callers updated.
6106         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6107         not cpu.
6108         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6109         (state-decode-assist): New proc.
6110         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6111         (-adata-set-derived!): Rewrite.
6112         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6113         callers updated.
6114         (arch-init!): Add define-isa command.
6115         * read.scm (<reader>): Default keep-isa member to (all).
6116         (reader-* accessors): Renamed from reader:*.  All callers updated.
6117         (-keep-isa-set!): Call string->symbol on isa name list.
6118         (keep-isa-validate!): Rewrite.
6119         (current-isa): New proc.
6120         (keep-isa?): Recognize "all".
6121         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6122         Call -keep-isa-set!.
6123         (cmd-if): Recognize keep-isa?.
6124         (cpu-load): New arg keep-isa.  All callers updated.
6125         (-opt-spec-update): New proc.
6126         (common-arguments): First arg is string, not symbol.
6127         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6128
6129         * rtl.scm (rtx-get): Default mode of string arg is INT.
6130
6131         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6132
6133         * rtx-funcs.scm (join:): Pass cpu to handler.
6134
6135         * configure.in (guile_include_dir): Delete.
6136         * configure: Rebuild.
6137         * Makefile.in: Rebuild.
6138         * doc/Makefile.in: Rebuild.
6139
6140         * sid-cpu.scm (-extract-chunk-specs): New proc.
6141         (gen-define-fields): Use it.
6142         (-extract-chunk): New proc.
6143         (-gen-extract-beyond-var-list): Use it.
6144         (gen-extract-fields): Simplify.
6145
6146 1999-03-22  Ben Elliston  <bje@cygnus.com>
6147
6148         * arm7.cpu (ldri-p): New instruction.
6149         (swi): Do not vector through 0x8 yet--there is nothing there.
6150         (addi): Reinstate.
6151         (movi): Likewise.
6152         (all): Use (const x) in subreg expressions.
6153
6154 1999-03-19  Ben Elliston  <bje@cygnus.com>
6155
6156         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6157         (smlal): Likewise.
6158
6159 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6160
6161         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6162         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6163         * sim-cpu.scm (-extract-chunk-specs): New proc.
6164         (gen-define-fields): Use it.
6165         (-extract-chunk): New proc.
6166         (-gen-extract-beyond-var-list): Use it.
6167         (gen-extract-fields): Simplify.
6168
6169         Port to guile 1.3.1.
6170         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6171         (LIBIBERTY): New var.
6172         (HOB_OBJS): Add cgen-gh.o.
6173         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6174         * Makefile.in: Rebuild.
6175         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6176         * config.in: Rebuild.
6177         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6178         libncurses, libtermcap.
6179         Add checks for needed functions in guile 1.2 not in guile 1.3,
6180         and vice versa.  Add test for 3 argument scm_make_vector.
6181         * configure: Rebuild.
6182         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6183         definitions if guile doesn't have them.
6184         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6185         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6186         with gh_vector_set_x.
6187         (cgh_qsort): Replace gh_list_length with gh_length.
6188         * cgen-gh.h: Add decls for added functions.
6189         (cgh_qsort): Don't declare if IN_HOBBIT.
6190         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6191         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6192         scm_make_vector with gh_make_vector.
6193         * cos.scm: Use vector-length instead of length on vectors.
6194         * dev.scm (cload): Make varargs proc with keyword/value args.
6195         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6196         provide version that works with guile 1.2 or 1.3.
6197         Include private copy of scmhob.h.
6198         * scmhob.h: New file.  Keep our own copy for now.
6199
6200 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6201
6202         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6203         plain text.
6204         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6205         (-cx-temp-dump-stack): Pretty up output.
6206
6207         * arm.cpu: comment out thumb.cpu until isa support ready.
6208         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6209         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6210         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6211
6212         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6213
6214 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6215
6216         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6217         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6218
6219         * operand (op:new-mode): Improve error message.
6220
6221         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6222         * arm7.cpu: New file.
6223
6224 1999-03-12  Ben Elliston  <bje@cygnus.com>
6225
6226         * arm.cpu: Lots of minor fixes after desk checking.
6227
6228 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6229
6230         * thumb.cpu: snapshot of current work
6231
6232         * rtl.scm (rtx-get): Tweak error message.
6233
6234 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6235
6236         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6237         * Makefile.in: Rebuild.
6238
6239         * cos.c (cos_vector_copy): New function.
6240         (_object_copy): Use it.
6241
6242         * mode.scm (mode:eq?): Clean up.
6243         * rtl.scm (cx-new-mode): Copy attributes.
6244         (rtx-get): Don't make copy if <c-expr> with identical mode.
6245
6246         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6247         add new isas spec.
6248         (gr-names): h-gr register names moved here.
6249         (h-gr): Update.
6250         (cr-names): h-cr register names moved here.
6251         (h-cr): update.
6252         (dr-names): h-dr register names moved here.
6253         (h-dr): update.
6254         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6255         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6256         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6257         add new isas spec.
6258         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6259         add new isas spec.
6260         (gr-names): h-gr register names moved here.
6261         (h-gr): Update.
6262         (cr-names): h-cr register names moved here.
6263         (h-cr): update.
6264         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6265         (h-accums,h-psw): Ditto.
6266         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6267         add new isas spec.
6268         (gr-names): h-gr register names moved here.
6269         (h-gr-indices): Delete.
6270         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6271         (sparc64 h-gr): Ditto.
6272         (h-y): Add get/set specs.
6273         (fp regs): Rewrite.
6274         (fp operands): Rewrite.
6275         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6276         (h-tbr,h-cwp,h-wim): Ditto.
6277         * sparc64.cpu (h-fpsr): Add get/set specs.
6278         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6279         (fp-ld-op): New arg `dest', all callers updated.
6280         (*): Replace `make-di' with `join'.
6281
6282         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6283         present.
6284         (gen-semantic-code): Save/restore rtl generator state.
6285         (cgen-cpu.h): Call rtl-gen-init!.
6286         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6287         (-gen-ifld-extract-beyond): Ditto.
6288         (<multi-ifield>,gen-ifld-extract): Ditto.
6289         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6290         `gstate'.
6291         (-hw-gen-set-quiet-pc): Ditto.
6292         (<hw-pc>,gen-write): Ditto.
6293         (-hw-cxmake-get): Ditto.  Call getter function if present.
6294         (<hw-register>,cxmake-get-raw): New method.
6295         (<hw-register>,gen-set-quiet-raw): New method.
6296         (-hw-gen-set-quiet): New arg `gstate'.
6297         (hw-fun-access?): Delete.
6298         (gen-reg-access-defn): Output function contents.
6299         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6300         invocation.
6301         (-gen-hw-index): Ditto.
6302         (op:read): Update gen-read invocation.
6303         (op:write): Update gen-write invocation.
6304         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6305         operands.
6306         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6307         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6308         (<unit>,gen-profile-code): Update to sim.scm version.
6309
6310         * sim-arch.scm (-regs-for-access-fns): New proc.
6311         (-biggest-reg-mode): New proc.
6312         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6313         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6314         virtual regs separately.
6315         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6316         get/set specs.
6317         (gen-semantic-code): Save/restore rtl generator state.
6318         (cgen-cpu.h): Call rtl-gen-init!.
6319         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6320         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6321         renamed to mach-bfd-name.
6322         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6323         (-gen-ifld-extract-beyond): Ditto.
6324         (<multi-ifield>,gen-ifld-extract): Ditto.
6325         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6326         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6327         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6328         `gstate'.
6329         (hw-fun-access?): Delete.
6330         (-hw-gen-set-quiet-pc): New arg `gstate'.
6331         (<hw-register>,gen-get-macro): Rewrite.
6332         (<hw-register>,gen-set-macro): Rewrite.
6333         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6334         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6335         (<hw-register>,cxmake-get-raw): New method.
6336         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6337         (<hw-register>,gen-set-quiet-raw): New method.
6338         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6339         invocation.
6340         (-gen-hw-index): Ditto.
6341         (<hw-index>): New arg `gstate'.
6342         (-gen-hw-selector): Update call to rtx-c.
6343         (<pc>): New arg `gstate'.
6344         (op:read): Update gen-read invocation.
6345         (op:write): Update gen-write invocation.
6346         (<operand>,cxmake-get): Handle raw-reg.
6347         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6348         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6349         (<operand>,gen-set-quiet): Handle raw-reg.
6350         (<operand>,gen-set-trace): Handle raw-reg.
6351         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6352
6353         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6354         cgen_operand_type enum.
6355         (gen-operand-table): Add operand type enum.  Replace pointer to
6356         hardware element with its enum.  Null terminate table.
6357         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6358         Build operand table.
6359         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6360         * mach.scm (<arch-data>): New member `isas'.
6361         (adata-isas): New accessor.
6362         (<isa>): New class.
6363         (isa-default-insn-word-bitsize): New accessor.
6364         (isa-enum): New proc.
6365         (current-arch-default-insn-word-bitsize): Delete.
6366         (current-isa-list,current-isa-lookup): New procs.
6367         (-arch-parse-isa): New proc.
6368         (-arch-parse): Rewrite.
6369         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6370         (define-arch): Define ISA attribute.
6371         (def-isa-attr!,isa-supports?): New procs.
6372         (<mach>): New member `isas'.
6373         (mach-isas): New accessor.
6374         (-mach-parse): New arg `isas', all callers updated.
6375         (-mach-read): Recognize `isas'.
6376         (arch-finish!): Rewrite.
6377         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6378         @arch@_cgen_get_{int,vma}_operand.
6379         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6380         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6381         of pointer to table entry.
6382         * opcodes.scm (gen-switch): Handle multiply defined operands.
6383         * operand.scm (op-sort): New proc.
6384
6385         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6386         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6387         (hw-enum): Accept symbol argument.
6388         (hardware-builtin!): Delete attribute FUN-ACCESS.
6389         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6390
6391         * attr.scm (atlist-source-form): New proc.
6392         (attr-builtin!): New attr `PRIVATE'.
6393         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6394         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6395         if they have `PRIVATE' attribute.
6396         (gen-hw-table-defns): Output definitions of explicitly defined
6397         keyword tables.
6398         * hardware.scm (<keyword>): New member print-name.  Rename member
6399         `value' to `values', all uses updated.
6400         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6401         (keyword-parse): Rewrite.
6402         (-keyword-read): New proc.
6403         (define-keyword): New proc.
6404         (-hw-parse-keyword): New proc.
6405         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6406         `extern-keyword'.
6407         (-hw-parse-values): Ditto.
6408         (-hw-parse-get,-hw-parse-set): Rewrite.
6409         (hardware-init!): Add new comment define-keyword.
6410         * mach.scm (<arch>): New member `kw-list'.
6411         (arch:kw-list,arch_set-kw-list!): New accessors.
6412         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6413
6414         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6415         * mode.scm (mode-class-integral?): New proc.
6416         (mode-class-float?,mode-class-numeric?): New procs.
6417         (mode-integral?,mode-float?,mode-numeric?): New procs.
6418         (mode-compatible?): New proc.
6419         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6420         rtx-c-with-alist.
6421         (<ifield>,gen-extract): Ditto.
6422         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6423         (<gstate>): New class.
6424         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6425         (gstate-context,gstate-set-context!): New accessors.
6426         (gstate-macro?,gstate-set-macro?!): New accessors.
6427         (gstate-make,gstate-copy): New procs.
6428         (-rtl-current-gstate): New global.
6429         (current-gstate-simulator?): New proc.
6430         (current-gstate-context,current-gstate-macro?): New procs.
6431         (current-gstate,current-gstate-set!): New procs.
6432         (rtl-gen-init!): Rewrite.
6433         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6434         (tstate-make): New arg `gstate', all callers updated.
6435         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6436         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6437         (tstate-gstate,tstate-set-gstate!): New accessors.
6438         (tstate-copy): New proc.
6439         (tstate-new-cond?,tstate-new-set?): Rewrite.
6440         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6441         (rtx-traverse): New arg `gstate', all callers updated.
6442         (rtx-strdump): New proc.
6443         (-simplify-for-compilation): New arg `gstate', all callers updated.
6444         (semantic-in-out-operands): Ditto.
6445         (semantic-attrs): Ditto.
6446         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6447         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6448         (rtx-value): Rewrite.
6449         (<c-expr>,gen-name): New method.
6450         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6451         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6452         (cx-new-mode): New proc.
6453         (-rtx-c-with-tstate): New proc.
6454         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6455         callers updated.
6456         (-rtx-mode): Rewrite.
6457         (-rtx-mode-compatible?): New proc.
6458         (<c-expr-temp>): New member `value'.
6459         (cx-temp:value): New accessor.
6460         (<c-expr-temp>,make!): Override default method.
6461         (<c-expr-temp>,cxmake-get): Rewrite.
6462         (<c-expr-temp>,gen-set-quiet): Rewrite.
6463         (<c-expr-temp>,gen-set-trace): Rewrite.
6464         (gen-temp-defs): Use cx-temp:value.
6465         (record-temp!): New arg value, all callers updated.
6466         (cx-temp:cx:make): Delete.
6467         (-cx-temp-dump-stack): New proc.
6468         (rtx-get): New arg `gstate', all callers updated.  Do mode
6469         compatibility checks.  Ensure result has specified mode.
6470         (rtx-set-quiet): New arg `gstate', all callers updated.
6471         (rtx-set-trace): Ditto.
6472         (s-c-call): New arg `tstate', all callers updated.
6473         (s-c-raw-call): Ditto.
6474         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6475         (s-cmpop,s-if,e-if): Ditto.
6476         (s-subreg): New proc.
6477         (-par-new-temp!): New proc.
6478         (-par-next-temp!): Rewrite.
6479         (-par-replace-set-dests): Use -par-new-temp!.
6480         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6481         (s-sequence): Use -rtx-c-with-state.
6482         * rtx-funcs.scm (*): Update.
6483         (raw-reg:): New rtx function.
6484         (make-di): Delete.
6485         (join:,subreg:): New rtx functions.
6486
6487         * insn.scm (<insn>): New members pre-cond-trap, condition,
6488         post-cond-trap, compiled-condition.
6489
6490         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6491
6492         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6493
6494         * utils-cgen.scm (parse-symbol): New proc.
6495         (parse-string): New proc.
6496         (gen-get-macro,gen-set-macro): New arg `index-args'.
6497         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6498         Prepend \ to newlines.
6499
6500         * utils.scm (alist-remove-duplicates): Delete.
6501
6502         * sid.scm (sim-init!): Delete private debugging code.
6503
6504 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6505
6506         * cgen-sid.scm: New file for C++ simulator application.
6507         * sid-arch.scm: Ditto.
6508         * sid-cpu.scm: Ditto.
6509         * sid-decode.scm: Ditto.
6510         * sid-model.scm: Ditto.
6511         * sid.scm: Ditto.
6512         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6513
6514 1999-03-05  Ben Elliston  <bje@cygnus.com>
6515
6516         * arm.cpu: New file.
6517
6518 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6519
6520         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6521         * Makefile.in: Rebuild.
6522
6523         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6524         (-attr-parse): Validate default value.
6525
6526         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6527         (-CGEN-LANG-VERSION): Ditto.
6528         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6529         (<reader>): New member keep-isa plus accessors.
6530         (-keep-isa-set!,keep-isa-validate!): New procs.
6531         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6532         (common-arguments): New variable.
6533         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6534         (-debug-repl,continue): New procs.
6535         (-cgen,cgen): New procs.
6536         * cgen-gas.scm: Rewrite.
6537         * cgen-opc.scm: Rewrite.
6538         * cgen-sim.scm: Rewrite.
6539         * cgen-stest.scm: Rewrite.
6540
6541         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6542         (gas-test-finish!): Call opcodes-finish!.
6543         (gas-test-analyze!): Call opcodes-analyze!.
6544         (<hw-asm>): New method test-data.
6545         (<operand>,testdata): Rewrite.
6546         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6547         (sim-test-finish!): Call opcodes-finish!.
6548         (sim-test-analyze!): Call opcodes-analyze!.
6549         (<hw-asm>): New method test-data.
6550         (<operand>,testdata): Rewrite.
6551
6552 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6553
6554         * fixup.scm (reverse!): Define if missing.
6555         * *.scm: Use reverse! instead of list-reverse!.
6556
6557         * utils.scm (leading-id-char?): New proc.
6558         (id-char?): Rewrite.
6559         (chars-until-delimiter): New proc.
6560         * opc-itab.scm (extract-syntax-operands): Rewrite.
6561         (strip-mnemonic): Rewrite.
6562         (compute-syntax): Rewrite.
6563
6564         * pmacros.scm (-pmacro-substr): New proc.
6565         (pmacros-init!): Add builtin .substr.
6566
6567 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6568
6569         * thumb.cpu: New file.
6570
6571 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6572
6573         * Makefile.am (CGENCFLAGS): New variable.
6574         (WITH_HOBBIT): Use automake conditional.
6575         (CGEN_HOB_SRC): New variable.
6576         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6577         (*.o): Compile with CGENCFLAGS.
6578         (cgen-hob.c): Simplify.
6579         (cgen-nohob.c): New rule.
6580         (hobbit): Renamed from hob.x.
6581         (CLEANFILES): Add cgen-nohob.c.
6582         * Makefile.in: Rebuild.
6583         * doc/Makefile.in: Rebuild.
6584         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6585         (WITH_HOBBIT): Use AM_CONDITIONAL.
6586         * configure: Rebuild.
6587         * aclocal.m4: Rebuild.
6588
6589         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6590         with string-write-map.
6591
6592         * sim-cpu.scm (hw-need-storage?): New proc.
6593         (-gen-hardware-types): Use it.
6594         (gen-parallel-exec-elm): Call op-save-index?.
6595
6596         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6597
6598         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6599         UNSIGNED attribute.
6600         (-gen-ifld-extract-beyond): Ditto.
6601         (<integer>): Delete all references.
6602         (<sim-hardware>): Delete.
6603         (hw-profilable?): New proc.
6604         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6605         (<hw-register>): Rename method get-index-mode to save-index?.
6606         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6607         (<hw-register>,gen-sym-decl): Make virtual.
6608         (<hw-memory>,gen-sym-decl): Make virtual.
6609         (<hw-memory>): Rename method get-index-mode to save-index?.
6610         (<hw-address>,gen-sym-decl): Make virtual.
6611         (<operand>): New method save-index?.
6612         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6613
6614         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6615         prefix added.  All uses updated.
6616
6617         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6618         rather than pointer to table entry.
6619
6620         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6621         Remove all hw-asm,op-asm support.
6622         (-gen-parse-number,-gen-parse-address): New procs.
6623         (<keyword>,gen-parse): Redo function name computation.
6624         (<keyword>,gen-print): Ditto.
6625         (<operand>,gen-function-name): Rewrite.
6626         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6627         (opcodes-init!): Delete call to add-parser!.
6628
6629         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6630         Define enum using hardware semantic name.
6631         (-gen-hw-decl,-gen-hw-defn): New procs.
6632         (gen-hw-table-decls): Use -gen-hw-decl.
6633         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6634         CGEN_HW_ENTRY structs.
6635         (gen-operand-table): Output hw's enum, not pointer to table entry.
6636         (-gen-cpu-open): Build table of selected hardware elements.
6637
6638         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6639         (<hardware> support): Delete.
6640         (<hw-asm>): Delete, moved to hardware.scm.
6641         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6642         (<hw-asm>,gen-table-entry): New method.
6643         (<hw-asm>,parse!): Delete.
6644         (<keyword>,gen-table-entry): New method.
6645         (<keyword>,parse!): Delete.
6646         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6647         for gen-decl,gen-defn,gen-ref,gen-init.
6648         (desc-init!): Don't create parser for operand asm specs.
6649
6650         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6651         * ifield.scm (<ifield>): New member `mode'.
6652         (<ifield>,make!): New arg `mode'.
6653         (ifld-mode): Rewrite.
6654         (ifld-hw-type): Rewrite.
6655         (<ifield>,min-value): Rewrite.
6656         (<ifield>,max-value): Rewrite.
6657         (-ifield-parse): New arg `mode'.
6658         (-ifield-read): Update.
6659         (define-full-ifield): New arg `mode'.
6660         (define-full-multi-ifield): Ditto.
6661         (-multi-ifield-parse): Ditto.
6662         (-multi-ifield-read): Update.
6663         (define-full-multi-ifield): New arg `mode'.
6664         (ifield-builtin!): Update definition of f-nil.
6665         * simplify.inc (define-normal-ifield): Update call to
6666         define-full-ifield.
6667         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6668         (define-normal-hardware): Delete arg asm.  New args indices, values,
6669         handlers.  Update call to define-full-hardware.
6670         (define-simple-hardware,dsh): New pmacros.
6671         (define-normal-operand): Update call to define-full-operand.
6672         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6673         Specify INT/UINT mode instead.
6674         (h-gr,h-cr): Use "indices" instead of "asm".
6675         (h-dr,h-ps): Update keyword syntax.
6676         (h-r13,h-r14,h-r15): Ditto.
6677         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6678         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6679         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6680         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6681         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6682         Specify INT/UINT mode instead.
6683         (h-gr): Use "indices" instead of "asm".
6684         (h-cc): Update keyword syntax.
6685         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6686         Specify INT/UINT mode instead.
6687         (h-hi16,h-slo16,h-ulo16): Update.
6688         (h-gr,h-cr): Use "indices" instead of "asm".
6689         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6690         (h-accums): Update keyword syntax.
6691         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6692         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6693         Specify INT/UINT mode instead.
6694         (h-gr-indices): New pmacro.
6695         (h-gr32,h-gr64): Split up from h-gr.
6696         (h-a): Update type spec.  Use values instead of asm spec.
6697         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6698         (h-y,h-annul-p): Ditto.
6699         (h-asr): Update keyword spec.
6700         (h-lo10,h-lo13,h-hi22): Update.
6701         (get-freg-spec,set-freg-spec): New pmacros.
6702         (h-fr32,h-fr64): Split up from h-fr.
6703         (rdd): Comment out get/set specs.
6704         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6705         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6706         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6707         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6708         UNSIGNED.  Specify INT/UINT mode instead.
6709         (h-*): Use dsh instead of dnh where appropriate.
6710         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6711         (h-p,h-membarmask): Ditto.
6712         (membarmask): Use "handlers" instead of "asm".
6713
6714         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6715         values,handlers,getters,setters plus accessors.
6716         (hw-mode-ok?,hw-default-mode): New procs.
6717         (<hardware-base>): Rename method new-mode to mode-ok?
6718         (<hardware-base>): New method get-index-mode.
6719         (hw-index-mode): New proc.
6720         (pc?): Delete, moved to operand.scm.
6721         (address?): New proc.
6722         (<hardware>): Delete.
6723         (<hw-asm>): Definition moved here from desc.scm.
6724         (keyword-parse): New proc.
6725         (hardware-parsers): Delete.
6726         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6727         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6728         (-hw-parse-get,-hw-parse-set): New procs.
6729         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6730         indices,values,handlers,get,set.  Rewrite.
6731         (-hw-read-extra): Delete.
6732         (-hw-read): Update.
6733         (define-hardware): Don't add object if not selected.
6734         (define-full-hardware): Ditto.
6735         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6736         (<hw-register>): Member `type' moved to baseclass.  Delete member
6737         hw-asm.
6738         (<hw-register>,parse!): Rewrite.
6739         (<hw-register>): Delete methods get-rank,get-mode.
6740         (<hw-register>): Method new-mode renamed to mode-ok?
6741         (<hw-register>): New method get-index-mode.
6742         (<hw-pc>,parse!): Rewrite.
6743         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6744         (<hw-memory>,parse!): Rewrite.
6745         (<hw-memory>): Delete methods get-rank,get-mode.
6746         (<hw-memory>): Method new-mode renamed to mode-ok?
6747         (<hw-memory>): New method get-index-mode.
6748         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6749         hw-asm.
6750         (<hw-immediate>,parse!): Rewrite.
6751         (<hw-immediate>): Delete methods get-rank,get-mode.
6752         (<hw-immediate>): Method new-mode renamed to mode-ok?
6753         (<hw-address>): Delete member hw-asm.
6754         (<hw-address>,parse!): Rewrite.
6755         (<hw-address>): Delete methods get-rank,get-mode.
6756         (<hw-address>): Method new-mode renamed to mode-ok?
6757         (hw-profilable?): Delete.
6758         (hardware-init!): Delete hardware-parsers reference.
6759         Update argument specs of command define-full-hardware.
6760         (hardware-builtin!): Update definitions of hardware builtins.
6761         * operand.scm (<operand>): New members hw-name,mode-name.
6762         Delete member op-asm.  New member handlers.
6763         (<operand>,make!): Update.
6764         (op:hw-name,op:mode-name,op:handlers): New procs.
6765         (op:type): Rewrite.
6766         (op:mode): Rewrite.
6767         (<operand>): New method get-index-mode.
6768         (<pc>,make!): Update.
6769         (op:new-mode): Rewrite.
6770         (operand-parsers): Delete.
6771         (-operand-parse): Rewrite.  Return #f if insn not selected.
6772         (-op-read-extra): Delete.
6773         (-operand-read): Update.
6774         (define-operand,define-full-operand): Update.
6775         (operand-init!): Delete operand-parsers reference.
6776         Update syntax of define-full-operand command.
6777
6778         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6779         (define-full-insn): Update.
6780         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6781         (define-full-minsn): Update.
6782
6783         * mode.scm (<mode>): New member class.
6784         (mode:class): New proc.
6785         (mode?): Rewrite.
6786         (-mode-parse): New arg class.
6787         (define-full-mode): Update.
6788         (mode-find): Rewrite.
6789         (mode-make-int,mode-make-uint): New procs.
6790         (mode-init!): Update syntax of define-full-mode command.
6791         (mode-builtin!): Update definitions of builtin modes.
6792
6793         * model.scm (<profile>): Delete.
6794
6795         * read.scm (keep-atlist?): New proc.
6796         (keep-multiple?): New proc.
6797         (<parser-list>): Delete.
6798         (add-parser!,parse-spec!): Delete.
6799
6800         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6801         (def-rtx-syntax-node): Ditto.
6802         (-rtx-traverse-debug?): New variable.
6803         (tstate-make): New proc.
6804         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6805         (tstate-new-cond?,tstate-new-set?): New procs.
6806         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6807         tstate.  All callers updated.
6808         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6809         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6810         (-build-operand!): Replace arg cond? with tstate.
6811         (-build-reg-operand!,-build-mem-operand!): Ditto.
6812         (-build-index-of-operand!): Update making of <operand> object.
6813         (s-ifield): New arg tstate.  All callers updated.
6814         (hw:): New arg tstate.  All callers updated.  Replace call to
6815         current-hw-lookup with current-hw-sem-lookup-1.
6816         (s-index-of): New arg tstate.  All callers updated.
6817         (reg:,mem:): Ditto.
6818         (-rtx-use-sem-fn?): New proc.
6819         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6820         semantic cover fns.
6821         (s-convop): Only use semantic mode when using semantic cover fns.
6822         (s-cmpop): Call -rtx-use-sem-fn?.
6823         (s-cond,s-case): New arg tstate.  All callers updated.
6824         (s-parallel,s-sequence): Ditto.
6825
6826         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6827
6828         * types.scm (<scalar>): Rewrite implementation.
6829         (<integer>): Delete.
6830         (parse-type): Rewrite.
6831
6832         * utils-cgen.scm (parse-handlers): New proc.
6833
6834         * utils.scm (!=): New proc.
6835
6836 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6837
6838         * pmacros.scm (-pmacro-expand): Fix typo.
6839
6840 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6841
6842         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6843         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6844         * i960.cpu (build-hex2): New pmacro.
6845         (insn-opcode): Simplify.
6846         (insn-opcode2): Ditto.
6847
6848         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6849         * cgen-stest.scm (catch-with-backtrace): Ditto.
6850
6851 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6852
6853         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6854         All callers updated.
6855         (-pmacro-invoke): New proc.
6856         (-pmacro-sym,-pmacro-str): New procs.
6857         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6858         (pmacros-init!): Install builtins .iota, .map, .apply.
6859         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6860         (h-fr): Simplify register name spec.
6861         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6862         * utils.scm (num-args-ok?): New proc.
6863
6864 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6865
6866         * pmacros.scm (-pmacro-error): New proc.
6867         (-pmacro-expand): Use it.
6868         (-pmacro-splice): New proc.
6869         (pmacros-init!): Install new builtin .splice.
6870
6871         * sparc.cpu: Include sparc64.cpu when appropriate.
6872         (f-mmask,f-simm11): Moved to sparc64.cpu.
6873         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6874         (ANNUL attribute): Delete.
6875         (test-* pmacros): New arg cc, all callers updated.
6876         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6877         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6878         atomic-opc.
6879         (ldstub,swap): Moved to sparccom.cpu.
6880         * sparc64.cpu: Add more insns.
6881
6882 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6883
6884         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6885         CGEN_ATTR_VALUE.
6886         (cgen-sem-switch.c): Ditto.
6887         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6888         moved to cgen-engine.h.
6889         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6890         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6891         global.  Cache attributes and insn length in IDESC.
6892         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6893         @cpu@_opcode renamed to @cpu@_get_idata.
6894         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6895         done later underneath sim_resume.
6896         (@mach@_mach): Record @cpu@_prepare_run.
6897         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6898         updated.
6899         (-hw-gen-set-quiet-pc): Ditto.
6900         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6901         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6902         (<hw-addr>,cxmake-get): Ditto.
6903         (<hw-iaddr>,cxmake-get): Ditto.
6904         (<pc>,cxmake-get): Ditto.
6905         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6906         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6907         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6908         (<hw-pc>,gen-write): Use hw-selector-default.
6909         (<hw-register>,gen-write): Ditto.
6910         (<hw-memory>,gen-write): Ditto.
6911         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6912         (-gen-hw-selector): New proc.
6913
6914         * desc.scm: New file.
6915         * desc-cpu.scm: New file.
6916         * opcodes.scm: Split up into several smaller files.
6917         * opc-asmdis.scm: New file.
6918         * opc-ibld.scm: New file.
6919         * opc-itab.scm: New file.
6920         * opc-opinst.scm: New file.
6921         * Makefile.am (desc): New target.
6922         (opcodes): Update args to cgen-opc.scm.
6923         * Makefile.in: Rebuild.
6924         * aclocal.m4: Rebuild.
6925         * config.in: Rebuild.
6926         * configure.in: Update arg to AC_INIT.
6927         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6928         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6929         AC_PROG_INSTALL.
6930         * configure: Rebuild.
6931         * cgen-gas.scm: Update files to load.
6932         * cgen-opc.scm: Ditto.  Reorganize option letters.
6933         * cgen-sim.scm: Update files to load.
6934         * cgen-stest.scm: Ditto.
6935         * dev.scm (cload): New app "DESC".
6936         (load-opc): Update files to load.
6937         (load-gtest,load-sim,load-stest): Ditto.
6938
6939         * attr.scm (bool-attr?): New proc.
6940         (attr-list-enum-list): New proc.
6941         (-attr-sort): Rewrite.
6942         (attr-builtin!): Give ALIAS attribute a fixed index.
6943         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6944         calculate attribute enum list.
6945         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6946
6947         * insn.scm (-insn-parse): Renamed from parse-insn.
6948
6949         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6950         (-hw-read): Ditto.
6951
6952         * mode.scm (-mode-parse): Renamed from parse-mode.
6953
6954         * operand.scm (<operand>): New member `selector'.
6955         (<operand>,make!): Use default selector.
6956         (hw-selector-default): New variable.
6957         (hw-selector-default?): New proc.
6958
6959         * pmacros.scm (pmacros-init!): New proc.
6960         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6961         (-env-set!): Delete.
6962         (-pmacro-expand): New proc apply-macro.
6963         Use it in scan-list,scan.  Scan list first, then see if macro
6964         invocation.
6965         (define-pmacro): Rewrite.
6966         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6967
6968         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6969         selected if (current-mach) seen.
6970         (rtx?): Renamed from rtx-uneval?, all callers updated.
6971         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6972         updated.
6973         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6974         selector, all callers updated.
6975         (hw:): New arg selector, all callers updated.  Delete old comments
6976         and code.
6977         (reg:,mem:): Handle selectors
6978         * rtx-funcs.scm (reg:): Handle selectors.
6979
6980         * read.scm: Renamed from cpu.scm.
6981         (<command>): New class.
6982         (<reader>): New member commands.
6983         (reader-add-command!): New proc.
6984         (reader-lookup-command): New proc.
6985         (reader-error,-reader-process-expanded,reader-process): New procs.
6986         (reader-read-file!): New proc.
6987         (include): Call reader-read-file!.
6988         (cmd-if): New proc.
6989         (cpu-load): Call reader-read-file!.
6990         * utils.scm (num-args): New proc.
6991         * simplify.inc: New file.
6992         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6993         procs.  Move define-normal-foo procs (and abbreviated forms) to
6994         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6995         routines.
6996         * fr30.cpu: Include simplify.inc.
6997         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6998         * i960.cpu: Include simplify.inc.
6999         * m32r.cpu: Include simplify.inc.
7000         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7001         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7002         * sparc.cpu: Include simplify.inc.
7003         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7004         * utils-cgen.scm (parse-error): Moved to read.scm.
7005         (sanitize): Rewrite.
7006         (utils-init!): New proc.
7007
7008 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
7009
7010         * sparc.cpu: New file.
7011         * sparc32.cpu: New file.
7012         * sparc64.cpu: New file.
7013         * sparccom.cpu: New file.
7014         * sparc.opc: New file.
7015
7016 1999-01-27  Frank Eigler  <fche@cygnus.com>
7017
7018         * utils.scm (gen-copyright): New proc.
7019
7020 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7021
7022         Parameterize rtl parsing, rather than having lots of little handlers.
7023         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7024         Delete member traverse.
7025         (rtx:set-traverse!): Delete.
7026         (-rtx-valid-types,-rtx-valid-matches): New variables.
7027         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7028         instead of expression.  All callers updated.
7029         (def-rtx-node): New args arg-types,arg-modes.
7030         (def-rtx-syntax-node): Ditto.
7031         (def-rtx-dual-mode): Ditto.
7032         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7033         All callers updated.
7034         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7035         All callers updated.
7036         (rtx-macro-expand): New proc.
7037         (-rtx-traverse-check-args): Delete.
7038         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7039         an rtx specific traverser.
7040         (-rtx-any-mode?,-rtx-symornum?): New procs.
7041         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7042         (-rtx-traverse-no-mode): Delete.
7043         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7044         (-rtx-traverse-operands): Rewrite.
7045         (-rtx-traverse-expr): Rewrite.
7046         (rtx-traverse): Don't expand macros here, leave for caller to do.
7047         (rtx-simplify): Delete.
7048         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7049         attributes.
7050         (rtx-true?,rtx-false?): Ditto.
7051         (-rtx-ref-type): Set dest is operand 1 now.
7052         (-simplify-for-compilation): New proc.
7053         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7054         Expand macros before calling rtx-traverse.  Sort operands by name
7055         to avoid unnecessary semantic formats.
7056         (semantic-attrs): New proc.
7057         (rtx-uneval?): Handle (<rtx-func> ...).
7058         (s-boolifop): Delete arg mode.  All callers updated.
7059         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7060         (eq-attr): New arg obj.
7061         (eq-attr:): Delete.
7062         * m32r.cpu (rach): Update calls to andif.
7063
7064         * minsn.scm (-minsn-parse-expansion): Renamed from
7065         parse-minsn-expansion.
7066         (-minsn-parse): Renamed from parse-minsn.
7067         (-minsn-read): Renamed from read-minsn.
7068         (def-minsn): Don't check APPLICATION here.
7069         (def-full-minsn): New proc.
7070         (define-macro-insn): Check APPLICATION here.  Expand macros.
7071         (define-normal-macro-insn): Ditto.
7072
7073         * utils.scm (word-value): New arg start-lsb?.
7074         (word-mask,word-extract): Ditto.
7075         (split-bits,powers-of-2): Use integer-expt instead of expt.
7076         (bit-set?): Handle 32 bit values (which are bignums).
7077         (cg-logand,cg-logxor): New functions.
7078         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7079         (<ifield>,field-value): Update call to word-value.
7080         (<ifield>,min-value): Use integer-expt instead of expt.
7081         (<ifield>,max-value): Ditto.
7082
7083         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7084
7085         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7086
7087         Compute raw instruction format in addition to semantic based format.
7088         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7089         (<iformat> accessors): Rename accessors to ifmt-*.
7090         (<sformat>): New class.
7091         (fmt-enum): Renamed from fmt:enum.
7092         (-ifmt-search-key): Rewrite.
7093         (-sfmt-search-key): New proc.
7094         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7095         Compute iformat and sformat search keys.
7096         (ifmt-build): Update.
7097         (sfmt-build): New proc.
7098         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7099         (ifmt-compute!): Compute instruction format <iformat> based on
7100         instruction fields alone.  Compute new semantic format <sformat>
7101         based on instruction fields and semantic information.
7102         (ifmt:lookup): Delete.
7103         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7104         (current-sfmt-list): New proc.
7105         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7106         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7107         (insn-length,insn-length-bytes): Update.
7108         (insn:mask-length,insn:mask): Update.
7109         (insn-lookup-op): Update.
7110         * gas-test.scm (gas-test-analyze!): Update.
7111         (gen-gas-test): Ditto.
7112         * sim-test.scm (sim-test-analyze!): Update.
7113         (gen-sim-test): Ditto.
7114         * opcodes.scm (gen-operand-instance-table): Update.
7115         (gen-operand-instance-ref): Ditto.
7116         (max-operand-instances): Use heuristic if semantics not parsed.
7117         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7118         (opcodes-analyze!): Only scan semantics of building operand instance
7119         tables.
7120         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7121         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7122         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7123         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7124         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7125         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7126         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7127
7128         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7129         New arg lsb0?  All callers updated.
7130         (decode-bits): New arg lsb0?.  All callers updated.
7131         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7132         of expt.
7133         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7134         (build-slots): Call integer-expt instead of expt.
7135         (build-decode-table-entry): Handle crossing word boundaries better.
7136         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7137         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7138
7139         * enum.scm (define-enum): Rewrite.
7140         (define-normal-enum): Ditto.
7141         (def-full-insn-enum): New proc.
7142         (define-normal-insn-enum): Rewrite.
7143
7144         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7145         valid C.
7146         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7147
7148         * dev.scm: Add sid support.
7149
7150         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7151         (CLEANFILES): Add tmp-*.
7152         * Makefile.in: Rebuild.
7153
7154         * doc/Makefile.am: New file.
7155         * doc/Makefile.in: New file.
7156         * doc/cgen.texi: New file.
7157         * Makefile.am (SUBDIRS): Define.
7158         * Makefile.in: Rebuild.
7159         * configure.in: Create doc/Makefile.
7160         * configure: Rebuild.
7161
7162 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7163
7164         * insn.scm (insn:syn): Delete.
7165
7166 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7167
7168         * fr30.cpu (model fr30-1): Add state variables load-regs,
7169         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7170         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7171         (model m32rx): Ditto.
7172         (addi): Simplify function unit usage spec.
7173         (ld-plus): Rewrite operand names in function unit usage spec.
7174         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7175         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7176         overridden.  Allow operand to appear in input and output spec.
7177         (<insn>,gen-profile-code): string-append -> string-list.
7178
7179         * ifield.scm (define-ifield): Call pmacro-expand.
7180         (define-full-ifield,define-normal-ifield): Ditto.
7181         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7182
7183         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7184         with-scache and without-scache cases.
7185
7186 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7187
7188         * fr30.cpu (fr30-1): Add state variable h-gr.
7189         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7190         (all insns): First pass at providing cycle counts.
7191         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7192         when initializing unit output operands, ditto for input operands.
7193
7194         * insn.scm (insn-length,insn-length-bytes): New procs.
7195         * mach.scm (-adata-set-derived!): Use them.
7196         * sim-cpu.scm (-gen-sem-case): Ditto.
7197
7198         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7199         (-gen-write-case): Ditto.
7200         (gen-semantic-fn): Ditto.  Split into two:
7201         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7202         in non-scache case.
7203         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7204         scache/no-scache appropriately.  All callers updated.
7205         (-gen-sem-case): PCADDR->IADDR.
7206         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7207
7208         * sim-decode.scm (*): Replace string-append,string-map with
7209         string-list,string-list-map where the result is sufficiently large.
7210         (-gen-decode-insn-table): Go back to simple version for non-scache
7211         case: just record IDESC in decoder tables and leave field extraction
7212         to the caller.
7213         (-gen-decode-switch): Ditto.
7214         (-gen-decode-fn): Ditto.
7215         (-gen-extract-decls): Only emit format enum if with-scache?.
7216         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7217         non-scache case.
7218         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7219         (-gen-insn-timing): Ditto.
7220         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7221         with-scache case.
7222
7223         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7224         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7225
7226 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7227
7228         * cpu.scm (keep-mach-validate!): New proc.
7229         (include): New proc.
7230
7231         * mach.scm (current-arch-mach-name-list): New proc.
7232         (-parse-arch-machs): Always return canonical form.
7233         (def-arch): Validate user specified machs to be kept.
7234         (def-mach-attr!): Simplify.
7235
7236         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7237         (option-init!): Initialize it.
7238         (option-set!): Set it.
7239         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7240         output operand instance tables.
7241         (cgen-opc.in): Only output operand instance tables if asked to.
7242
7243         * sim.scm (option-init!,option-set!): Clarify returned value.
7244
7245         * sim.scm (gen-mach-bfd-name): Move from here.
7246         * utils-cgen.scm: To here.
7247
7248 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7249
7250         * fr30.cpu (ilm): Fix comment field.
7251         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7252         compute it.
7253
7254         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7255         (rtx-true?, rtx-false?): New procs.
7256         * rtx-funcs.scm (annul): Rename vpc to pc.
7257         (-rtx-traverse-if): Improve determination of whether then/else parts
7258         are conditionally executed.
7259
7260         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7261         outer level.
7262         (gen-argbuf-type): Simplify generated definition (big sem_fields
7263         union moved outside).
7264
7265 1999-01-11  Ben Elliston  <bje@cygnus.com>
7266
7267         * doc/porting.texi: New file.
7268
7269         * doc/intro.texi: New file.
7270         (Layout): Use @example to insert preformatted ASCII text (such as
7271         diagrams). @code is inappropriate here.
7272
7273 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7274
7275         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7276
7277         * m32r.opc (print_hash): Cast dis_info.
7278
7279         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7280         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7281         get/set macros.
7282
7283 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7284
7285         * i960.cpu (f-br-disp): Remove RELOC attribute.
7286         (f-ctrl-disp): Ditto.
7287         (callx-disp): set-quiet -> set for (reg h-gr 2).
7288         (callx-indirect,callx-indirect-offset): Ditto.
7289
7290         * Makefile.am (gas-test): Fix dependencies.
7291         * Makefile.in: Rebuild.
7292         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7293         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7294         (gas-test-analyze!): Use syntax-break-out.
7295         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7296         (sim-test-analyze!): Use syntax-break-out.
7297         (cgen-build.sh): Use gen-file-name.
7298         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7299         * insn.scm (syntax-break-out): New proc.
7300         * utils.scm (gen-file-name): New proc.
7301
7302         * fixup.scm (nil,<?,<=?,>?): Delete.
7303
7304         * utils.scm (count-true): Rewrite.
7305
7306         * slib/sort.scm: Move sort.scm to slib directory.
7307         * cpu.scm: Update.
7308
7309         * iformat.scm (ifmt-compute!): Record empty format.
7310
7311         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7312         internal procs outside.  Handle expression register numbers.
7313         Handle index-of.
7314
7315         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7316
7317         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7318         every register.
7319         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7320         (gen-semantic-fn,-gen-sem-case): Ditto.
7321         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7322         (cgen-semantics.c): Ditto.
7323         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7324         (gen-ifmt-argvars-defns): New proc.
7325         (gen-ifmt-argvars-assigns): New proc.
7326         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7327         (-gen-decode-fn): Handle non-with-scache case.
7328         (cgen-decode.c): Define WANT_CPU to @cpu@.
7329         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7330         (cgen-model.c): Define WANT_CPU to @cpu@.
7331         * sim.scm (gen-ifld-extract-argvar): New proc.
7332         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7333         with FUN-ACCESS specified.
7334         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7335         (<hw-register>,gen-extract): New arg local?.
7336         (<hw-address>,gen-extract): Ditto.
7337         (-hw-cxmake-get): Handle non-with-scache case.
7338         (-hw-gen-set-quiet): Ditto.
7339         (<hw-address>,cxmake-get): Handle non-with-scache case.
7340         (gen-op-extract-argvar): New proc.
7341         (<operand>,gen-record-profile): Rewrite.
7342         (<operand>,gen-profile-code): Rewrite.
7343         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7344         (gen-argbuf-fields-union): New proc.
7345         (gen-argbuf-type): Use it.  Handle non-scache case.
7346
7347         * *.scm: class:foo procs renamed to class-foo.
7348         * attr.scm (<attribute>): New member `for'.
7349         (-attr-parse): New first value in list for default if
7350         none specified.
7351         (non-bool-attr-list,attr:add!): Delete.
7352         (def-attr): Use current-attr-add!.
7353         (atlist-attr-value-no-default): New proc.
7354         (attr-lookup-default): Handle boolean attributes.
7355         (gen-attr-enum): New proc.
7356         (-attr-remove-meta-attrs-alist): New proc.
7357         (attr-nub): New proc.
7358         (current-attr-list-for): New proc.
7359         (current-{ifld,hw,op,insn}-attr-list): New procs.
7360         (attr-builtin!): New proc.
7361         * cpu.scm (keep-obj?): Rewrite.
7362         (-init-parse-cpu!): Call arch-init!.
7363         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7364         (-finish-parse-cpu!): Call arch-finish!.
7365         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7366         (def-enum,def-full-enum): Use current-enum-add!.
7367         (gen-obj-list-enums): New proc.
7368         * hardware.scm (hw:add!,hw:lookup): Delete.
7369         (def-hardware,def-hardware-ext): Use current-hw-add!.
7370         (hw:std-attrs,hw:attr-list): Delete.
7371         (hardware-builtin!): Define builtin hardware attributes.
7372         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7373         (def-ifield,def-full-ifield): Use current-ifld-add!.
7374         (ifld:std-attrs,ifld:attr-list): Delete.
7375         (ifield-builtin!): New proc.
7376         * insn.scm (insn:add!,insn:lookup): Delete.
7377         (def-full-insn): Use current-insn-add!.
7378         (insn:std-attrs): Delete.
7379         (insn-builtin!): New proc.
7380         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7381         minsn-list.
7382         (<arch-data>): New member machs.
7383         (current-attr-list,current-enum-list): New procs.
7384         (current-op-list,current-minsn-list): New procs.
7385         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7386         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7387         Ditto.
7388         (-parse-arch-machs): New proc.
7389         (-arch-parse): New arg machs, all callers updated.
7390         (-arch-read): Handle machs spec.
7391         (def-arch): Define MACH attribute here.
7392         (mach-init!,mach-finish!): Not here.
7393         (cpu:add!,cpu:lookup): Delete.
7394         (def-cpu): Use current-cpu-add!.
7395         (<mach>): New member bfd-name.
7396         (-mach-parse): New arg bfd-name, all callers updated.
7397         (-mach-read): Handle bfd-name spec.
7398         (mach:add!,mach:lookup): Delete.
7399         (def-mach): Use current-mach-add!.
7400         (def-mach-attr!): New proc.
7401         (arch-init!): New proc.
7402         (arch-finish!): New proc.  Reverse all object lists here.
7403         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7404         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7405         (define-normal-macro-insn): Ignore minsn if mach not kept.
7406         * mode.scm (mode-builtin!): New proc.
7407         * model.scm (model:add!,model:lookup): Delete.
7408         (def-model): Use current-model-add!.
7409         * opcodes.scm (insn:attr-list): Delete.
7410         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7411         (gen-attr-table-defn): Emit value for default.
7412         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7413         (op:attr-list): Delete.
7414         (gen-operand-decls,gen-insn-decls): New proc.
7415         (compute-insn-attr-list): Delete.
7416         (cgen-opc.h): Reorganize and simplify.
7417         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7418         (def-operand,def-full-operand): Use current-op-add!.
7419         (op:std-attrs): Delete.
7420         (operand-enum): Delete.
7421         (operand-builtin!): Define builtin operand attrs.
7422         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7423         (gen-attr-enum-decl): Use gen-obj-list-enums.
7424         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7425         Rewrite.
7426         * fr30.cpu (define-arch): Add machs spec.
7427         (f-i4): SIGNED attribute -> !UNSIGNED.
7428         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7429         (HASH-PREFIX): Define operand attribute.
7430         (NOT-IN-DELAY-SLOT): Define insn attribute.
7431         * i960.cpu (define-arch): Add machs spec.
7432         * m32r.cpu (define-arch): Add machs spec.
7433         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7434         (HASH-PREFIX): Define operand attribute.
7435         (FILL-SLOT): Define insn attribute.
7436
7437 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7438
7439         * fr30.cpu (stilm): Correct mask for and operation.
7440
7441 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7442
7443         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7444         Replace START/EXIT with start/pass.
7445         (gen-sim-test): Delete ".text".
7446
7447 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7448
7449         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7450
7451 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7452
7453         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7454         (h-sbit): Make it FUN-ACCESS.
7455         (h-gr): Reorder so that general regs are always printed by number.
7456
7457 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7458
7459         * i960.cpu (flushreg): Use nop.
7460
7461 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7462
7463         * m32r.cpu (default-alignment): Specify.
7464         * mach.scm (<arch-data>): New member default-alignment.
7465         (adata:default-alignment): New proc.
7466         (current-arch-default-alignment): New proc.
7467         (-arch-parse): New arg default-alignment.
7468         (parse-alignment): New proc.
7469         (-arch-read): Handle default-alignment spec.
7470
7471         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7472
7473         * insn.scm (f-%): Delete.
7474         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7475         be readded if proved useful.
7476         (gen-extract-fields): Ditto.  Use gen-ifetch.
7477         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7478         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7479
7480 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7481
7482         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7483
7484 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7485
7486         * fr30.cpu: Remove stub macros.
7487         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7488         (div2): Don't use addc/subc.
7489
7490 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7491
7492         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7493         if opcodes.
7494
7495 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7496
7497         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7498
7499 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7500
7501         * cpu.scm (keep-all?): New proc.
7502         (assert-keep-all): Use it.
7503         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7504         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7505         Check for spelling errors.
7506
7507 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7508
7509         * rtl.scm (s-convop): Call -rtx-sem-mode.
7510
7511 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7512
7513         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7514         (-parse-hw-profile): Ditto.
7515         (<hw-register>, parse!): Return `void' result.
7516         (<hw-pc>, parse!): Ditto.
7517         (<hw-memory>, parse!): Ditto.
7518         (<hw-immediate>, parse!): Ditto.
7519         (<hw-address>, parse!): Ditto.
7520
7521         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7522         (-ifld-parse-encode-decode): New proc.
7523         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7524         (-multi-ifield-parse): Set encode/decode to #f.
7525         (ifld:decode-mode): New proc.
7526         * utils.scm (nub): Rewrite.
7527         * operand.scm (op-nub): Rewrite.
7528         * sim.scm (<ifield>, gen-type): Rewrite.
7529         (-gen-ifld-argbuf-defn): New proc.
7530         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7531         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7532         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7533         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7534         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7535         New method gen-trace-extract.
7536         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7537         from gen-argbuf-elm, return "" if not caching register address.
7538         Rewrite gen-extract.  New method gen-trace-extract.
7539         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7540         gen-extract, gen-trace-extract, cxmake-get.
7541         (<hw-iaddress>): New method cxmake-get.
7542         (op-needed-iflds): New proc.
7543         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7544         (-gen-op-argbuf-defn): New proc.
7545         (gen-op-extract): Renamed from op:extract.
7546         (gen-op-trace-extract): Renamed from op:trace-extract.
7547         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7548         and rewritten.
7549         (gen-argbuf-elm): Rewrite.
7550         * sim-decode.scm (-gen-record-args): Update.
7551
7552         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7553
7554         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7555         argument position.  Flag symbolic macros in function position as
7556         an error.
7557         (define-pmacro): Handle quoting in definition of symbolic macros.
7558         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7559
7560 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7561
7562         * fr30.opc (parse_register_list): Account for reverse masks
7563         for load and store.
7564         (print_register_list): Ditto.
7565         (parse_low_register_list_ld): New function.
7566         (parse_hi_register_list_ld): New function.
7567         (parse_low_register_list_st): New function.
7568         (parse_hi_register_list_st): New function.
7569         (print_hi_register_list_ld): New function.
7570         (print_hi_register_list_st): New function.
7571         (print_low_register_list_ld): New function.
7572         (print_low_register_list_st): New function.
7573         * fr30.cpu (ldr15dr): Implement workaround.
7574         (ldm0,ldm1,stm0,stm1): Implemented.
7575
7576 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7577
7578         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7579         * configure: Regenerate.
7580         * Makefile.am (WITH_HOBBIT): Update.
7581         (cgen-hob.c): Remove Makefile dependency.
7582         (cgen.o): Depend on cgen-gh.h, config.h.
7583         * Makefile.in: Regenerate.
7584         * aclocal.m4: Regenerate.
7585
7586 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7587
7588         * i960.cpu, i960.opc: New files.
7589
7590 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7591
7592         * fr30.opc (parse_register_number): New function.
7593         (parse_register_list): New function.
7594         (parse_low_register_list): Use parse_register_list.
7595         (parse_hi_register_list): Use parse_register_list.
7596         * fr30.cpu (sth): Fix assembler syntax. Implement more
7597         insns.
7598
7599 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7600
7601         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7602         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7603         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7604         (-op-gen-set-trace-parallel): Ditto.
7605         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7606
7607         * fr30.cpu (call,calld): Fix setting of pc.
7608         (f-op5): Fix start bit number.
7609
7610 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7611
7612         * fr30.cpu (st): Fix operand ordering. Implement more
7613         insns.
7614
7615 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7616
7617         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7618         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7619         (fmt-semantic-operands): Move to sim.scm.
7620         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7621         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7622         (<hw-index>): New method get-name.
7623         (op-profilable?): Moved to sim.scm.
7624         (op-nub): New proc.
7625         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7626         (op-profilable?): Moved here from operand.scm.
7627         (gen-extract-type): Delete.
7628         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7629         (-gen-argfld-ref): New proc.
7630         (-gen-ifld-argfld-name): New proc.
7631         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7632         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7633         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7634         (<hardware-base>): Delete method gen-extract-type.  New method
7635         gen-argbuf-elm.
7636         (<hw-register): Ditto.  Update method gen-extract.
7637         (<operand>, method gen-argbuf-elm): Rewrite.
7638         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7639         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7640         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7641
7642         * sim-decode.scm (-gen-record-args): Tweak.
7643
7644         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7645
7646 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7647
7648         * doc/porting: Fix typo: gas->sim.
7649         * fr30.opc (print_m4): New function.
7650         * fr30.cpu: Implemented many insns.
7651
7652 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7653
7654         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7655
7656         * fr30.cpu (f-rel9): Delete RELOC attribute.
7657         (f-rel12): Add PCREL-ADDR attribute.
7658         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7659         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7660         * fr30.opc (print_label9): Delete.
7661
7662         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7663         code for CTI indicators.
7664         * insn.scm (insn-cti?): Simplify.
7665         * utils-cgen.scm (atlist:cti?): New proc.
7666
7667 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7668
7669         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7670         (f-i20-4,f-i20-16,f-i20): New fields.
7671         (i20): New operand.
7672         (ldi8): Implement.
7673         (ldi20): New insn.
7674         (ldi32m): Delete.
7675         (jmpd): Implement.
7676         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7677         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7678         * mach.scm (arch-data): Ditto.
7679         (current-arch-default-insn-word-bitsize): Renamed from
7680         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7681         (-arch-read): Update.
7682
7683         * hardware.scm (hw:attr-list): Move here ...
7684         * opcodes.scm: ... from here.
7685
7686         * ifield.scm (fld:bitrange): Delete.
7687         (fld:word-offset,fld:word-length): New procs.
7688         (ifield?): Use class-instance.
7689         (<ifield>, method field-start): Rewrite.
7690         (ifld:enum): New proc.
7691         (<ifield>, methods field-mask,field-value): Rewrite.
7692         (-ifield-parse): Rewrite.
7693         (<multi-ifield> support): Rewrite.
7694         (ifld-beyond-base?): Rewrite.
7695         (ifld:std-attrs): New variable.
7696         (ifld:attr-list): New proc.
7697         * iformat.scm (-compute-insn-mask): Rewrite.
7698         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7699         Simplify.
7700         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7701         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7702         onto type.
7703         (<operand>): Ditto.  Forward onto index instead.
7704         (gen-ifld-decls,gen-ifld-defns): New procs.
7705         (ifld:insert,ifld:extract): New procs.
7706         (<ifield>): New methods gen-insert, gen-extract.
7707         (<multi-ifield>): Ditto.
7708         (<hw-index>): Forward gen-insert,gen-extract onto value.
7709         (<hw-asm>): Delete insert/extract support.
7710         (<hw-register,hw-memory,hw-immediate>): Ditto.
7711         (gen-hash-defines): Use string-list.
7712         Define CGEN_MAX_IFMT_OPERANDS.
7713         (gen-switch): Use string-list,string-list-map.
7714         (gen-fget-switch,gen-fset-switch): Use string-list.
7715         (gen-parse-switch,gen-insert-switch): Ditto.
7716         (gen-extract-switch,gen-print-switch): Ditto.
7717         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7718         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7719         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7720         (gen-ivalue-entry): New proc.
7721         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7722         computation.  Use 0 for operand ref table if ALIAS insn.
7723         (gen-minsn-table-entry): Use string-list.
7724         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7725         (gen-opcode-open): Record address of ifield table.
7726         (cgen-opc.h): Call gen-ifld-decls.
7727         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7728         * types.scm (<bitrange>): New members word-offset,word-length.
7729         Delete member total-length.  Delete methods start,mask,value.
7730         (bitrange:word-offset,bitrange:word-length): New procs.
7731         * sim-cpu.scm (gen-define-fields): Simplify.
7732         (gen-extract-fields): Simplify.
7733         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7734         (<ifield>): New methods gen-ifld-extract-decl.
7735         Delete method gen-ifld-extract-beyond.
7736         (<multi-ifield>): New methods gen-ifld-extract-decl.
7737         (<multi-ifield>, method gen-ifld-extract): Implement.
7738         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7739         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7740
7741         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7742         (-rtx-traverse-syntax-no-mode): New proc.
7743         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7744         (s-ifield): New proc.
7745         (s-shop): Don't prepend `unsigned' for unsigned modes.
7746         * rtx-funcs.scm (ifield): New rtx function.
7747         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7748         (delay): New rtx function.
7749         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7750
7751         * cos.scm (-elm-make-method-getter): Fix typo.
7752
7753         * utils.scm (backslash): Handle lists of strings.
7754
7755 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7756
7757         * fr30.cpu (f-rel9): Correct for pc+2.
7758         (label9): Use print_label9.
7759         * fr30.opc (print_label9): New function.
7760
7761 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7762
7763         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7764         * fr30.opc (parse_low_register_list): Renamed.
7765         (parse_hi_register_list): Renamed.
7766         (print_hi_register_list): Renamed.
7767         (print_low_register_list): Renamed.
7768
7769 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7770
7771         * fr30.cpu (f-rel9): Now a pc relative offset.
7772
7773 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7774
7775         * opcodes.scm (op-asm): Move to here, from operands.scm.
7776         (<op-asm>, method parse!): Validate arguments.
7777         (<operand>, method gen-function-name): Fix thinko.
7778         * operand.scm (<operand>, method make!): Don't set op-asm here.
7779         * utils.scm (list-elements-ok?): New proc.
7780
7781         * opcodes.scm: Clean up pass.
7782
7783 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7784
7785         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7786         the fr30_int function.
7787         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7788         (h-dr): Add FUN-ACCESS attribute.
7789
7790 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7791
7792         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7793         for C symbol for models array.
7794
7795 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7796
7797         * fr30.opc (parse_reglist_low): New function.
7798         (parse_reglist_hi): New function.
7799         (print_reglist_low): New function.
7800         (print_reglist_hi): New function.
7801         * fr30.cpu: Finish remaining insn stubs.
7802
7803 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7804
7805         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7806
7807         * fr30.cpu (ldi32m): Don't use for disassembly.
7808
7809 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7810
7811         * fr30.cpu (int): Implement it.
7812
7813 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7814
7815         * rtx-funcs.scm (nop): Fix C code.
7816
7817         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7818
7819         * fr30.cpu (f-i32): New ifield.
7820         (i32): New operand.
7821         (ldi32): New insn.
7822         (ldi32m): New macro insn.
7823         (inte): Provide simple version for now.
7824
7825         * sim-arch.scm: New file.
7826         * sim.scm: Move architecture support generation to sim-arch.scm.
7827         * cgen-sim.scm: Load sim-arch.scm.
7828         * dev.scm: Ditto.
7829
7830         * hardware.scm (pc?) New proc.
7831         (class <hardware-base>): Rewrite method 'pc?.
7832         (class <hardware>): Forward 'pc? to the hardware type.
7833         (class <hw-pc>): New method 'pc?.
7834
7835         Add support for variable length ISAs.
7836         * ifield.scm (ifld-beyond-base?): New proc.
7837         * m32r.cpu: Remove integral-insn? spec.
7838         * mach.scm (arch:derived,arch:set-derived!): New procs.
7839         (arch:app-data,arch:set-app-data!): New procs.
7840         (class <arch>): New members derived, app-data.
7841         (class <cpu>): Delete member integral-insn?.
7842         (cpu:integral-insn?): Delete.
7843         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7844         (-cpu-read): Delete integral-insn? support.
7845         (state:decode-assist): Delete.
7846         (state:int-insn?): Delete.
7847         (<derived-arch-data>): New class.
7848         (-adata-set-derived!): New proc.
7849         (mach-finish!): Call it.
7850         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7851         (gen-operand-instance): Add COND_REF support.
7852         (gen-operand-instance-table): Ditto.
7853         (gen-hash-defines): Update.
7854         (gen-extract-switch): Update type of `insn_value' arg.
7855         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7856         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7857         updated.
7858         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7859         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7860         beyond the base insn (for large insns).
7861         (-gen-extract-beyond-var-list): New proc.
7862         (gen-extract-fields): Handle large insns.
7863         (-gen-write-case): Update sem_arg computation.
7864         Update initial vpc computation.
7865         (gen-semantic-fn): Ditto.  Update type of `insn'.
7866         (-gen-sem-case): Update sem_arg computation.
7867         Update initial vpc computation.
7868         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7869         (-gen-extract-word): New proc.
7870         (<ifield>): New method gen-ifld-extract-beyond.
7871         (gen-ifld-extract-beyond): New proc.
7872         * types.scm (bitrange-overlap?): New proc.
7873
7874         * utils.scm (bits->bytes): New proc.
7875         (bytes->bits): New proc.
7876
7877         Move extraction support into decoder.
7878         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7879         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7880         support to sim-decode.scm.
7881         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7882         be array of IDESC,FMT entries.  Make the array const.
7883         (-gen-gcc-label-table): Make array const.
7884         (-gen-decode-switch): Branch to extraction code after insn has been
7885         identified.
7886         (-gen-decode-insn-globals): Delete extract handler from
7887         @cpu@_insn_sem.
7888         (gen-decode-fn): Add extraction support.
7889         (-gen-sem-fn-decls): Delete extraction fn decls.
7890         (-gen-idesc-decls): Update @cpu@_decode decl.
7891         (-gen-idesc-init-fn): Delete extraction support.
7892         (-gen-extract-decls): New proc.
7893
7894         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7895         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7896
7897         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7898         All callers updated.
7899         (table-entry:make): Record insn value as insn object, not name.
7900         All uses updated.
7901
7902         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7903         collision with C function.
7904         (path_dirname): Similarily.
7905         * hobbit.c,hobbit.h: Rebuild.
7906
7907 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7908
7909         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7910
7911 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7912
7913         * fr30.cpu: Implement more instruction stubs.
7914
7915 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7916
7917         * fr30.cpu: Implement more instruction stubs.
7918
7919 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7920
7921         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7922
7923         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7924
7925         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7926         (op:std-attrs): Ditto.
7927         * opcodes.scm (gen-operand-instance): Ditto.
7928         (gen-switch): Ditto.
7929         * m32r.cpu (condbit,accum): Update.
7930         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7931
7932 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7933
7934         * enum.scm (-enum-read): Fix typo.
7935
7936         * iformat.scm (-ifmt-search-key): Simplify a little.
7937
7938 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7939
7940         * doc/porting: semantics.c -> sem.c.
7941         * Makefile.in: Regenerate.
7942         * fr30.cpu (add): Change ADD to add. Add more registers and set
7943         status bits on 'add' instruction.
7944
7945 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7946
7947         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7948         of 0.
7949
7950 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7951
7952         * minsn.scm (minsn:enum): Update, call current-arch-name.
7953
7954         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7955
7956         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7957         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7958         (ARCH,CGEN,CGENFLAGS): New variables.
7959         (gas-test,sim-test): New rules.
7960         * Makefile.in: Rebuild.
7961         * configure.in (arch): Define.
7962         * configure: Rebuild.
7963
7964         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7965         * All .scm files: Ditto.
7966
7967         * dev.scm: Fix gas-test call to cpu-load.
7968         * gas-test.scm: Clean up pass to remove bit-rot.
7969         * sim-test.scm: Ditto.
7970
7971         * enum.scm (read-enum): Fix typo in `vals' handling.
7972
7973         * hardware.scm (-parse-hw-type): Fix typo.
7974         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7975         (def-hardware,define-normal-hardware): Ditto.
7976
7977         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7978         (display-var): Use it.
7979         * hobbit.c: Rebuild.
7980         * hobbit.h: Rebuild.
7981
7982         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7983         avoid hobbit problem.
7984         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7985         `parallel-insns-' to avoid hobbit problem.
7986
7987 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7988
7989         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7990         (parse_slo16,parse_ulo16): Ditto.
7991         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7992
7993 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7994
7995         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7996         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7997         * Makefile.in: Rebuild.
7998         * insn.scm (define-normal-insn): Expand pmacros.
7999         * mode.scm (<mode>): New member `host?'.  All uses updated.
8000         (mode:host?): New proc.
8001         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8002         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8003         (define-rtx-dual-mode): Ditto.
8004         (s-index-of): New proc.
8005         (s-unop): Use plain C for host mode operations.
8006         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8007         * rtx-funcs.scm (index-of): New rtx function.
8008         * sim.scm (<hw-index>): New method cxmake-get.
8009
8010 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
8011
8012         * sim-cpu.scm (-gen-engine-decls): Delete.
8013
8014 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
8015
8016         * doc/rtl (Example): Correct Typo.
8017         * doc/porting: Add 'make dep' step to opcodes port instructions.
8018         * fr30.opc: New file.
8019         * fr30.cpu: New file.
8020
8021 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8022
8023         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8024         * Makefile.am (GUILEINCDIR): New variable.
8025         (INCLUDES): Use it.
8026         * configure: Regenerate.
8027         * Makefile.in: Ditto.
8028         * aclocal.m4: Ditto.
8029
8030 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8031
8032         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8033         (cgen-semantics.c): Ditto.
8034         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8035         * sim-model.scm (cgen-model.c): Ditto.
8036         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8037         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8038
8039         * opcodes.scm (read-cpu.opc): Handle empty file.
8040
8041         * cos.scm (-elm-make-method-setter): Fix typo.
8042
8043         * cpu.scm (-init-parse-cpu!): Call types-init!.
8044         (-finish-parse-cpu!): Call types-finish!.
8045         * ifield.scm (<ifield>): Delete members start,length.
8046         New member bitrange.
8047         (<ifield>, methods field-start,field-length): Update.
8048         (fld:start): New arg insn-len.  All callers updated.
8049         (<ifield>, methods field-mask,field-value): Update.
8050         (-ifield-parse): Update.
8051         (ifield-init!): Update.
8052         * iformat.scm (compute-insn-length): Simplify.
8053         (compute-insn-mask): Update.
8054         * insn.scm (insn:value): Update.
8055         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8056         (current-arch-default-insn-bitsize): New proc.
8057         (current-arch-insn-lsb0?): New proc.
8058         (-arch-parse,-arch-read): Update.
8059         (<cpu>): New member file-transform.
8060         (-cpu-parse,-cpu-read): Update.
8061         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8062         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8063         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8064         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8065         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8066         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8067         * operand.scm (op:start): Update call to field-start method.
8068         * sim-decode.scm (opcode-slots): New arg lsb0?.
8069         (fill-slot!,build-slots): Ditto.
8070         (build-decode-table-entry,build-decode-table-guts): Ditto.
8071         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8072         (gen-decode-fn): Ditto.
8073         (cgen-decode.c): Update call to gen-decode-fn.
8074         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8075         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8076         (cgen-cpuall.h): Call -gen-cpuall-includes.
8077         * types.scm (<bitrange>): New class.
8078         (types-init!,types-finish!): New procs.
8079         * utils-cgen.scm (parse-number): New proc.
8080         (parse-boolean): New proc.
8081         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8082         (word-mask): Rewrite.
8083         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8084         (m32rxf): New field `file-transform'.
8085         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8086
8087         * hobbit.h: Fix include file name.
8088
8089 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8090
8091         * slib: New directory of slib files used by cgen/hobbit.
8092         * hobbit.scm: New file.
8093         * hobbit.c: New file.
8094         * hobbit.h: New file.
8095         * hobscmif.h: New file.
8096         * hob-main.c: New file.
8097         * hobslib.scm: New file.
8098         * hob.sh: New file.
8099         * Makefile.am: Add support for compiling hobbit, and using compiled
8100         version of hobbit to compile cgen.
8101         * Makefile.in: Regenerate.
8102         * configure.in: Support --with-hobbit.
8103         * configure: Regenerate.
8104         * acconfig.h (WITH_HOBBIT): Add.
8105         * config.in: Regenerate.
8106
8107         * rtl.scm: New file, was cdl-c.scm.
8108         Definition of rtx funcs moved to rtx-funcs.scm.
8109         (semantic-in-out-operands): Rewrite to compute object form of
8110         semantic code.
8111         * rtx-funcs.scm: New file.
8112
8113         * cgen-gh.c: #include "config.h".
8114         (gh_cadddr,gh_cddddr): New fns.
8115         (cgh_vector_to_list): New fn.
8116         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8117         (cgh_init): Prefix qsort procs with "cgh-".
8118         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8119         * cgen.c: #include "config.h".
8120
8121         * attr.scm (bitset-attr?): New proc.
8122         (<bitset-attribute>, method parse-value): Value syntax changed from
8123         (val1 val2 ...) to val1,val2,....
8124         (<bitset-attribute>): New method gen-value.
8125         (<integer-attribute>): New method gen-value.
8126         (<enum-attribute>): New method gen-value.
8127         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8128         (<reader>): New class.
8129         (CURRENT-ARCH,CURRENT-READER): New globals.
8130         (keep-mach?): Move here from mach.scm.
8131         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8132         (<arch>): New class.
8133         (<arch-data>): New class.
8134         (<cpu>): Make subclass of <ident>.
8135         (*ENDIAN* variables): Delete.
8136         (process-state-vars): Delete.
8137         (mach-finish!): Add `base' value to MACH attribute.
8138         * hardware.scm (<hardware>): Make subclass of <ident>.
8139         (hw:std-attrs): New global.
8140         (hw-profilable?): New proc.
8141         * ifield.scm (<ifield>): Make subclass of <ident>.
8142         (sort-ifield-list): Move here from iformat.scm.
8143         * iformat.scm (<iformat>): Renamed from <insn-format>.
8144         Make subclass of <ident>.
8145         (-ifmt-search-key): Include cti? in categorization of formats.
8146         (ifmt-analyze): Compile semantics (turn to object form).
8147         * insn.scm (<insn>): Make subclass of <ident>.
8148         New member compiled-semantics.
8149         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8150         * mode.scm (<mode>): Make subclass of <ident>.
8151         (UBI): Delete.
8152         * model.scm (<unit>): Make subclass of <ident>.
8153         New members inputs,outputs.
8154         (<model>): Make subclass of <ident>.  New member state.
8155         (-unit-parse): Parse inputs,outputs.
8156         (<iunit>): New class.
8157         (-insn-timing-parse-model): New proc.
8158         (parse-insn-timing): Function unit spec rewritten.
8159         * operand.scm (<operand>): Make subclass of <ident>.
8160         New members sem-name,num,cond?  New method gen-pretty-name.
8161         (hw-index-scalar): New global.
8162         (op-nub-hw): Move here from rtl.scm.
8163         (op:lookup-sem-name,op-profilable?): New procs.
8164         * pmacros.scm: Rewrite to pass through hobbit.
8165         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8166         * utils.scm (logit): Make a macro.
8167         (bit-set?): Rewrite.
8168         (high-part): Rewrite.
8169
8170         * m32r.cpu (define-arch): Move to top of file.
8171         (cpu family m32rbf): Renamed from m32rb.
8172         (model m32r/d): Function unit spec rewritten.
8173         (all insns): Ditto.  Replace UBI with BI.
8174
8175         * opcodes.scm (gen-attr-table-decls): Declare
8176         @arch@_cgen_hw_attr_table.
8177         (gen-attr-table-defns): Generate hw attribute table.
8178
8179         * sim-cpu.scm (-gen-engine-decls): New proc.
8180         (-gen-model-decls): New proc.
8181         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8182         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8183         (-gen-record-profile-args): Simplify.
8184         (-gen-parallel-sem-case): Delete.
8185         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8186         New local `written'.  Delete profiling code.
8187         (-gen-sem-case): Ditto.
8188         (-uncond-written-mask,-any-cond-written?): New procs.
8189         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8190         parallelly or serially, and write-back handlers for all parallel insns.
8191         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8192         support to initialization of struct insn_sem.
8193         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8194         (-gen-insn-sem-type): Add parallel write-back support to struct
8195         insn_sem.
8196         (-gen-idesc-init-fn): Add support for virtual insns.
8197         Add parallel write-back support.
8198         * sim-model.scm (gen-model-profile-fn): Delete
8199         (-gen-model-fn-decls): New proc.
8200         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8201         (-gen-model-init-fn): New proc.
8202         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8203         members in @mach@_init_cpu.
8204         (cgen-model.c): Generate model handlers for each insn.
8205         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8206         (<hw-pc>): New method gen-write.
8207         (<hw-register>, method gen-write): New arg `mode'.
8208         (<hw-register>): Delete method gen-record-profile!.
8209         New method gen-profile-index-type.
8210         (<hw-memory>, method gen-write): New arg `mode'.
8211         (<hw-address>, method gen-extract): Delete.
8212         (<hw-address>, method gen-write): New arg `mode'.
8213         (<hw-index>, method get-write-index): Rewrite.
8214         (<pc>, method cxmake-get-direct): Delete.
8215         (<pc>): New method cxmake-get.  Comment out methods
8216         gen-set-quiet,gen-set-trace.
8217         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8218         gen-profile-index-type,gen-profile-code.
8219         Delete method gen-pretty-name.  Rewrite method gen-write.
8220         Delete method cxmake-get-direct.
8221         (-op-gen-set-trace): Update `written'.
8222         (-op-gen-set-trace-parallel): Ditto.
8223         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8224         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8225         insns and their write-back handlers.
8226         (insn-op-lookup): New proc.
8227         (<unit>): New method gen-profile-code.
8228         (<iunit>): New method gen-profile-code.
8229         (gen-argbuf-elm): Add profiling elements.
8230         (gen-argbuf-type): Define cti insns separately in their own struct.
8231         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8232         insns.  Move semantic entries here from struct scache.
8233         Delete everything from struct scache except argbuf.
8234         (<insn>, method gen-profile-locals): Rewrite.
8235         (<insn>, method gen-profile-code): Rewrite.
8236         (sim-finish!): Create virtual pbb insns.
8237
8238 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8239
8240         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8241         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8242         (h-psw,h-bpsw,h-bbpsw): Define.
8243         (rte,trap): Handle bbpc,bbpsw.
8244         * opcodes.scm (max-operand-instances): Fix typo.
8245         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8246         hardware elements to be fun-access.
8247         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8248
8249 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8250
8251         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8252
8253 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8254
8255         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8256
8257 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8258
8259         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8260         architecture name.
8261         (mach m32r): Update.
8262
8263         * mach.scm (mach:supports?): New proc.
8264         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8265         gen-reg-access-{decls,defns}.
8266         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8267         (gen-mach-bfd-name): New proc.
8268         (gen-arch-reg-access-{decls,defns}): New procs.
8269         (cgen-arch.[ch]): Output register access cover fns.
8270
8271         * hardware.scm (hardware-builtin!): Set print handlers for
8272         h-addr,h-iaddr.
8273         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8274         `od'.
8275         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8276         (my_print_insn): Ditto.  Delete args buf, buflen.
8277         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8278         (-hw-asm-specs): Add `handlers' spec.
8279         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8280         `normal-hw-asm'.
8281         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8282         print.
8283         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8284         (<hw-asm>, parse!): New method.
8285         (gen-insn-table-entry): Print semantics.
8286         (gen-opcode-open): Renamed from gen-opcode-table.
8287
8288         * utils.scm (string-write): No longer a macro.
8289         (-string-write): Handle procedure args.
8290         * opcodes.scm: Update all calls to string-write.
8291         * sim-cpu.scm: Ditto.
8292         * sim-decode.scm: Ditto.
8293         * sim-model.scm: Ditto.
8294         * sim.scm: Ditto.
8295
8296 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8297
8298         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8299         (-gen-insn-builders,-gen-insn-builder): New procs.
8300
8301 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8302
8303         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8304         (gen-opcode-table): Properly terminate comment.
8305
8306 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8307
8308         * Version 0.6.0.
8309         Clean up pass over everything, so starting fresh.