OSDN Git Service

* gen-all: Add support for building gcc/newlib.
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2009-12-17  Doug Evans  <dje@sebabeach.org>
2
3         * gen-all: Add support for building gcc/newlib.
4         Specify --prefix and install all built tools.
5
6 2009-12-16  Doug Evans  <dje@sebabeach.org>
7
8         * sim.scm (/op-gen-written-update): Disable operand number is too
9         large warning, for now.
10
11 2009-12-11  Nick Clifton  <nickc@redhat.com>
12
13         * cpu/fr30.opc: Fix shadowed variable warnings.
14
15 2009-12-10  Doug Evans  <dje@sebabeach.org>
16
17         * gen-all: Rewrite.  Build more ports.  Split out building of sid.
18
19 2009-11-23  Doug Evans  <dje@sebabeach.org>
20
21         * hardware.scm (hw-pc?): New function.
22         * ifield.scm (ifld-signed?): New function.
23         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
24         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
25         (insn-cti?): New function.
26         * rtl.scm (/hw): Create <pc> object for pcs.
27         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
28         All callers updated.  Watch for sets to the pc.
29         (semantic-attrs): Watch for sets to the pc.
30         * sid.scm (<pc> cxmake-get): Handle raw-reg.
31         * sim.scm (<pc> cxmake-get): Handle raw-reg.
32         (<operand> cxmake-get): Add debugging printf.
33         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
34         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
35         (/gen-extract-word): Ditto.
36
37         * utils.scm (gen-c-hex-constant): New function.
38         * utils-sim.scm (/gen-decode-insn-entry): Call it.
39
40 2009-11-22  Doug Evans  <dje@sebabeach.org>
41
42         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
43         * read.scm (parse-error-continuable): New function.
44         (define /continuable-error-found?): New variable.
45         (/init-reader!): Initialize it.
46         (/finish-reader!): New function.
47         (cpu-load): Call it.
48         * utils-cgen.scm (obj-list-nub): New function.
49
50         * mach.scm (<derived-arch-data>): New member large-insn-word?.
51         (/adata-set-derived!): Set it.
52         (adata-large-insn-word?): New function.
53         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
54         here.
55         * sim-cpu.scm (cgen-cpu.h): #include it here.
56         (/gen-cpu-defines): Define CGEN_INSN_WORD.
57         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
58         CGEN_INSN_INT.
59         * sim-decode.scm (/gen-idesc-decls): Ditto.
60         (/gen-extract-case, /gen-decode-fn): Ditto.
61         * sim-model.scm (/gen-model-insn-fn): Ditto.
62         * sim.scm (gen-argbuf-type): Ditto.
63
64         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
65         (s-sequence): Call it.
66
67 2009-11-21  Doug Evans  <dje@sebabeach.org>
68
69         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
70         non-VOID-mode expressions with multiple statements.
71
72         * sim.scm (/operand-number-elaboration-written?): New variable.
73         (/op-gen-written-update op): New function.
74         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
75
76         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
77
78         * operand.scm (op-nub): Delete.
79
80         * dev-utils.scm: New file.
81         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
82         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
83         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
84         /loaded-file-record!, maybe-load): Delete.
85         Load cgen files directly instead of via maybe-load.
86
87 2009-11-14  Doug Evans  <dje@sebabeach.org>
88
89         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
90         expressions used in a void context.
91
92         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
93
94         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
95         * cpu/xc16x.opc: Ditto.
96
97 2009-11-12  Doug Evans  <dje@sebabeach.org>
98
99         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
100
101         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
102         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
103
104 2009-11-11  Doug Evans  <dje@sebabeach.org>
105
106         * html.scm (gen-insn-docs): Add logging message.
107
108 2009-11-05  Doug Evans  <dje@sebabeach.org>
109
110         * utils-cgen.scm (gen-set-macro2): New function.
111         * sim.scm (<hw-register> gen-get-macro): Call it.
112
113         * co-for-gen-all: New file.
114
115         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
116
117         * utils.scm (reduce): Delete.
118
119         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
120
121         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
122         regarding PREFIX attribute handling.
123
124         * operand.scm (<hw-index>): Add enum to possible types, all uses
125         updated.
126         (hw-index-constant?, hw-index-constant-value): New functions.
127         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
128         hw-index-enum-obj): New functions.
129         (/operand-parse): Handle enum indices.
130         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
131         hw-index-constant-value.
132         * rtl.scm (rtx-constant-value): Fix handling of enums.
133         * rtx-funcs.scm (enum): Ditto.
134         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
135         currently supported here.
136
137 2009-11-02  Doug Evans  <dje@sebabeach.org>
138
139         Specify isa(s) when doing ifield, operand, insn lookups.
140         ACU = all callers updated.
141         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
142         * enum.scm (define-full-insn-enum): Pass isa-name-list to
143         current-ifld-lookup.
144         * html.scm (get-insn-properties): Pass isa-name-list to
145         current-op-lookup.
146         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
147         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
148         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
149         (/parse-insn-format, syntax-break-out): Ditto.
150         * mach.scm (obj-filter-by-isa): New function.
151         (current-ifld-lookup): New optional arg maybe-isa-name-list.
152         (/ifld-already-defined?, /op-already-defined?): Simplify.
153         (current-op-lookup): New optional arg maybe-isa-name-list.
154         (current-insn-lookup): New arg isa-name-list, ACU.
155         (/insn-already-defined?, /minsn-already-defined?): Simplify.
156         (current-minsn-lookup): New arg isa-name-list, ACU.
157         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
158         current-op-lookup.
159         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
160         (gen-syntax-entry): Ditto.
161         * operand.scm (/operand-parse): Pass isa-name-list to
162         current-ifld-lookup.
163         (/derived-parse-encoding): New arg isa-name-list, ACU.
164         (/derived-parse-ifield-assertion): Ditto.
165         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
166         (/anyof-parse-choice): Ditto.
167         (anyof-satisfies-assertions?): Pass context to rtx-solve.
168         (/anyof-merge-syntax): New arg container, ACU.
169         (operand-builtin!): Add pc to all isas.
170         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
171         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
172         (rtl-c-parsed, rtl-c++-parsed): Ditto.
173         (rtl-c): New arg isa-name-list, ACU.
174         (rtl-c-expr, rtl-c++): Ditto.
175         (closure): New arg isa-name-list, ACU.
176         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
177         (/cstate-isas): New function.
178         (/rtx-canon-symbol-list): New function.
179         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
180         updated.
181         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
182         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
183         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
184         (rtx-canonicalize): New arg isa-name-list, ACU.
185         (rtx-canonicalize-stmt): Delete.
186         (tstate-make): New arg isas, ACU.
187         (tstate-isas, tstate--set-isas!): New functions.
188         (tstate-env-stack): Renamed from tstate-env, ACU.
189         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
190         (tstate-make-closure): Renamed from tstate-new-env, new arg
191         isa-name-list, ACU.
192         (/rtx-traverse-env): Delete.
193         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
194         SUMBOLLIST.
195         (/rtx-traverse): Include conditional flag in dump output.
196         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
197         (<eval-state>): New member isas.  Rename env to env-stack.
198         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
199         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
200         to env-stack.
201         (estate-make-for-eval): Provide #:isas.
202         (estate-make-closure): Renamed from estate-new-env.  New arg
203         isa-name-list, ACU.
204         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
205         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
206         (/rtx-trim-for-doc): Handle closures.
207         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
208         SYMBOLLIST.
209         (rtx-env-var-list): Delete.
210         (rtx-env-make): Handle already-compiled environments.
211         (rtx-var-alist-to-env): New function.
212         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
213         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
214         (rtx-operand-obj): New arg isa-name-list, ACU.
215         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
216         functions.
217         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
218         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
219         (/frag-compute-desired-frags): Minor simplification.
220         (/frag-pick-best): Ditto.
221         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
222         (/gen-sfrag-code): Update.
223         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
224         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
225         * utils.scm (non-null-intersection?): New function.
226
227         * gen-all (do_src): Manually run cgen-all for sid.
228
229 2009-11-01  Doug Evans  <dje@sebabeach.org>
230
231         * gen-all: New file.
232
233         * rtl-traverse.scm (/rtx-canon): Issue better error message for
234         invalid rtx function names.
235
236 2009-10-28  Doug Evans  <dje@sebabeach.org>
237
238         * cos.scm (object-assign!): New function.
239         * mode.scm (/mode-set-word-params!): Call it.
240
241 2009-10-25  Doug Evans  <dje@sebabeach.org>
242
243         Record bitset attributes internally as a list.
244         Record rtx attribute values internally as ((rtx-expr)).
245         * attr.scm (bitset-attr?): Delete, unused.
246         (<bitset-attribute> parse-value): Rewrite.
247         (/attr-parse): Rewrite bitset default value processing.
248         (/attr-read): Pick out values of scalar attributes to distinguish
249         them from bitset values which are a list.
250         Fix spelling errors for processing of default values.
251         Handle string attributes.
252         (bitset-attr->list): Delete, all callers updated.
253         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
254         All callers updated.
255         (atlist-source-form): Rewrite.
256         * hardware.scm (<hardware-base> 'get-isas): Update recognition
257         of all isas.
258         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
259         -> (ISA foo bar).
260         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
261         values are now lists.
262         * mach.scm (def-isa-attr!): Update, bitset attribute values,
263         including the default, are now lists.
264         (all-isas-attr-value): Result is now a list.
265         * doc/rtl.texi: Clean up pass over attribute docs.
266
267         Change internal representation of rtx attribute values.
268         * attr.scm (/attr-val-is-rtx?): New function.
269         (attr-value): Call it.
270         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
271         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
272         Disallow rtx values for bitset attributes.
273         (/attr-read): Record rtx in default value as ((rtx-expr)).
274         (/attr-eval): Update.
275
276 2009-10-24  Doug Evans  <dje@sebabeach.org>
277
278         * gen-all-doc: Add sh.cpu.
279         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
280         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
281
282         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
283         (/gen-sfrag-case): Ditto.
284         * sim-cpu.scm (/gen-sem-case): Ditto.
285
286         * doc/rtl.texi: Add note that different ifields, operands, insns,
287         and minsns may occur with the same name in different isas.
288         Add note on the canonical form of rtl expressions.
289
290 2009-10-23  Doug Evans  <dje@sebabeach.org>
291
292         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
293         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
294
295         * decode.scm: Tweak various comments.
296         (/opcode-slots): Add FIXME.
297         (/build-decode-table-guts): Add assert.
298         * utils-sim.scm (/gen-set-itype-and-extract): New function.
299         (/gen-bracketed-set-itype-and-extract): New function.
300         (/gen-decode-default-entry): Rewrite.
301         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
302         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
303         updated.  Don't unnecessarily emit check for whether all opcode bits
304         have been examined.
305         (/gen-decode-expr-set-itype): Delete.
306         (/gen-decode-expr-entry): Update.
307         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
308         updated.  Keep track of decoder tables used thus far.
309         (/gen-decoder-switch): Ditto.
310         * utils.scm (word-bit-value): New function.
311
312 2009-10-14  Doug Evans  <dje@sebabeach.org>
313
314         * ifield.scm (<ifield>, value): Provide default initial value.
315         (ifield-encode-mode): Delete
316         (ifield-decode-mode): Delete duplicate definition.
317         (<derived-ifield>, 'make!): Initialize members encode, decode.
318         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
319         ifld-encode-mode.
320         (<multi-ifield>, 'gen-insert): Ditto.
321         
322 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
323
324         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
325         for @foo@_init_idesc_table.
326
327 2009-09-30  Doug Evans  <dje@sebabeach.org>
328
329         * doc/intro.texi: Mention SID.
330         * doc/sim.texi: Ditto.
331         * doc/porting.text (Doing a simulator port): Add some text.
332
333 2009-09-27  Doug Evans  <dje@sebabeach.org>
334
335         * cos.scm (/class-table): New global.
336         (/class-uid, /class-set-uid!): New functions.
337         (/class-parent-name): Renamed from /class-parents.
338         (/class-make!): Change parents arg to parent-name, all callers updated.
339         Assign uid to class.
340         (/class-lookup-uid): New function.
341         (/class-parent-classes): Rewrite.
342         (/class-mi?): Delete.
343         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
344         Delete.
345         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
346         (/class-compute-class-desc, class-desc-dump): Update.
347         (/object-make!): Update.
348         (/object-make-with-values!): Delete arg class-desc, all callers
349         updated.
350         (/object-copy): Delete arg top?, all callers updated.
351         (/object-specialize): Delete.
352         (/object-elements, /object-top-class): Delete.
353         (/object-class-name, /object-class-desc): Update.
354         (/object-class-uid): New function.
355         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
356         class-make, /class-subclass? /class-lookup-element,
357         Update.
358         (/elm-delta, elm-list): Delete.
359         (/elm-make-method-getter, elm-get, elm-xget): Update.
360         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
361         (elm-make-getter, elm-make-setter): Update.
362         (/method-lookup-next): Update.
363         (send): Don't specialize class passed to method.
364         (send-next): New arg class-name, all callers updated.
365         (/class-parent, /class-parent-via-path, object-parent): Delete.
366         (class-cons-parent!, class-append-parent!): Delete.
367         (object-reset!): Init /class-table.
368
369         * cos.scm (/object-debug-classes): Delete.
370         (/object-debug-elements, /object-debug-methods): Delete.
371
372         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
373         (method-proc): Delete.
374         (method-make-virtual!, method-make-virtual-forward!): Delete.
375         * ifield.scm (<ifield> field-start): Update.
376         (<ifield> field-length, pretty-print): Update.
377         (<multi-ifield> field-length, field-start, pretty-print): Update.
378         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
379         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
380         (<array> gen-sym-defn): Ditto.
381         (<hardware-base> gen-defn): Renamed from gen-defn.
382         (<hw-register> gen-type): Update.
383         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
384         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
385         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
386         (<hw-immediate> gen-type): Update.
387         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
388         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
389         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
390         (<array> gen-sym-defn): Ditto.
391         (<hardware-base> gen-defn): Renamed from gen-defn.
392         (<hw-register> gen-type): Update.
393         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
394         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
395         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
396         (<hw-immediate> gen-type): Update.
397         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
398
399 2009-09-25  Doug Evans  <dje@sebabeach.org>
400
401         * operand.scm (/anyof-merge-setter): Handle set-quiet.
402         * rtl.scm (rtx-single-set?): Handle set-quiet.
403
404         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
405         rtl-cover-fns?, macro?.  All callers updated.
406         (estate-make-for-normal-rtl-c): Delete, have all callers call
407         estate-make-for-rtl-c directly.
408         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
409         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
410
411         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
412         replaces /par-replace-set-dests.
413         (/par-replace-set-src-expr-fn): New function, replaces
414         /par-replace-set-srcs.
415         (s-parallel): Rewrite.
416
417         * rtl.scm (rtx-pretty-strdump): New function.
418         * rtl-traverse.scm (/rtx-canon-error): Use it.
419         (<eval-state>): New member outer-expr.
420         (estate-error): Include outer expression in error message if present.
421
422 2009-09-23  Doug Evans  <dje@sebabeach.org>
423
424         * xc16x.cpu (h-cr): New hardware.
425         (muls): Comment out parts that won't compile, add fixme.
426         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
427         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
428         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
429
430         Rewrite rtl processing to require it to be "canonicalized" first,
431         and write a full canonicalizer / expression checker.
432         Remove all appearances of DFLT in canonical rtl.
433         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
434         then rtx-simplify.
435         * iformat.scm (ifmt-analyze) Use canonical semantics.
436         * insn (<insn>): New member canonical-semantics.
437         * mach.scm (<arch>): New member multi-insns-instantiated?.
438         (/instantiate-multi-insns!): New function.
439         (/canonicalize-insns!): New function.
440         (arch-analyze-insns!): Canonicalize insn semantics before processing
441         them.
442         * mode.scm (/mode-set-word-params!): New function.
443         (mode-void?): New function.
444         (mode-compatible?): VOID is compatible with VOID.
445         (/mode-word-sizes-defined?): New global.
446         (mode-set-word-modes!): Use/set it.
447         (mode-ensure-word-sizes-defined): Update.
448         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
449         Redo WI/UWI/AI/IAI handling.
450         (op:new-mode): No longer accept DFLT.
451         (<derived-operand> constructor): Ensure all fields are initialized.
452         (<anyof-operand> constructor): Ditto.
453         (/derived-parse-ifield-assertion): Delete arg `args'.
454         All callers updated.
455         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
456         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
457         (rtl-c-expr, rtl-c++): Ditto.
458         (/rtl-c-get): Use mode of operand, not containing expression.
459         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
460         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
461         estate-for-insn? instead.
462         (s-unop): Use mode of expression, not first operand.
463         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
464         (s-sequence): Remove DFLT support.
465         (ifield): Use mode of expression, not UINT.
466         (pc): Comment out, unused.
467         (int-attr): New rtx kind.
468         (attr): Deprecate.
469         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
470         * rtl-traverse.scm (/rtx-canon-debug?): New global.
471         (/make-cstate): New function.
472         (/cstate-context, /cstate-outer-expr): New functions.
473         (/rtx-canon-error): New function.
474         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
475         /rtx-get-last-cond-case-rtx): New functions.
476         (/rtx-canon-*): New functions.
477         (/rtx-canner-table, /rtx-operand-canoners): New globals.
478         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
479         (/rtx-option, /rtx-option-list?): Rewrite.
480         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
481         Rewritten, all callers updated.
482         (/rtx-canon-expr, /rtx-canon): New functions.
483         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
484         (rtx-canonicalize-stmt): New function.
485         (tstate-make): Remove arg `set?'.  All callers updated.
486         (tstate-new-set?): Delete.
487         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
488         moved to /rtx-canon-*.
489         (/rtx-traverse-normal-operand): New function.
490         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
491         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
492         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
493         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
494         Ditto.
495         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
496         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
497         (/rtx-make-traverser-table): Update.
498         (/rtx-traverse-operands): Remove mode processing, now done during
499         canonicalization.
500         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
501         (/rtx-traverse): Ditto.
502         (rtx-init-traverser-tables!): New function.
503         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
504         (rtx-verify-no-dflt-modes): New function.
505         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
506         (rtx-simplify-insn): Use insn-canonical-semantics.
507         (rtx-canonicalize): Moved to rtl-traverse.scm.
508         (/compile-expr-fn, rtx-compile): Delete.
509         (/rtx-trim-rtx-list): New function.
510         (/rtx-trim-for-doc): Handle set, if.
511         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
512         (/rtx-valid-mode-types): Update.
513         (/rtx-valid-matches): Update.
514         (/rtx-find-matchexpr-index): New function.
515         (rtx-lookup): Require rtx-kind to be the rtx name.
516         (def-rtx-node): New arg result-mode, all callers updated.
517         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
518         (rtx-lazy-sem-mode): Delete.
519         (/rtx-closure-make): New arg `mode', all callers updated.
520         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
521         (rtx-operand-obj): Rewrite.
522         (rtx-make-xop): New functions.
523         (/hw): Renamed from `hw', all callers updated.
524         Use the correct mode instead of DFLT for the index.
525         (rtl-builtin!): Call rtx-init-traversal-tables!.
526         (rtl-finish!): Update.
527         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
528         Update mode arg-type.
529         (pc): Comment out.
530         (int-attr): New rtx kind.
531         (attr): Deprecate.
532         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
533         (/frag-cost-compute!): Ditto.
534         * semantics.scm (/build-operand!): Delete args op-name, op.
535         New arg op-expr.  All callers updated.
536         (/build-mem-operand!): Remove DFLT support.
537         (semantic-compile): Update process-expr!, mode arg deleted.
538         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
539         rtl-c++ calls.
540         (/gen-sem-case, /gen-sfrag-code): Ditto.
541         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
542         (/op-gen-set-trace): New function.  If not doing profiling, or using
543         the pbb engine, call /op-gen-set-quiet.
544         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
545         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
546         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
547         * utils.scm (find-first-index): New function.
548         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
549
550         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
551         to COMPARE.
552         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
553
554 2009-09-21  Doug Evans  <dje@sebabeach.org>
555
556         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
557         All callers updated.  Add FIXME.
558         (all rtx functions): Rename local estate to *estate*.  It's an
559         artificial argument added to the rtx, so make it stand out.
560
561         * openrisc.cpu (or32 isa): Fix setup-semantics.
562
563         * rtl.scm (rtx-class-*?): Delete, unused.
564         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
565
566         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
567         (init-reader!): Set /CGEN-RTL-VERSION to default.
568
569         * read.scm (cpu-load): Print load parameters.
570
571         * dev.scm (load-doc): Set verbose-level to 2.
572
573 2009-09-20  Doug Evans  <dje@sebabeach.org>
574
575         * rtl.scm (rtx-strdump): Use write instead of display.
576
577 2009-09-17  Doug Evans  <dje@sebabeach.org>
578
579         * utils-cgen.scm (obj-csv-names): New function.
580         * utils-sim.scm (/sfmt-contents): Use it in logging message.
581
582 2009-09-12  Doug Evans  <dje@sebabeach.org>
583
584         Clean up pass of mode handling.
585         Make use of mode name vs <mode> object more consistent and clear.
586         * hardware.scm (/keyword-read): Default mode to the mode name,
587         not the <mode> object.
588         (/hw-parse-indices): Parse mode name and pass mode object to
589         <hw-asm> constructor.
590         (/hw-parse-values): Ditto.
591         (<hw-register> parse!): Pass mode name to /hw-parse-indices
592         and /hw-parse-values.
593         (<hw-memory> parse!): Ditto.
594         (<hw-address> parse!): Ditto.
595         * mode.scm (/mode-table): New global, replaces mode-list.
596         Modes stored in hashtable instead of list.
597         (/mode-class-table): New global.
598         (mode-list-non-alias-values): Update.
599         (mode:eq?, mode-compatible?, mode:add!): Update.
600         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
601         (mode-maybe-lookup): New function.
602         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
603         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
604         (mode-find, mode-set-word-modes!): Update
605         (mode-ensure-word-sizes-defined): Update.
606         (/sort-mode-classes!): New function.
607         (mode-builtin!): Update.  Sort mode classes here.
608         (mode-finish!): Sort mode classes here too.
609         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
610         All callers updated.
611         (rtl-c-set-quiet): Allow mode to be name of object.
612         (rtl-c-set-trace): Ditto.
613         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
614         <mode> object.  All callers updated.
615         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
616         (rtx-lazy-sem-mode): Ditto.
617         (<rtx-temp> make!): Assert mode arg is a <mode> object.
618         (rtx-env-make): Allow var-list modes to be name or object.
619         * sem-frags.scm (/frag-expr-assq-locals): New function.
620         (/frag-compute-locals!): Call it.
621         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
622         All callers updated.
623         * semantics.scm (/build-mem-operand!): Handle mode aliases.
624
625         * sim-test.scm (*): Symbols no longer can be passed to string-append.
626
627 2009-09-10  Doug Evans  <dje@sebabeach.org>
628
629         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
630         Improve error message for missing or too many bits.
631         (/insn-parse): Don't verify iformat for virtual insns.
632         
633         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
634         non-multi-insns.
635         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
636         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
637         * sid.scm (pbb-engine-insns): Ditto.
638         * sim-decode.scm (cgen-decode.c): Ditto.
639
640 2009-09-09  Doug Evans  <dje@sebabeach.org>
641
642         * rtl-traverse.scm: Comment tweaks.
643         * rtl-xform.scm: Comment and reformatting tweaks.
644         * doc/rtl.texi: Add text to docs on ifield-assertions.
645
646         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
647         saving.
648
649         Add support for controlling warnings/errors.
650         Add tests for iformat description errors.
651         * dev.scm (cload): New option #:diag.
652         * read.scm (<reader>): New member verify-iformat?.
653         (/parse-diagnostic, parse-warning): New functions.
654         (parse-error): Guts moved to /parse-diagnostic.
655         (/set-diagnostic-options!): New function.
656         (cpu-load): New arg diagnostic-options, all callers updated.
657         Recognize -w diagnostic-option-list.
658         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
659         (ifld-simple-ifields, ifields-simple-ifields): New function.
660         * insn.scm (/parse-insn-format-iflds): New function.
661         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
662         New arg isa, all callers updated.  Do some basic validation of the
663         ifield list if requested.
664         * mach.scm (/sanity-check-insns): Improve error message text.
665         * doc/running.texi: Document -w option.
666         * doc/porting.texi: Document #:trace, #:diag options to cload.
667
668         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
669
670         * dev.scm (*): Change default verbosity level to 2.
671
672         * ifield.scm (<ifield> pretty-print): New method.
673         (ifld-pretty-print): New function.
674         (<multi-ifield> pretty-print): New method.
675
676         * ifield.scm (<ifield> field-start): Delete word-len arg.
677         All callers updated.
678         (ifld-start): Ditto.
679         (<multi-ifield> field-start): Ditto.
680         * operand.scm (<hw-index> field-start): Ditto.
681
682         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
683         total-bitsize.  All callers updated.
684         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
685         New member /insn-base-value.
686         (insn-base-value): New function.
687         * mach.scm (/sanity-check-insns): New function.
688         (arch-analyze-insns!): Call it.
689
690 2009-09-08  Doug Evans  <dje@sebabeach.org>
691
692         * iformat.scm (ifields-base-ifields): Simplify.
693         (compute-insn-length): Simplify, call ifields-base-ifields.
694         (compute-insn-base-mask): Ditto.
695         * ifield.scm (ifld-known-values): Ditto.
696         (ifld-base-ifields): Ditto.
697         * insn.scm (insn-value): Ditto.
698         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
699
700 2009-09-08  DJ Delorie  <dj@redhat.com>
701
702         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
703         preprocessor macro, not an enum.
704
705 2009-09-08  Doug Evans  <dje@sebabeach.org>
706
707         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
708         to string-append.
709         (*): Remove trailing ":" from error messages passed to estate-error.
710
711 2009-09-07  Doug Evans  <dje@sebabeach.org>
712
713         * types.scm (<struct>): Delete.
714
715         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
716         updated.
717         (/pmacro-loc-error): New function.
718
719         * mach.scm (/isa-parse-decode-assist): New function.
720         (/isa-parse): Call it.
721
722         * decode.scm (/get-subopcode-value): New function.
723         (/opcode-slots): Call it.
724         (/fill-slot!): Add logging message.
725
726         * cos.scm (/object-error): Convert symbols to strings before passing
727         to string-append.
728
729         * read.scm (rtl-version-equal?): New function.
730         (rtl-version-at-least?, rtl-version-older?): New functions.
731
732         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
733         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
734         rtl versions >= 0.9.
735         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
736
737 2009-09-03  Doug Evans  <dje@sebabeach.org>
738
739         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
740         is simple.
741
742 2009-09-01  DJ Delorie  <dj@redhat.com>
743
744         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
745         (parse_unsigned16_range): Likewise.
746         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
747         isa.
748
749 2009-09-01  Doug Evans  <dje@sebabeach.org>
750
751         Pmacro .equals -> .equal?
752         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
753         -pmacro-builtin-equals.  All callers updated.
754         (pmacros-init!): Rename .equals to .equal?.
755         * doc/pmacros.texi: Update.
756         * testsuite/pmacros-1.test: Update.
757
758         * doc/porting.texi: Work around texi2html bug where it doesn't
759         properly escape <> inside double-quotes inside @code.
760
761         * doc/porting.texi (Doing an opcodes port): Add step to specify
762         the .opc file.
763
764 2009-08-29  Doug Evans  <dje@sebabeach.org>
765
766         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
767         rtl version 0.7.
768         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
769
770 2009-08-27  Doug Evans  <dje@sebabeach.org>
771
772         Add do-count rtl function.
773         * rtl-c.scm (s-do-count): New function.
774         (do-count): New rtl handler.
775         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
776         (-rtx-make-traverser-table): Add ITERATION.
777         * rtl.scm (rtx-make-iteration-limit-var): New function.
778         (rtx-env-make-iteration-locals): New function.
779         * rtx-funcs.scm (do-count): New rtl function.
780         * cpu/play.cpu: Add do-count-test insn.
781         * doc/rtl.texi: Add docs on do-count.
782
783 2009-08-26  Doug Evans  <dje@sebabeach.org>
784
785         * read.scm (parse-error): Change error message output format
786         to match context-owner-error.
787         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
788         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
789         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
790         (operand): Call estate-error instead of context-error.
791         (local, delay): Ditto.
792         (ref, attr): Call estate-error instead of error.
793         * rtl-traverse.scm (tstate-error): New function.
794         (-rtx-traverse-error): Call tstate-error instead of context-error.
795         (-rtx-traverse-operands, -rtx-traverse): Ditto.
796         (estate-error): New function.
797         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
798         instead of error.
799         (e-if): Call estate-error instead of error.
800         * rtx-funcs.scm (error): Call estate-error instead of context-error.
801         (member): Ditto.
802         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
803         Rewrite to call context-owner-error.
804         (context-owner-error): New function.
805
806         * ifield.scm (<ifield> constructor): New arg `location',
807         all callers updated.
808         * insn.scm (<insn> constructor): Ditto.
809         (<multi-insn> constructor): Ditto.
810         * minsn.scm (<macro-insn> constructor): Ditto.
811         * operand.scm (<operand> constructor): Ditto.
812         * utils-cgen.scm (builtin-location): New function.
813         (<source-ident>): Fix default value of member `location'.
814         (source-ident?): New function.
815
816         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
817         (estate-push-env, estate-with-modifiers): Ditto.
818         (estate-deepen): New function.
819
820 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
821
822         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
823         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
824         routines.
825
826 2009-08-25  Doug Evans  <dje@sebabeach.org>
827
828         * doc/pmacros.texi (pmacro default argument values): Add text.
829
830 2009-08-23  Doug Evans  <dje@sebabeach.org>
831
832         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
833         Rename member prefix -> name-prefix.
834         (<keyword> getters): Update.
835         (-keyword-parse): Update.  Default enum-prefix to NAME-.
836         (-keyword-read): Update.  Don't compute default value for
837         enum-prefix here.
838         (define-keyword): Update.
839         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
840         * read.scm (cgen-rtl-version): New function.
841         (-supported-rtl-versions): Add (0 8).
842         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
843         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
844         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
845         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
846         Update, print-name -> enum-prefix, make uppercase.
847         Remove unnecessary name-prefix spec.
848         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
849         * cpu/ip2k.cpu (register-names): Ditto.
850         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
851         * cpu/sparc.cpu (gr-names): Ditto.
852         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
853         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
854         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
855         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
856         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
857         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
858         prefix -> name-prefix.
859         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
860         Update, print-name -> enum-prefix, make uppercase.
861         (drc-names, xf-names): Ditto.
862         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
863         * doc/rtl.texi (Keywords): New section.
864         (hardware indices): Update text.
865         (rtl versions): Add 0.8.
866
867         Add define-rtl-version.
868         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
869         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
870         (cgen-lang-fixlevel): Delete.
871         (-supported-rtl-versions): New variable.
872         (-cmd-define-rtl-version): New function.
873         (init-reader!): New command define-rtl-version.
874         (-cgen): Add rtl version to --version output.
875         * doc/rtl.texi: Document rtl version support.
876         * cpu/play.cpu: Add define-rtl-version.
877
878 2009-08-22  Doug Evans  <dje@sebabeach.org>
879
880         * Makefile.am (OPTIONS): Define.
881         (desc): Just generate <arch>-desc.[ch] files.
882         * Makefile.in: Regenerate.
883         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
884         no .opc file.
885         (cgen-desc.c): Similarly.
886         * gen-all-desc: New file.
887         * opcodes.scm (opc-file-provided?): New function.
888
889         * mach.scm (current-*-add!): Update calls to parse-error.
890         * operand.scm (op:new-mode): Update call to parse-error.
891         * utils-cgen.scm (make-obj-context): New function.
892
893         * NEWS: Copy over entries from 1.1 branch.
894
895 2009-08-20  Doug Evans  <dje@sebabeach.org>
896
897         * gas-test.scm (<keyword> test-data): Catch invalid requests,
898         flag a warning and compensate.
899         (<hw-address test-data): Tweak for readability.
900         (<hw-iaddress test-data): Ditto.
901         (cgen-build.sh): Convert symbols to strings before passing to
902         string-append.
903         (cgen-allinsn.exp): Ditto.
904
905         * doc/pmacros.texi (.splice): Add more text.
906
907 2009-08-19  Doug Evans  <dje@sebabeach.org>
908
909         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
910         distinguish from 1.1.
911         * configure: Regenerate.
912         * read.scm (-CGEN-VERSION): Update.
913         * doc/version.texi: Update.
914
915         New builtin .pmacro?.
916         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
917         (pmacros-init!): Add .pmacro?.
918         * doc/pmacros.text: Document .pmacro?.
919         * testsuite/pmacros-1.test: Test .pmacro?.
920
921         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
922         of a pmacro begins before its arguments are evaluated, improves
923         readability.
924
925         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
926         * testsuite/pmacros-1.test: Ditto.  Add better tests.
927
928         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
929         in assembler syntax.
930         (Operands): Similarly.
931
932 2009-08-18  Doug Evans  <dje@sebabeach.org>
933
934         * ifield.scm (ifld-encode-mode): Add FIXME.
935         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
936         modes.
937         (<ifield> gen-extract): Similarly.
938
939         * read.scm (parse-error): Handle #f for context-location.
940         * utils-cgen.scm (unspecified-location): Fix building of
941         single-location.
942
943         * doc/rtl.texi: Document how to write hex and boolean values.
944
945         * gas-test.scm (<hw-asm> test-data): Handle () values.
946         (<keyword> test-data): Convert symbols to strings before passing
947         to string-append.
948         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
949         result for scalars.
950
951         * operand.scm (hw-index-scalar): Set `name'.
952         (hw-index-anyof, hw-index-derived): Ditto.
953
954 2009-08-17  Doug Evans  <dje@sebabeach.org>
955
956         * pmacros.scm (-pmacro-builtin-internal-test): New function.
957         (pmacros-init!): Add .internal-test.
958         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
959         * testsuite/testsuite.cpu (internal-verify): New pmacro.
960         * doc/pmacros.text: Document .internal-test.
961
962         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
963         (parse-comment): Allow numbers.
964         * doc/porting.texi: Document that names and comments may be lists.
965
966         * insn.scm (-insn-parse): Fix typo.
967
968         Rename .eval -> .exec.  Add new .eval.
969         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
970         (-pmacro-builtin-eval): New function.
971         (pmacros-init!): Add .exec.
972         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
973         * testsuite/location-1.test: Update.
974         * testsuite/pmacros-1.test: Add test for .eval.
975
976 2009-08-16  Doug Evans  <dje@sebabeach.org>
977
978         * doc/porting.texi: Remove support for Guile 1.4.
979
980         * read.scm (current-reader-location): Return unspecified location
981         if reader hasn't been initialized yet.
982
983 2009-08-13  Doug Evans  <dje@sebabeach.org>
984
985         * dev.scm: Document tracing options.
986
987         * pmacros.scm (pmacro-dump): New function.
988         (check-pmacro): Tweak debugging output.
989         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
990         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
991
992         Add .let* pmacro builtin.
993         * pmacros.scm (-pmacro-builtin-let*): New function.
994         (pmacros-init!): Add .let*.
995         * doc/pmacros.texi: Document .let*.
996         * testsuite/pmacros-1.test: Test .let*.
997
998 2009-08-12  Doug Evans  <dje@sebabeach.org>
999
1000         Clean up cpu file parsing, pass context consistently instead of the
1001         old "errtxt" argument.
1002         NOTE: ACU == "All Callers Updated".
1003         * attr.scm (-parse-simple-attribute): Renamed from
1004         parse-simple-attribute, ACU.
1005         (-attr-parse): Change errtxt argument to context, ACU.
1006         (-attr-read): Ditto.
1007         (atlist-parse): Ditto.  Put context arg first.
1008         (attr-parse): Use parse-error instead of context-error.
1009         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1010         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1011         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1012         `context' arg is now a <context> object.  ACU.
1013         (-keyword-read): `context' arg is now a <context> object.  ACU.
1014         (-hw-parse-indices): Change errtxt argument to context, ACU.
1015         (-hw-parse-values, -hw-parse-handlers): Ditto.
1016         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1017         (-hw-validate-layout, -hw-create-getter-from-layout,
1018         -hw-create-setter-from-layout): Ditto.
1019         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1020         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1021         (<hw-address>:parse!): Ditto.
1022         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1023         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1024         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1025         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1026         * insn.scm (-insn-parse, -insn-read): Ditto.
1027         (parse-syntax): Ditto.  Put context arg first.
1028         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1029         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1030         (-parse-insn-format): Ditto.
1031         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1032         (-arch-parse-isas): Ditto.
1033         (-isa-read): Add context arg, ACU.
1034         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1035         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1036         context, ACU.
1037         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1038         (minsn-make-alias): Ditto.
1039         * mode.scm (-mode-parse): Ditto.
1040         (parse-mode-name): Ditto.  Put context arg first.
1041         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1042         errtxt argument to context, ACU.
1043         (-unit-parse, -model-parse, -model-read): Ditto.
1044         * operand.scm (-operand-parse-getter): Use parse-error instead of
1045         context-error.
1046         (-operand-parse-setter): Ditto.
1047         (-operand-parse): Change errtxt argument to context, ACU.
1048         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1049         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1050         * read.scm (reader-error): Delete.  Use parse-error instead.
1051         (parse-error): Change errtxt argument to context, ACU.  Split args
1052         argument into expr and maybe-help-text.
1053         (-reader-process-expanded-1!): Reorganize.
1054         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1055         * types.scm (parse-type): Ditto.
1056         * utils-cgen.scm (single-location->simple-string): New function.
1057         (<context>): Replace members file,lineno with location.
1058         (make-prefix-context): Renamed from context-make-prefix, ACU.
1059         (make-current-context): New function.
1060         (context-append, context-append-name): New functions.
1061         (context-make-reader): Delete.
1062         (parse-name): Change errtxt argument to context, ACU.
1063         Put context arg first.
1064         (parse-comment): Ditto.
1065         (parse-number): Change errtxt argument to context, ACU.
1066         (arg-list-validate-name, arg-list-check-no-args,
1067         arg-list-symbol-arg): Ditto.
1068
1069         * read.scm (-cmd-if): Don't assume test is a list.
1070
1071         * html.scm (get-insn-properties): Delete errtxt, unused.
1072
1073 2009-08-11  Doug Evans  <dje@sebabeach.org>
1074
1075         * doc/rtl.texi (hardware types): Add pc.
1076
1077 2009-08-07  Doug Evans  <dje@sebabeach.org>
1078
1079         Add -t option for tracing things like commands, pmacro expansion.
1080         * dev.scm (cload): New arg #:trace.
1081         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1082         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1083         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1084         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1085         (-reader-process-expanded-1!): Trace commands if requested.
1086         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1087         (-set-trace-options!): New function.
1088         (-init-reader!): New function.
1089         (cpu-load): New arg trace-options, all callers updated.
1090         Call -init-reader! and -set-trace-options!.
1091         (cgen-usage): Improve output formatting.
1092         (common-arguments): New option -t.
1093         (-cgen): Process -t.
1094         * utils-cgen.scm (single-location->string): Renamed from
1095         pretty-print-single-location.  All callers updated.
1096         (location->string): Renamed from pretty-print-location.
1097         All callers updated.
1098         (source-properties-location->string): New function.
1099         * doc/running.texi: Document -t.
1100
1101 2009-08-06  Doug Evans  <dje@sebabeach.org>
1102
1103         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1104         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1105         * utils.scm: ... here.
1106
1107 2009-08-05  Doug Evans  <dje@sebabeach.org>
1108
1109         Track source location better, for better error messages.
1110         * pmacros.scm (-pmacro-eval): Delete, unused.
1111         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1112         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1113         (scan-list, scan): Ditto.
1114         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1115         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1116         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1117         (scan-list1): New function.
1118         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1119         * read.scm (<reader>): New member `location'.
1120         (-reader-lookup-command): Renamed from reader-lookup-command,
1121         all callers updated.
1122         (reader-error): Rewrite to produce better source location info.
1123         (current-reader-location): New function.
1124         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1125         All callers updated.  Record source location of expression.
1126         (reader-process-expanded!): Renamed from reader-process-expanded.
1127         All callers updated.
1128         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1129         All callers updated.  Record source location of define-pmacro.
1130         * utils-cgen.scm (<location>): New class.
1131         (single-location): New (pseudo) class.
1132         (pretty-print-single-location, pretty-print-location): New functions.
1133         (location-top, location-push-single, location-push): New functions.
1134         (unspecified-location, current-input-location): New functions.
1135         (location-property): New object property.
1136         (location-property-set!): New function.
1137         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1138         All uses updated.
1139         * testsuite/location-1.test: New testcase.
1140         * testsuite/run-tests.sh: Fix fail count handling.
1141         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1142         to expect cgen to fail.
1143
1144         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1145
1146         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1147         (-cmd-if): Renamed from cmd-if.  All callers updated.
1148         Use reader-process-expanded! on then/else clauses instead of eval1.
1149
1150 2009-07-22  Doug Evans  <dje@sebabeach.org>
1151
1152         * modes.scm (TI,OI): New modes.
1153         * types.scm (parse-type): Improve error checking.  Don't hardwire
1154         mode names here.
1155         * utils.scm (non-negative-integer?): New function.
1156
1157         * pmacros.scm (-pmacro-builtin-find): New predicate.
1158         (pmacros-init!): Add .find.
1159         * doc/pmacros.tex: Document .find.
1160         * testsuite/pmacros-1.test: Test .find.
1161
1162 2009-07-20  Doug Evans  <dje@sebabeach.org>
1163
1164         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1165         commented out printfs.
1166         * rtl.scm (rtl-finish!): Whitespace tweaks.
1167         * model.scm (parse-insn-timing): Tweak logging message.
1168         * operand.scm: Comment and whitespace tweaks.
1169         (op:type): Tweak error message.
1170         (op-ifield): Tweak logging message.
1171         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1172         * read.scm: Whitespace cleanup.
1173         * utils.scm: Whitespace cleanup.
1174
1175 2009-07-19  Doug Evans  <dje@sebabeach.org>
1176
1177         Fix binding of nested pmacro parameters.
1178         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1179         All callers updated.
1180         (-pmacro-bulid-lambda): Ditto.
1181         * doc/pmacros.texi: Update.
1182         * testsuite/pmacros-1.test: Add testcase.
1183
1184         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1185         calculation.
1186         (-multi-ifield-make-default-extract): Ditto.
1187
1188         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1189         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1190         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1191         Define.
1192         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1193         * doc/rtl.texi: Update.
1194
1195         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1196
1197         Rename builtin boolean pmacros, for consistency with rtl.
1198         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1199         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1200         * doc/pmacros.texi: Update.
1201         * testsuite/pmacros-1.test: Update.
1202
1203 2009-07-17  Doug Evans  <dje@sebabeach.org>
1204
1205         Use hash tables to record ifields, operands, insns, macro-insns.
1206         * attr.scm (attr-builtin!): Tweak some comments.
1207         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1208         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1209         <ident>.
1210         (<multi-ifield>): New constructor.
1211         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1212         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1213         <ident>.
1214         (-sub-insn-make!): Add hack to avoid differences in generated code.
1215         (multi-insn-instantiate!): Add total number of multi-insns to
1216         logging message.
1217         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1218         minsn-list to foo-table.  New member next-ordinal.
1219         Update getters/setters.
1220         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1221         New functions.
1222         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1223         (-make-ident-object-table, -ident-object-table->list,
1224         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1225         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1226         -ifld-already-defined?): Rewrite.
1227         (current-op-list, current-op-add! current-op-lookup,
1228         -op-already-defined?): Rewrite.
1229         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1230         (current-insn-list, current-insn-add! current-insn-lookup,
1231         -insn-already-defined?): Rewrite.
1232         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1233         -minsn-already-defined?): Rewrite.
1234         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1235         (MAX-VIRTUAL-INSNS): Define.
1236         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1237         Update use of arch-insn-list.
1238         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1239         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1240         minsn-list.
1241         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1242         <ident>.  New constructor.
1243         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1244         <ident>.
1245         * sid.scm (-virtual-insn-add!): New function.
1246         (-create-virtual-insns!): Call it.
1247         (-fill-sim-insn-list!): Rewrite.
1248         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1249         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1250         * utils-cgen.scm (<ordered-ident>): New class.
1251         (obj-ordinal, obj-set-ordinal!): New functions.
1252         (add-ident-methods!): Delete.
1253
1254         * model.scm (parse-insn-timing): Change logging message to level 3.
1255
1256 2009-07-16  Doug Evans  <dje@sebabeach.org>
1257
1258         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1259         add a link to define-normal-insn-enum.
1260
1261         * doc/porting.texi (Conventions): Add docs on writing integers.
1262
1263         * cpu/simplify.inc (*): One line doc strings don't need \n.
1264         (df): Invoke define-full-ifield instead of claiming it's an alias.
1265         (dno): Define.
1266         (dnop): Mark as deprecated.
1267
1268         * cpu/play.cpu: Add example of hardware `layout'.
1269         * doc/porting.tex: Add docs on simplify.inc.
1270         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1271         and other things.
1272
1273         * ifield.scm: Whitespace/formatting cleanup.
1274
1275         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1276
1277         * read.scm (parse-error): Don't print single entry args as a list.
1278         (-reader-process-expanded-1): Convert symbol to string for
1279         string-append.
1280
1281         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1282
1283 2009-07-15  Doug Evans  <dje@sebabeach.org>
1284
1285         * cpu/simplify.inc (dno): New pmacro.
1286         * doc/porting.texi: Add section on simplify.inc.
1287         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1288
1289 2009-07-15  Doug Evans  <devans@sourceware.org>
1290
1291         * gen-all-doc: Generate index.html.
1292
1293 2009-07-13  Doug Evans  <dje@sebabeach.org>
1294
1295         Extend pmacro language, add testsuite.
1296         * Makefile.am (SUBDIRS): Add testsuite.
1297         * Makefile.in: Regenerate.
1298         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1299         testsuite/test-utils.sh.
1300         * configure: Regenerate.
1301         * dev.scm (cload): Handle testsuite app.
1302         (load-testsuite): New function.
1303         * pmacros.scm: (-pmacro-debug?): New global.
1304         (-smacro-table): New global.
1305         (-smacro-lookup, -smacro-set!): New functions.
1306         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1307         (-pmacro-syntactic-form?): New function.
1308         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1309         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1310         (-pmacro-expected-non-negative-integer): New function.
1311         (-pmacro-verify-non-negative-integer): New function.
1312         (-pmacro-expand-expr-list): New function.
1313         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1314         (-pmacro-process-args): Renamed from -pmacro-invoke.
1315         (-pmacro-apply, -smacro-apply): New functions.
1316         (-pmacro-expand): Rewrite syntactic form processing.
1317         (-pmacro-build-lambda): Reformat.
1318         (define-pmacro): Watch for more errors in definition.
1319         (pmacro-debug): New function.
1320         (pmacro-trace): Set/reset -pmacro-debug?.
1321         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1322         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1323         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1324         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1325         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1326         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1327         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1328         (pmacros-init!): Initialize -smacro-table.
1329         Rewrite pmacro initialization.
1330         * read.scm (reader-process-expanded): Renamed from
1331         -reader-process-expanded.  All callers updated.
1332         Recognize () as a no-op.
1333         (cpu-load): Tweak logging messages.
1334         * utils.scm (message): Add comment.
1335         * cpu/play.cpu: Add some instructions to play with .let.
1336         * doc/cgenint.texi: Move some debugging related docs to here from
1337         cgen.texi.
1338         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1339         * testsuite/Makefile.am: New file.
1340         * testsuite/Makefile.in: New file.
1341         * testsuite/test-utils.sh.in: New file.
1342         * testsuite/run-tests.sh: New file.
1343         * testsuite/testsuite.cpu: New file.
1344         * testsuite/pmacros-1.test: New file.
1345
1346         * decode.scm: Comment and formatting tweaks.
1347         (-build-decode-table-guts): Add more data to logging message.
1348
1349 2009-07-12  Doug Evans  <dje@sebabeach.org>
1350
1351         Delete files that now live in ../cpu.
1352         * cpu/iq10.cpu: Delete.
1353         * cpu/iq2000.cpu: Delete.
1354         * cpu/iq2000.opc: Delete.
1355         * cpu/iq2000m.cpu: Delete.
1356         * cpu/m32r.cpu: Delete.
1357         * cpu/m32r.opc: Delete.
1358
1359 2009-07-09  Doug Evans  <dje@sebabeach.org>
1360
1361         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1362         All callers updated.  Work around -ve shifts by referencing the
1363         entire value.
1364
1365         * utils.scm (message): Handle pairs.
1366
1367 2009-07-08  DJ Delorie  <dj@redhat.com>
1368
1369         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1370         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1371         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1372         written to.
1373
1374 2009-07-07  Doug Evans  <dje@sebabeach.org>
1375
1376         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1377         * cpu/play.opc: New file.
1378
1379         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1380         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1381         * doc/rtl.texi (Instructions): Update.
1382
1383         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1384         (opc-arguments, -OPC): Call set-opc-file-path!.
1385         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1386         (set-opc-file-path!): New function.
1387         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1388
1389         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1390         before passing to gen-c-args.
1391
1392 2009-07-06  DJ Delorie  <dj@redhat.com>
1393
1394         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1395         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1396         unspecified accesses to control registers.
1397
1398 2009-07-01  DJ Delorie  <dj@redhat.com>
1399
1400         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1401         unspecified accesses to control registers.
1402
1403         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1404         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1405
1406 2009-06-27  Doug Evans  <dje@sebabeach.org>
1407
1408         * gen-all-intrinsics: New file.
1409
1410 2009-06-24  Doug Evans  <dje@sebabeach.org>
1411
1412         * All *.scm files: Update copyright year.
1413         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1414
1415 2009-06-23  DJ Delorie  <dj@redhat.com>
1416
1417         * intrinsics.scm: Updates to support IVC2.
1418         (belongs-to-group?): Check IVC2 slots.
1419         (-slots-attribute): New.
1420         (targets::attributes): Add SLOTS.
1421         (target:add-well-known-intrinsics): Add CPMOV.
1422         (md-insn): Add CPTYPE and CRET?.
1423         (add-md-insn): Likewise.
1424         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1425         duplicate insns with different bit patterns.
1426         (write-cgen-insn?): Add cret? support.
1427         (intrinsics.h): Add vector types.
1428         (runtime-op): Add vector support.
1429         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1430
1431         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1432         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1433         (h-cr-ivc2): Default to typeless.
1434         (h-ccr-ivc2): Fix register width.
1435         (SLOTS): Fix values and default.
1436         (ivc2_*): Add control register names.
1437         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1438
1439         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1440         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1441
1442 2009-06-22  Doug Evans  <dje@sebabeach.org>
1443
1444         * semantics.scm (insn-build-known-values): Fix typo in comment.
1445
1446 2009-06-21  Doug Evans  <dje@sebabeach.org>
1447
1448         * rtl-xform.scm (rtx-simplify-insn): New function.
1449         * html.scm (gen-insn-docs): Call it.
1450         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1451         * iformat.scm (ifmt-analyze): Minor simplification.
1452
1453         * semantics.scm (semantic-compile): Change arg sem-code-list to
1454         sem-code.
1455         (semantic-attrs): Ditto.
1456         * iformat.scm (ifmt-analyze): Update.
1457         (ifmt-compute!): Update.
1458         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1459         rtl-xform.scm.
1460         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1461         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1462         * semantics.scm (rtx-simplify): Ditto.
1463         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1464         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1465         (-simplify-expr-fn): Move to rtl-xform.scm.
1466         (-solve-expr-fn, rtx-solve): Ditto.
1467         * rtl-xform.c: New file.
1468         * read.scm: Load it.
1469
1470         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1471         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1472         (-rtx-traverse, rtx-traverse): Ditto.
1473
1474 2009-06-20  Doug Evans  <dje@sebabeach.org>
1475
1476         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1477
1478         * configure.in: Update version to 1.1.
1479         * configure: Regenerate.
1480         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1481
1482 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1483             Doug Evans  <dje@sebabeach.org>
1484
1485         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1486         (cgen-desc.c): Ditto.
1487         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1488         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1489         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1490         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1491         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1492         (cgen-cpuall.h, cgen-ops.c): Ditto.
1493         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1494         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1495         (cgen-sem-switch.c): Ditto.
1496         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1497         * sim-model.c (cgen-model.c): Ditto.
1498
1499 2009-06-18  Doug Evans  <dje@sebabeach.org>
1500
1501         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1502
1503         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1504
1505         * dev.scm (cload): Change #:arch argument to take the path to the
1506         .cpu file instead of just the name of the architecture.
1507         * read.scm (arch-path): Remove trailing '/'.
1508         (cpu-load): Set `arch-path' to directory of .cpu file.
1509         (-cgen): Don't set `arch-path' here.
1510         (include): Update.
1511         * doc/porting.texi: Update.
1512
1513 2009-06-14  Doug Evans  <dje@sebabeach.org>
1514
1515         * gen-all-doc: Use files in ../cpu where possible.
1516
1517         * Makefile.am (ARCHFILE): Fix path.
1518         * Makefile.in: Regenerate.
1519         * html.scm: Use "pre" instead of "plaintext".
1520
1521         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1522         * doc/app.texi: Cleanup pass.
1523         * doc/cgen.texi: Cleanup pass.
1524         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1525         * doc/intro.texi: Cleanup pass.
1526         * doc/mdate-sh: New file.
1527         * doc/opcodes.texi: Cleanup pass.
1528         * doc/pmacros.texi: Cleanup pass.
1529         * doc/porting.texi: Cleanup pass.
1530         * doc/rtl.texi: Cleanup pass.
1531         * doc/running.texi: Cleanup pass.  Document more runtime options.
1532         * doc/stamp-vti: Update.
1533         * doc/version.texi: Update.
1534
1535         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1536         (GUILE): Fix definition.
1537         * Makefile.in: Regenerate with automake 1.9.6.
1538         * aclocal.m4: Regenerate with aclocal 1.9.6.
1539         * configure.in (AC_PREREQ): Set to 2.59.
1540         (GENINSRC_NEVER): Define.
1541         * configure: Regenerate with autoconf 2.59.
1542         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1543         (cgen.info,cgen.dvi): Delete.
1544         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1545         (noinst_TEXINFOS): Add cgenint.texi.
1546         (DOCFILES): Add missing files.
1547         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1548         * doc/Makefile.in: Regenerate with automake 1.9.6.
1549
1550         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1551
1552         * attr.scm: Removing trailing whitespace.
1553         * cgen-intrinsics.scm: Ditto.
1554         * cgen-sim.scm: Ditto.
1555         * cos.scm: Ditto.
1556         * enum.scm: Ditto.
1557         * guile.scm: Ditto.
1558         * sim.scm: Ditto.
1559
1560 2009-05-28  DJ Delorie  <dj@redhat.com>
1561
1562         * cpu/mep.opc (parse_signed16_range): New.
1563         (parse_unsigned16_range): New.
1564         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1565
1566 2009-05-26  DJ Delorie  <dj@redhat.com>
1567
1568         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1569         accumulator names.
1570         (f-ivc2-ccrn-c3hi): New.
1571         (f-ivc2-ccrn-c3lo): New.
1572         (f-ivc2-ccrn-c3): New.
1573         (ivc2c3ccrn): Use it.
1574
1575 2009-05-22  DJ Delorie  <dj@redhat.com>
1576
1577         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1578         (mep_config_map): Regenerate.
1579
1580         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1581         ivc2-specific names.
1582         (simm8p20): New.
1583         (cmovc): move to after field definitions, use ivc2-specific
1584         register names.
1585         (cpmovi_b_P0S_P1): New.
1586         
1587 2009-05-19  DJ Delorie  <dj@redhat.com>
1588
1589         * cpu/mep.opc: Regenerate configuration.
1590         (parse_cdisp10): Only check CPU flags, not COP flags.
1591         (check_configured_mach): Likewise.
1592
1593 2009-05-13  DJ Delorie  <dj@redhat.com>
1594
1595         * intrinsics.scm (insns.md): Add RTL predicates.
1596         (intrinsics.h): Remove old C intrinsics.
1597
1598 2009-04-29  DJ Delorie  <dj@redhat.com>
1599
1600         * mep-ivc2.cpu: New.
1601         * mep-core.cpu: Regenerated.  Add support for deferred register
1602         writes.
1603         (SLOT): Add IVC2 slot types.
1604         (sim-syscall): Rename to something more appropriate.
1605         * mep-ext-cop.cpu: Regenerate.
1606         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1607         (print_slot_insn): New.
1608         (mep_examine_ivc2_insns): New.
1609         (mep_print_insn_set_ivc2_mode): New.
1610         (mep_print_insn): Support IVC2 slotting.
1611         
1612 2009-04-20  DJ Delorie  <dj@redhat.com>
1613
1614         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1615         (guess-mode): Drop COP* syntax.
1616         (need-insn): Add "--syscall--" to the list.
1617         (enum-type): Drop COP* syntax.
1618         (intrinsics.h): Likewise.
1619         (intrinsic-protos.h): Change file header to allow it to be
1620         included.
1621
1622 2009-04-17  DJ Delorie  <dj@redhat.com>
1623
1624         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1625         (lhucpm1): Limit to C5 mach.
1626         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1627         * cpu/mep-core.cpu (extend-cdisp10): New.
1628         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1629         
1630 2009-04-08  DJ Delorie  <dj@redhat.com>
1631
1632         * cpu/mep-c5.cpu: New.
1633         * cpu/mep-core.cpu: Add C5 support.
1634         * cpu/mep.opc: Likewise.
1635
1636 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1637
1638         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1639         about calling memset with a zero length.
1640
1641 2009-02-03  DJ Delorie  <dj@redhat.com>
1642
1643         * cpu/mep-core.cpu: Update to new MeP configuration.
1644         * cpu/mep-ext-cop.cpu: Likewise.
1645         * cpu/mep.opc: Likewise.
1646
1647 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1648
1649         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1650
1651 2008-06-17  Dave Brolley  <brolley@redhat.com>
1652
1653         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1654         (h-gr): Likewise.
1655
1656 2007-11-13  Dave Brolley  <brolley@redhat.com>
1657
1658         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1659
1660 2007-11-05  Dave Brolley  <brolley@redhat.com>
1661
1662         * intrinsics.scm,cgen-intrinsics.scm: New application which
1663         generates code to support intrinsic functions for insns in the
1664         mep architecture in gcc.
1665
1666 2007-09-21  Dave Brolley  <brolley@redhat.com>
1667
1668         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1669         (rn3us): CDATA attribute now LONG.
1670         
1671 2007-08-21  Dave Brolley  <brolley@redhat.com>
1672
1673         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1674         than 32 bits.
1675
1676 2007-07-05  Nick Clifton  <nickc@redhat.com>
1677
1678         * utils.scm (copyright-fsf): Update copyright notice to refer to
1679         the GPL version 3.
1680
1681 2007-05-22  Nick Clifton  <nickc@redhat.com>
1682
1683         * doc/cgen.texi: Use @copying around the copyright notice.
1684         * doc/internals.texi: Likewise.
1685
1686 2007-02-05  Dave Brolley  <brolley@redhat.com>
1687
1688         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1689
1690 2007-02-05  Dave Brolley  <brolley@redhat.com>
1691
1692         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1693         in the generated code for @arch@_cgen_init_asm if it is defined.
1694
1695         * Contribute the following changes:
1696         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1697
1698         * attr.scm (<string-attribute>): New attribute class.
1699         (attr-kind): Handle <string-attribute>.
1700         (parse-simple-attribute): New function.
1701         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1702         (<bitset-attribute> 'parse-value): Likewise.
1703         (<boolean-attribute> 'parse-value): Likewise.
1704         (<enum-attribute> 'parse-value): Likewise.
1705         (<string-attribute> 'parse-value): New function.
1706         (-attr-parse): Handle <string-attribute>.
1707         (-attr-read): Likewise.
1708         (<string-attribute> 'gen-value-for-defn-raw): New function.
1709         (<string-attribute> 'gen-value-for-defn): New function.
1710
1711 2006-11-07  Dave Brolley  <brolley@redhat.com>
1712
1713         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1714         necessary.
1715
1716 2006-10-18  Dave Brolley  <brolley@redhat.com>
1717
1718         * Contribute the following changes:
1719
1720         2006-07-11  Dave Brolley  <brolley@redhat.com>
1721
1722         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1723         (movcol): New insn.
1724         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1725         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1726         hardware or memory mode which was used.
1727         * sid-cpu.scm (hw-need-write-stack?): New function.
1728         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1729         identify hardware which uses write stacks.
1730         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1731         Initialized to an empty list.
1732         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1733         hw-need-write-stack?.
1734         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1735         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1736         (used-in-delay-rtl?): New method of <hardware-base>.
1737         (hw-used-in-delay-rtl?): New function.
1738
1739         2006-06-20  Dave Brolley  <brolley@redhat.com>
1740
1741         * sid.scm (gen-attr-type): Removed.
1742         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1743         (SH2a-MACH): Add sh5.
1744         (sh2a-nofpu-models): Add units for sh5.
1745         (sh2a-fpu-models): Likewise.
1746
1747         2006-06-15  Dave Brolley  <brolley@redhat.com>
1748
1749         * cpu/sh-sim.cpu: New file.
1750         * cpu/sh-sid.cpu: New file.
1751         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1752         (All fields): Remap for (insn-lsb0? #f)
1753         (All insns): Add timing specs.
1754         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1755         'xattrs' and .splice it in.
1756         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1757         (h-frc,h-drc): Add PROFILE attribute.
1758         (h-fpccr): Removed.
1759         (h-vbr): New hardware.
1760         (All fields): Remap for (insn-lsb0? #f)
1761         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1762         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1763         (fpscr): Use h-fpscr.
1764         (fsdm,fsdn): Use h-fsd.
1765         (dshci): Add xtiming argument and splice it in.
1766         (dr,xd): pmacros removed.
1767         (All insns): Add timing specs, *-MACH attribibutes,
1768         SH4{A}-GROUP attributes.
1769         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1770         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1771         we're being processed for sim or sid.
1772         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1773         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1774         (define-isa compact): Add (isa-parallel-insns 2).
1775         (define-isa media): Add (isa-parallel-insns 2). Add
1776         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1777         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1778         sh4a, sh4al
1779         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1780         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1781         (SH4al-MACH, SH5-MACH): New pmacros.
1782         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1783         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1784         (sh5-media-fp-units, common-model, common-model-with-fp) 
1785         (sh3-model, sh3e-model): New pmacros.
1786         (define-model sh2): New model.
1787         (define-model sh2e): New model.
1788         (define-model sh3): New model.
1789         (define-model sh3e): New model.
1790         (define-model sh2a-nofpu): New model.
1791         (define-model sh2a-fpu): New model.
1792         (define-model sh4-nofpu): New model.
1793         (define-model sh4): New model.
1794         (define-model sh4a-nofpu): New model.
1795         (define-model sh4a): New model.
1796         (define-model sh4al): New model.
1797         (define-model sh5-media): New model.
1798         (define-model sh5): Add all units.
1799         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1800         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1801         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1802         (h-pc): Add PROFILE attribute.
1803         (h-fr): Likewise.
1804         (h-tr): Likewise.
1805         (h-gr,h-grc): Likewise.
1806         (h-cr): Set h-sr in setter.
1807         (h-frbit): Get/Set h-fpscr.
1808         (h-szbit,h-prbit): Likewise.
1809         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1810         Add getter and setter.
1811         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1812         Adjust getter and setter.
1813         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1814         Adjust getter and setter.
1815         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1816         (h-fsd,h-fmov): New hardware.
1817
1818 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1819
1820         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1821         doc/notes.texi, doc/porting.texi, doc/running.texi,
1822         doc/sim.texi: Fix some typos.
1823
1824 2006-07-14  Dave Brolley  <brolley@redhat.com>
1825
1826         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1827         hardware or memory mode which was used.
1828         * sid-cpu.scm (hw-need-write-stack?): New function.
1829         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1830         identify hardware which uses write stacks.
1831         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1832         Initialized to an empty list.
1833         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1834         hw-need-write-stack?.
1835         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1836         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1837         (used-in-delay-rtl?): New method of <hardware-base>.
1838         (hw-used-in-delay-rtl?): New function.
1839
1840 2006-06-20  Dave Brolley  <brolley@redhat.com>
1841
1842         * sid.scm (gen-attr-type): Removed.
1843
1844 2006-05-10  Dave Brolley  <brolley@redhat.com>
1845
1846         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1847         support for (if (application-is? <appname>) (...) (...)).
1848         (-cgen): Add trailing "/" to arch-path.
1849         * utils.scm (dirname): Removed. dirname is a primitive function.
1850
1851 2006-05-09  Dave Brolley  <brolley@redhat.com>
1852
1853         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1854         'entire_insn' not 'base_insn'.
1855         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1856         is null.
1857         * sim.scm (-gen-arch-model-decls): Likewise.
1858         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1859         abuf->written if profiling.
1860         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1861         object->string om the mode.
1862         (-hw-gen-write-stack-decl): Likewise.
1863         * read.scm (include): Use arch-path as file location.
1864         (arch-path): Define it with a default setting.
1865         (-cgen): Update arch-path when "-a" option is specified.
1866         * utils.scm (dirname): New function.
1867
1868 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1869
1870         * configure.in: Remove AC_ARG_PROGRAM.
1871         * configure: Regenerate with autoconf 2.59.
1872
1873 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1874
1875         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1876         SIMULATOR.
1877
1878 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1879
1880         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1881         or an error message otherwise.
1882         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1883         Fix up comments to correctly describe the functions.
1884
1885 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1886             Anil Paranjape   <anilp1@kpitcummins.com>
1887             Shilin Shakti    <shilins@kpitcummins.com>
1888
1889         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1890         CPU description.
1891         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1892
1893 2006-02-10  Nick Clifton  <nickc@redhat.com>
1894
1895         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1896
1897 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1898
1899         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1900         for concatenation.
1901         (-hw-gen-write-stack-decl): Likewise.
1902
1903 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1904
1905         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1906         non-(adata-integral-insn? CURRENT-ARCH) case.
1907
1908 2005-10-28  Dave Brolley  <brolley@redhat.com>
1909
1910         Contribute the following changes:
1911         2005-09-19  Dave Brolley  <brolley@redhat.com>
1912
1913         * attr.scm (gen-value-for-defn-raw): New methods.
1914         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1915         gen-value-for-defn-raw.
1916         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1917
1918         2002-12-13  Dave Brolley  <brolley@redhat.com>
1919
1920         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1921         (-gen-attr-accessors): New function.
1922         (gen-obj-attr-defn): Update terminating initializer.
1923         (gen-obj-attr-end-defn): New function.
1924         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1925         * sid-cpu.scm (cgen-desc.h): Generate code to include
1926         "opcode/cgen-bitset.h"
1927         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1928         name.
1929         * desc.scm ('gen-defn): Update terminating initializer.
1930         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1931         terminatinig initializer.
1932         (gen-hw-decls): Ditto.
1933         (gen-operand-decls): Ditto.
1934         (gen-insn-decls): Ditto.
1935         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1936         (gen-insn-table): Update terminating initializer.
1937         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1938         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1939         * attr.scm (charmask-bytes): New function.
1940         (bitset-attr->charmask): New function.
1941         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1942         differences for SID-SIMULATOR.
1943         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1944         (<enum-attribute>): Ditto.
1945
1946 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1947
1948         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1949
1950 2005-10-24  DJ Delorie  <dj@redhat.com>
1951
1952         * operand.scm (-anyof-merge-syntax): Print a more useful error
1953         message.
1954
1955 2005-10-19  Nick Clifton  <nickc@redhat.com>
1956
1957         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1958         patch.
1959
1960 2005-10-18  Andreas Schwab  <schwab@suse.de>
1961
1962         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1963
1964 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1965
1966         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1967         size.
1968
1969 2005-08-02  Dave Brolley  <brolley@redhat.com>
1970
1971         * rtl-c.scm (s-unop): Don't dereference
1972         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1973         (s-binop, s-convop, s-cmpop): Likewise.
1974
1975 2005-07-29  Dave Brolley  <brolley@redhat.com>
1976
1977         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1978         if with-profile or with-parallel-write.
1979         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1980         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1981         string-append.
1982
1983 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1984
1985         * cpu/fr30.opc (print_register_list): Correct format strings.
1986         * cpu/ip2k.opc: Likewise.
1987
1988 2005-07-05  Nick Clifton  <nickc@redhat.com>
1989
1990         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1991         unsigned in order to avoid compile time warnings about sign
1992         conflicts.
1993
1994 2005-07-01  Nick Clifton  <nickc@redhat.com>
1995
1996         * desc-cpu.scm: Update to ISO C90 function declaration style.
1997         * opc-asmdis.scm: Likewise.
1998         * opc-ibld.scm: Likewise.
1999         * opc-itab.scm: Likewise.
2000         * cpu/fr30.opc: Likewise.
2001         * cpu/i960.opc: Likewise.
2002         * cpu/ip2k.opc: Likewise.
2003         * cpu/iq2000.opc: Likewise.
2004         * cpu/m32r.opc: Likewise.
2005         * cpu/openrisc.opc: Likewise.
2006         * cpu/sh.opc: Likewise.
2007         * cpu/sparc.opc: Likewise.
2008         * cpu/xstormy16.opc: Likewise.
2009
2010 2005-06-15  Dave Brolley  <brolley@redhat.com>
2011
2012         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2013         (cgen-cpu.h): Call it.
2014
2015         Contributed on behalf of Graydon Hoare
2016         2001-06-05  graydon hoare  <graydon@redhat.com>
2017
2018         * utils.scm (foldl): Define.
2019         (foldr): Define.
2020         (filter): Define.
2021         (union): Define.
2022         (intersection): Simplify.
2023         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2024         (-op-gen-delayed-set-maybe-trace): Define.
2025         (<operand> 'gen-set-{quiet,trace}): Delegate to
2026         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2027         up and needs cleaning.
2028         (-with-parallel?): Hardwire with-parallel to #t.
2029         (<operand> 'cxmake-get): Replace with lookahead-aware code
2030         * sid-decode.scm: Remove per-insn writeback fns.
2031         (-gen-idesc-decls): Redefine sem_fn type.
2032         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2033         with write stack stuff.
2034         (cgen-write.cxx): Replace per-insn writebacks with single write
2035         stack writeback. Add write stack reset function.
2036         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2037         stack stuff.
2038         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2039         estate attribute set.
2040         (delay): Set #:delayed attribute to calculated delay, update
2041         maximum delay of cpu, check (delay ...) usage.
2042         * operand.scm (<operand>): Add delayed slot to <operand>.
2043         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2044         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2045         * doc/rtl.texi (Expressions): Add section on (delay ...).
2046
2047 2005-06-13  Jim Blandy  <jimb@redhat.com>
2048
2049         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2050         as well as strings.
2051
2052 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2053
2054         * doc/porting.texi: Change all mention of md_apply_fix3 and
2055         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2056         respectively.
2057
2058 2005-05-18  Dave Brolley  <brolley@redhat.com>
2059
2060         * utils-sim.scm (-gen-decode-default-entry): New function.
2061         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2062         code to check that all opcodes bits match.
2063         (-gen-decoder-switch): Use -gen-decode-default-entry.
2064
2065 2005-05-16  Jim Blandy  <jimb@redhat.com>
2066
2067         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2068         fetched by one of our GETIMEM* methods.
2069         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2070         base-insn-sized chunks.
2071
2072 2005-05-10  Nick Clifton  <nickc@redhat.com>
2073
2074         * Update the address and phone number of the FSF organization in
2075         the GPL notices in the following files:
2076         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2077         cpu/powerpc.cpu, slib/random.scm
2078
2079 2005-05-06  Jim Blandy  <jimb@redhat.com>
2080
2081         * pprint.scm, cos-pprint.scm: Add documentation.
2082
2083         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2084
2085         * pprint.scm, cos-pprint.scm: New files.
2086
2087 2005-04-04  Nick Clifton  <nickc@redhat.com>
2088
2089         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2090         avoid a compile time warning.
2091
2092 2005-03-18  Nick Clifton  <nickc@redhat.com>
2093
2094         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2095         "percent-operand" from "%operand" as the latter confuses xgettext
2096         into thinking that it is a C printf formating directive, which
2097         prevents proper translation.
2098
2099 2005-02-23  Nick Clifton  <nickc@redhat.com>
2100
2101         * opcodes.scm (gen-parse-number): Add a cast to the desired
2102         pointer signed'ness in order to prevent compile time warnings.
2103         * cpu/ip2k.opc: Fixed compile time warnings about differing
2104         signed'ness of pointers passed to functions.
2105         * cpu/iq2000.opc: Likewise.
2106         * cpu/m32r.opc: Likewise.
2107         * cpu/openrisc.opc: Likewise.
2108         * cpu/xstormy16.opc: Likewise.
2109
2110 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2111
2112         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2113         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2114
2115 2005-02-16  Dave Brolley  <brolley@redhat.com>
2116
2117         * utils.scm: Update copyright years.
2118         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2119         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2120         * operand.scm (-derived-operand-parse): Move logit message from level 1
2121         to level 2.
2122
2123 2005-02-15  Nick Clifton  <nickc@redhat.com>
2124
2125         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2126         prevent compile time warning messages.
2127         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2128         * utils-gen.scm (attr-int-gen-defn): Likewise.
2129         (attr-gen-defn): Likewise.
2130         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2131         (print_dollarhex16): Remove unused function.
2132
2133 2005-02-15  Jim Blandy  <jimb@redhat.com>
2134
2135         * guile.scm (cgen-call-with-debugging): Doc fix.
2136
2137         Make backtraces work more reliably.
2138         * guile.scm: Set up debugging parameters, and enable debugging and
2139         source positions while loading.
2140         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2141         functions.
2142         * read.scm: Don't set debugging parameters here.
2143         (catch-with-backtrace): Function deleted.
2144         (-cgen): Simply note the presence or absence of the -b option.
2145         Pass the flag to cgen-call-with-debugging, so debugging is turned
2146         off here if the user didn't request it, for faster computation.
2147         (cgen): Call cgen-debugging-stack-start here, instead of
2148         catch-with-backtrace.
2149
2150         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2151         trailing -s.
2152         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2153         Don't write out the trailing -s here.
2154         * Makefile.in: Regenerated.
2155         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2156         fixup.scm here; let the caller decide which Scheme's customization
2157         file to preload.
2158         * dev.scm: Load guile.scm, not fixup.scm.
2159         * fixup.scm: Deleted; contents have all moved to guile.scm.
2160         * README: Doc fix.
2161
2162         * guile.scm (debug-write): New function.
2163
2164 2005-02-14  Jim Blandy  <jimb@redhat.com>
2165
2166         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2167         transformer procedure, not eval.  Transformer procedures take one
2168         argument.
2169
2170 2005-02-11  Nick Clifton  <nickc@redhat.com>
2171
2172         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2173         to 'bfd_vma *' in order avoid compile time warning message.
2174
2175 2005-02-09  Jim Blandy  <jimb@redhat.com>
2176
2177         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2178         corresponding change in the sim/common directory.)
2179
2180 2005-02-07  Jim Blandy  <jimb@redhat.com>
2181
2182         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2183         changes in the opcodes directory.)
2184
2185         * guile.scm: New file, containing Guile-specific definitions and
2186         adaptations.  This is loaded by the app-specific shell scripts.
2187         Initially identical to fixup.scm.
2188         * cgen-sid.scm: Don't load fixup.scm here.
2189
2190         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2191         latter is a macro.
2192
2193 2005-01-27  Jim Blandy  <jimb@redhat.com>
2194
2195         * utils.scm (string/symbol->append): Renamed from 'concat'.
2196         * opcodes.scm (gen-switch): Use new name.
2197         * insn.scm (-sub-insn-make!): Same.
2198         * rtl.scm (rtx-dump): Same.
2199         * semantics.scm (semantic-compile): Same.
2200
2201 2005-01-20  Jim Blandy  <jimb@redhat.com>
2202
2203         * opcodes.scm (gen-switch): Use concat instead of string-map.
2204
2205         * utils.scm (concat): New function.
2206         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2207         * rtl.scm (rtx-dump): Same.
2208         * semantics.scm (semantic-compile): Same.
2209
2210 2004-12-16  Jim Blandy  <jimb@redhat.com>
2211
2212         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2213         applied to symbols.  Process everything as strings, and then
2214         convert to a symbol at the end.
2215
2216         * read.scm (debug-repl): Temporarily redirect input and output to
2217         /dev/tty while we debug, so we don't interfere with whatever CGEN
2218         is reading or writing.
2219         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2220         New functions.
2221
2222 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2223
2224         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2225         will work with newer versions of guile.
2226
2227 2004-10-27  Nick Clifton  <nickc@redhat.com>
2228
2229         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2230         * cpu/iq2000.cpu: Likewise.
2231
2232 2004-07-21  DJ Delorie  <dj@redhat.com>
2233
2234         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2235
2236 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2237
2238         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2239         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2240
2241 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2242
2243         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2244
2245 2004-03-22  Dave Brolley  <brolley@redhat.com>
2246
2247         * utils.scm (copyright-fsf): Update copyright years.
2248         (copyright-red-hat): Ditto.
2249         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2250         code.
2251         (-op-gen-set-trace-parallel): Ditto.
2252
2253 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2254
2255         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2256         disassembling codes for 0x*2 addresses.
2257
2258 2004-01-29  Dave Brolley  <brolley@redhat.com>
2259
2260         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2261         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2262         in the extra bit positions.
2263
2264 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2265
2266         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2267
2268 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2269
2270         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2271         "short" being 16 bit.
2272         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2273         internationalize error message.
2274         (parse_lo16): Likewise.  Remove useless code.
2275
2276 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2277
2278         * cpu/m32r.cpu : Add new model m32r2.
2279         Add new instructions.
2280         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2281         Changed PIPE attr of push from O to OS.
2282         Care for Little-endian of M32R.
2283         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2284         Care for Little-endian of M32R.
2285         (parse_slo16): signed extension for value.
2286
2287 2003-10-26  Dave Brolley  <brolley@redhat.com>
2288
2289         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2290         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2291         (-gen-extract-fn): Call -gen-record-profile-args.
2292
2293 2003-10-21  Dave Brolley  <brolley@redhat.com>
2294
2295         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2296         a static const int.
2297         * decode.scm (-opcode-slots): Correct typo in logit call.
2298
2299 2003-10-09  Jim Blandy  <jimb@redhat.com>
2300
2301         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2302         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2303
2304         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2305
2306 2003-10-06  Dave Brolley  <brolley@redhat.com>
2307
2308         * gen-all-doc: Add fr550.
2309
2310 2003-09-11  Doug Evans  <dje@sebabeach.org>
2311
2312         * Makefile.am (ARCHFILE): New var.
2313         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2314         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2315         * Makefile.in: Regenerate.
2316
2317 2003-09-08  Dave Brolley  <brolley@redhat.com>
2318
2319         On behalf of Doug Evans <dje@sebabeach.org>
2320         Pass in paths to input files, instead of assuming they live in
2321         $srcdir/cpu.  Plus misc. option processing cleanup.
2322         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2323         Add pre-process pass to all options.
2324         * cgen-gas.scm (gas-arguments): Ditto.
2325         * cgen-sid.scm (sim-arguments): Ditto.
2326         * cgen-sim.scm (sim-arguments): Ditto.
2327         * cgen-stest.scm (stest-arguments): Ditto.
2328         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2329         (-opc-file-path): New global.
2330         (opc-file-path): New fn.
2331         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2332         All callers updated.
2333         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2334         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2335         Replace srcdir arg with opc-file.  All callers updated.
2336         * read.scm (-opt-spec-update): Delete.
2337         (opt-get-first-pass,opt-get-second-pass): New fns.
2338         (-cgen): Process application-specific arguments in two passes.
2339
2340 2003-08-29  Dave Brolley  <brolley@redhat.com>
2341
2342         * cpu/frv.cpu: Removed.
2343         * cpu/frv.opc: Removed.
2344
2345 2003-08-21  Nick Clifton  <nickc@redhat.com>
2346
2347         * cpu/frv.cpu (mbtoh): Replace input parameter to
2348         u-media-dual-expand and u-media-dual-btoh with output parameter.
2349         (cmbtoh): Add profiling hack.
2350
2351 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2352
2353         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2354
2355 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2356
2357         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2358         the elements for the END record of CGEN_OPINST, silencing warnings.
2359
2360 2003-07-15  Doug Evans  <dje@sebabeach.org>
2361
2362         Add guile 1.6.4 support.
2363         - empty list must be quoted
2364         - string functions have stricter type checking
2365         - eval now takes a second argument
2366         - symbol-bound? is deprecated
2367         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2368         (bitset-attr->list): Ensure arg to string-cut is a string.
2369         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2370         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2371         * cos.scm (-class-list): Must quote empty list.
2372         (-class-parent-classes,-class-compute-class-desc): Ditto.
2373         (class-make,make,object-reset!): Ditto.
2374         (method-make-make!): Call eval1 instead of eval.
2375         (method-make-forward!,method-make-virtual-forward!): Ditto.
2376         * decode.scm (subdtable-add): Use stringsym-append instead of
2377         string-append.
2378         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2379         (-build-decode-table-entry): Fetch string name of insn.
2380         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2381         (-gen-mach-table-defns): Ditto for mach.
2382         (gen-ifld-defns): Ditto for ifld.
2383         (gen-hw-table-defns): Ditto for hw.
2384         (gen-operand-table): Ditto for op.
2385         (gen-insn-table-entry): Ditto for insn.
2386         * desc.scm (gen-attr-table-defn): Ditto for attr.
2387         (<keyword>,gen-defn): Don't pass symbols to string-append.
2388         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2389         symbol-append.
2390         (enum-vals-upcase): Use symbol-upcase to build result.
2391         (-enum-parse): Use stringsym-append to build errtxt.
2392         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2393         (eval1): New function.
2394         (symbol-bound?): Provide own version if >= guile 1.6.
2395         * hardware.scm (define-keyword): Use string-append instead of
2396         symbol-append.
2397         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2398         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2399         before using.
2400         (gen-list-entry): Handle either symbol or string `name' arg.
2401         (gen-obj-doc-header): Fetch string name of `o' arg.
2402         (define-cpu-intro): Ditto for cpu.
2403         (gen-mach-intro): Ditto for mach.
2404         (gen-model-intro): Ditto for model.
2405         (gen-isa-intro): Ditto for isa.
2406         (gen-machine-doc-1): Ditto for isa.
2407         (gen-reg-doc-1): Convert mach to string first.
2408         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2409         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2410         to string first.
2411         (gen-insn-categories): Fetch string name of mach.  Convert
2412         enum-val-name to string first.
2413         (gen-insn-docs): Fetch string name of mach.
2414         * ifield.scm (ifld-ilk): Result is a string.
2415         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2416         Fetch string name of ifld.
2417         (-sfmt-search-key): Similarily for ifld and op.
2418         * insn.scm (syntax-make): Fetch string name of syntax element.
2419         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2420         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2421         * mode.scm (mode:c-type): Result is a string.
2422         (mode:enum): Fetch string name of mode.
2423         (-mode-parse): Use stringsym-append to build errtxt.
2424         * model.scm (model:enum): Fetch string name of model.
2425         (-model-parse): Use stringsym-append to build errtxt.
2426         (parse-insn-timing): Must quote empty list.
2427         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2428         (-gen-minsn-opcode-entry): Ditto.
2429         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2430         convert to string.
2431         (read-cpu.opc): Convert current-arch-name to a string before using.
2432         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2433         (<derived-operand>): Must quote empty list.
2434         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2435         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2436         of ifld.
2437         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2438         (-pmacro-sym): Must convert symbols to strings before passing to
2439         string-append.
2440         (-pmacro-str): Ditto.
2441         (pmacros-init!): Use eval1 instead of eval.
2442         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2443         (keep-isa-atlist?): Ditto.
2444         (cmd-if): Use eval1 instead of eval.
2445         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2446         (-rtl-c-get): Fetch string name of src.
2447         (s-unop): Ditto for mode.
2448         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2449         (-gen-par-temp-defns,subword): Ditto.
2450         (join): Use stringsym-append instead of string-append.
2451         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2452         (rtx-traverse-debug): Fetch string name of rtx-obj.
2453         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2454         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2455         (rtx-pretty-name): Result is a string.
2456         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2457         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2458         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2459         before using.
2460         (-gen-sfrag-case): Fetch string name of user.
2461         * sid-model.scm (unit:enum): Fetch string name of unit.
2462         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2463         (<hw-memory>,gen-set-quiet): Ditto.
2464         (gen-mode-defs): Ditto.
2465         (sim-finish!): Convert current-arch-name to a string before using.
2466         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2467         (-gen-no-scache-semantic-fn): Ditto.
2468         (cgen-defs.h): Fetch string name of isa.
2469         (cgen-read.c): Convert current-arch-name to a string before using.
2470         (cgen-write.c): Ditto.
2471         * sim-model.scm (unit:enum): Fetch string name of unit.
2472         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2473         (-gen-model-timing-table): Fetch string name of model.
2474         (-gen-mach-model-table): Ditto.
2475         (-gen-mach-defns): Fetch string name of mach.
2476         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2477         (<hw-memory>,cxmake-get): Fetch string name of mode.
2478         (<hw-memory>,gen-set-quiet): Ditto.
2479         (gen-mode-defs): Ditto.
2480         (sim-finish!): Must quote empty list.
2481         * utils-cgen.scm (<ident>): Must quote empty list.
2482         (obj:str-name): New fn.
2483         (parse-comment): Result is a string.
2484         (parse-symbol): Result is a symbol.
2485         (parse-string): Result is a string.
2486         (keyword-list?): Convert arg to string before calling string-ref.
2487         (keyword-list->arg-list): Ditto.
2488         (gen-attr-name): Convert attr-name to string first.
2489         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2490         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2491         (gen-define-ifmt-ifields): Ditto for fld.
2492         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2493         map-over-string.
2494         (gen-file-name): Ditto.
2495         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2496         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2497         (reduce): Call eval1 instead of eval.
2498         * cpu/m32r.cpu (addi): Don't use `#.'.
2499
2500         * gen-all-sim: Fix some typos.
2501
2502 2003-07-08  Doug Evans  <dje@sebabeach.org>
2503
2504         * gen-all-doc: Ensure run from cgen src dir.
2505         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2506         * gen-all-sid: Similarily, in ./tmp-sid.
2507         * gen-all-sim: Similarily, in ./tmp-sim.
2508
2509 2003-06-20  Doug Evans  <dje@sebabeach.org>
2510
2511         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2512
2513 2003-06-19  Doug Evans  <dje@sebabeach.org>
2514
2515         * mach.scm (-ifld-already-defined?): New proc.
2516         (current-ifld-add!): Use it.
2517         (-op-already-defined?): New proc.
2518         (current-op-add!): Use it.
2519         (-insn-already-defined?): New proc.
2520         (current-insn-add!): Use it.
2521         (-minsn-already-defined?): New proc.
2522         (current-minsn-add!): Use it.
2523         (obj-isa-list): New proc.
2524         (isa-supports?): Use it.
2525
2526 2003-06-10  Doug Evans  <dje@sebabeach.org>
2527
2528         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2529         * cpu/m32r.cpu (all insns): Ditto.
2530
2531         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2532         "unspecified".
2533
2534         * gen-all-doc: Split arm and frv docs up a bit.
2535
2536         * cpu/arm.cpu: Add IDOC attribute.
2537         * cpu/frv.cpu: Ditto.
2538         * cpu/i960.cpu: Ditto.
2539         * cpu/openrisc.cpu: Ditto.
2540         * cpu/xstormy16.cpu: Ditto.
2541         * cpu/m32r.cpu: Ditto.
2542         (all insns): Explicitly specify IDOC attribute.
2543
2544         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2545         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2546         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2547         * Makefile.in: Regenerate.
2548         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2549         (-attr-read): Defer computing default value until we know the type.
2550         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2551         (<attr-list>:attr-present?): New method.
2552         (atlist-attr-present?,obj-attr-present?): New fns.
2553         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2554         (attr-builtin!): New insn attr IDOC.
2555         * cgen-doc.scm (doc-arguments): New args -I,-N.
2556         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2557         Support comment as fourth element of enum value.
2558         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2559         * html.scm (gen-html-header): New arg kind, all callers updated.
2560         (gen-table-of-contents): New arg insn-file, all callers updated.
2561         (gen-list-entry,gen-doc-header): New fn.
2562         (get-operands): Delete.
2563         (gen-iformat-table): Rewrite.
2564         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2565         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2566         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2567         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2568         (get-insns-for-category,gen-categories-insn-lists): New fns.
2569         (gen-insn-docs): Simplify each insn's semantics first.
2570         Print insn tables sorted by IDOC categories.
2571         (*insn-html-file-name*): New global.
2572         (cgen-insn.html): New fn.
2573         (cgen-all): Update.
2574         * insn.scm (<insn>): Create a setter for the `tmp' member.
2575         * semantics.scm (insn-build-known-values): Renamed from
2576         -build-known-values.  All callers updated.
2577
2578         * rtl.scm: Move traveral/evaluation support to ...
2579         * rtl-traverse.scm: New file.
2580         * read.scm: Maybe-load rtl-traverse.scm.
2581
2582         * rtl.scm (-rtx-valid-types): Add SETRTX.
2583
2584         * rtx-funcs.scm (nop,parallel): Fix mode.
2585
2586         * utils.scm (eqv-lookup-index): New fn.
2587         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2588
2589         * dev.scm (load-doc): Set APPLICATION.
2590
2591 2003-06-10  Dave Brolley  <brolley@redhat.com>
2592
2593         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2594         * sid-decode.scm: Generate #include of config.h into
2595         @prefix@-decode.cxx.
2596         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2597
2598 2003-06-07  Doug Evans  <dje@sebabeach.org>
2599
2600         * gen-all-sid: New file.
2601         * gen-all-opcodes: New file.
2602
2603 2003-06-05  Nick Clifton  <nickc@redhat.com>
2604
2605         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2606         version of the FRinti operand.
2607         (FRintjeven): Likewise for FRintj.
2608         (FRintkeven): Likewise for FRintk.
2609         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2610         media-quad-arith-sat-semantics, media-quad-arith-sat,
2611         conditional-media-quad-arith-sat, mdunpackh,
2612         media-quad-multiply-semantics, media-quad-multiply,
2613         conditional-media-quad-multiply, media-quad-complex-i,
2614         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2615         conditional-media-quad-multiply-acc, munpackh,
2616         media-quad-multiply-cross-acc-semantics, mdpackh,
2617         media-quad-multiply-cross-acc, mbtoh-semantics,
2618         media-quad-cross-multiply-cross-acc-semantics,
2619         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2620         media-quad-cross-multiply-acc-semantics, cmbtoh,
2621         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2622         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2623         cmhtob): Use new operands.
2624         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2625         (parse_even_register): New function.
2626
2627 2003-06-04  Doug Evans  <dje@sebabeach.org>
2628
2629         Better handling of 64 bit and mixed 32/64 bit architectures.
2630         * hardware.scm (hw-update-word-modes!): New fn.
2631         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2632         hw-update-word-modes!.
2633         (state-word-bitsize): Replace FIXME with requested check.
2634         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2635         * mode.scm (mode-find): Ignore INT,UINT.
2636         (-mode-word-sizes-kind): New global.
2637         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2638         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2639         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2640         of mode-list to ...
2641         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2642         unusable, correct values set later.
2643         (mode-finish!): Remove cruft.
2644         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2645         * opcodes.scm (opcodes-init!): Ditto.
2646         * rtx-funcs.scm (annul): Fix mode of pc.
2647         * cpu/ia64.cpu: Remove cruft that sets word modes.
2648         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2649
2650 2003-06-03  Nick Clifton  <nickc@redhat.com>
2651
2652         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2653         immediate value not unsigned.
2654
2655 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2656
2657         * cpu/sh.cpu: Amend comments to refer to SuperH.
2658         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2659         * cpu/sh64-media.cpu: Likewise.
2660         (Saturation): Update manual reference.
2661
2662 2003-05-15  Doug Evans  <dje@sebabeach.org>
2663
2664         * Makefile.am (srcroot): New var.
2665         (html): New rule.
2666         * Makefile.in: Regenerate.
2667         * cgen-doc.scm: New file.
2668         * html.scm: New file.
2669         * gen-all-doc: New file.
2670         * dev.scm (cload): Handle DOC application.
2671         (load-doc): New fn.
2672         * machs.scm (machs-for-cpu): New fn.
2673         * model.scm (models-for-cpu): New fn.
2674         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2675         All uses updated.
2676         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2677         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2678
2679         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2680         (-gen-decode-bits): Instead put in better fix here.
2681
2682         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2683
2684 2003-05-01  DJ Delorie  <dj@redhat.com>
2685
2686         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2687         word accesses.
2688         (set-alignfix-mem): Likewise.
2689
2690 2003-04-16  Dave Brolley  <brolley@redhat.com>
2691
2692         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2693         * utils.scm (copyright-fsf): Update generate copyright years.
2694         (copyright-cygnus): Ditto.
2695         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2696         operands.
2697         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2698         here.
2699         (<operand>'gen-profile-code): New parameter 'when'.
2700         (<iunit>'gen-profile-code): Ditto.
2701         (<insn>'gen-profile-code): Ditto.
2702         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2703         'insn_reference' for the 'after' function.
2704         * model.scm (unit:enum): Moved to sim-model.scm.
2705         * sim-model.scm (unit:enum): Moved from model.scm.
2706         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2707         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2708         * sid-model.scm (unit:enum): New version for sid.
2709         (gen-model-class-name): New function.
2710         (gen-model-unit-fn-decl): New function.
2711         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2712         (gen-model-unit-fn-name): New parameter 'when'.
2713         (-gen-model-insn-fn-name): Ditto.
2714         (-gen-model-insn-qualified-fn-name): New function.
2715         (-gen-model-insn-fn-decl): New function.
2716         (-gen-model-insn-fn-decls): New function.
2717         (-gen-model-insn-fn): New parameter 'when'. Call
2718         -gen-model-insn-qualified-fn-name.
2719         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2720         functions for modelling insn before and after execution.
2721         (-gen-model-class-decls): New function.
2722         (" (gen-model-class-name model) "): New function.
2723         (gen-model-classes): New function.
2724         (-gen-insn-timing): Generate functions for modelling insn before and after
2725         execution.
2726         (-gen-insn-unit-timing): Generate class-qualified names.
2727         (-gen-model-timing-table): Ditto.
2728         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2729         not needed (yet) by sid.
2730         (cgen-model.h): New function.
2731
2732 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2733
2734         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2735         * cpu/sh64-compact.cpu: Likewise.
2736         * cpu/sh64-media.cpu: Likewise.
2737
2738 2003-03-21  DJ Delorie  <dj@redhat.com>
2739
2740         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2741         which indicates if the sign flag is set from bit 15 or 7.
2742         Adjust all callers.
2743         (set-psw): New argument ws, propogate it.
2744         (set-psw-nowrite): Likewise.
2745         (set-mem-psw): Likewise.
2746         (set-psw-carry): Likewise.  Use temporaries to prevent
2747         prematurely overwriting needed inputs.
2748         (set-psw-rrotate17): Fix logic.
2749         (shrgrgr): Preserve carry for zero-bit shifts.
2750         (shrgrimm): Likewise.
2751         (shlgrgr): Likewise.
2752         (shlgrimm): Likewise.
2753         (asrgrgr): Likewise.
2754         (asrgrimm): Likewise.
2755         (reset): New.
2756
2757 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2758
2759         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2760
2761 2002-03-05  DJ Delorie  <dj@redhat.com>
2762
2763         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2764         prematurely overwriting needed inputs.
2765         (set-psw-sub): Likewise.
2766
2767 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2768
2769         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2770
2771 2003-02-18  DJ Delorie  <dj@redhat.com>
2772
2773         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2774         (movlmemimm): Just mask the address.
2775         (movhmemimm): Likewise.
2776         (movlmemgr): Likewise.
2777         (movhmemgr): Likewise.
2778         (set-psw): Always set the psw last.
2779         (set-psw-carry): Likewise.
2780         (set-psw-add): Likewise.
2781         (set-psw-sub): Likewise.
2782
2783         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2784         of 16 patterns from the set-psw-rotate17 function.
2785         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2786         movgriipostincgr, movgriipredecgr): Set psw correctly.
2787         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2788         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2789         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2790
2791 2003-02-11  Dave Brolley  <brolley@redhat.com>
2792
2793         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2794         @arch@_cgen-ifld_table.
2795         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2796         @arch@_cgen-ifld_table.
2797
2798 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2799
2800         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2801
2802 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2803
2804         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2805         empty ISAs.
2806
2807 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2808
2809         * utils-gen.scm (attr-int-gen-defn): Define.
2810
2811 2002-12-21  Doug Evans  <dje@sebabeach.org>
2812
2813         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2814         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2815
2816         * dev.scm (cload): Update location of .cpu files.
2817
2818 2002-12-19  Doug Evans  <dje@sebabeach.org>
2819
2820         * utils-sim.scm (gen-profile-sym): New fn.
2821         (<operand>,sbuf-profile-sym): New method.
2822         (<operand>,sbuf-profile-elm): Use it.
2823         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2824         of hardcoding symbol name.
2825         (<operand>,gen-profile-code): Ditto.
2826         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2827         symbol name.
2828
2829         * mode.scm (mode-sem-mode): New fn.
2830         * operand.scm (op:new-mode): Update. mode-name.
2831         (op-natural-mode?) New fn.
2832         * rtl.scm (hw): Set hw-name,mode-name.
2833
2834         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2835         Instead do:
2836         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2837         as size of IDESC-TABLE-VAR.
2838         (@prefix@_init_idesc_table): Ditto.
2839         * sim-model.scm (-gen-mach-defns): Ditto.
2840         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2841
2842         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2843
2844         * insn.scm (-parse-insn-format-symbol): Improve error message.
2845         (-parse-insn-format): Ditto.
2846
2847         * gen-all-sim: New script.
2848
2849 2002-12-16  DJ Delorie  <dj@delorie.com>
2850
2851         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2852
2853 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2854
2855         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2856         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2857         (parse_immediate16): Handle immediate16 values, which now include
2858         @hi(label) and @lo(label)
2859
2860 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2861
2862         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2863         Add braces and cast for union field.
2864         (gen-multi-ifield-nodes): Add braces and cast for union field.
2865         (cgen_operand_table): Similarly fix sentinel.
2866         (cgen_cpu_close): Constify "insns".  Formatting.
2867         (cgen-desc.c): Include xregex.h.
2868         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2869         Prototype.
2870         <opc.c>: Include safe-ctype.h.
2871         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2872         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2873         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2874         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2875         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2876         (parse_addr16): Correct type of "value".  Formatting.
2877         (parse_addr16_p): Likewise.
2878         (parse_addr16_cjp): Likewise.
2879         (parse_lit8): Likewise.
2880         (parse_bit3): Formatting.
2881         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2882         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2883         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2884         print_decimal.
2885         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2886         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2887         (print_dollarhex8): Likewise.
2888         (print_dollarhex16): Likewise.
2889         (print_dollarhex_addr16h): Likewise.
2890         (print_dollarhex_addr16l): Likewise.
2891         (print_dollarhex_p): Likewise.
2892         (print_dollarhex_cj): Likewise.
2893         (print_decimal): Likewise.
2894         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2895
2896 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2897
2898         * doc/rtl.texi (Model variants): Mention current limitations for
2899         unit inputs and outputs.
2900         (Hardware elements) <attribute PROFILE>: Be slightly more
2901         verbose.
2902         (Instructions) <timing>: input/output overrides have a direction
2903         operand.
2904
2905 2002-11-25  DJ Delorie  <dj@redhat.com>
2906
2907         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2908
2909 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2910
2911         * cpu/iq10.cpu: New file.
2912         * cpu/iq2000.cpu: Likewise.
2913         * cpu/iq2000.opc: Likewise.
2914         * cpu/iq2000m.cpu: Likewise.
2915
2916 2002-11-19  DJ Delorie  <dj@redhat.com>
2917
2918         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2919
2920 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2921
2922         * dev.scm: Call getenv with a string, not a symbol.
2923
2924 2002-10-08  Doug Evans  <dje@transmeta.com>
2925             Hans-Peter Nilsson  <hp@axis.com>
2926
2927         * types.scm (bitrange-overlap?): Handle lsb0?.
2928
2929 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2930
2931         From Robert Cragie <rcc@jennic.com>:
2932         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2933
2934 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2935             Ben Elliston  <bje@redhat.com>
2936             John Healy  <jhealy@redhat.com>
2937             Jeff Johnston  <jjohnstn@redhat.com>
2938             Alan Lehotsky  <alehotsky@redhat.com>
2939             Ubicom Inc. <SupportDesk@ubicom.com>
2940
2941         * cpu/ip2k.cpu: New file.
2942         * cpu/ip2k.opc: Likewise.
2943
2944 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2945
2946         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2947
2948 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2949
2950         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2951         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2952         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2953         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2954         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2955         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2956         (-sthi-byte): If there is a single byte to store, store it at
2957         proper address.
2958         (sthil, sthiq): Fix big-endian behaviour.
2959         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2960         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2961         (saturate): Use Dimode to check if saturation operation is required.
2962         (usaturate): Likewise.
2963         (mpermw): Fix mask.
2964         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2965         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2966         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2967         (msadubq): Fix subword index in second operand of first subtraction.
2968
2969 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2970
2971         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2972         code.
2973
2974 2002-06-18  Dave Brolley  <brolley@redhat.com>
2975
2976         * cpu/frv.cpu: New cpu description.
2977         * cpu/frv.opc: New cpu support code.
2978
2979 2002-05-21  Dave Brolley  <brolley@redhat.com>
2980
2981         * decode.scm (-opcode-slots): Don't consider bits beyond the
2982         length of the insn.
2983
2984 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2985
2986         * cpu/powerpc.cpu: New file.
2987
2988 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2989
2990         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2991
2992 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2993
2994         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2995         results are expanded recursively.
2996
2997 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2998
2999         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3000         call scan-symbol on it, to enable recursive macro-expansion.
3001
3002 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
3003
3004         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3005         for multiple-isa configurations.
3006         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3007
3008 2002-02-04  Ben Elliston  <bje@redhat.com>
3009
3010         * cpu/sh.cpu, cpu/sh.opc: New files.
3011         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3012
3013 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
3014
3015         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3016         (Enumerated constants): Mention that an ifield must not specify a
3017         multi-ifield.
3018         (Instruction operands): Ditto for index.
3019         (Expressions) <parallel>: Remove misplaced mention of local
3020         variables.
3021         <if>: Mention that mode must be specified and non-VOID when the
3022         result is used.
3023
3024 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3025
3026         * doc/porting.texi: When referring to *.opc, mention they are in
3027         the cpu subdir.  Call top-level directory toplevel, not devo.
3028         Close string in define-normal-insn example.
3029
3030         * doc/pmacros.texi: Fix .substr typo to .substring.
3031         Mention that .sym expansions are not further expanded.
3032
3033 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3034
3035         * desc-cpu.scm (ifld-number-cache): Add.
3036         (ifld-number): Add.
3037         (gen-maybe-multi-ifld-of-op): Add.
3038         (gen-maybe-multi-ifld): Add.
3039         (gen-multi-ifield-nodes): Add.
3040         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3041
3042 2002-01-10  matthew green  <mrg@redhat.com>
3043
3044         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3045         (gr-Rb-names): ... to this.
3046         (h-Rb): New hardware piece.
3047         (h-Rbj): Use gr-Rb-names.
3048         (Rb): Use h-Rb.
3049         (holdx): New instruction.
3050
3051 2002-01-07  Ben Elliston  <bje@redhat.com>
3052
3053         * utils.scm (package-cygnus-simulators): Rename from this ..
3054         (package-red-hat-simulators): .. to this.
3055         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3056         * sid-cpu.scm (cgen-desc.h): Likewise.
3057         (cgen-cpu.h): Likewise.
3058         (cgen-defs.h): Likewise.
3059         (cgen-write.cxx): Likewise.
3060         (cgen-semantics.cxx): Likewise.
3061         (cgen-sem-switch.cxx): Likewise.
3062         * sid-decode.scm (cgen-decode.h): Likewise.
3063         (cgen-decode.cxx): Likewise.
3064         * sid-model.scm (cgen-model.cxx): Likewise.
3065         * sid.scm (option-set!): Likewise.
3066         * sim.scm (option-set!): Likewise.
3067
3068 2002-01-07  Ben Elliston  <bje@redhat.com>
3069
3070         * utils.scm (copyright-fsf): Add 2002.
3071         (copyright-cygnus): Rename to copyright-red-hat.
3072         (copyright-red-hat): Add 2002.
3073         (CURRENT-COPYRIGHT): Update comment.
3074         * opcodes.scm (option-set!): Update callers.
3075         * sid-model.scm (cgen-model.cxx): Likewise.
3076         * sid-cpu.scm: Likewise.
3077         * sid-decode.scm: Likewise.
3078         * sid.scm (option-set!): Handle "redhat" as an option for
3079         "copyright"; use copyright-red-hat.
3080         * sim.scm (option-set!): Likewise.
3081
3082 2002-01-03  Dave Brolley  <brolley@redhat.com>
3083
3084         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3085         number of insns in the list.  Update the population count function to
3086         identify and prioritize 3 catgories of useful bits.
3087         (-population-top-few): Don't consider bits with a population count of
3088         zero.
3089         (-build-decode-table-entry): Don't call
3090         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3091         identical insns at the next tree level.
3092         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3093         this function is no longer used.
3094         (filter-non-specialized-ambiguous-insns): New function.
3095         (filter-identical-ambiguous-insns): New function.
3096         (find-identical-insn): New function.
3097         (filter-harmlessly-ambiguous-insns): Removed.
3098
3099 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3100             matthew green  <mrg@redhat.com>
3101             Frank Ch. Eigler  <fche@redhat.com>
3102             Nick Clifton  <nickc@cambridge.redhat.com>
3103
3104         * cpu/xstormy16.cpu: New file.
3105         * cpu/xstormy16.opc: New file.
3106
3107 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3108
3109         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3110
3111 2001-11-14  Dave Brolley  <brolley@redhat.com>
3112
3113         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3114         of the field being extracted.
3115
3116 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3117
3118         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3119         (cos ...) and (sin ..) rtx.
3120
3121 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3122
3123         * desc-cpu.scm: Do not include ctype.h in generated desc
3124         files.  They will inherit safe-ctype.h instead.
3125
3126 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3127
3128         * desc-cpu.scm: Add missing function prototypes (for generated
3129         C files).  Fix compile time warning messages about unused
3130         parameters (for generated C files).
3131         * opc-asmdis.scm: The same.
3132         * opc-ibld.c: The same.
3133         * opc-itab.scm: The same.
3134         * cpu/fr30.opc: The same.
3135         * cpu/m32r.opc: The same.
3136         * cpu/openrisc.opc: The same.
3137
3138 2001-09-17  graydon hoare  <graydon@redhat.com>
3139
3140         * insn.scm (syntax-break-out): Correct logic in handling escaped
3141         syntax characters.
3142
3143 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3144
3145         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3146         call @arch@_cgen_build_insn_regex now that regex support is in
3147         libiberty.
3148
3149 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3150
3151         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3152         (mask-superset?): Look for strict supersets to allow rejection of
3153         duplicate insns.
3154
3155 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3156
3157         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3158         (cgen-desc.h): Call it.
3159         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3160         decode-size.
3161         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3162         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3163
3164 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3165
3166         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3167         mach->cpu insn-chunk-bitsize.
3168         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3169         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3170         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3171         (-cpu-parse, -cpu-read): Parse/initialize it.
3172         * doc/rtl.texi (define-cpu): Document it.
3173
3174 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3175
3176         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3177
3178 2001-07-06  Ben Elliston  <bje@redhat.com>
3179
3180         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3181
3182 2001-07-05  Ben Elliston  <bje@redhat.com>
3183
3184         * README: Update.
3185
3186         * read.scm (include): Include files from srcdir/cpu.
3187         (-cgen): Likewise for loading .cpu files.
3188         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3189         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3190         * *.opc: Likewise.
3191         * simplify.inc: Likewise.
3192
3193 2001-07-04  Ben Elliston  <bje@redhat.com>
3194
3195         * read.scm (include): Log "Including file" message at level 1,
3196         rather than outputting it with (display).
3197         (cpu-load): Log "Loading cpu description" and "Processing cpu
3198         description" messages at levels 1 and 2, respectively, rather than
3199         using (display).
3200
3201 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3202
3203         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3204         CGEN_KEYWORD_ENTRY initializers.
3205
3206         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3207         (<operand> 'test-data): Involve both the index and the hardware
3208         in testcase generation.
3209         (<hw-indx> 'test-data): Generate test data from the underlying
3210         object.
3211         (<ifield> 'test-data): Generate test data by computing bit
3212         patterns for the field, then decoding them.
3213         (<hw-address> 'test-data): Allow for new calling convention.
3214         (<hw-iaddress> 'test-data): Likewise.
3215         (<keyword> 'test-data): Convert index values into keywords.
3216         (<hw-asm> 'test-data): Convert index values into integer strings.
3217
3218         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3219
3220 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3221
3222         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3223         is required for multi-mode hw types (memory).
3224
3225 2001-05-11  Ben Elliston  <bje@redhat.com>
3226
3227         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3228         when generating allinsn.d from objdump output. Without it, the
3229         testsuite will treat $ as the regular expression for end of line.
3230
3231 2001-05-09  Ben Elliston  <bje@redhat.com>
3232
3233         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3234         with `cgen_cpu_open'; documentation had become out of date.
3235         * doc/rtl.texi (Instruction operands): Likewise.
3236
3237 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3238
3239         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3240         various-base-length instruction sets.
3241
3242 2001-04-02  Ben Elliston  <bje@redhat.com>
3243
3244         * sid-cpu.scm (-last-insn): New function.
3245         (-gen-sem-switch-engine): Loop through idesc while less than or
3246         equal to the last instruction enum, not less than the MAX enum.
3247         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3248         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3249         table's size to be the last instruction enum plus one, not
3250         @PREFIX@_INSN_MAX.
3251         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3252         instruction onto the instruction list.
3253
3254         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3255         using the size of the table and its elements.
3256         (-gen-decode-insn-globals): Define the idesc table's size to be
3257         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3258         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3259         last instruction enum plus one, not @CPU@_INSN_MAX.
3260
3261 2001-03-28  Ben Elliston  <bje@redhat.com>
3262
3263         * doc/version.texi (UPDATED, EDITION): Update.
3264         * doc/stamp-vti: Likewise.
3265
3266 2001-03-26  Ben Elliston  <bje@redhat.com>
3267
3268         * doc/credits.texi (Credits): Update.
3269
3270         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3271         specified prefix and, if necessary, escape `$' in gas-build.sh to
3272         prevent unwanted shell variable expansion.
3273
3274 2001-03-24  Ben Elliston  <bje@redhat.com>
3275
3276         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3277         (<keyword>,test-data): Likewise.
3278         (<hw-address>,test-data): Likewise.
3279         (<hw-iaddress>,test-data): Likewise.
3280         (-collate-test-set): New function.
3281         (build-test-set): Use it.
3282         (gen-gas-test): Generate five test cases per instruction.
3283         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3284
3285         * read.scm: Load "slib/random" if random is not defined.
3286         * slib/random.scm: New file.
3287
3288         * utils.scm: Remove comments about the Hobbit compiler.
3289         (copyright-cygnus): Add 2001.
3290         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3291         (package-gnu-simulators): Tidy.
3292
3293 2001-03-23  Ben Elliston  <bje@redhat.com>
3294
3295         * cgen-gas.scm: Inline documentation improvements.
3296
3297 2001-03-21  Ben Elliston  <bje@redhat.com>
3298
3299         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3300         given in a syntax string is undefined.
3301
3302         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3303         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3304
3305 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3306
3307         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3308         for arg_type CGEN_CPU_OPEN_BFDMACH.
3309
3310 2001-03-20  Ben Elliston  <bje@redhat.com>
3311
3312         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3313         instruction onto the instruction list. Define MAX_INSNS to be the
3314         value of the last instruction enum plus one.
3315
3316 2001-03-14  Nick Clifton  <nickc@redhat.com>
3317
3318         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3319
3320 2001-03-05  Dave Brolley  <brolley@redhat.com>
3321
3322         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3323         if the number of ifields is greater than zero.
3324
3325 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3326
3327         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3328         Emit LIKELY/UNLIKELY branch probability hints.
3329         * sid-decode.cpu (-gen-record-args): Ditto.
3330
3331 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3332
3333         * desc-cpu.scm (-gen-hash-defines): Rename
3334         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3335
3336 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3337
3338         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3339         writeback tracking.
3340         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3341         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3342         if unnecessary.
3343         * sid.scm (<operand> gen-write): Use unsigned long long expression
3344         for writeback.
3345         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3346         (<unit> gen-profile-code): Ditto.
3347
3348 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3349
3350         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3351         (regno ...) rtx.
3352
3353 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3354
3355         * operand.scm (<operand> pretty-sem-name): New field.
3356         (<operand> make): Initialize it from hw-name.
3357         (op:set-pretty-sem-name!): New function.
3358         (<operand> gen-pretty-name): Default to fetching new field.
3359         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3360         sem-name setting from -rtx-hw-name.
3361
3362 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3363
3364         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3365         its subsequent gen-pretty-name.
3366
3367         * read.scm: Increase thread working stack limit and backtrace
3368         depth limits.
3369
3370 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3371
3372         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3373
3374 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3375
3376         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3377         current insn plus 4.
3378         (h-delay-insn): New hardware register.
3379         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3380         (l-jalr): Likewise.
3381         (l-bal): Likewise.
3382
3383         * openrisc.opc (parse_hi16): Sign extend value.
3384         (parse_lo16): Likewise.
3385
3386 2001-01-06  Ben Elliston  <bje@redhat.com>
3387
3388         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3389         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3390         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3391         (-gen-semantic-fn-table): Likewise.
3392         (-gen-scache-semantic-fn): Likewise.
3393         (-gen-no-scache-semantic-fn): Likewise.
3394         (cgen-read.c): Likewise.
3395         (cgen-sem-switch.c): Likewise.
3396         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3397         is a filename prefix.
3398         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3399         (-gen-decode-insn-globals): Likewise.
3400         (-gen-idesc-decls): Likewise.
3401         (cgen-decode.h): Likewise.
3402         (cgen-decode.c): Likewise.
3403         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3404         (gen-cpu-insn-enum): Likewise.
3405         (sim-finish!): Likewise.
3406
3407 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3408
3409         * openrisc.cpu: New file.
3410         * openrisc.opc: Likewise.
3411
3412 2000-12-12  Ben Elliston  <bje@redhat.com>
3413
3414         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3415
3416 2000-12-07  Ben Elliston  <bje@redhat.com>
3417
3418         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3419         "insn" when there are zero ifields to extract.
3420
3421 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3422
3423         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3424         used by simple/non-scache simulators.
3425         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3426         regardless of with-scache?.
3427         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3428
3429 2000-12-03  Ben Elliston  <bje@redhat.com>
3430
3431         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3432         (cgen-desc.c): Likewise.
3433
3434 2000-12-01  Greg McGary  <greg@mcgary.org>
3435
3436         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3437
3438 2000-12-01  Ben Elliston  <bje@redhat.com>
3439
3440         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3441         definitions if run without with-multipla-isa?.
3442         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3443         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3444
3445 2000-11-24  Ben Elliston  <bje@redhat.com>
3446
3447         * sim-cpu.scm (-gen-hardware-struct): New function.
3448         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3449         hardware elements wich have share one or more ISAs with the ISAs
3450         being kept.
3451
3452         * sim.scm (-with-multiple-isa?): New symbol.
3453         (with-multiple-isa?): New function.
3454         (option-init!): Initialise -with-multiple-isa?.
3455         (option-set!): Handle with-multiple-isa option.
3456
3457 2000-11-21  Ben Elliston  <bje@redhat.com>
3458
3459         * utils.scm (copyright-fsf): Add the year 2000.
3460
3461 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3462
3463         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3464         unneeded "\n\n" from F() macro definition.
3465
3466 2000-11-15  Greg McGary  <greg@mcgary.org>
3467
3468         * utils-cgen.scm (gen-define-with-symcat): New function.
3469         * desc-cpu.scm (gen-ifld-defns): Use it.
3470         (gen-hw-table-defns): Use it.
3471         (-gen-hash-defines): Use it.
3472         (gen-operand-table): Use it.
3473         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3474         * opc-itab.scm (-gen-ifmt-table): Use it.
3475         (-gen-insn-opcode-table): Use it.
3476         (-gen-macro-insn-table): Use it.
3477         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3478         * sim-cpu.scm (cgen-semantics.c): Use it.
3479         (cgen-sem-switch.c): Use it.
3480
3481 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3482
3483         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3484         request to emit calls to insn extractors as functions rather than
3485         branches to inline blocks.
3486         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3487         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3488
3489         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3490         to extractor clauses.
3491
3492 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3493
3494         * decode.scm (-distinguishing-bit-population): Significantly
3495         improve popularity heuristic.  Renamed from
3496         (-mask-bit-population): Gone.
3497         (-population-above-threshold): Sort new bit numbers in order of
3498         popularity.
3499         (-population-top-few): Allow up to three more bits to be selected
3500         than requested.  Correct selection order to prefer better bits.
3501         Correct bug in fewer-than-requested case.  Keep threshold as
3502         floating-point.
3503         (decode-best-get-bits): Pass also the insn-values.
3504
3505         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3506         future optimization.
3507
3508         * utils.scm (message): Format nested lists better.
3509
3510 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3511
3512         * dev.scm: Add srcdir to %load-path.
3513
3514         * rtx-funcs.scm (subword): Mode of argument can be different
3515         than mode of result, so don't use OP0 to specify argument's mode.
3516
3517 2000-11-02  Ben Elliston  <bje@redhat.com>
3518
3519         * doc/porting.texi (Building a GAS test suite): Document my change
3520         to gas-build.sh.
3521
3522 2000-11-01  Ben Elliston  <bje@redhat.com>
3523
3524         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3525
3526 2000-10-31  Ben Elliston  <bje@redhat.com>
3527
3528         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3529         with no command line arguments if the gas build directory can be
3530         determined.
3531
3532 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3533
3534         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3535         op-ifld -> op-ifield.
3536
3537 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3538
3539         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3540
3541 2000-10-13  matthew green  <mrg@cygnus.com>
3542
3543         * utils-cgen.scm (get-ifetch): Move from here ...
3544         * sim.scm (get-ifetch): ... to here.
3545         * sid.scm (get-ifetch): Copy and port to c++.
3546
3547 2000-10-06  Dave Brolley  <brolley@redhat.com>
3548
3549         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3550         ifld-start + ifld-word-offset.
3551         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3552         the field is beyond the base number of bits.
3553         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3554         (gen-extract-ifields): Ditto.
3555         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3556         characters in the regular expression.
3557
3558 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3559
3560         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3561         preprocessor constant.
3562
3563 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3564
3565         * slib/logical.scm: New file from slib.  Provides robust bitwise
3566         logical operations for large integers.
3567         * read.scm: maybe-load it.
3568
3569 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3570
3571         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3572         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3573         single-isa predicate, but support keep-isa filtering.
3574
3575 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3576
3577         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3578         statement-expression and comma-expression contexts.
3579         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3580
3581 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3582
3583         * decode.scm (-population-top-few): Signal error gracefully if
3584         decoding is about to become ambiguous.
3585
3586 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3587
3588         * doc/rtl.texi (decode-assist): Describe this field as optional.
3589
3590 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3591
3592         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3593         with decode proc.
3594
3595 2000-09-05  Dave Brolley  <brolley@redhat.com>
3596
3597         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3598         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3599
3600 2000-08-29  Dave Brolley  <brolley@redhat.com>
3601
3602         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3603         adata-integral-insn is true for this architecture.
3604
3605 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3606
3607         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3608         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3609         * rtl-c.scm (-c-rtl-get): Improve an error message.
3610         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3611
3612 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3613
3614         * Makefile.in (DIST_COMMON): Regenerated.
3615         * ifield.scm (<derived-ifield> needed-iflds): New method.
3616         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3617         sfmts built from <derived-ifield>s.
3618         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3619         type symbol 'derived-ifield, not an unparseable string.
3620         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3621         (-sfmt-contents): Add tracing.
3622
3623         From Doug Evans <dje@transmeta.com>:
3624         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3625         C code.
3626
3627 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3628
3629         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3630         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3631         (-rtl-c-get): Rename from rtl-c-get.
3632         (rtl-c-get): New fn for getter logging.
3633
3634 2000-07-28  Ben Elliston  <bje@redhat.com>
3635
3636         * NEWS: Update.
3637
3638 2000-07-25  Ben Elliston  <bje@redhat.com>
3639
3640         * doc/credits.texi (Credits): Add Frank Eigler.
3641
3642 2000-07-24  Dave Brolley  <brolley@redhat.com>
3643
3644         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3645         fully.
3646         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3647         (<keyword>): Initialize all elements fully.
3648         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3649         fully.
3650         (-gen-mach-table-defns): Ditto.
3651         (-gen-ifld-defns): Ditto.
3652         (-gen-operand-table): Ditto.
3653         (-gen-insn-table): Ditto.
3654         (-gen-cpu-open): Nothing to do for the mach table.
3655
3656 2000-07-13  Ben Elliston  <bje@redhat.com>
3657
3658         * doc/version.texi (UPDATED): Update.
3659
3660 2000-07-05  Ben Elliston  <bje@redhat.com>
3661
3662         * configure.in (AC_PATH_PROG): Remove.
3663         * configure: Regenerate.
3664         * Makefile.am (GUILE): Locate guile dynamically.
3665         * Makefile.in: Regenerate.
3666         * doc/Makefile.in: Likewise.
3667
3668 2000-07-03  Ben Elliston  <bje@redhat.com>
3669
3670         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3671         * opc-itab.scm (cgen-opc.c): Likewise.
3672
3673 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3674
3675         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3676         guile 1.4 compatibility.
3677         (rtx-env-dump): Comment out buggy display calls.
3678
3679 2000-06-15  matthew green  <mrg@redhat.com>
3680
3681         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3682
3683 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3684
3685         * Makefile.in: Regenerated.
3686
3687         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3688         (gen-ifld-defns): Ditto.
3689         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3690         * rtl.c (rtl-finish!): Ditto.
3691         * opc-itab.scm (-gen-ifield-decls): Ditto.
3692         * opcodes.scm (gen-switch): Exclude derived operands.
3693         * operand.scm (op-iflds-used): Expand derived operands.
3694         (hw-index-derived): New dummy function to create dummy object.
3695         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3696         constructor.  Set object's hw-name and index fields.
3697         (-anyof-merge-subchoices): Set instance object's index also.
3698         (-anyof-name): New helper function.
3699         (anyof-merge-semantics): Correct replacement of operand names in
3700         anyof instance.
3701         (op-ifield): Tolerate derived-operands and their funny indices better.
3702         * ifield.scm (ifld-known-values): Expand derived ifields.
3703         (non-multi-ifields, non-derived-ifields): New utility functions.
3704         (ifld-decode-mode): Tolerate objects with unbound decode field.
3705         * iformat.scm (compute-insn-length): Expand derived ifields.
3706         (compute-insn-base-mask): Ditto.
3707         * insn.scm (insn-base-ifields): Remove.
3708         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3709         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3710         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3711         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3712         (-frag-test-data): Ditto.
3713         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3714         (-gen-sem-switch-engine); Ditto.
3715         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3716         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3717         (-gen-record-args): Tolerate unbound op-ifield.
3718         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3719         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3720         Exclude multi-insns.
3721         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3722         * utils-sim.scm (op-extract?): Handle derived operands.
3723
3724         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3725         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3726         * hardware.scm (hardware-for-mode): New function.
3727
3728         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3729         cleaning up decode tables.
3730         (mask-superset?): Little helper function for above.
3731         * decode.scm (-build-decode-table-entry): Call it.
3732         (-opcode-slots): Add some more tracing.
3733         * arm.cpu: Disable decode-splits construct due to implementation
3734         conflict with `filter-harmlessly-ambiguous-insns'
3735
3736         * decode.scm (-population-top-few): New function for better decode
3737         bit generation.  Includes minor helper functions.
3738         (decode-get-best-bits): Call it instead.
3739         (OLDdecode-get-best-bits): Renamed previous version of above.
3740
3741
3742 2000-06-13  Ben Elliston  <bje@redhat.com>
3743
3744         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3745         for the Guile library directory.
3746         * configure: Regenerate.
3747         * Makefile.in, doc/Makefile.in: Regenerate.
3748
3749         * Makefile.in, doc/Makefile.in: Regenerate.
3750         * configure.in: Remove unnecessary tests. Move to version 1.0.
3751         * acconfig.h, config.in: Remove.
3752         * configure, aclocal.m4: Regenerate.
3753         * doc/stamp-vti, doc/version.texi: Likewise.
3754         * AUTHORS: New file.
3755
3756 2000-06-07 Ben Elliston  <bje@redhat.com>
3757
3758         * fixup.scm (symbol-bound?): Reduce debugging output.
3759
3760 2000-06-02  matthew green  <mrg@redhat.com>
3761
3762         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3763         a given instruction, replacing derived fields with their subfields.
3764         (insn-value): Use `insn-base-ifields' to find all constant values.
3765         (multi-insn-instantiate!): Comment some debug messages.
3766
3767 2000-06-01  Ben Elliston  <bje@redhat.com>
3768
3769         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3770         symbol names used in a (c-call ..) rtx.
3771
3772         * sim-test.scm (build-test-set): Return (()) for an instruction
3773         with no operands, so it too is included in the generated test set.
3774
3775 2000-05-31  Ben Elliston  <bje@redhat.com>
3776
3777         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3778         (sim-test): Likewise.
3779         * Makefile.in: Regenerate.
3780
3781 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3782
3783         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3784         stack traceback, in an order that resembles gdb's `bt'.
3785
3786 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3787
3788         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3789         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3790         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3791         multi insns.
3792         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3793         virtual functions.
3794         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3795         * iformat.scm (ifmt-expanded-ifields): Gone.
3796         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3797         work.
3798         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3799         ifmt entries.
3800
3801         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3802         code.
3803
3804 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3805
3806         * sid.scm (with-any-profile?): New function clone.
3807
3808 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3809
3810         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3811
3812 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3813
3814         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3815         (-multi-ifield-read): Parse them.
3816         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3817         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3818         (multi-ifield gen-extract): Add decode hook.
3819         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3820
3821         * insn.scm (syntax-break-out): More correctly handle \-escaped
3822         syntax characters.
3823         (syntax-make-elements): Ditto.
3824         * opc-itab.scm (compute-syntax): Ditto.
3825
3826 2000-05-17  Ben Elliston  <bje@redhat.com>
3827
3828         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3829
3830 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3831
3832         * gas-test.scm (build-test-set): Return (()) for an instruction
3833         with no operands, so it too is included in the generated test set.
3834
3835 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3836
3837         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3838         IFMT_OPERANDS and SYNTAX_BYTES.
3839
3840 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3841
3842         * sim.scm (with-any-profile?): New function.
3843         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3844         to decide whether or not to include profiling counters.
3845
3846 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3847
3848         Fuller derived-operand support for opcodes.
3849         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3850         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3851         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3852         (gen-operand-table): Omit derived- and anyof- operands from table.
3853         (gen-insn-table): Omit multi-insns from table.
3854         * iformat.scm (ifmt-expanded-fields): New function to expand
3855         subfields of derived-ifields.
3856         (ifmt-compute!): Ignore remaining multi-insns.
3857         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3858         multi-insns.
3859         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3860         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3861         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3862         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3863         (gen-switch): Omit anyof-operands.
3864         * operand.scm (-anyof-syntax): New function.
3865         (-anyof-merge-syntax): Call it.
3866         * utils.scm (collect): New idiomatic function.
3867
3868 2000-05-10  Ben Elliston  <bje@redhat.com>
3869
3870         * m68k.cpu: New file (work in progress).
3871
3872 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3873
3874         * Makefile.am (all-local): New target.  Create stamp-cgen.
3875         * Makefile.in: Regenerated.
3876         * doc/Makefile.in: Regenerated.
3877
3878 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3879
3880         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3881         (-operand-parse-setter): Ditto.
3882         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3883         for CACHE-ADDR operands.
3884         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3885         trace entries.  Widen byte-wide values for printing.
3886         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3887         Widen byte-wide values for printing.  Hexify memory addresses.
3888
3889 2000-04-23  matthew green  <mrg@redhat.com>
3890
3891         * m32r.cpu: Fix a typo.
3892
3893 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3894
3895         * ia64.cpu (define-model): Change merced to Itanium.
3896         (f-qp): Change quilifying to qualifying.
3897         (movbr_ph, movbr_pvec): Delete.
3898         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3899
3900 2000-04-07  Ben Elliston  <bje@redhat.com>
3901
3902         * doc/porting.texi (Building a simulator test suite): Clarify
3903         where generated test cases are placed.
3904
3905 2000-04-07  Ben Elliston  <bje@redhat.com>
3906
3907         * Makefile.am (gas-test): Remove dependency on `cgen'.
3908         (sim-test): Ditto.
3909         * Makefile.in: Regenerate.
3910
3911 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3912
3913         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3914         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3915         type reconfiguration.
3916         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3917         with-profile?.
3918
3919 2000-03-30  Ben Elliston  <bje@redhat.com>
3920
3921         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3922
3923 2000-03-24  Ben Elliston  <bje@redhat.com>
3924
3925         * Makefile.am (stamp-cgen): Reinstate target.
3926         * Makefile.in: Regenerate.
3927
3928 2000-03-22  Ben Elliston  <bje@redhat.com>
3929
3930         * slib/ppfile.scm: Remove; unused.
3931         * slib/defmacex.scm: Likewise.
3932
3933 2000-03-21  Ben Elliston  <bje@redhat.com>
3934
3935         * doc/internals.texi (Source file overview): Document.
3936
3937         * Makefile.am (GUILEDIR): Remove.
3938         (CGEN): Ditto. Callers use $(GUILE) instead.
3939         (GUILEFLAGS): Ditto.
3940         (CGENFILES): Ditto.
3941         (APPDESCFILES): Ditto.
3942         (OPCODESFILES): Ditto.
3943         (SIMFILES): Ditto.
3944         (pkgdata_SCRIPTS): Ditto.
3945         (stamp-cgen): Remove target.
3946         * Makefile.in: Regenerate.
3947
3948         * configure.in: Remove header and library tests.
3949         * configure: Regenerate.
3950         * config.in: Likewise.
3951
3952 2000-03-20  Ben Elliston  <bje@redhat.com>
3953
3954         * read.scm: Cease loading "hob-sup.scm".
3955         * utils.scm: Inherit the fastcall family of procedures (for now).
3956         * hob-sup.scm: Remove.
3957
3958 2000-03-20  Ben Elliston  <bje@redhat.com>
3959
3960         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3961         * configure: Regenerate.
3962         * gdbinit.in: Remove.
3963
3964 2000-03-17  Ben Elliston  <bje@redhat.com>
3965
3966         * Makefile.am (CGEN): Use guile, not cgen.
3967         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3968         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3969         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3970         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3971         (HOB_OBJS): Likewise.
3972         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3973         (CGENOBJS): Likewise.
3974         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3975         (hobbit, hobbit.o, hobbit.c): Remove targets.
3976         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3977         (CLEANFILES): Update.
3978         * acconfig.h (WITH_HOBBIT): Remove.
3979         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3980         option --with-cgen-hobbit.
3981         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3982         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3983         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3984         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3985         * Makefile.in: Regenerate.
3986         * config.in: Likewise.
3987         * aclocal.m4: Likewise.
3988         * configure: Likewise.
3989         * README (Hobbit support): Remove.
3990         * doc/internals.texi (Conventions): Do not mention Hobbit.
3991         * doc/porting.texi (Supported Guile versions): Likewise.
3992
3993 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3994
3995         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3996         callback convention to new sid sidutil::basic_cpu code.
3997         (-gen-sfrag-engine-fn): Ditto.
3998         * sid.scm (-create-virtual-insns!): Ditto.
3999         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4000         mode.
4001         (cxmake-skip): Implement properly for pbb mode.
4002
4003 2000-03-03  Ben Elliston  <bje@redhat.com>
4004
4005         * doc/internals.texi: New file.
4006
4007 2000-02-29  Ben Elliston  <bje@redhat.com>
4008
4009         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4010         * doc/porting.texi: Formatting tweaks.
4011
4012 2000-02-25  Nick Clifton  <nickc@cygnus.com>
4013
4014         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4015         field.
4016
4017 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4018
4019         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4020         mode.
4021
4022 2000-02-23  Andrew Haley  <aph@cygnus.com>
4023
4024         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4025         instruction.
4026
4027 2000-02-24  Ben Elliston  <bje@redhat.com>
4028
4029         * doc/rtl.texi (Derived operands): Add some cindex entries.
4030
4031 2000-02-23  Ben Elliston  <bje@redhat.com>
4032
4033         * ia32.cpu (dndo): Move general purpose macro from here ..
4034         * simplify.inc (dndo): .. to here.
4035
4036 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4037
4038         * arm.cpu (h-tbit): Add c-call setter function.
4039         (h-mbits): Ditto.
4040
4041 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4042
4043         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4044         (-frag-cost-compute!): Ditto.
4045         * utils.scm (copyright-cygnus): Add Y2K.
4046         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4047
4048 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4049
4050         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4051         flags field of the CGEN_CPU_TABLE structure.
4052
4053 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4054
4055         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4056         All references updated.
4057
4058 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4059
4060         * ia32.cpu: Rewrite addressing mode support.
4061
4062         * ifield.scm (<ifield>): New member `follows'.
4063         (ifld-known-values): New proc.
4064         (<ifield>): New method set-word-offset!.
4065         (ifld-set-word-offset!): New proc.
4066         (ifld-new-word-offset): New proc.
4067         (<ifield>): New method next-word.
4068         (<multi-ifield>): New method next-word.
4069         (ifld-next-word): New proc.
4070         (ifld-precedes?): New proc.
4071         (-ifield-parse): New args word-offset,word-length,follows.
4072         All callers updated.  Handle CISC-style vs RISC-style ifields.
4073         (-ifield-read): Recognize word-offset,word-length,follows specs.
4074         (-ifld-parse-follows): New proc.
4075         (-multi-ifield-make-default-insert): New proc.
4076         (-multi-ifield-make-default-extract): New proc.
4077         (-multi-ifield-parse): Provide default values for insert,extract
4078         handlers if not specified.
4079         (<derived-ifield>): New class.
4080         (derived-ifield?): New predicate.
4081         (ifld-derived-operand?): New predicate.
4082         (f-anyof): New global.
4083         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4084         (f-derived,ifld-derived?): Delete.
4085         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4086         * insn.scm (-sub-insn-ifields): New proc.
4087         (-sub-insn-make!): New proc.
4088         (multi-insn-instantiate!): Provide initial implementation.
4089         (-insn-parse): If insn contains "anyof" operands, create a
4090         <multi-insn> object instead of a plain <insn>.
4091         (-parse-insn-format-symbol): Rewrite derived operand handling.
4092         Add anyof operand handling.
4093         (-parse-insn-format-ifield-spec): Rewrite.
4094         (-parse-insn-format-operand-spec): Delete.
4095         (-parse-insn-format-list): Delete support for `(operand value)'.
4096         (anyof-operand-format?): Replaces derived-operand-format?.
4097         * operand.scm (-operand-parse-getter): Improve error messages.
4098         (-operand-parse-setter): Ditto.
4099         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4100         ifield-assertion.
4101         (<anyof-operand>): Change baseclass from <derived-operand> to
4102         <operand>.  Delete member values.  New members base-ifield,choices.
4103         (anyof-operand?): New predicate.
4104         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4105         (-derived-operand-parse): Rewrite.
4106         (-derived-operand-read): Rewrite.
4107         (-anyof-parse-choice): New proc.
4108         (-anyof-operand-parse): Rewrite.
4109         (-anyof-operand-read,define-anyof-operand): New procs.
4110         (<anyof-value>): Rewrite.
4111         (-anyof-initial-known): New proc.
4112         (anyof-satisfies-assertions?): New proc.
4113         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4114         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4115         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4116         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4117         (-anyof-value-from-derived): New proc.
4118         (-anyof-all-choices-1,anyof-all-choices): New procs.
4119         (operand-init!): Create define-anyof-operand reader command.
4120
4121         * insn (syntax-break-out): Take syntax as argument instead of insn.
4122         All callers updated.
4123         (syntax-make): Move here, from ???.
4124
4125         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4126         bitrange-foo. All uses updated.
4127         (bitrange-next-word): New proc.
4128
4129         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4130
4131         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4132         (rtx-make-const,rtx-make-enum): New procs.
4133         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4134         (rtx-mem-addr,rtx-mem-sel): New procs.
4135         (rtx-change-address): New proc.
4136         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4137         (rtx-make-set,rtx-single-set?): New procs.
4138         (rtx-combine): New proc.
4139
4140         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4141         (rtx-traverse-with-locals): Ditto.
4142         (-rtx-traverse,-rtx-traverse-*): Ditto.
4143
4144         * rtl.scm (define-subr): New proc.
4145         (rtl-init!): Create reader command `define-subr'.
4146
4147         * cos.c (_object_mi_p): Ensure argument is an object.
4148         (indent): New function.
4149         (_object_print_elms): Add pretty-printing support.
4150         (_object_print): Ditto.
4151
4152         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4153         (*floats-s->c-fun-table*): Ditto.
4154         * hobbit.c,hobbit.h: Rebuild.
4155         * hob-sup.c (fastcall7): New proc.
4156         * hob-sup.h (fastcall7): Declare.
4157         * hob-sup.scm (fastcall7): New macro.
4158
4159         * mach.scm (<arch>): New member subr-list.
4160         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4161         (arch-finish!): Reverse recorded subr list.
4162
4163         * read.scm (debug-env): New global.
4164         (debug-var-names,debug-var,debug-repl-env): New procs.
4165         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4166         (debug-quit): Renamed from `continue'.
4167
4168         * simplify.inc (dsmf): New pmacro.
4169
4170         * utils.scm (plus-scan): New proc.
4171         (split-bits): Rewrite.
4172         (split-value): New proc.
4173
4174 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4175
4176         * doc/Makefile.am (DOCFILES): Add notes.texi.
4177         * doc/Makefile.in: Rebuild.
4178
4179 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4180
4181         * ifield.scm (ifld-derived?): New proc.
4182         (f-derived): New global.
4183         (ifield-builtin!): Create ifield f-derived.
4184         (<multi-insn>): New class.
4185         (multi-insn?): New predicate.
4186         (multi-insn-instantiate!): New proc.
4187         (-insn-parse): Create <multi-insn> objects for insns with derived
4188         ifields.
4189         (-parse-insn-format-symbol): Handle derived ifields.
4190         (-parse-insn-format-ifield-spec): New proc.
4191         (-parse-insn-format-operand-spec): New proc.
4192         (-parse-insn-format-list): Simplify.
4193         (-parse-insn-format): No longer allow (ifield-object value) spec.
4194         (derived-operand-format?): New proc.
4195         (insn-alias?): New proc.
4196         (non-alias-insns): Rewrite.
4197         (insn-real?): Renamed from real-insn?, all callers updated.
4198         (virutal-insns): Rewrite.
4199         (multi-insns): New proc.
4200         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4201         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4202         Return #f if operand doesn't have an index or if index is not an
4203         ifield.
4204         (hw-index-anyof): New proc.
4205         (-operand-parse): Allow integer indices.
4206         (<derived-operand>): New class.
4207         (derived-operand?): New predicate.
4208         (<anyof-operand>): New class.
4209         (<anyof-value>): New class.
4210         (-anyof-parse-value,-anyof-operand-parse): New procs.
4211         (-derived-operand-parse,-derived-operand-read): New procs.
4212         (define-derived-operand,define-full-derived-operand): New procs.
4213         (operand-init!): New reader command define-derived-operand.
4214
4215         * utils.scm (list-take): Handle negative amount.
4216         (element?): Rewrite.
4217
4218 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4219
4220         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4221
4222 1999-10-04  Richard Henderson  <rth@cygnus.com>
4223
4224         * ia64.cpu: Checkpoint.
4225
4226 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4227
4228         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4229
4230         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4231         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4232
4233 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4234
4235         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4236         PC returned by sim_engine_invalid_insn.
4237
4238 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4239
4240         * ia32.cpu: New file.
4241
4242 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4243
4244         * utils.scm (bit-set?): Fix off by one error.
4245
4246         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4247
4248         * rtl.scm (hw): Check for valid hardware element before trying to
4249         get its mode.
4250
4251         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4252         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4253         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4254         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4255         compute_operand2_foo.
4256
4257         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4258         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4259         Call delayed_branch/branch methods instead of assigning to `vpc'.
4260         (<hw-pc>,cxmake-skip): Call skip method.
4261         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4262         (<pc>,cxmake-skip): Ditto.
4263         (-create-virtual-insns!): Ditto.
4264         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4265         (op:write): Ditto.
4266         (op:record-profile): Specify #:output-language "c++".
4267         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4268         @arch@_insn_attr.
4269         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4270         Define enums here.
4271         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4272         (gen-semantic-code): Ditto.
4273         (-gen-sem-case,-gen-sfrag-code): Ditto.
4274         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4275         (cgen-cpu.h): File is now #included by main cpu class, rather than
4276         subclassing.
4277         (cgen-defs.h): New proc.
4278         (-gen-scache-semantic-fn): Change result type to sem_status.
4279         New local `status'.  Call done_cti_insn/done_insn method at end.
4280         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4281         cgen-ops.h.
4282         (cgen-sem-switch.cxx): Ditto.
4283         * sid-decode.scm (-gen-idesc-decls): Update return type of
4284         @prefix@_sem_fn.
4285         (cgen-decode.h): Add using namespace @arch@.
4286         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4287
4288         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4289         (estate-output-language-c?,estate-output-language-c++?): New procs.
4290         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4291         (estate-make-for-normal-rtl-c++): New proc.
4292         (rtl-c++-parsed,rtl-c++): New proc.
4293         (s-c-call): Invoke cpu class method if c++.
4294         (join): Use s-c-raw-call.
4295
4296         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4297         (nop): Rewrite.
4298
4299         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4300         * rtl.scm (<eval-state>): New member `modifiers'.
4301         (<eval-state>,vmake!): Handle #:modifiers.
4302         (estate-with-modifiers): New proc.
4303
4304         * rtl.scm (rtx-side-effects?): New proc.
4305         (rtx-canonical-bool): Don't change expr if it has side effects.
4306         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4307         better.
4308
4309 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4310
4311         * sim.scm (gen-scache-type): Fix typo in last patch.
4312
4313 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4314
4315         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4316
4317 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4318
4319         * sid.scm (<hw-pc>,cxmake-skip): New method.
4320         (<pc>,cxmake-skip): New method.
4321
4322         * decode.scm (decode-build-table): Delete args startbit,index-list.
4323         All callers updated.
4324         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4325         All callers updated.
4326         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4327         to decode-get-best-bits.
4328         * sid-decode.scm (-gen-decode-fn): Ditto.
4329
4330         * hardware.scm (hw-bits): New proc.
4331         (-hw-parse): New arg layout.  All callers updated.
4332         (define-full-hardware): New arg layout.  All callers updated.
4333         (-hw-validate-layout): New proc.
4334         (-hw-create-[gs]etter-from-layout): New procs.
4335         (<hw-register>,parse!): Handle layout spec.
4336         * types.scm (type-bits): New proc.
4337
4338         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4339         UNARY, BINARY, TRINARY rtxs.
4340
4341         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4342         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4343         Support '- as "unused spot" indicator.
4344
4345 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4346
4347         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4348
4349 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4350
4351         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4352
4353         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4354         construction.
4355         (tstate-make): New arg `depth'.  All callers updated.
4356         (tstate-depth,tstate-set-depth!): New procs.
4357         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4358         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4359         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4360
4361 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4362
4363         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4364         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4365         * utils-sim.scm: Decoder generator support moved here.
4366         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4367         (-gen-decoder-switch): Sort entries for more fall-throughs.
4368
4369         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4370         * Makefile.in: Rebuild.
4371         * sim-test.scm (build-sim-testcase): Add logging message.
4372         * dev.scm (cload): Recognize SIM-TEST application.
4373         (load-stest): Set APPLICATION to SIM-TEST.
4374
4375         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4376
4377         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4378         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4379         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4380
4381         * insn.scm (syntax-break-out): Handle ${foo}.
4382
4383 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4384
4385         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4386         (bin_PROGRAMS): Define.
4387         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4388         (cgen-hob.c): Prepend $(srcdir)/ here.
4389         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4390         (libcpu_a_SOURCES): Delete.
4391         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4392         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4393         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4394         Add AC_CHECK_LIB(guile,main).
4395         * Makefile.in: Rebuild.
4396         * doc/Makefile.in: Rebuild.
4397         * aclocal.m4: Rebuild.
4398         * config.in: Rebuild.
4399         * configure: Rebuild.
4400
4401 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4402
4403         Rename rtx functions from name: to name, accept optional leading
4404         modifier and mode.
4405         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4406         * attr.scm (-attr-eval): Update.
4407         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4408         (<hw-register>,mode-ok?): Disallow VOID.
4409         (<hw-immediate>,mode-ok?): Disallow VOID.
4410         (<hw-address>,mode-ok?): Disallow VOID.
4411         * mode.scm (mode-name?): New proc.
4412         (VOID): Renamed from VM.
4413         (DFLT): Renamed from DM.
4414         (mode-builtin!): Update.
4415         * opcodes.scm (<ifield>,gen-insert): Update.
4416         (<ifield>,gen-extract): Update.
4417         (<multi-ifield>,gen-insert,gen-extract): Update.
4418         * operand.scm (op:mode): Update.
4419         (<pc>,make!): Update.
4420         (op:new-mode): Update.
4421         (-operand-read): Update.
4422         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4423         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4424         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4425         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4426         (rtx-make): Call -rtx-munge-mode&options.
4427         (rtx accessors): Rewrite.
4428         (rtx-pretty-name): Update.
4429         (-rtx-traverse-*): Update.
4430         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4431         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4432         (-rtx-make-traverse-table): Update.
4433         (-rtx-traverse-operands): Update.
4434         (-rtx-option?,-rtx-option-list?): New procs.
4435         (-rtx-munge-mode&options): New proc.
4436         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4437         (-rtx-traverse): Update.
4438         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4439         (rtx-compile-time-constant?): Update.
4440         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4441         (rtx-value): Update.
4442         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4443         * rtx-funcs.scm (*): Update.
4444         * rtl-c.scm (rtl-c-get): Update.
4445         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4446         (s-c-call,s-c-raw-call): Update.
4447         (s-boolifop,s-convop,s-if,s-cond): Update.
4448         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4449         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4450         (s-parallel,s-sequence): Update.
4451         (rtl-c-build-table): Update.
4452         * sem-frags.scm (-frag-hash-compute!): Update.
4453         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4454         for temporary bug compatibility with previous version.
4455         (-frag-expr-locals,-frag-expr-stmts): Update.
4456         (-frag-compute-desired-frags,-frag-pick-best): Update.
4457         * semantics.scm (-simplify-expr-fn): Update.
4458         (rtx-simplify): Update.
4459         (-rtx-ref-type): Update.  Account for modifiers.
4460         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4461         (-build-ifield-operand!): Update.
4462         (-build-known-values): Update.
4463         (semantic-compile): Update.
4464         (-gen-reg-access-defns): Update.
4465         (gen-semantic-code,-gen-sem-case): Update.
4466         (-gen-sfrag-code,-gen-sfrag-case): Update.
4467         * sim-cpu (gen-semantic-code): Update.
4468         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4469         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4470         (-hw-cxmake-get): Update.
4471         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4472         (<hw-index>,cxmake-get): Update.
4473         (<operand>,gen-type,gen-read,cxmake-get): Update.
4474         (<operand>,gen-set-quiet,gen-set-trace): Update.
4475         (<pc>,cxmake-get): Update.
4476         (sim-finish!): Update.
4477         * utils-gen.scm (-gen-ifld-extract-base): Update.
4478         (-gen-ifld-extract-beyond): Update.
4479         (gen-multi-ifld-extract): Update.
4480         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4481         * sid.scm (<hw-pc>,gen-write): Update.
4482         (-gen-decode-insn-globals): Update.
4483         (-hw-cxmake-get): Update.
4484         (<hw-register>,cxmake-get-raw): Update.
4485         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4486         (<hw-index>,cxmake-get): Update.
4487         (<operand>,gen-type,gen-read,cxmake-get): Update.
4488         (<operand>,gen-set-quiet,gen-set-trace): Update.
4489         (<pc>,cxmake-get): Update.
4490         (-create-virtual-insns!): Update.
4491         (-decode-split-build-assertion): Update.
4492         * *.cpu: Update.
4493         * simplify.inc: Update.
4494
4495 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4496
4497         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4498         Prefix queue function name with sim_ instead of @cpu@_.
4499
4500         * sim.scm (-with-parallel-only?): New global.
4501         (option-init!): Initialize it.
4502         (option-set!): Set it.
4503         (with-parallel-only?): New proc.
4504         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4505         and writeback markers if with-parallel-only.
4506         (-gen-idesc-init-fn): Update.
4507         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4508         with-generic-write.
4509
4510 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4511
4512         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4513         with the invalid insn handler.
4514
4515         * utils.scm (list-maybe-ref): New proc.
4516
4517         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4518         define-arch.
4519         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4520
4521         * i960.cpu (test*-*): Delete `expr' arg.
4522         (test-op,branch-op): Update.
4523
4524 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4525
4526         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4527         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4528         updated.
4529         (gen-reg-access-defn): Ditto.
4530         (-gen-hw-addr): Rewrite.
4531         (-op-gen-queued-write): Rewrite.
4532         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4533         (-gen-scache-semantic-fn): Handle with-generic-write.
4534         (-gen-no-scache-semantic-fn): Ditto.
4535
4536 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4537
4538         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4539
4540         * sim.scm (-with-generic-write?): New global.
4541         (option-init!): Initialize it.
4542         (option-set!): Set it.
4543         (with-generic-write?): New proc.
4544         (-gen-hw-addr): New proc.
4545         (-op-gen-queued-write): New proc.
4546         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4547
4548         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4549         turned off.
4550         (-gen-sem-switch): Preserve existing with-parallel? value.
4551         (-gen-sem-parallel-switch): Ditto.
4552         (-gen-write-case): Add /indent support.
4553         (cgen-write.c): Rewrite.
4554
4555         * utils.scm (-current-print-state): New global.
4556         (make-print-state): New proc.
4557         (pstate-indent,pstate-set-indent!): New procs.
4558         (pstate-cmd?,pstate-cmd-do): New procs.
4559         (/indent): New global.
4560         (/indent-set,/indent-add): New procs.
4561         (string-write): Set -current-print-state.
4562         (-string-write): New arg pstate, all callers updated.
4563         Handle print-state commands.
4564         (-string-list-flatten): New proc.
4565         (string-list->string): Use it.
4566
4567         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4568         (-gen-sem-fn-table-entry): New proc.
4569         (-gen-semantic-fn-table): New proc.
4570         (-gen-scache-semantic-fn): Make fn static.
4571         (-gen-no-scache-semantic-fn): Ditto.
4572         (cgen-semantics.c): Define macro SEM_FN_NAME.
4573         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4574         FAST,FULL.  Update @cpu@_insn_sem contents.
4575         (-gen-semf-fn-name): Delete.
4576         (-gen-sem-fn-decls): Delete.
4577         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4578         @cpu@_semf_init_idesc_table.
4579         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4580         handlers here.
4581         (cgen-decode.h): Print sfmt enum.
4582         * sid-decode.scm (-gen-semf-fn-name): Delete.
4583         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4584
4585         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4586         (ifmt-compute!): Ditto.
4587         * sim-decode.scm (-gen-decoder-switch): Ditto.
4588         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4589         (-gen-decoder-switch): Ditto.
4590
4591         * insn.scm (insn-virtual?): New proc.
4592
4593         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4594         convert to string.
4595         * mach.scm (<arch>): attr-list is now a pair of lists.
4596         (current-attr-list): Rewrite.
4597         (current-attr-add!,current-attr-lookup): Rewrite.
4598         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4599
4600 1999-08-06  Richard Henderson  <rth@cygnus.com>
4601
4602         * ia64.cpu: Initial checkpoint.
4603
4604 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4605
4606         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4607         (pmacros-init!): Update .apply help string.
4608
4609 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4610
4611         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4612         (<hw-pc>,cxmake-skip): New method.
4613         (<pc>,cxmake-skip): New method.
4614         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4615         (gen-argbuf-type): New member `skip_count'.
4616         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4617         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4618
4619         * utils-sim.scm: New file.
4620         * dev.scm (load-sim): Load it.
4621         (load-sid): Load it.
4622         * cgen-sid.scm: Load it.
4623         * cgen-sim.scm: Load it.
4624         * iformat.scm (<sformat>): New member sbuf, not initialized by
4625         default make.
4626         * rtx-funcs.scm (skip): Rewrite.
4627         * rtl-c.scm (skip): Rewrite.
4628         * m32r.cpu (sc,snc): Update `skip' usage.
4629         * mode.scm (mode-real-mode): New proc.
4630         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4631         Distinguish fragments by the <sformat-abuf> they use.
4632         * sim.scm (gen-profile-index-type): Delete.
4633         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4634         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4635         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4636         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4637         (-gen-argbuf-elm): Rewrite.
4638         (-gen-argbuf-hw-elm): Delete.
4639         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4640         of each sfmt.
4641         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4642         (sim-init!): Initialize them.
4643         (sim-analyze-insns!): Set them.
4644         (current-sbuf-list): New proc.
4645         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4646         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4647         * sim-model.scm (-gen-model-insn-fn): Ditto.
4648         * sim-decode.scm (-gen-extract-decls): Delete.
4649         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4650         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4651         sim.scm.
4652         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4653         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4654         (-gen-op-extract,-gen-op-trace-extract): New procs.
4655         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4656         gen-sfmt-argvars-foo and rewrite.
4657         (-gen-record-args): Rewrite.
4658         (-gen-extract-case): Tweak.
4659         * sid.scm (gen-profile-index-type): Delete.
4660         (ifield argbuf support): Move to utils-sim.scm.
4661         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4662         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4663         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4664         (-sim-sformat-argbuf-list): New global.
4665         (sim-init!): Initialize it.
4666         (sim-analyze-insns!): Set it.
4667         (current-sbuf-list): New proc.
4668         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4669         (-gen-argbuf-hw-elm): Delete.
4670         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4671         of each sfmt.
4672         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4673         (-gen-extract-decls): Delete.
4674         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4675         sid.scm.
4676         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4677         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4678         (-gen-op-extract,-gen-op-trace-extract): New procs.
4679         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4680         gen-sfmt-argvars-foo and rewrite.
4681         (-gen-record-args): Rewrite.
4682         (-gen-extract-case): Tweak.
4683
4684         * cgen-gh.c (gh_putc,gh_puts): New functions.
4685         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4686         * cos.c (_object_print_elms,_object_print): Use them.
4687         * hob-sup.c (fastcall_print): Use them.
4688         * configure.in: Check for scm_gen_puts, scm_puts.
4689         * config.in: Rebuild.
4690         * configure: Rebuild.
4691         * aclocal.m4: Rebuild.
4692         * Makefile.in: Rebuild.
4693
4694         * dev.scm (load-opc): Use load instead of maybe-load.
4695         (load-gtest,load-sim,load-stest): Ditto.
4696         (load-sid): Ditto.
4697
4698 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4699
4700         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4701         up to avoid g++ 'goto crosses initialization' warning.
4702         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4703         (-gen-sfrag-case): Update use of NEXT_FRAG.
4704
4705 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4706
4707         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4708
4709         * read.scm: Load sem-frags.scm.
4710         * sem-frags.scm (*): Lots rewritten.
4711         * sid.scm (-with-sem-frags?): New global
4712         (with-sem-frags?): New proc.
4713         (option-init!): Initialize -with-sem-frags?.
4714         (option-set!): Recognize with-sem-frags.
4715         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4716         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4717         if asked to.
4718         (-gen-sfrag-engine-decls): New proc.
4719         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4720         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4721         (-gen-sfrag-engine): New proc.
4722         (-gen-sem-case): Emit setup-semantics if specified.
4723         (-gen-sem-switch-engine): Update init/use of computed goto label.
4724         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4725         from local vars.
4726         (-gen-idesc-decls): Replace sem_address with cgoto.
4727         (-gen-scache-decls): Rewrite definition of `execute' member.
4728         * arm.cpu (arm isa): Enable decode-splits.
4729         * arm7.cpu (multiply insns): Rename result to mul-result.
4730
4731         Rename decode-specialize to decode-split.
4732         * decode.scm (*): Update.
4733         * insn.scm (*): Update.
4734         * mach.scm (*): Update.
4735         * sid.scm (*): Update.
4736
4737 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4738
4739         Record objects as a smob.
4740         * cos.c (scm_tc16_object): New static global.
4741         (cos_init): Initialize it.
4742         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4743         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4744         (_object_tag): Delete.
4745         (_object_make_smob): New function.
4746         (_object_make_x,_object_make_with_values_x): Rewrite.
4747         (_object_elements,_object_class_desc): Rewrite.
4748         (_object_copy,object_p): Rewrite.
4749         (_object_specialize): Rewrite.
4750         (_object_print_elms,_object_print): New functions.
4751         (object_smob): New static global.
4752         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4753
4754         * cos.c (_make_x_symbol): New static global.
4755         (object_make): Use it.
4756         (cos_init): Initialize it.
4757
4758 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4759
4760         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4761         instead to determine whether to use FLD macro.
4762         (<rtl-c-eval-state>): New member ifield-var?.
4763         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4764         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4765         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4766
4767         * rtl.scm (rtx-sequence-assq-locals): New proc.
4768
4769         * cos.scm (-object-error): Don't crash on non-objects.
4770
4771         * Makefile.am (CLEANFILES): Add hobbit.
4772         * Makefile.in: Rebuild.
4773
4774         * rtl-c.scm (s-c-call): Delete unnecessary code.
4775
4776 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4777
4778         * rtl-c.scm (ifield): Always reference value via `FLD'.
4779
4780         * cos.c (elm_bound_p): Return problem SCM boolean values.
4781
4782         * utils-cgen.scm (display-argv): New proc.
4783         * cgen-opc.scm (cgen): Call it.
4784         * cgen-sim.scm (cgen): Ditto.
4785         * cgen-gas.scm (cgen): Ditto.
4786         * cgen-stest.scm (cgen): Ditto.
4787         * cgen-sid.scm (cgen): Ditto.
4788
4789 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4790
4791         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4792         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4793         (-gen-extract-switch): Initialize result to 1.
4794         * opcodes.scm (gen-ifield-default-type): New proc.
4795         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4796         updated.
4797         (<hw-index>,gen-insert): Handle non-ifield indices.
4798         (<hw-index>,gen-extract): Ditto.
4799         (<hw-asm>,gen-parse): Ditto.
4800         (<hw-asm>,gen-print): Ditto.
4801         (<keyword>,gen-parse): Ditto.
4802         (<keyword>,gen-print): Ditto.
4803         (<operand>,gen-fget): Ditto.
4804         (<operand>,gen-fset): Ditto.
4805
4806         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4807         (-gen-hw-index): Ditto.
4808         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4809         (-gen-hw-index): Ditto.
4810
4811         * sem-frags.scm: New file.
4812
4813         * attr.scm (attr-parse): Add better checking of input.
4814
4815         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4816         All uses updated.
4817         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4818
4819         * ifield.scm (ifld-nil?): New proc.
4820
4821         * operand.scm (<operand>): New members getter,setter.
4822         (<operand>,make!): New args getter,setter.  All uses updated.
4823         (op:getter,op:setter): New procs.
4824         (<hw-index>,field-start): Return 0 for non-ifield indices.
4825         (<hw-index>,field-length): Return 0 for non-ifield indices.
4826         (-operand-parse-getter,-operand-parse-setter): New procs.
4827         (-operand-parse): New args getter,setter.  All callers updated.
4828         Always use hw-index-scalar for scalar operands.
4829         (-operand-read): Handle getter,setter.
4830         (define-full-operand): New args getter,setter.  All uses updated.
4831         * semantics.scm (-build-ifield-operand!): Update.
4832         (-build-index-of-operand!): Update.
4833         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4834         * simplify.inc (define-normal-operand): Update.
4835
4836         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4837         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4838         (s-binop,s-cmpop,s-convop): Ditto.
4839         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4840         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4841         (fcc-tests): New insn-enum.
4842         (fcc-value): Rename from fcc-type.
4843         * sparcfpu.cpu: New file.  All fp support moved here.
4844
4845         * rtl.scm (<rtx-func>): New member class.
4846         (rtx-class-*?): New procs.
4847         (def-rtx-node): New arg class.  All callers updated.
4848         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4849         * rtx-funcs.scm (*): Specify class.
4850
4851         * utils-cgen.scm (context-make-reader): New proc.
4852
4853         * utils.scm (assert-fail-msg): New variable.
4854         (assert): Use it.
4855         (list-drop,list-tail-drop): New procs.
4856
4857 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4858
4859         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4860         CGEN_MIN_INSN_SIZE deleted on March 22.
4861
4862         * ifield.scm (<ifield>,needed-iflds): New method.
4863         (<multi-ifield>,needed-iflds): New method.
4864         (ifld-needed-iflds): New proc.
4865         (multi-ifield?): New proc.
4866         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4867         (-sfmt-search-key): Include insn length in key.
4868         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4869         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4870         (-ifmt-lookup-ifmt!): Compute key here.
4871         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4872         All callers updated.
4873         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4874         All callers updated.
4875         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4876         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4877         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4878         to ifmt-build.
4879         * operand.scm (op-iflds-used): New proc.
4880         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4881         and sim-cpu.scm.
4882         And from sid.scm,sid-cpu.scm as well.
4883         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4884         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4885         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4886         (gen-extracted-ifld-value): Ditto.
4887         (-extract-chunk-specs): Ditto.
4888         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4889         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4890         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4891         (-extract-insert-subfields): New function.
4892         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4893         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4894         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4895         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4896         gen-extract-foo.
4897         (-gen-no-scache-semantic-fn): Ditto.
4898         (-gen-sem-case): Ditto.
4899         (-gen-read-case): Update calls to gen-define-ifields,
4900         gen-extract-ifields.
4901         * sim-decode.scm (-gen-record-args): Update.
4902         (-gen-sfmt-argvars-assigns): Update.
4903         (-gen-extract-case): Update.
4904         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4905         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4906         gen-extract-foo.
4907         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4908         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4909         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4910         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4911         gen-define-ifields, gen-extract-ifields.
4912         (-gen-record-args): Update.
4913         (gen-sfmt-argvars-assigns): Update.
4914         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4915         with gen-define-ifields.  Ditto for gen-extract-foo.
4916         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4917         procs rather than method calls.
4918
4919 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4920
4921         * sid.scm (-create-virtual-insns!): New local `context', pass it
4922         to insn-read.
4923
4924         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4925         (operand name) not (operand object), (local name) not (local object).
4926         (rtx-traverse-with-locals): New proc.
4927         (-compile-expr-fn): New proc.
4928         (rtx-compile): Rewrite.
4929         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4930         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4931         (rtl-c-set-trace): Ditto.
4932         (operand define-fn): Recognize operand name argument.
4933         (local define-fn): Recognize sequence temp name argument.
4934         * rtx-funcs.scm (operand): Argument is operand name, not object,
4935         so call current-op-lookup.
4936         (local): Similarily, so call rtx-temp-lookup.
4937
4938         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4939         (rtx-operand?): Ditto.
4940         (rtx-pretty-name): Ditto.
4941         (rtx-local-obj): Flag symbol argument as an error.
4942         (rtx-local-name): New proc.
4943         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4944
4945         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4946
4947         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4948         updated.
4949
4950         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4951         (and: QI rd #xff).
4952
4953         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4954         (*floats-s->c-fun-table*): Ditto.
4955         * hobbit.c,hobbit.h: Rebuild.
4956         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4957         * semantics.scm (rtx-simplify): Use /fastcall-make.
4958
4959         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4960
4961         * insn.scm (<insn>): Delete members condition, compiled-condition.
4962         (<insn>,make!): Update
4963         (<insn> getters,setters): Update.
4964         (-insn-parse,insn-read,define-full-insn): Update.
4965         * minsn.scm (minsn-make-alias): Update.
4966         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4967         (ifmt-compute!): Ditto.
4968         * sim.scm (sim-finish!): Update.
4969         * simplify.inc: (define-normal-insn): Update.
4970         * sid-cpu.scm (gen-semantic-code): Update.
4971
4972         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4973         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4974         (ifmt-compute!): Ditto.
4975
4976 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4977
4978         * minsn.scm (minsn-compute-iflds): Print better error message for
4979         missing ifields.
4980
4981 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4982
4983         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4984
4985         * Makefile.am (HOBFLAGS): New variable.
4986         (cgen-hob.c): Use it.
4987         (hobbit.c): Use it.
4988         (libcpu_a_SOURCES): Add hob-sup.c.
4989         (hob-sup.o): New rule.
4990         * Makefile.in: Rebuild.
4991         * cgen.c: #include hob-sup.h.
4992         (cgen_init_c): Call hobbit_init_support.
4993         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4994         (*special-scm->c-functions*): Add them.
4995         (display-c-expression): Handle *c-symbol*.
4996         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4997         (*floats-s->c-fun-table*): Ditto.
4998         (normalize): Recognize /fastcall-make.
4999         (normalize-fastcall-make): New proc.
5000         * hobbit.c,hobbit.h: Rebuild.
5001         * hob-sup.scm: New file.
5002         * hob-sup.c: New file.
5003         * hob-sup.h: New file.
5004         * read.scm: Load hob-sup.scm.
5005         * rtl.scm (-rtx-name-list): New variable.
5006         (rtx-name-list): New proc.
5007         (rtx-lookup): Try symbol first.
5008         (def-rtx-node): Add name to -rtx-name-list.
5009         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5010         (-rtx-traverse-anymode): New proc.
5011         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5012         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5013         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5014         (-rtx-traverse-{symornum,object}): New procs.
5015         (-rtx-make-traverse-table): Rewrite.
5016         (-rtx-traverse-operands): Rewrite arg-types handling.
5017         Handle #f result of traverser.
5018         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5019         Move debug handling here.
5020         (-rtx-traverse-debug): Delete.
5021         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5022         for each rtx.
5023         * semantics.scm (semantic-compile:process-expr!): Fix call to
5024         -rtx-traverse.
5025         * utils.scm (map1-improper): New proc.
5026
5027 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5028
5029         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5030         (h-mbits): Ditto.
5031         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5032         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5033         (<operand>,cxmake-get): Tweak.
5034         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5035
5036 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5037
5038         * thumb.cpu (dnti): Delete timing spec.
5039         (all insn): Update.
5040
5041         * arm.cpu (arm isa): New fields condition, setup-semantics.
5042         (thumb isa): New field setup-semantics.
5043         (h-gr): Add attribute CACHE-ADDR.
5044         * arm7.cpu (dnai): Delete condition.
5045         (eval-cond): Delete.
5046
5047         * mach.scm (<isa>): New member setup-semantics.
5048         (-isa-parse-setup-semantics): New proc.
5049         (-isa-parse): New arg setup-semantics.
5050         (-isa-read): Recognize setup-semantics.
5051
5052         * sid-cpu.scm (gen-extract-fields): Split into two:
5053         gen-extract-ifields, gen-extract-ifmt-ifields.
5054         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5055         tracing begin/end messages (done by caller now).
5056         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5057         tracing begin/end messages (done by x-before,x-after virtual insns).
5058         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5059         end so don't have to look it up again next time.
5060         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5061         (-decode-expr-ifield-tracking-key): New proc.
5062         (-decode-expr-ifield-tracking): New proc.
5063         (-decode-expr-ifield-values-used): New proc.
5064         (-decode-expr-ifield-mark-used!): New proc.
5065         (-gen-decode-expr-set-itype): New proc.
5066         (-gen-decode-expr-entry): Rewrite.
5067         (-gen-decode-table-entry): New proc.
5068         (-gen-decoder-switch): Use it.
5069         (-gen-virtual-insn-finder): New proc.
5070         (-gen-argbuf-elm): Move here from sid.scm.
5071         (-gen-argbuf-hw-elm): Ditto.
5072         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5073         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5074         conditional-execution isas.
5075         (-gen-decode-fn): Record conditional-exec ifield.
5076         * sid.scm (-current-pbb-engine?): New global.
5077         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5078         (<ifield>,gen-ifld-extract): New arg `indent'.
5079         (<multi-ifield>,gen-ifld-extract): Ditto.
5080         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5081         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5082         (-gen-arch-model-decls): Only scan real insns.
5083         (scache-engine-insns,pbb-engine-insns): New procs.
5084         (-create-virtual-insns!): New proc.
5085         (sim-finish!): Call it.
5086         (-decode-specialize-insn?): New proc.
5087         (-decode-specialize-build-assertion): New proc.
5088         (-decode-specialize-insn-1): New proc.
5089         (-decode-specialize-insn): New proc.
5090         (-fill-sim-insn-list!): New proc.
5091         (sim-analyze!): Create copies of insns to be specialized.
5092         * utils-cgen.scm (obj-set-name!): New proc.
5093
5094         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5095         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5096         semantic-attrs.
5097         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5098         sformats.
5099         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5100         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5101         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5102         (attr): Rewrite test for insn owner.
5103         (member): New rtx function.
5104         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5105         as separate function.
5106         (rtx-ifield?,rtx-ifield-name): New procs.
5107         (rtx-operand-obj): Rewrite.
5108         (rtx-operand-name): New proc.
5109         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5110         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5111         (tstate-make): New args owner, known.  All callers updated.
5112         (tstate-known-lookup): New proc.
5113         (rtx-traverse): New arg owner.  All callers updated.
5114         (rtx-make-bool): New proc.
5115         (rtl-find-ifields): Rewrite.
5116         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5117         * semantics.scm: ... here.
5118         (rtx-const-equal,rtx-const-list-equal): New procs.
5119         (-build-known-values): New proc.
5120         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5121         (semantic-attrs): Ditto.
5122         * rtx-funcs.scm (member,number-list): New rtx functions.
5123
5124         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5125         Rewrite.  Delete arg `all-attrs'. All callers updated.
5126         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5127         updated.
5128         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5129
5130         * decode.scm (subdtable-add): Handle `expr' entries.
5131         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5132         (exprtable-entry-*): Update.
5133         (exprtable-entry-iflds): New proc.
5134         (exprentry-cost): New proc.
5135         (exprtable-sort,-gen-exprtable-name): New procs.
5136         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5137         (exprtable-*): Update.
5138         (-build-decode-table-entry): Don't issue collision warning if all are
5139         specialized insns.  Sort exprtable entries before building table.
5140
5141         * read.scm (-reader-process-expanded-1): Move pretty printing of
5142         input to logging level 4.
5143
5144         * utils.scm (string-list->string): New proc.
5145
5146         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5147         semantics.
5148         (insn-read): Delete leading '-' in name.  All callers updated.
5149         (real-insn?): New proc.
5150         (real-insns): Rewrite.
5151         (insn-has-ifield?): New proc.
5152         (insn-builtin!): Create insn attribute SPECIALIZED.
5153
5154         * mach.scm (<arch>): Delete member app-data.
5155         (current-raw-insn-list): New proc.
5156         (insn-list-car,insn-list-splice!): New procs.
5157         (<decode-specialize>): New class.
5158         (-isa-parse-decode-specialize): New proc.
5159         (-isa-parse-decode-specializes): New proc.
5160         (<isa>): New members `condition', `decode-specializes'.
5161         (-isa-parse-condition): New proc.
5162         (-isa-parse): New args condition, decode-specializes.
5163         (-isa-read): Recognize condition, decode-specializes.
5164         (-isa-add-decode-specialize!): New proc.
5165         (modify-isa): New proc.
5166         (isa-conditional-exec?,state-conditional-exec?): New procs.
5167         (arch-init!): New reader command `modify-isa'.
5168
5169         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5170         (mode-signed,mode-unsigned?): New procs.
5171
5172 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5173
5174         * types.scm (<array>): New method get-shape.
5175         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5176         onto type.
5177         (hw-shape,hw-num-elms): New procs.
5178         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5179         if there's more than 255 registers.
5180         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5181
5182         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5183         with get/set specs.
5184
5185 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5186
5187         * cgen-sid.scm (sim-arguments): Add -X.
5188         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5189         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5190         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5191         Simplify by supporting pbb engine only.
5192         (-gen-sem-switch-init): New proc.
5193         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5194         (cgen-sem-switch.cxx): New proc.
5195         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5196         with with-pbb?.  Support dual scache/pbb engines.
5197         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5198         Support dual scache/pbb engines.
5199         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5200         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5201         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5202
5203 1999-05-10  Ben Elliston  <bje@cygnus.com>
5204
5205         * arm7.cpu: Remove coprocessor related fields, operands and insn
5206         definitions for now. Take the undefined instruction trap instead.
5207         (ldmda-wb): New instruction.
5208         (ldmib-wb): Likewise.
5209         (ldmdb-wb): Likewise.
5210         (stmdb-wb): Likewise.
5211         (stmib-wb): Likewise.
5212         (stmda-wb): Likewise.
5213
5214 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5215
5216         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5217         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5218
5219         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5220         hobbit can't handle optional third arg.
5221
5222 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5223
5224         * arm.cpu (h-tbit): Delete set spec.
5225         (h-mbits): Don't call arm_mbits_set in set spec.
5226         * arm.sim: New file.
5227         * hardware.scm (modify-hardware): New proc.
5228         (hardware-init!): Add modify-hardware command.
5229         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5230         (-hw-gen-set-quiet): Ditto.
5231         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5232         hardware attribute.  Load $arch.sim file if present.
5233         * utils-cgen.scm (keyword-list?): New proc.
5234         (keyword-list->arg-list,arg-list-validate-name): New procs.
5235         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5236
5237         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5238
5239         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5240         @cpu@_cpu_cgen.
5241
5242         * attr.scm (obj-prepend-atlist!): New proc.
5243
5244         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5245
5246         * sid.scm (<operand>,profilable?): Use op:type.
5247         * sim.scm (<operand>,profilable?): Use op:type.
5248
5249 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5250
5251         * utils.scm (find-index,find): Be more stack friendly.
5252
5253         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5254         (bic-imm): Ditto.
5255
5256 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5257
5258         * arm.cpu (h-gr-usr): New hardware element.
5259         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5260         (arm-mode): New keyword.
5261         (h-mbits): Add set spec.
5262         (h-spsr): Implement get/set specs.
5263
5264         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5265         (-reader-process-expanded-1): Pretty print logging output.
5266
5267         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5268         (cgen-cpu.h): Print enums before hardware elements.
5269         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5270         * sid-decode.scm (cgen-decode.cxx): Ditto.
5271         * sid-model.scm (cgen-model.cxx): Ditto.
5272
5273         * utils-cgen.scm (context-error): Accept variable number of
5274         trailing args.
5275
5276         * rtx-funcs.scm (error:): New rtx function.
5277         * rtl-c.scm (s-case-vm): New proc.
5278         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5279         (s-case): Simplify, handle non-VM result.
5280         (error:): New rtx function.
5281
5282 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5283
5284         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5285         (test-hi,test-ls): Fix cbit handling.
5286         (shift-type,h-operand2-shifttype): Move here ...
5287         * arm7.cpu: ... from here.
5288         (set-cond,set-cond-maybe,dnix): Delete, unused.
5289         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5290         * arm.cpu: ... to here.
5291         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5292         (alu-cmn): Use set-add-flags.
5293         (alu-tst): Use set-zn-flags.
5294         (alu-cmp): Use set-sub-flags.
5295         (lsl,lsr,asr): Set condition codes.
5296         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5297         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5298         alu-shift-op.
5299         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5300         All callers updated.
5301         (sub-sp): Rename from add-sp-neg.
5302         (f-lbwl-offset): Delete.
5303         (f-lbwl-hi,f-lbwl-lo): New ifields.
5304         (lbwl-hi,lbwl-lo): Update.
5305         (bl-hi): Add 4 to pc.
5306         (push-reg,pop-reg): Simplify.
5307         (push,push-lr): Push registers in correct order.
5308         (pop,pop-pc): Pop registers in correct order.
5309         (save-reg-inc,load-reg-inc): Simplify.
5310         (ldmia): Save registers in correct order.
5311
5312 1999-04-30  Ben Elliston  <bje@cygnus.com>
5313
5314         * arm7.cpu (f-op-hdt): Remove; unused.
5315         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5316         (f-ror-imm8): New multi-ifield.
5317         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5318         callers updated.
5319         (f-uimm12): New field.
5320         (ror-imm8): New operand.
5321         (uimm12): Likewise.
5322         (hdt-offset8): Reinstate operand.
5323         (offset4-hi,offset4-lo): Remove.
5324         (set-cond): Remove macro; unused.
5325         (set-cond-maybe): Likewise.
5326         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5327         (store-word/byte): Likewise.
5328         (load-halfword): Use hdt-offset8 multifield operand instead of two
5329         4-bit operands that are explicitly combined by semantic code.
5330         (do-halfword-store): Bug fix. Set address when not preindexing.
5331         (store-halfword): Also use hdt-offset8 operand.
5332         (arith-op): Avoid clobbering source registers when one of them is
5333         the destination register.
5334         (arith-imm-op): Likewise.
5335         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5336         (teq-imm): Likewise.
5337         (ldm-p): Rename to ldmdb.
5338         (stm-pw): Rename to stmdb-wb.
5339         (multi-action): New macro; test reg-list bits and execute a
5340         semantic fn if the bit is set.
5341         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5342         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5343         (all insns): Use dnai entries for simplicity rather than dni.
5344         (*): Use short-form of (const ..).
5345
5346 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5347
5348         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5349         member eval to evaluator.
5350         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5351         (tstate-make): Delete arg op-fn.  All callers updated.
5352         (tstate-op-fn,tstate-set-op-fn!): Delete.
5353         (rtx-traverse): Delete op-fn arg.  All callers updated.
5354         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5355         split out of -simplify-for-compilation.
5356
5357         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5358         (cgen_DEPENDENCIES): Add stamp-cgen.
5359         (stamp-cgen): New rule.
5360         * Makefile.in: Rebuild.
5361
5362         * rtl-c.scm (enum:): Define emitter for.
5363         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5364         enums as well.
5365         (rtx-constant-value,rtx-enum-value): New procs.
5366         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5367         (rtx-compile-time-constant?): Return #t for enums.
5368         (rtx-true?,rtx-false?): Handle enums.
5369         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5370         building result by hand.
5371         (rtx-simplify-eq-attr-insn): Ditto.
5372         * rtx-funcs.scm (enum:,enum): New rtx functions.
5373
5374         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5375         aliases-analyzed?.
5376         (arch-analyze-insns!): New proc.
5377         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5378         of calling ifmt-compute! directly.
5379         * sid.scm (-sim-insns-analyzed?): Delete.
5380         (sim-analyze!): Call arch-analyze-insns! instead of calling
5381         ifmt-compute! directly.
5382         * sim.scm (-sim-insns-analyzed?): Delete.
5383         (sim-analyze!): Call arch-analyze-insns! instead of calling
5384         ifmt-compute! directly.
5385
5386         * utils.scm (string-take-with-filler): New proc.
5387         (string-take): Use it.
5388
5389         * pgmr-tools.scm: New file.
5390         * read.scm: Load it.
5391         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5392
5393         * insn.scm (insn-base-mask): Renamed from insn:mask.
5394         All callers updated.
5395         (insn-base-mask-length): Renamed from insn:mask-length.
5396         All callers updated.
5397         (insn-foo): Renamed from insn:foo.  All callers updated.
5398         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5399         * iformat.scm (compute-insn-base-mask-length): Renamed from
5400         compute-insn-mask-length.  All callers updated.
5401         (compute-insn-base-mask): Renamed from compute-insn-mask.
5402         All callers updated.
5403
5404         * enum.scm (-enum-parse-prefix): New proc.
5405         (<enum>,make!): Don't parse enum values here.
5406         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5407         (define-full-insn-enum): Ditto.
5408         (enum-vals-upcase): New proc.
5409         * hardware.scm (define-keyword): Make enum prefix uppercase.
5410         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5411
5412         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5413         (<ifield>,field-extract): New method.
5414         (<multi-ifield>,field-extract): New method.
5415         (ifld-extract): New proc.
5416         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5417         (ifld-extract-fn-name): Renamed from ifld-extract.
5418
5419         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5420         All callers updated.
5421
5422         * ifield.scm (ifld-lsb0?): New proc.
5423         (sort-ifield-list): New arg up?.  All callers updated.
5424         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5425         rather than global state.
5426
5427 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5428
5429         * insn.scm (pretty-print-insn-format): New proc.
5430
5431         * Makefile.in: Rebuild.
5432         * aclocal.m4: Rebuild
5433         * configure: Rebuild.
5434
5435 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5436
5437         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5438         * configure: Rebuild.
5439         * aclocal.m4: Rebuild.
5440         * Makefile.in: Rebuild.
5441         * doc/Makefile.in: Rebuild.
5442         * doc/version.texi: Rebuild.
5443
5444 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5445
5446         * utils.scm (bits->bools): New proc.
5447
5448 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5449
5450         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5451         subfield's gen-ifld-extract-decl method.
5452
5453 1999-04-23  Ben Elliston  <bje@cygnus.com>
5454
5455         * arm7.cpu (ldrsh-pu): Remove.
5456         (do-halfword-load): New pmacro.
5457         (load-halfword): Likewise.
5458         (do-halfword-store): Likewise.
5459         (store-halfword): Likewise.
5460         (strh-*): New instructions.
5461         (ldrsb-*): Likewise.
5462         (ldrh-*): Likewise.
5463         (ldrsh-*): Likewise.
5464
5465 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5466
5467         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5468         fields.
5469
5470         * arm7.cpu (do-word/byte-store): Fix typo.
5471
5472 1999-04-22  Ben Elliston  <bje@cygnus.com>
5473
5474         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5475         register is the program counter (R15).
5476
5477         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5478         (str-*): Implement using store-word-byte. Remove older versions.
5479         (bic): Use the `inv' rtx for obtaining bitwise complements.
5480         (bic-imm): Likewise.
5481         (mvn): Likewise.
5482         (mvn-imm): Likewise.
5483         (store-indev-reg): Remove crufty pmacro.
5484         (load-indiv-reg): Likewise.
5485         (ldm-p): Reverse the order of register processing for decrement.
5486         (stm-p): Likewise.
5487         (stbi): Remove; handled by the str-* insns.
5488
5489 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5490
5491         * thumb.cpu (cmp): Fix carry bit computation.
5492         (alu-cmp): Ditto.
5493
5494 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5495
5496         * arm.cpu (h-tbit): Specify set spec.
5497         (h-cpsr): Ditto.
5498         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5499         (set-sub-flags): Interpret "carry bit" as a borrow.
5500         (all sub/cmp insns): Carry bit is actually a borrow bit.
5501         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5502         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5503         .pmacro instead.
5504         (hireg-add,hireg-cmp,hireg-move): Ditto.
5505
5506         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5507         (-CGEN-LANG-VERSION): Ditto.
5508
5509 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5510
5511         * pmacros.scm (-pmacro-make): New arg `default-values',
5512         all callers updated.
5513         (-pmacro-default-values): New proc.
5514         (-pmacro-process-keyworded-args): New proc.
5515         (-pmacro-process-args): New proc.
5516         (-pmacro-invoke): Process arguments before expanding macro.
5517         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5518         (define-pmacro): Handle default values specified in arg list.
5519         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5520         (rtx-boolif-op-arg[01]): New procs.
5521         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5522         (rtx-simplify): Handle not,orif,andif.
5523         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5524         * utils.scm (alist-copy): New proc.
5525         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5526         (ldr*): Rewrite.
5527         (swi): Explicitly set pc.
5528
5529         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5530
5531 1999-04-17  Ben Elliston  <bje@cygnus.com>
5532
5533         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5534         correctly adjusts the program counter now.
5535
5536         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5537         (f-signed?): Rename from `f-hdt-signed?'.
5538         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5539         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5540         (f-hdt-offset8): Use new field names.
5541         (ldr): Use `imm12' field, not `offset12', since we do our own
5542         address arithmetic.
5543         (str, str-*): Likewise.
5544         (ldu-*): Remove most; better not implemented than broken.
5545         (ldrh*): Likewise.
5546         (ldrsh-pu): New insn.
5547         (stri): Likewise.
5548         (stri-p): Likewise.
5549         (stbi): Likewise.
5550         (ldm-p): Likewise; replace (load-indiv-reg) version.
5551
5552 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5553
5554         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5555         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5556         (*): Explicitly specify mode in c-call.
5557         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5558         (arith-op): Ditto.
5559         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5560         (arith-imm-op): New pmacro.
5561         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5562         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5563
5564 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5565
5566         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5567
5568         * rtl.scm (rtl-find-ifields): Implement.
5569
5570         * utils-gen.scm: New file.
5571         * read.scm: Load it.
5572         * desc.scm: Move generic attribute code to utils-gen.scm.
5573         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5574         * Makefile.in: Rebuild.
5575
5576         * arm7.cpu (R15-OFFSET): New attribute.
5577         (dnai): New pmacro.
5578         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5579         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5580         for reg-shift version.
5581         (arith-op): Ditto.
5582         (data processing insns): Reorganize.  Use dnai.
5583
5584         * attr.scm (attr-kind): New proc.
5585         (attr-list-enum-list): Rewrite.
5586         (-attr-sort): Split result into two lists, bools and non-bools.
5587         (current-attr-list-for): Update.
5588
5589         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5590         * sid-cpu.scm (-gen-attr-decls): New proc.
5591         (-gen-insn-attr-decls): New proc.
5592         (cgen-desc.h): New proc.
5593         (cgen-cpu.h): Put everything in @cpu@ namespace.
5594         (gen-parallel-exec-type): Change prefix of parexec struct from
5595         @cpu@ to @prefix@.
5596         (-gen-trace-record-type): Ditto for trace_record struct.
5597         (-gen-write-case): Update.
5598         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5599         @prefix@.  Update scache struct references.
5600         (-gen-sem-case): Update scache struct references.
5601         (-gen-sem-switch-fn): Update idesc struct reference.
5602         Update insn_type enum reference.
5603         (cgen-write.cxx): Update scache,argbuf references.
5604         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5605         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5606         from @cpu@ to @prefix@.
5607         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5608         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5609         from @CPU@ to @PREFIX@.
5610         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5611         from @CPU@ to @PREFIX@.
5612         (-gen-decode-insn-globals): Generate insn attributes.
5613         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5614         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5615         semantic fn typedef.
5616         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5617         Change prefix of scache struct from @cpu@ to @prefix@.
5618         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5619         Change prefix of idesc struct from @cpu@ to @prefix@.
5620         Change prefix of insn_type enum from @cpu@ to @prefix@.
5621         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5622         from @cpu@ to @prefix@.
5623         (-gen-scache-decls): Change prefix of scache struct from
5624         @cpu@ to @prefix@.  Update idesc struct name.
5625         Update decode,execute methods.
5626         (-gen-extract-case): Update to type name changes.
5627         (-gen-decode-fn): Ditto.
5628         (cgen-decode.h): Put everything in @cpu@ namespace (except
5629         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5630         (cgen-decode.cxx): Add using namespace @cpu@.
5631         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5632         model_mark_get/set from @cpu@ to @prefix@.
5633         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5634         @prefix@.
5635         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5636         of model_insn_before/after from @cpu@ to @prefix@.
5637         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5638         Update insn_word type name.
5639         (-gen-model-timing-table): Update INSN_TIMING struct name.
5640         (-gen-model-init-fn): Update MODEL_DATA struct name.
5641         (-gen-mach-defns): Update name of init_idesc_table fn.
5642         (cgen-model.cxx): Add using namespace @cpu@.
5643         * sid.scm (gen-cpu-class): Delete.
5644         (gen-attr-type): New proc.
5645         (gen-obj-attr-sid-defn): New proc.
5646         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5647         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5648         @CPU@ to @PREFIX@.
5649         (gen-cpu-insn-enum): Update name of insn enum.
5650         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5651         (bx-hs): Ditto.
5652         (swi): Rename @cpu@_swi to @prefix@_swi.
5653
5654         * decode.scm (-build-decode-table-entry): Remove heuristic for
5655         distinguishing insns, and use insn ifield-assertion specs.
5656
5657         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5658         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5659         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5660         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5661         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5662         all callers updated.
5663         (gen-attr-name): New proc
5664         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5665         (gen-obj-attr-defn): Delete num_nonbools count.
5666
5667         * iformat.scm (ifmt-analyze): Handle insn-condition.
5668         (ifmt-compute!): Ditto.
5669         * insn.scm (<insn>): Specify default value for condition,
5670         post-cond-trap,compiled-condition,compiled-semantics.
5671         (<insn>,make!): New arg condition.
5672         (<insn>): Add getters for condition,compiled-condition.
5673         (-insn-parse): New arg condition, all callers updated.
5674         (-insn-read): Recognize condition spec.
5675         (define-full-insn): New arg condition.
5676         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5677         * semantics.scm (semantic-compile): Change arg sem-code to
5678         sem-code-list.
5679         (semantic-attrs): Ditto.
5680         * sim.scm (sim-finish!): Update calls to define-full-insn.
5681         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5682         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5683         * sid.scm (sim-finish!): Update call to define-full-insn.
5684
5685 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5686
5687         * Makefile.am (sim-cpu): Allow specification of ISA.
5688         * Makefile.in: Rebuild.
5689
5690 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5691
5692         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5693
5694 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5695
5696         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5697
5698         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5699
5700         * attr.scm (atlist?): New proc.
5701         (-attr-eval): Rewrite.
5702         (attr-parse): New proc.
5703         (atlist-parse): Use it.
5704
5705         * decode.scm (exprtable-entry-make): New proc.
5706         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5707         (exprtable-make,exprtable-insns): New procs.
5708
5709         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5710         All uses updated.
5711         (hardware-builtin!): Make h-memory a vector.
5712
5713         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5714         All callers updated.
5715         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5716
5717         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5718         All uses updated.
5719         (-insn-parse): Set semantics to #f if not specified.
5720         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5721         if simulator.
5722         (-parse-insn-format): Recognize `=' iformat spec.
5723
5724         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5725         (isa-max-insn-bitsize): Ditto.
5726
5727         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5728         rtl-c-with-alist.
5729         (<ifield>,gen-extract): Ditto.
5730         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5731         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5732         (gen-define-ifmt-ifields): New proc.
5733         (gen-semantic-code): Rewrite.
5734         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5735         (-gen-decoder-switch): Handle expression tables.
5736         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5737         gen-define-fields.
5738         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5739         instead of gen-define-fields.
5740         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5741         callers updated.
5742         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5743         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5744         (-gen-ifld-extract-beyond): Ditto.
5745         (<multi-ifield>,gen-ifld-extract): Ditto.
5746         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5747         rtl evaluation code.
5748         (op:read): Build an <eval-state> to pass to gen-read.
5749         (op:write): Build an <eval-state> to pass to gen-write.
5750         (op:record-profile): Build an <eval-state> to pass to
5751         gen-record-profile.
5752         * sim-cpu.scm (gen-semantic-code): Rewrite.
5753         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5754         rtl-c-with-alist.
5755         (-gen-ifld-extract-beyond): Ditto.
5756         (<multi-ifield>,gen-ifld-extract): Ditto.
5757         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5758         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5759         rtl evaluation code.
5760         (op:read): Build an <eval-state> to pass to gen-read.
5761         (op:write): Build an <eval-state> to pass to gen-write.
5762         (op:record-profile): Build an <eval-state> to pass to
5763         gen-record-profile.
5764
5765         * operand.scm (<operand>): Give `selector' default value of #f.
5766         Give `num' default value of -1.  Give `cond?' default value of #f.
5767         (op:new-mode): Delete arg `set?', all uses updated.
5768
5769         * read.scm (reader-error): Handle #f return from port-filename.
5770         (-init-parse-cpu!): Call rtl-c-init!.
5771         (reader-install-builtin!): Call rtl-builtin!.
5772
5773         * rtl-c.scm: New file.
5774         * semantics.scm: New file.
5775         * read.scm: Load them.
5776         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5777         to semantics.scm.
5778         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5779         type,eval,num.
5780         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5781         (-rtx-num-text,-rtx-max-num): New globals.
5782         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5783         (-rtx-macro-lookup): New proc.
5784         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5785         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5786         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5787         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5788         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5789         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5790         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5791         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5792         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5793         (rtx-pretty-name): New proc.
5794         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5795         (rtx-traverse-*): Rewrite rtx traversing.
5796         (rtx-eval-*): Rewrite rtx evaluation.
5797         (rtx-compile): New proc.
5798         (rtx-simplify): New proc.
5799         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5800         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5801         (ifield,index-of): Rewrite.
5802         (name): Renamed from `operand:'.
5803         (operand,xop,local): New rtx's.
5804         (current-insn): Rewrite.
5805         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5806         (cgen-hob.h): Remove rule for.
5807         (cgen-hob.o): Depend on cgen-hob.c only.
5808         * Makefile.in: Rebuild.
5809
5810         * utils-cgen.scm (vmake): New proc.
5811         (<context>): New class.
5812         (context-make-prefix,context-error): New procs.
5813
5814 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5815
5816         * i960.cpu: Add some ??? comments.
5817         (xnor, ornot): New instructions.
5818         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5819
5820 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5821
5822         * cos.scm (-object-error): Print better error message.
5823
5824         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5825         (-pmacro-env-ref): Renamed from -env-ref.
5826
5827 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5828
5829         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5830         (h-pc): Delete.
5831         (hardware-builtin!): Delete h-pc builtin.
5832         * arm.cpu (h-pc): Define.
5833         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5834         * arm7.cpu (set-logical-cc-maybe): Delete.
5835         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5836         (data processing insns): Rewrite.
5837         * m32r.cpu (h-pc): Define.
5838         * fr30.cpu (h-pc): Define.
5839         * i960.cpu (h-pc): Define.
5840         * sparc.cpu (h-pc): Define.
5841
5842         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5843         (s-parallel): Replace do {...} while (0) with {...}.
5844         (s-sequence): Ditto.
5845
5846         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5847         consistent.
5848         (-gen-write-case,-gen-sem-case): Ditto.
5849         (-gen-sem-case): Only specify `written' if profiling or
5850         parallel-write-back.
5851         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5852         (-gen-sem-switch-fn): New proc.
5853         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5854         based on with-sem-switch option.
5855         * sid-decode.scm (-gen-decode-insn-globals): Only define
5856         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5857         addresses in idesc_table if !with-sem-switch.
5858         (-gen-sem-fn-decls): Rewrite.
5859         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5860         member based on with-sem-switch.  Only define
5861         `idesc_table_initialized_p' member if with-sem-switch.
5862         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5863         * sid.scm (-with-sem-switch?): New variable.
5864         (option-init!): Initialize it.
5865         (option-set!): Set it.
5866         (with-sem-switch?): New proc.
5867         (-op-gen-set-trace): Only emit `written' reference if profiling.
5868         (sim-finish!): Use h_pc_set to set pc.
5869
5870 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5871
5872         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5873         All callers updated.
5874         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5875
5876         * sid.scm (gen-argbuf-type): Delete.
5877         (-gen-argbuf-fields-union): Move to ...
5878         * sid-decode.scm: ... here.
5879
5880         * read.scm (-reader-process-expanded-1): New proc.
5881         (-reader-process-expanded): Call it to catch nested begin's.
5882         (reader-process): Move `begin' handling to -reader-process-expanded.
5883
5884         * insn.scm (-insn-read): Fix name of `format' spec.
5885
5886         * pmacros.scm (.pmacro): New builtin.
5887         (scan-symbol): If procedure macro, return macro rather than its symbol.
5888         (check-macro): Don't do lookup, instead check if (car expr) is
5889         macro object.
5890         (scan-list): Handle .pmacro.
5891         (scan): No longer re-examine text for another macro invocation.
5892         (-pmacro-build-lambda): New proc.
5893         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5894         another, fetch the other's value (rather than doing it during
5895         expansion).
5896
5897 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5898
5899         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5900         * Makefile.in: Rebuild.
5901
5902         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5903         (-fill-slot!): Simplify.
5904         (-build-slots): Simplify.
5905
5906         * dev.scm (load-sid): Don't load sid-arch.scm.
5907
5908         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5909         switch's.
5910         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5911         switch's.
5912
5913 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5914
5915         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5916         * decode.scm: ... here.  New file.
5917         * sid-decode.scm: Use decoder computation code in decode.scm.
5918         * read.scm: Load decode.scm.
5919
5920         * arm.cpu (arm710 model): Add u-exec function unit.
5921         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5922         Add get/set specs to redirect reg 15 to h-pc.
5923         (h-*): Indicate for both ARM and THUMB isas.
5924         (cbit,nbit,vbit,zbit): Ditto.
5925         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5926         (h-cpsr): Make virtual.  Add get/set specs.
5927         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5928         (h-spsr): New virtual reg.
5929         * arm7.cpu (shift-type): New explicitly defined keyword.
5930         (h-operand2-shifttype): Use it.
5931         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5932         All callers updated.  Don't set cbit.
5933         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5934         shift-type enum as case choices.  Set cbit.
5935         (and,orr,eor,add-imm): Uncomment out.
5936         (undefined): Temporarily comment out.
5937         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5938         (lda-pc,lda-sp): Ditto.
5939         (ldr-pc): Rename from ldr.
5940         (cbranch): Mark insns as being thumb insns.
5941
5942         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5943
5944         * cgen-sid.scm: Don't load sid-arch.scm.
5945         (sim-arguments): Delete unused entries.
5946         * sid-arch.scm: Delete.
5947
5948         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5949         (<insn>,ifld-assertions): New member.
5950         (<insn>,make!): New arg ifld-assertions, all callers updated.
5951         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5952         (insn:fields): Delete.
5953         (-insn-parse): New arg ifld-assertions.  All callers updated.
5954         (-insn-read,define-insn): New procs.
5955         (define-full-insn): New arg ifld-assertions.  All callers updated.
5956         (insn-init!): New comment define-insn.
5957
5958         * model.scm (-model-parse): Ensure at least one unit specified.
5959
5960         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5961         (<c-expr-temp>,get-name): New method.
5962         (-rtx-make-current-closure,s-closure): New proc.
5963         (hw:): Wrap rtx indices in a closure.
5964         (-gen-case-prefix): New proc.
5965         (s-case): Simplify.
5966         * rtx-funcs.scm (case:): Fix call to s-case.
5967         (closure): New rtx func.
5968
5969         * hardware.scm (<hardware-base>): New member isas-cache.
5970         (<hardware-base>,get-isas): New method.
5971         (hardware-builtin): Indicate for all isas.
5972         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5973         * mach.scm (current-arch-mach-name-list): Return list of names.
5974         (current-isa-mach-name-list): Ditto.
5975         (define-arch): Install builtin objects here.
5976         * read.scm (keep-atlist?): Only keep if both mach and isa are
5977         being kept.
5978         (keep-mach-atlist?): New proc.
5979         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5980         (reader-install-builtin!): Renamed from -install-builtin!.
5981         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5982         -gen-cpu-reg-access-defns.  Rewrite.
5983         (gen-reg-access-defn): Delete.
5984         (-gen-hardware-struct): New proc.
5985         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5986         (gen-semantic-fn,-gen-all-semantics): Delete.
5987         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5988         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5989         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5990         Call sem-analyze-insns!.
5991         (cgen-semantics.cxx): Add multiple-isa support.
5992         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5993         (-gen-scache-decls,-gen-decode-fn): Ditto.
5994         (cgen-decode.h): Call sem-analyze-insns!.
5995         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5996         * sid.scm (-with-multiple-isa?): New variable.
5997         (option-init!): Initialize it.
5998         (option-set!): Set it.
5999         (with-multiple-isa?): New proc.
6000         (gen-cpu-ref): New arg isas.  All callers updated.
6001         (gen-cpu-class): New proc.
6002         (*-get-macro,*-set-macro): Delete.
6003         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6004         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6005         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6006         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6007         (-sim-insns-analyzed): New global variable.
6008         (sim-init!): Reset it.
6009         (sim-analyze-insns!): New proc.
6010         (sim-analyze!): Don't do instruction analysis here.
6011         (sim-finish!): Specify isa of x-invalid insn.
6012         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6013
6014 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
6015
6016         * thumb.cpu (cpu,mach,model): Delete.
6017         (dntf): New pmacro.  Use it for all field definitions.
6018         (dntop): New pmacro.  Use it for all operand definitions.
6019         (asr): Correct field list.
6020         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6021
6022         * utils-cgen.scm (define-getters): New macro to simplify
6023         writing class accessors.
6024         (define-setters): Ditto.
6025         (sanitize): Recognize isa elements.
6026
6027         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6028         state-parallel-exec?.
6029         * sid-model.scm (*): Ditto.
6030         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6031         state-decode-assist.
6032
6033         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6034         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6035         * sim-decode.scm (-gen-decode-switch): Ditto.
6036
6037         * sim-arch.scm (-regs-for-access-fns): Delete.
6038         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6039         (-gen-arch-reg-access-defns): Delete.
6040
6041         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6042         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6043         with state-parallel=exec?.
6044         (cgen-*): Call sim-analyze-insns! here.
6045         * sim-decode.scm (cgen-*): Ditto.
6046         * sim-model.scm (cgen-*): Ditto.
6047         * sim.scm (-sim-insns-analyzed): New global variable.
6048         (sim-init!): Reset it.
6049         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6050         already done the analysis.
6051
6052         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6053         MACH struct.
6054
6055         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6056         (arm arch): Update isa spec.
6057         (arm,thumb isas): Define.
6058         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6059         (arm7tdmi mach): Add isa spec.
6060         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6061         `const' on word number.
6062         * fr30.cpu (fr30 arch): Update isa spec.
6063         (fr30 isa): Define.
6064         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6065         moved to isa spec.
6066         * i960.cpu (i960 arch): Update isa spec.
6067         (i960 isa): Define.
6068         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6069         liw-insns,parallel-insns moved to isas spec.
6070         * m32r.cpu (m32r arch): Update isas spec.
6071         (m32r isa): Define.
6072         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6073         liw-insns,parallel-insns moved to isa spec.
6074         * sparc.cpu (sparc arch): Update isas spec.
6075         (sparc isa): Define.
6076         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6077         decode-assist moved to isa spec.
6078         * sparc64.cpu (sparc64 cpu): Ditto.
6079         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6080         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6081         (-gen-mach-table-defns): Output mach table.
6082         (-gen-hash-defines): Delete insn size macros, except for
6083         CGEN_MAX_INSN_SIZE.
6084         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6085         (cgen-desc.h): Define MAX_ISAS.
6086         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6087         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6088         (arch-* accessors): Renamed from arch:*.  All callers updated.
6089         (current-arch-isa-name-list): New proc.
6090         (-arch-parse-isas): Renamed from -arch-parse-isa.
6091         (def-isa-attr!): Rewrite.
6092         (<iframe>): New class.
6093         (<itype>): New class.
6094         (<isa>): Rewrite.
6095         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6096         (isa-integral-insn?,isa-parallel-exec?): New procs.
6097         (-isa-parse,-isa-read,define-isa): New proc.
6098         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6099         liw-insns moved to <isa>.
6100         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6101         (-cpu-parse,-cpu-read): Update.
6102         (state-*): Renamed from state:*.  All callers updated.
6103         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6104         not cpu.
6105         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6106         (state-decode-assist): New proc.
6107         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6108         (-adata-set-derived!): Rewrite.
6109         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6110         callers updated.
6111         (arch-init!): Add define-isa command.
6112         * read.scm (<reader>): Default keep-isa member to (all).
6113         (reader-* accessors): Renamed from reader:*.  All callers updated.
6114         (-keep-isa-set!): Call string->symbol on isa name list.
6115         (keep-isa-validate!): Rewrite.
6116         (current-isa): New proc.
6117         (keep-isa?): Recognize "all".
6118         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6119         Call -keep-isa-set!.
6120         (cmd-if): Recognize keep-isa?.
6121         (cpu-load): New arg keep-isa.  All callers updated.
6122         (-opt-spec-update): New proc.
6123         (common-arguments): First arg is string, not symbol.
6124         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6125
6126         * rtl.scm (rtx-get): Default mode of string arg is INT.
6127
6128         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6129
6130         * rtx-funcs.scm (join:): Pass cpu to handler.
6131
6132         * configure.in (guile_include_dir): Delete.
6133         * configure: Rebuild.
6134         * Makefile.in: Rebuild.
6135         * doc/Makefile.in: Rebuild.
6136
6137         * sid-cpu.scm (-extract-chunk-specs): New proc.
6138         (gen-define-fields): Use it.
6139         (-extract-chunk): New proc.
6140         (-gen-extract-beyond-var-list): Use it.
6141         (gen-extract-fields): Simplify.
6142
6143 1999-03-22  Ben Elliston  <bje@cygnus.com>
6144
6145         * arm7.cpu (ldri-p): New instruction.
6146         (swi): Do not vector through 0x8 yet--there is nothing there.
6147         (addi): Reinstate.
6148         (movi): Likewise.
6149         (all): Use (const x) in subreg expressions.
6150
6151 1999-03-19  Ben Elliston  <bje@cygnus.com>
6152
6153         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6154         (smlal): Likewise.
6155
6156 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6157
6158         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6159         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6160         * sim-cpu.scm (-extract-chunk-specs): New proc.
6161         (gen-define-fields): Use it.
6162         (-extract-chunk): New proc.
6163         (-gen-extract-beyond-var-list): Use it.
6164         (gen-extract-fields): Simplify.
6165
6166         Port to guile 1.3.1.
6167         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6168         (LIBIBERTY): New var.
6169         (HOB_OBJS): Add cgen-gh.o.
6170         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6171         * Makefile.in: Rebuild.
6172         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6173         * config.in: Rebuild.
6174         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6175         libncurses, libtermcap.
6176         Add checks for needed functions in guile 1.2 not in guile 1.3,
6177         and vice versa.  Add test for 3 argument scm_make_vector.
6178         * configure: Rebuild.
6179         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6180         definitions if guile doesn't have them.
6181         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6182         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6183         with gh_vector_set_x.
6184         (cgh_qsort): Replace gh_list_length with gh_length.
6185         * cgen-gh.h: Add decls for added functions.
6186         (cgh_qsort): Don't declare if IN_HOBBIT.
6187         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6188         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6189         scm_make_vector with gh_make_vector.
6190         * cos.scm: Use vector-length instead of length on vectors.
6191         * dev.scm (cload): Make varargs proc with keyword/value args.
6192         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6193         provide version that works with guile 1.2 or 1.3.
6194         Include private copy of scmhob.h.
6195         * scmhob.h: New file.  Keep our own copy for now.
6196
6197 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6198
6199         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6200         plain text.
6201         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6202         (-cx-temp-dump-stack): Pretty up output.
6203
6204         * arm.cpu: comment out thumb.cpu until isa support ready.
6205         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6206         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6207         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6208
6209         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6210
6211 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6212
6213         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6214         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6215
6216         * operand (op:new-mode): Improve error message.
6217
6218         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6219         * arm7.cpu: New file.
6220
6221 1999-03-12  Ben Elliston  <bje@cygnus.com>
6222
6223         * arm.cpu: Lots of minor fixes after desk checking.
6224
6225 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6226
6227         * thumb.cpu: snapshot of current work
6228
6229         * rtl.scm (rtx-get): Tweak error message.
6230
6231 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6232
6233         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6234         * Makefile.in: Rebuild.
6235
6236         * cos.c (cos_vector_copy): New function.
6237         (_object_copy): Use it.
6238
6239         * mode.scm (mode:eq?): Clean up.
6240         * rtl.scm (cx-new-mode): Copy attributes.
6241         (rtx-get): Don't make copy if <c-expr> with identical mode.
6242
6243         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6244         add new isas spec.
6245         (gr-names): h-gr register names moved here.
6246         (h-gr): Update.
6247         (cr-names): h-cr register names moved here.
6248         (h-cr): update.
6249         (dr-names): h-dr register names moved here.
6250         (h-dr): update.
6251         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6252         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6253         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6254         add new isas spec.
6255         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6256         add new isas spec.
6257         (gr-names): h-gr register names moved here.
6258         (h-gr): Update.
6259         (cr-names): h-cr register names moved here.
6260         (h-cr): update.
6261         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6262         (h-accums,h-psw): Ditto.
6263         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6264         add new isas spec.
6265         (gr-names): h-gr register names moved here.
6266         (h-gr-indices): Delete.
6267         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6268         (sparc64 h-gr): Ditto.
6269         (h-y): Add get/set specs.
6270         (fp regs): Rewrite.
6271         (fp operands): Rewrite.
6272         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6273         (h-tbr,h-cwp,h-wim): Ditto.
6274         * sparc64.cpu (h-fpsr): Add get/set specs.
6275         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6276         (fp-ld-op): New arg `dest', all callers updated.
6277         (*): Replace `make-di' with `join'.
6278
6279         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6280         present.
6281         (gen-semantic-code): Save/restore rtl generator state.
6282         (cgen-cpu.h): Call rtl-gen-init!.
6283         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6284         (-gen-ifld-extract-beyond): Ditto.
6285         (<multi-ifield>,gen-ifld-extract): Ditto.
6286         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6287         `gstate'.
6288         (-hw-gen-set-quiet-pc): Ditto.
6289         (<hw-pc>,gen-write): Ditto.
6290         (-hw-cxmake-get): Ditto.  Call getter function if present.
6291         (<hw-register>,cxmake-get-raw): New method.
6292         (<hw-register>,gen-set-quiet-raw): New method.
6293         (-hw-gen-set-quiet): New arg `gstate'.
6294         (hw-fun-access?): Delete.
6295         (gen-reg-access-defn): Output function contents.
6296         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6297         invocation.
6298         (-gen-hw-index): Ditto.
6299         (op:read): Update gen-read invocation.
6300         (op:write): Update gen-write invocation.
6301         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6302         operands.
6303         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6304         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6305         (<unit>,gen-profile-code): Update to sim.scm version.
6306
6307         * sim-arch.scm (-regs-for-access-fns): New proc.
6308         (-biggest-reg-mode): New proc.
6309         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6310         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6311         virtual regs separately.
6312         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6313         get/set specs.
6314         (gen-semantic-code): Save/restore rtl generator state.
6315         (cgen-cpu.h): Call rtl-gen-init!.
6316         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6317         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6318         renamed to mach-bfd-name.
6319         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6320         (-gen-ifld-extract-beyond): Ditto.
6321         (<multi-ifield>,gen-ifld-extract): Ditto.
6322         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6323         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6324         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6325         `gstate'.
6326         (hw-fun-access?): Delete.
6327         (-hw-gen-set-quiet-pc): New arg `gstate'.
6328         (<hw-register>,gen-get-macro): Rewrite.
6329         (<hw-register>,gen-set-macro): Rewrite.
6330         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6331         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6332         (<hw-register>,cxmake-get-raw): New method.
6333         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6334         (<hw-register>,gen-set-quiet-raw): New method.
6335         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6336         invocation.
6337         (-gen-hw-index): Ditto.
6338         (<hw-index>): New arg `gstate'.
6339         (-gen-hw-selector): Update call to rtx-c.
6340         (<pc>): New arg `gstate'.
6341         (op:read): Update gen-read invocation.
6342         (op:write): Update gen-write invocation.
6343         (<operand>,cxmake-get): Handle raw-reg.
6344         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6345         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6346         (<operand>,gen-set-quiet): Handle raw-reg.
6347         (<operand>,gen-set-trace): Handle raw-reg.
6348         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6349
6350         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6351         cgen_operand_type enum.
6352         (gen-operand-table): Add operand type enum.  Replace pointer to
6353         hardware element with its enum.  Null terminate table.
6354         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6355         Build operand table.
6356         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6357         * mach.scm (<arch-data>): New member `isas'.
6358         (adata-isas): New accessor.
6359         (<isa>): New class.
6360         (isa-default-insn-word-bitsize): New accessor.
6361         (isa-enum): New proc.
6362         (current-arch-default-insn-word-bitsize): Delete.
6363         (current-isa-list,current-isa-lookup): New procs.
6364         (-arch-parse-isa): New proc.
6365         (-arch-parse): Rewrite.
6366         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6367         (define-arch): Define ISA attribute.
6368         (def-isa-attr!,isa-supports?): New procs.
6369         (<mach>): New member `isas'.
6370         (mach-isas): New accessor.
6371         (-mach-parse): New arg `isas', all callers updated.
6372         (-mach-read): Recognize `isas'.
6373         (arch-finish!): Rewrite.
6374         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6375         @arch@_cgen_get_{int,vma}_operand.
6376         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6377         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6378         of pointer to table entry.
6379         * opcodes.scm (gen-switch): Handle multiply defined operands.
6380         * operand.scm (op-sort): New proc.
6381
6382         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6383         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6384         (hw-enum): Accept symbol argument.
6385         (hardware-builtin!): Delete attribute FUN-ACCESS.
6386         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6387
6388         * attr.scm (atlist-source-form): New proc.
6389         (attr-builtin!): New attr `PRIVATE'.
6390         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6391         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6392         if they have `PRIVATE' attribute.
6393         (gen-hw-table-defns): Output definitions of explicitly defined
6394         keyword tables.
6395         * hardware.scm (<keyword>): New member print-name.  Rename member
6396         `value' to `values', all uses updated.
6397         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6398         (keyword-parse): Rewrite.
6399         (-keyword-read): New proc.
6400         (define-keyword): New proc.
6401         (-hw-parse-keyword): New proc.
6402         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6403         `extern-keyword'.
6404         (-hw-parse-values): Ditto.
6405         (-hw-parse-get,-hw-parse-set): Rewrite.
6406         (hardware-init!): Add new comment define-keyword.
6407         * mach.scm (<arch>): New member `kw-list'.
6408         (arch:kw-list,arch_set-kw-list!): New accessors.
6409         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6410
6411         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6412         * mode.scm (mode-class-integral?): New proc.
6413         (mode-class-float?,mode-class-numeric?): New procs.
6414         (mode-integral?,mode-float?,mode-numeric?): New procs.
6415         (mode-compatible?): New proc.
6416         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6417         rtx-c-with-alist.
6418         (<ifield>,gen-extract): Ditto.
6419         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6420         (<gstate>): New class.
6421         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6422         (gstate-context,gstate-set-context!): New accessors.
6423         (gstate-macro?,gstate-set-macro?!): New accessors.
6424         (gstate-make,gstate-copy): New procs.
6425         (-rtl-current-gstate): New global.
6426         (current-gstate-simulator?): New proc.
6427         (current-gstate-context,current-gstate-macro?): New procs.
6428         (current-gstate,current-gstate-set!): New procs.
6429         (rtl-gen-init!): Rewrite.
6430         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6431         (tstate-make): New arg `gstate', all callers updated.
6432         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6433         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6434         (tstate-gstate,tstate-set-gstate!): New accessors.
6435         (tstate-copy): New proc.
6436         (tstate-new-cond?,tstate-new-set?): Rewrite.
6437         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6438         (rtx-traverse): New arg `gstate', all callers updated.
6439         (rtx-strdump): New proc.
6440         (-simplify-for-compilation): New arg `gstate', all callers updated.
6441         (semantic-in-out-operands): Ditto.
6442         (semantic-attrs): Ditto.
6443         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6444         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6445         (rtx-value): Rewrite.
6446         (<c-expr>,gen-name): New method.
6447         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6448         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6449         (cx-new-mode): New proc.
6450         (-rtx-c-with-tstate): New proc.
6451         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6452         callers updated.
6453         (-rtx-mode): Rewrite.
6454         (-rtx-mode-compatible?): New proc.
6455         (<c-expr-temp>): New member `value'.
6456         (cx-temp:value): New accessor.
6457         (<c-expr-temp>,make!): Override default method.
6458         (<c-expr-temp>,cxmake-get): Rewrite.
6459         (<c-expr-temp>,gen-set-quiet): Rewrite.
6460         (<c-expr-temp>,gen-set-trace): Rewrite.
6461         (gen-temp-defs): Use cx-temp:value.
6462         (record-temp!): New arg value, all callers updated.
6463         (cx-temp:cx:make): Delete.
6464         (-cx-temp-dump-stack): New proc.
6465         (rtx-get): New arg `gstate', all callers updated.  Do mode
6466         compatibility checks.  Ensure result has specified mode.
6467         (rtx-set-quiet): New arg `gstate', all callers updated.
6468         (rtx-set-trace): Ditto.
6469         (s-c-call): New arg `tstate', all callers updated.
6470         (s-c-raw-call): Ditto.
6471         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6472         (s-cmpop,s-if,e-if): Ditto.
6473         (s-subreg): New proc.
6474         (-par-new-temp!): New proc.
6475         (-par-next-temp!): Rewrite.
6476         (-par-replace-set-dests): Use -par-new-temp!.
6477         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6478         (s-sequence): Use -rtx-c-with-state.
6479         * rtx-funcs.scm (*): Update.
6480         (raw-reg:): New rtx function.
6481         (make-di): Delete.
6482         (join:,subreg:): New rtx functions.
6483
6484         * insn.scm (<insn>): New members pre-cond-trap, condition,
6485         post-cond-trap, compiled-condition.
6486
6487         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6488
6489         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6490
6491         * utils-cgen.scm (parse-symbol): New proc.
6492         (parse-string): New proc.
6493         (gen-get-macro,gen-set-macro): New arg `index-args'.
6494         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6495         Prepend \ to newlines.
6496
6497         * utils.scm (alist-remove-duplicates): Delete.
6498
6499         * sid.scm (sim-init!): Delete private debugging code.
6500
6501 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6502
6503         * cgen-sid.scm: New file for C++ simulator application.
6504         * sid-arch.scm: Ditto.
6505         * sid-cpu.scm: Ditto.
6506         * sid-decode.scm: Ditto.
6507         * sid-model.scm: Ditto.
6508         * sid.scm: Ditto.
6509         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6510
6511 1999-03-05  Ben Elliston  <bje@cygnus.com>
6512
6513         * arm.cpu: New file.
6514
6515 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6516
6517         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6518         * Makefile.in: Rebuild.
6519
6520         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6521         (-attr-parse): Validate default value.
6522
6523         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6524         (-CGEN-LANG-VERSION): Ditto.
6525         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6526         (<reader>): New member keep-isa plus accessors.
6527         (-keep-isa-set!,keep-isa-validate!): New procs.
6528         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6529         (common-arguments): New variable.
6530         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6531         (-debug-repl,continue): New procs.
6532         (-cgen,cgen): New procs.
6533         * cgen-gas.scm: Rewrite.
6534         * cgen-opc.scm: Rewrite.
6535         * cgen-sim.scm: Rewrite.
6536         * cgen-stest.scm: Rewrite.
6537
6538         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6539         (gas-test-finish!): Call opcodes-finish!.
6540         (gas-test-analyze!): Call opcodes-analyze!.
6541         (<hw-asm>): New method test-data.
6542         (<operand>,testdata): Rewrite.
6543         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6544         (sim-test-finish!): Call opcodes-finish!.
6545         (sim-test-analyze!): Call opcodes-analyze!.
6546         (<hw-asm>): New method test-data.
6547         (<operand>,testdata): Rewrite.
6548
6549 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6550
6551         * fixup.scm (reverse!): Define if missing.
6552         * *.scm: Use reverse! instead of list-reverse!.
6553
6554         * utils.scm (leading-id-char?): New proc.
6555         (id-char?): Rewrite.
6556         (chars-until-delimiter): New proc.
6557         * opc-itab.scm (extract-syntax-operands): Rewrite.
6558         (strip-mnemonic): Rewrite.
6559         (compute-syntax): Rewrite.
6560
6561         * pmacros.scm (-pmacro-substr): New proc.
6562         (pmacros-init!): Add builtin .substr.
6563
6564 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6565
6566         * thumb.cpu: New file.
6567
6568 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6569
6570         * Makefile.am (CGENCFLAGS): New variable.
6571         (WITH_HOBBIT): Use automake conditional.
6572         (CGEN_HOB_SRC): New variable.
6573         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6574         (*.o): Compile with CGENCFLAGS.
6575         (cgen-hob.c): Simplify.
6576         (cgen-nohob.c): New rule.
6577         (hobbit): Renamed from hob.x.
6578         (CLEANFILES): Add cgen-nohob.c.
6579         * Makefile.in: Rebuild.
6580         * doc/Makefile.in: Rebuild.
6581         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6582         (WITH_HOBBIT): Use AM_CONDITIONAL.
6583         * configure: Rebuild.
6584         * aclocal.m4: Rebuild.
6585
6586         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6587         with string-write-map.
6588
6589         * sim-cpu.scm (hw-need-storage?): New proc.
6590         (-gen-hardware-types): Use it.
6591         (gen-parallel-exec-elm): Call op-save-index?.
6592
6593         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6594
6595         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6596         UNSIGNED attribute.
6597         (-gen-ifld-extract-beyond): Ditto.
6598         (<integer>): Delete all references.
6599         (<sim-hardware>): Delete.
6600         (hw-profilable?): New proc.
6601         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6602         (<hw-register>): Rename method get-index-mode to save-index?.
6603         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6604         (<hw-register>,gen-sym-decl): Make virtual.
6605         (<hw-memory>,gen-sym-decl): Make virtual.
6606         (<hw-memory>): Rename method get-index-mode to save-index?.
6607         (<hw-address>,gen-sym-decl): Make virtual.
6608         (<operand>): New method save-index?.
6609         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6610
6611         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6612         prefix added.  All uses updated.
6613
6614         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6615         rather than pointer to table entry.
6616
6617         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6618         Remove all hw-asm,op-asm support.
6619         (-gen-parse-number,-gen-parse-address): New procs.
6620         (<keyword>,gen-parse): Redo function name computation.
6621         (<keyword>,gen-print): Ditto.
6622         (<operand>,gen-function-name): Rewrite.
6623         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6624         (opcodes-init!): Delete call to add-parser!.
6625
6626         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6627         Define enum using hardware semantic name.
6628         (-gen-hw-decl,-gen-hw-defn): New procs.
6629         (gen-hw-table-decls): Use -gen-hw-decl.
6630         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6631         CGEN_HW_ENTRY structs.
6632         (gen-operand-table): Output hw's enum, not pointer to table entry.
6633         (-gen-cpu-open): Build table of selected hardware elements.
6634
6635         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6636         (<hardware> support): Delete.
6637         (<hw-asm>): Delete, moved to hardware.scm.
6638         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6639         (<hw-asm>,gen-table-entry): New method.
6640         (<hw-asm>,parse!): Delete.
6641         (<keyword>,gen-table-entry): New method.
6642         (<keyword>,parse!): Delete.
6643         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6644         for gen-decl,gen-defn,gen-ref,gen-init.
6645         (desc-init!): Don't create parser for operand asm specs.
6646
6647         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6648         * ifield.scm (<ifield>): New member `mode'.
6649         (<ifield>,make!): New arg `mode'.
6650         (ifld-mode): Rewrite.
6651         (ifld-hw-type): Rewrite.
6652         (<ifield>,min-value): Rewrite.
6653         (<ifield>,max-value): Rewrite.
6654         (-ifield-parse): New arg `mode'.
6655         (-ifield-read): Update.
6656         (define-full-ifield): New arg `mode'.
6657         (define-full-multi-ifield): Ditto.
6658         (-multi-ifield-parse): Ditto.
6659         (-multi-ifield-read): Update.
6660         (define-full-multi-ifield): New arg `mode'.
6661         (ifield-builtin!): Update definition of f-nil.
6662         * simplify.inc (define-normal-ifield): Update call to
6663         define-full-ifield.
6664         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6665         (define-normal-hardware): Delete arg asm.  New args indices, values,
6666         handlers.  Update call to define-full-hardware.
6667         (define-simple-hardware,dsh): New pmacros.
6668         (define-normal-operand): Update call to define-full-operand.
6669         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6670         Specify INT/UINT mode instead.
6671         (h-gr,h-cr): Use "indices" instead of "asm".
6672         (h-dr,h-ps): Update keyword syntax.
6673         (h-r13,h-r14,h-r15): Ditto.
6674         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6675         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6676         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6677         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6678         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6679         Specify INT/UINT mode instead.
6680         (h-gr): Use "indices" instead of "asm".
6681         (h-cc): Update keyword syntax.
6682         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6683         Specify INT/UINT mode instead.
6684         (h-hi16,h-slo16,h-ulo16): Update.
6685         (h-gr,h-cr): Use "indices" instead of "asm".
6686         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6687         (h-accums): Update keyword syntax.
6688         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6689         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6690         Specify INT/UINT mode instead.
6691         (h-gr-indices): New pmacro.
6692         (h-gr32,h-gr64): Split up from h-gr.
6693         (h-a): Update type spec.  Use values instead of asm spec.
6694         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6695         (h-y,h-annul-p): Ditto.
6696         (h-asr): Update keyword spec.
6697         (h-lo10,h-lo13,h-hi22): Update.
6698         (get-freg-spec,set-freg-spec): New pmacros.
6699         (h-fr32,h-fr64): Split up from h-fr.
6700         (rdd): Comment out get/set specs.
6701         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6702         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6703         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6704         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6705         UNSIGNED.  Specify INT/UINT mode instead.
6706         (h-*): Use dsh instead of dnh where appropriate.
6707         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6708         (h-p,h-membarmask): Ditto.
6709         (membarmask): Use "handlers" instead of "asm".
6710
6711         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6712         values,handlers,getters,setters plus accessors.
6713         (hw-mode-ok?,hw-default-mode): New procs.
6714         (<hardware-base>): Rename method new-mode to mode-ok?
6715         (<hardware-base>): New method get-index-mode.
6716         (hw-index-mode): New proc.
6717         (pc?): Delete, moved to operand.scm.
6718         (address?): New proc.
6719         (<hardware>): Delete.
6720         (<hw-asm>): Definition moved here from desc.scm.
6721         (keyword-parse): New proc.
6722         (hardware-parsers): Delete.
6723         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6724         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6725         (-hw-parse-get,-hw-parse-set): New procs.
6726         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6727         indices,values,handlers,get,set.  Rewrite.
6728         (-hw-read-extra): Delete.
6729         (-hw-read): Update.
6730         (define-hardware): Don't add object if not selected.
6731         (define-full-hardware): Ditto.
6732         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6733         (<hw-register>): Member `type' moved to baseclass.  Delete member
6734         hw-asm.
6735         (<hw-register>,parse!): Rewrite.
6736         (<hw-register>): Delete methods get-rank,get-mode.
6737         (<hw-register>): Method new-mode renamed to mode-ok?
6738         (<hw-register>): New method get-index-mode.
6739         (<hw-pc>,parse!): Rewrite.
6740         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6741         (<hw-memory>,parse!): Rewrite.
6742         (<hw-memory>): Delete methods get-rank,get-mode.
6743         (<hw-memory>): Method new-mode renamed to mode-ok?
6744         (<hw-memory>): New method get-index-mode.
6745         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6746         hw-asm.
6747         (<hw-immediate>,parse!): Rewrite.
6748         (<hw-immediate>): Delete methods get-rank,get-mode.
6749         (<hw-immediate>): Method new-mode renamed to mode-ok?
6750         (<hw-address>): Delete member hw-asm.
6751         (<hw-address>,parse!): Rewrite.
6752         (<hw-address>): Delete methods get-rank,get-mode.
6753         (<hw-address>): Method new-mode renamed to mode-ok?
6754         (hw-profilable?): Delete.
6755         (hardware-init!): Delete hardware-parsers reference.
6756         Update argument specs of command define-full-hardware.
6757         (hardware-builtin!): Update definitions of hardware builtins.
6758         * operand.scm (<operand>): New members hw-name,mode-name.
6759         Delete member op-asm.  New member handlers.
6760         (<operand>,make!): Update.
6761         (op:hw-name,op:mode-name,op:handlers): New procs.
6762         (op:type): Rewrite.
6763         (op:mode): Rewrite.
6764         (<operand>): New method get-index-mode.
6765         (<pc>,make!): Update.
6766         (op:new-mode): Rewrite.
6767         (operand-parsers): Delete.
6768         (-operand-parse): Rewrite.  Return #f if insn not selected.
6769         (-op-read-extra): Delete.
6770         (-operand-read): Update.
6771         (define-operand,define-full-operand): Update.
6772         (operand-init!): Delete operand-parsers reference.
6773         Update syntax of define-full-operand command.
6774
6775         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6776         (define-full-insn): Update.
6777         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6778         (define-full-minsn): Update.
6779
6780         * mode.scm (<mode>): New member class.
6781         (mode:class): New proc.
6782         (mode?): Rewrite.
6783         (-mode-parse): New arg class.
6784         (define-full-mode): Update.
6785         (mode-find): Rewrite.
6786         (mode-make-int,mode-make-uint): New procs.
6787         (mode-init!): Update syntax of define-full-mode command.
6788         (mode-builtin!): Update definitions of builtin modes.
6789
6790         * model.scm (<profile>): Delete.
6791
6792         * read.scm (keep-atlist?): New proc.
6793         (keep-multiple?): New proc.
6794         (<parser-list>): Delete.
6795         (add-parser!,parse-spec!): Delete.
6796
6797         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6798         (def-rtx-syntax-node): Ditto.
6799         (-rtx-traverse-debug?): New variable.
6800         (tstate-make): New proc.
6801         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6802         (tstate-new-cond?,tstate-new-set?): New procs.
6803         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6804         tstate.  All callers updated.
6805         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6806         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6807         (-build-operand!): Replace arg cond? with tstate.
6808         (-build-reg-operand!,-build-mem-operand!): Ditto.
6809         (-build-index-of-operand!): Update making of <operand> object.
6810         (s-ifield): New arg tstate.  All callers updated.
6811         (hw:): New arg tstate.  All callers updated.  Replace call to
6812         current-hw-lookup with current-hw-sem-lookup-1.
6813         (s-index-of): New arg tstate.  All callers updated.
6814         (reg:,mem:): Ditto.
6815         (-rtx-use-sem-fn?): New proc.
6816         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6817         semantic cover fns.
6818         (s-convop): Only use semantic mode when using semantic cover fns.
6819         (s-cmpop): Call -rtx-use-sem-fn?.
6820         (s-cond,s-case): New arg tstate.  All callers updated.
6821         (s-parallel,s-sequence): Ditto.
6822
6823         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6824
6825         * types.scm (<scalar>): Rewrite implementation.
6826         (<integer>): Delete.
6827         (parse-type): Rewrite.
6828
6829         * utils-cgen.scm (parse-handlers): New proc.
6830
6831         * utils.scm (!=): New proc.
6832
6833 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6834
6835         * pmacros.scm (-pmacro-expand): Fix typo.
6836
6837 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6838
6839         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6840         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6841         * i960.cpu (build-hex2): New pmacro.
6842         (insn-opcode): Simplify.
6843         (insn-opcode2): Ditto.
6844
6845         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6846         * cgen-stest.scm (catch-with-backtrace): Ditto.
6847
6848 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6849
6850         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6851         All callers updated.
6852         (-pmacro-invoke): New proc.
6853         (-pmacro-sym,-pmacro-str): New procs.
6854         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6855         (pmacros-init!): Install builtins .iota, .map, .apply.
6856         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6857         (h-fr): Simplify register name spec.
6858         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6859         * utils.scm (num-args-ok?): New proc.
6860
6861 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6862
6863         * pmacros.scm (-pmacro-error): New proc.
6864         (-pmacro-expand): Use it.
6865         (-pmacro-splice): New proc.
6866         (pmacros-init!): Install new builtin .splice.
6867
6868         * sparc.cpu: Include sparc64.cpu when appropriate.
6869         (f-mmask,f-simm11): Moved to sparc64.cpu.
6870         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6871         (ANNUL attribute): Delete.
6872         (test-* pmacros): New arg cc, all callers updated.
6873         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6874         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6875         atomic-opc.
6876         (ldstub,swap): Moved to sparccom.cpu.
6877         * sparc64.cpu: Add more insns.
6878
6879 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6880
6881         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6882         CGEN_ATTR_VALUE.
6883         (cgen-sem-switch.c): Ditto.
6884         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6885         moved to cgen-engine.h.
6886         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6887         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6888         global.  Cache attributes and insn length in IDESC.
6889         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6890         @cpu@_opcode renamed to @cpu@_get_idata.
6891         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6892         done later underneath sim_resume.
6893         (@mach@_mach): Record @cpu@_prepare_run.
6894         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6895         updated.
6896         (-hw-gen-set-quiet-pc): Ditto.
6897         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6898         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6899         (<hw-addr>,cxmake-get): Ditto.
6900         (<hw-iaddr>,cxmake-get): Ditto.
6901         (<pc>,cxmake-get): Ditto.
6902         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6903         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6904         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6905         (<hw-pc>,gen-write): Use hw-selector-default.
6906         (<hw-register>,gen-write): Ditto.
6907         (<hw-memory>,gen-write): Ditto.
6908         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6909         (-gen-hw-selector): New proc.
6910
6911         * desc.scm: New file.
6912         * desc-cpu.scm: New file.
6913         * opcodes.scm: Split up into several smaller files.
6914         * opc-asmdis.scm: New file.
6915         * opc-ibld.scm: New file.
6916         * opc-itab.scm: New file.
6917         * opc-opinst.scm: New file.
6918         * Makefile.am (desc): New target.
6919         (opcodes): Update args to cgen-opc.scm.
6920         * Makefile.in: Rebuild.
6921         * aclocal.m4: Rebuild.
6922         * config.in: Rebuild.
6923         * configure.in: Update arg to AC_INIT.
6924         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6925         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6926         AC_PROG_INSTALL.
6927         * configure: Rebuild.
6928         * cgen-gas.scm: Update files to load.
6929         * cgen-opc.scm: Ditto.  Reorganize option letters.
6930         * cgen-sim.scm: Update files to load.
6931         * cgen-stest.scm: Ditto.
6932         * dev.scm (cload): New app "DESC".
6933         (load-opc): Update files to load.
6934         (load-gtest,load-sim,load-stest): Ditto.
6935
6936         * attr.scm (bool-attr?): New proc.
6937         (attr-list-enum-list): New proc.
6938         (-attr-sort): Rewrite.
6939         (attr-builtin!): Give ALIAS attribute a fixed index.
6940         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6941         calculate attribute enum list.
6942         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6943
6944         * insn.scm (-insn-parse): Renamed from parse-insn.
6945
6946         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6947         (-hw-read): Ditto.
6948
6949         * mode.scm (-mode-parse): Renamed from parse-mode.
6950
6951         * operand.scm (<operand>): New member `selector'.
6952         (<operand>,make!): Use default selector.
6953         (hw-selector-default): New variable.
6954         (hw-selector-default?): New proc.
6955
6956         * pmacros.scm (pmacros-init!): New proc.
6957         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6958         (-env-set!): Delete.
6959         (-pmacro-expand): New proc apply-macro.
6960         Use it in scan-list,scan.  Scan list first, then see if macro
6961         invocation.
6962         (define-pmacro): Rewrite.
6963         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6964
6965         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6966         selected if (current-mach) seen.
6967         (rtx?): Renamed from rtx-uneval?, all callers updated.
6968         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6969         updated.
6970         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6971         selector, all callers updated.
6972         (hw:): New arg selector, all callers updated.  Delete old comments
6973         and code.
6974         (reg:,mem:): Handle selectors
6975         * rtx-funcs.scm (reg:): Handle selectors.
6976
6977         * read.scm: Renamed from cpu.scm.
6978         (<command>): New class.
6979         (<reader>): New member commands.
6980         (reader-add-command!): New proc.
6981         (reader-lookup-command): New proc.
6982         (reader-error,-reader-process-expanded,reader-process): New procs.
6983         (reader-read-file!): New proc.
6984         (include): Call reader-read-file!.
6985         (cmd-if): New proc.
6986         (cpu-load): Call reader-read-file!.
6987         * utils.scm (num-args): New proc.
6988         * simplify.inc: New file.
6989         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6990         procs.  Move define-normal-foo procs (and abbreviated forms) to
6991         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6992         routines.
6993         * fr30.cpu: Include simplify.inc.
6994         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6995         * i960.cpu: Include simplify.inc.
6996         * m32r.cpu: Include simplify.inc.
6997         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6998         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6999         * sparc.cpu: Include simplify.inc.
7000         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7001         * utils-cgen.scm (parse-error): Moved to read.scm.
7002         (sanitize): Rewrite.
7003         (utils-init!): New proc.
7004
7005 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
7006
7007         * sparc.cpu: New file.
7008         * sparc32.cpu: New file.
7009         * sparc64.cpu: New file.
7010         * sparccom.cpu: New file.
7011         * sparc.opc: New file.
7012
7013 1999-01-27  Frank Eigler  <fche@cygnus.com>
7014
7015         * utils.scm (gen-copyright): New proc.
7016
7017 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7018
7019         Parameterize rtl parsing, rather than having lots of little handlers.
7020         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7021         Delete member traverse.
7022         (rtx:set-traverse!): Delete.
7023         (-rtx-valid-types,-rtx-valid-matches): New variables.
7024         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7025         instead of expression.  All callers updated.
7026         (def-rtx-node): New args arg-types,arg-modes.
7027         (def-rtx-syntax-node): Ditto.
7028         (def-rtx-dual-mode): Ditto.
7029         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7030         All callers updated.
7031         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7032         All callers updated.
7033         (rtx-macro-expand): New proc.
7034         (-rtx-traverse-check-args): Delete.
7035         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7036         an rtx specific traverser.
7037         (-rtx-any-mode?,-rtx-symornum?): New procs.
7038         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7039         (-rtx-traverse-no-mode): Delete.
7040         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7041         (-rtx-traverse-operands): Rewrite.
7042         (-rtx-traverse-expr): Rewrite.
7043         (rtx-traverse): Don't expand macros here, leave for caller to do.
7044         (rtx-simplify): Delete.
7045         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7046         attributes.
7047         (rtx-true?,rtx-false?): Ditto.
7048         (-rtx-ref-type): Set dest is operand 1 now.
7049         (-simplify-for-compilation): New proc.
7050         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7051         Expand macros before calling rtx-traverse.  Sort operands by name
7052         to avoid unnecessary semantic formats.
7053         (semantic-attrs): New proc.
7054         (rtx-uneval?): Handle (<rtx-func> ...).
7055         (s-boolifop): Delete arg mode.  All callers updated.
7056         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7057         (eq-attr): New arg obj.
7058         (eq-attr:): Delete.
7059         * m32r.cpu (rach): Update calls to andif.
7060
7061         * minsn.scm (-minsn-parse-expansion): Renamed from
7062         parse-minsn-expansion.
7063         (-minsn-parse): Renamed from parse-minsn.
7064         (-minsn-read): Renamed from read-minsn.
7065         (def-minsn): Don't check APPLICATION here.
7066         (def-full-minsn): New proc.
7067         (define-macro-insn): Check APPLICATION here.  Expand macros.
7068         (define-normal-macro-insn): Ditto.
7069
7070         * utils.scm (word-value): New arg start-lsb?.
7071         (word-mask,word-extract): Ditto.
7072         (split-bits,powers-of-2): Use integer-expt instead of expt.
7073         (bit-set?): Handle 32 bit values (which are bignums).
7074         (cg-logand,cg-logxor): New functions.
7075         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7076         (<ifield>,field-value): Update call to word-value.
7077         (<ifield>,min-value): Use integer-expt instead of expt.
7078         (<ifield>,max-value): Ditto.
7079
7080         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7081
7082         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7083
7084         Compute raw instruction format in addition to semantic based format.
7085         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7086         (<iformat> accessors): Rename accessors to ifmt-*.
7087         (<sformat>): New class.
7088         (fmt-enum): Renamed from fmt:enum.
7089         (-ifmt-search-key): Rewrite.
7090         (-sfmt-search-key): New proc.
7091         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7092         Compute iformat and sformat search keys.
7093         (ifmt-build): Update.
7094         (sfmt-build): New proc.
7095         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7096         (ifmt-compute!): Compute instruction format <iformat> based on
7097         instruction fields alone.  Compute new semantic format <sformat>
7098         based on instruction fields and semantic information.
7099         (ifmt:lookup): Delete.
7100         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7101         (current-sfmt-list): New proc.
7102         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7103         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7104         (insn-length,insn-length-bytes): Update.
7105         (insn:mask-length,insn:mask): Update.
7106         (insn-lookup-op): Update.
7107         * gas-test.scm (gas-test-analyze!): Update.
7108         (gen-gas-test): Ditto.
7109         * sim-test.scm (sim-test-analyze!): Update.
7110         (gen-sim-test): Ditto.
7111         * opcodes.scm (gen-operand-instance-table): Update.
7112         (gen-operand-instance-ref): Ditto.
7113         (max-operand-instances): Use heuristic if semantics not parsed.
7114         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7115         (opcodes-analyze!): Only scan semantics of building operand instance
7116         tables.
7117         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7118         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7119         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7120         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7121         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7122         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7123         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7124
7125         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7126         New arg lsb0?  All callers updated.
7127         (decode-bits): New arg lsb0?.  All callers updated.
7128         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7129         of expt.
7130         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7131         (build-slots): Call integer-expt instead of expt.
7132         (build-decode-table-entry): Handle crossing word boundaries better.
7133         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7134         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7135
7136         * enum.scm (define-enum): Rewrite.
7137         (define-normal-enum): Ditto.
7138         (def-full-insn-enum): New proc.
7139         (define-normal-insn-enum): Rewrite.
7140
7141         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7142         valid C.
7143         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7144
7145         * dev.scm: Add sid support.
7146
7147         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7148         (CLEANFILES): Add tmp-*.
7149         * Makefile.in: Rebuild.
7150
7151         * doc/Makefile.am: New file.
7152         * doc/Makefile.in: New file.
7153         * doc/cgen.texi: New file.
7154         * Makefile.am (SUBDIRS): Define.
7155         * Makefile.in: Rebuild.
7156         * configure.in: Create doc/Makefile.
7157         * configure: Rebuild.
7158
7159 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7160
7161         * insn.scm (insn:syn): Delete.
7162
7163 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7164
7165         * fr30.cpu (model fr30-1): Add state variables load-regs,
7166         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7167         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7168         (model m32rx): Ditto.
7169         (addi): Simplify function unit usage spec.
7170         (ld-plus): Rewrite operand names in function unit usage spec.
7171         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7172         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7173         overridden.  Allow operand to appear in input and output spec.
7174         (<insn>,gen-profile-code): string-append -> string-list.
7175
7176         * ifield.scm (define-ifield): Call pmacro-expand.
7177         (define-full-ifield,define-normal-ifield): Ditto.
7178         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7179
7180         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7181         with-scache and without-scache cases.
7182
7183 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7184
7185         * fr30.cpu (fr30-1): Add state variable h-gr.
7186         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7187         (all insns): First pass at providing cycle counts.
7188         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7189         when initializing unit output operands, ditto for input operands.
7190
7191         * insn.scm (insn-length,insn-length-bytes): New procs.
7192         * mach.scm (-adata-set-derived!): Use them.
7193         * sim-cpu.scm (-gen-sem-case): Ditto.
7194
7195         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7196         (-gen-write-case): Ditto.
7197         (gen-semantic-fn): Ditto.  Split into two:
7198         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7199         in non-scache case.
7200         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7201         scache/no-scache appropriately.  All callers updated.
7202         (-gen-sem-case): PCADDR->IADDR.
7203         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7204
7205         * sim-decode.scm (*): Replace string-append,string-map with
7206         string-list,string-list-map where the result is sufficiently large.
7207         (-gen-decode-insn-table): Go back to simple version for non-scache
7208         case: just record IDESC in decoder tables and leave field extraction
7209         to the caller.
7210         (-gen-decode-switch): Ditto.
7211         (-gen-decode-fn): Ditto.
7212         (-gen-extract-decls): Only emit format enum if with-scache?.
7213         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7214         non-scache case.
7215         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7216         (-gen-insn-timing): Ditto.
7217         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7218         with-scache case.
7219
7220         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7221         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7222
7223 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7224
7225         * cpu.scm (keep-mach-validate!): New proc.
7226         (include): New proc.
7227
7228         * mach.scm (current-arch-mach-name-list): New proc.
7229         (-parse-arch-machs): Always return canonical form.
7230         (def-arch): Validate user specified machs to be kept.
7231         (def-mach-attr!): Simplify.
7232
7233         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7234         (option-init!): Initialize it.
7235         (option-set!): Set it.
7236         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7237         output operand instance tables.
7238         (cgen-opc.in): Only output operand instance tables if asked to.
7239
7240         * sim.scm (option-init!,option-set!): Clarify returned value.
7241
7242         * sim.scm (gen-mach-bfd-name): Move from here.
7243         * utils-cgen.scm: To here.
7244
7245 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7246
7247         * fr30.cpu (ilm): Fix comment field.
7248         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7249         compute it.
7250
7251         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7252         (rtx-true?, rtx-false?): New procs.
7253         * rtx-funcs.scm (annul): Rename vpc to pc.
7254         (-rtx-traverse-if): Improve determination of whether then/else parts
7255         are conditionally executed.
7256
7257         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7258         outer level.
7259         (gen-argbuf-type): Simplify generated definition (big sem_fields
7260         union moved outside).
7261
7262 1999-01-11  Ben Elliston  <bje@cygnus.com>
7263
7264         * doc/porting.texi: New file.
7265
7266         * doc/intro.texi: New file.
7267         (Layout): Use @example to insert preformatted ASCII text (such as
7268         diagrams). @code is inappropriate here.
7269
7270 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7271
7272         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7273
7274         * m32r.opc (print_hash): Cast dis_info.
7275
7276         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7277         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7278         get/set macros.
7279
7280 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7281
7282         * i960.cpu (f-br-disp): Remove RELOC attribute.
7283         (f-ctrl-disp): Ditto.
7284         (callx-disp): set-quiet -> set for (reg h-gr 2).
7285         (callx-indirect,callx-indirect-offset): Ditto.
7286
7287         * Makefile.am (gas-test): Fix dependencies.
7288         * Makefile.in: Rebuild.
7289         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7290         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7291         (gas-test-analyze!): Use syntax-break-out.
7292         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7293         (sim-test-analyze!): Use syntax-break-out.
7294         (cgen-build.sh): Use gen-file-name.
7295         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7296         * insn.scm (syntax-break-out): New proc.
7297         * utils.scm (gen-file-name): New proc.
7298
7299         * fixup.scm (nil,<?,<=?,>?): Delete.
7300
7301         * utils.scm (count-true): Rewrite.
7302
7303         * slib/sort.scm: Move sort.scm to slib directory.
7304         * cpu.scm: Update.
7305
7306         * iformat.scm (ifmt-compute!): Record empty format.
7307
7308         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7309         internal procs outside.  Handle expression register numbers.
7310         Handle index-of.
7311
7312         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7313
7314         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7315         every register.
7316         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7317         (gen-semantic-fn,-gen-sem-case): Ditto.
7318         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7319         (cgen-semantics.c): Ditto.
7320         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7321         (gen-ifmt-argvars-defns): New proc.
7322         (gen-ifmt-argvars-assigns): New proc.
7323         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7324         (-gen-decode-fn): Handle non-with-scache case.
7325         (cgen-decode.c): Define WANT_CPU to @cpu@.
7326         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7327         (cgen-model.c): Define WANT_CPU to @cpu@.
7328         * sim.scm (gen-ifld-extract-argvar): New proc.
7329         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7330         with FUN-ACCESS specified.
7331         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7332         (<hw-register>,gen-extract): New arg local?.
7333         (<hw-address>,gen-extract): Ditto.
7334         (-hw-cxmake-get): Handle non-with-scache case.
7335         (-hw-gen-set-quiet): Ditto.
7336         (<hw-address>,cxmake-get): Handle non-with-scache case.
7337         (gen-op-extract-argvar): New proc.
7338         (<operand>,gen-record-profile): Rewrite.
7339         (<operand>,gen-profile-code): Rewrite.
7340         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7341         (gen-argbuf-fields-union): New proc.
7342         (gen-argbuf-type): Use it.  Handle non-scache case.
7343
7344         * *.scm: class:foo procs renamed to class-foo.
7345         * attr.scm (<attribute>): New member `for'.
7346         (-attr-parse): New first value in list for default if
7347         none specified.
7348         (non-bool-attr-list,attr:add!): Delete.
7349         (def-attr): Use current-attr-add!.
7350         (atlist-attr-value-no-default): New proc.
7351         (attr-lookup-default): Handle boolean attributes.
7352         (gen-attr-enum): New proc.
7353         (-attr-remove-meta-attrs-alist): New proc.
7354         (attr-nub): New proc.
7355         (current-attr-list-for): New proc.
7356         (current-{ifld,hw,op,insn}-attr-list): New procs.
7357         (attr-builtin!): New proc.
7358         * cpu.scm (keep-obj?): Rewrite.
7359         (-init-parse-cpu!): Call arch-init!.
7360         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7361         (-finish-parse-cpu!): Call arch-finish!.
7362         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7363         (def-enum,def-full-enum): Use current-enum-add!.
7364         (gen-obj-list-enums): New proc.
7365         * hardware.scm (hw:add!,hw:lookup): Delete.
7366         (def-hardware,def-hardware-ext): Use current-hw-add!.
7367         (hw:std-attrs,hw:attr-list): Delete.
7368         (hardware-builtin!): Define builtin hardware attributes.
7369         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7370         (def-ifield,def-full-ifield): Use current-ifld-add!.
7371         (ifld:std-attrs,ifld:attr-list): Delete.
7372         (ifield-builtin!): New proc.
7373         * insn.scm (insn:add!,insn:lookup): Delete.
7374         (def-full-insn): Use current-insn-add!.
7375         (insn:std-attrs): Delete.
7376         (insn-builtin!): New proc.
7377         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7378         minsn-list.
7379         (<arch-data>): New member machs.
7380         (current-attr-list,current-enum-list): New procs.
7381         (current-op-list,current-minsn-list): New procs.
7382         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7383         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7384         Ditto.
7385         (-parse-arch-machs): New proc.
7386         (-arch-parse): New arg machs, all callers updated.
7387         (-arch-read): Handle machs spec.
7388         (def-arch): Define MACH attribute here.
7389         (mach-init!,mach-finish!): Not here.
7390         (cpu:add!,cpu:lookup): Delete.
7391         (def-cpu): Use current-cpu-add!.
7392         (<mach>): New member bfd-name.
7393         (-mach-parse): New arg bfd-name, all callers updated.
7394         (-mach-read): Handle bfd-name spec.
7395         (mach:add!,mach:lookup): Delete.
7396         (def-mach): Use current-mach-add!.
7397         (def-mach-attr!): New proc.
7398         (arch-init!): New proc.
7399         (arch-finish!): New proc.  Reverse all object lists here.
7400         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7401         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7402         (define-normal-macro-insn): Ignore minsn if mach not kept.
7403         * mode.scm (mode-builtin!): New proc.
7404         * model.scm (model:add!,model:lookup): Delete.
7405         (def-model): Use current-model-add!.
7406         * opcodes.scm (insn:attr-list): Delete.
7407         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7408         (gen-attr-table-defn): Emit value for default.
7409         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7410         (op:attr-list): Delete.
7411         (gen-operand-decls,gen-insn-decls): New proc.
7412         (compute-insn-attr-list): Delete.
7413         (cgen-opc.h): Reorganize and simplify.
7414         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7415         (def-operand,def-full-operand): Use current-op-add!.
7416         (op:std-attrs): Delete.
7417         (operand-enum): Delete.
7418         (operand-builtin!): Define builtin operand attrs.
7419         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7420         (gen-attr-enum-decl): Use gen-obj-list-enums.
7421         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7422         Rewrite.
7423         * fr30.cpu (define-arch): Add machs spec.
7424         (f-i4): SIGNED attribute -> !UNSIGNED.
7425         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7426         (HASH-PREFIX): Define operand attribute.
7427         (NOT-IN-DELAY-SLOT): Define insn attribute.
7428         * i960.cpu (define-arch): Add machs spec.
7429         * m32r.cpu (define-arch): Add machs spec.
7430         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7431         (HASH-PREFIX): Define operand attribute.
7432         (FILL-SLOT): Define insn attribute.
7433
7434 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7435
7436         * fr30.cpu (stilm): Correct mask for and operation.
7437
7438 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7439
7440         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7441         Replace START/EXIT with start/pass.
7442         (gen-sim-test): Delete ".text".
7443
7444 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7445
7446         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7447
7448 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7449
7450         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7451         (h-sbit): Make it FUN-ACCESS.
7452         (h-gr): Reorder so that general regs are always printed by number.
7453
7454 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7455
7456         * i960.cpu (flushreg): Use nop.
7457
7458 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7459
7460         * m32r.cpu (default-alignment): Specify.
7461         * mach.scm (<arch-data>): New member default-alignment.
7462         (adata:default-alignment): New proc.
7463         (current-arch-default-alignment): New proc.
7464         (-arch-parse): New arg default-alignment.
7465         (parse-alignment): New proc.
7466         (-arch-read): Handle default-alignment spec.
7467
7468         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7469
7470         * insn.scm (f-%): Delete.
7471         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7472         be readded if proved useful.
7473         (gen-extract-fields): Ditto.  Use gen-ifetch.
7474         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7475         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7476
7477 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7478
7479         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7480
7481 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7482
7483         * fr30.cpu: Remove stub macros.
7484         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7485         (div2): Don't use addc/subc.
7486
7487 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7488
7489         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7490         if opcodes.
7491
7492 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7493
7494         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7495
7496 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7497
7498         * cpu.scm (keep-all?): New proc.
7499         (assert-keep-all): Use it.
7500         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7501         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7502         Check for spelling errors.
7503
7504 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7505
7506         * rtl.scm (s-convop): Call -rtx-sem-mode.
7507
7508 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7509
7510         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7511         (-parse-hw-profile): Ditto.
7512         (<hw-register>, parse!): Return `void' result.
7513         (<hw-pc>, parse!): Ditto.
7514         (<hw-memory>, parse!): Ditto.
7515         (<hw-immediate>, parse!): Ditto.
7516         (<hw-address>, parse!): Ditto.
7517
7518         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7519         (-ifld-parse-encode-decode): New proc.
7520         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7521         (-multi-ifield-parse): Set encode/decode to #f.
7522         (ifld:decode-mode): New proc.
7523         * utils.scm (nub): Rewrite.
7524         * operand.scm (op-nub): Rewrite.
7525         * sim.scm (<ifield>, gen-type): Rewrite.
7526         (-gen-ifld-argbuf-defn): New proc.
7527         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7528         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7529         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7530         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7531         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7532         New method gen-trace-extract.
7533         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7534         from gen-argbuf-elm, return "" if not caching register address.
7535         Rewrite gen-extract.  New method gen-trace-extract.
7536         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7537         gen-extract, gen-trace-extract, cxmake-get.
7538         (<hw-iaddress>): New method cxmake-get.
7539         (op-needed-iflds): New proc.
7540         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7541         (-gen-op-argbuf-defn): New proc.
7542         (gen-op-extract): Renamed from op:extract.
7543         (gen-op-trace-extract): Renamed from op:trace-extract.
7544         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7545         and rewritten.
7546         (gen-argbuf-elm): Rewrite.
7547         * sim-decode.scm (-gen-record-args): Update.
7548
7549         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7550
7551         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7552         argument position.  Flag symbolic macros in function position as
7553         an error.
7554         (define-pmacro): Handle quoting in definition of symbolic macros.
7555         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7556
7557 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7558
7559         * fr30.opc (parse_register_list): Account for reverse masks
7560         for load and store.
7561         (print_register_list): Ditto.
7562         (parse_low_register_list_ld): New function.
7563         (parse_hi_register_list_ld): New function.
7564         (parse_low_register_list_st): New function.
7565         (parse_hi_register_list_st): New function.
7566         (print_hi_register_list_ld): New function.
7567         (print_hi_register_list_st): New function.
7568         (print_low_register_list_ld): New function.
7569         (print_low_register_list_st): New function.
7570         * fr30.cpu (ldr15dr): Implement workaround.
7571         (ldm0,ldm1,stm0,stm1): Implemented.
7572
7573 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7574
7575         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7576         * configure: Regenerate.
7577         * Makefile.am (WITH_HOBBIT): Update.
7578         (cgen-hob.c): Remove Makefile dependency.
7579         (cgen.o): Depend on cgen-gh.h, config.h.
7580         * Makefile.in: Regenerate.
7581         * aclocal.m4: Regenerate.
7582
7583 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7584
7585         * i960.cpu, i960.opc: New files.
7586
7587 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7588
7589         * fr30.opc (parse_register_number): New function.
7590         (parse_register_list): New function.
7591         (parse_low_register_list): Use parse_register_list.
7592         (parse_hi_register_list): Use parse_register_list.
7593         * fr30.cpu (sth): Fix assembler syntax. Implement more
7594         insns.
7595
7596 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7597
7598         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7599         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7600         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7601         (-op-gen-set-trace-parallel): Ditto.
7602         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7603
7604         * fr30.cpu (call,calld): Fix setting of pc.
7605         (f-op5): Fix start bit number.
7606
7607 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7608
7609         * fr30.cpu (st): Fix operand ordering. Implement more
7610         insns.
7611
7612 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7613
7614         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7615         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7616         (fmt-semantic-operands): Move to sim.scm.
7617         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7618         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7619         (<hw-index>): New method get-name.
7620         (op-profilable?): Moved to sim.scm.
7621         (op-nub): New proc.
7622         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7623         (op-profilable?): Moved here from operand.scm.
7624         (gen-extract-type): Delete.
7625         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7626         (-gen-argfld-ref): New proc.
7627         (-gen-ifld-argfld-name): New proc.
7628         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7629         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7630         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7631         (<hardware-base>): Delete method gen-extract-type.  New method
7632         gen-argbuf-elm.
7633         (<hw-register): Ditto.  Update method gen-extract.
7634         (<operand>, method gen-argbuf-elm): Rewrite.
7635         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7636         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7637         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7638
7639         * sim-decode.scm (-gen-record-args): Tweak.
7640
7641         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7642
7643 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7644
7645         * doc/porting: Fix typo: gas->sim.
7646         * fr30.opc (print_m4): New function.
7647         * fr30.cpu: Implemented many insns.
7648
7649 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7650
7651         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7652
7653         * fr30.cpu (f-rel9): Delete RELOC attribute.
7654         (f-rel12): Add PCREL-ADDR attribute.
7655         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7656         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7657         * fr30.opc (print_label9): Delete.
7658
7659         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7660         code for CTI indicators.
7661         * insn.scm (insn-cti?): Simplify.
7662         * utils-cgen.scm (atlist:cti?): New proc.
7663
7664 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7665
7666         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7667         (f-i20-4,f-i20-16,f-i20): New fields.
7668         (i20): New operand.
7669         (ldi8): Implement.
7670         (ldi20): New insn.
7671         (ldi32m): Delete.
7672         (jmpd): Implement.
7673         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7674         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7675         * mach.scm (arch-data): Ditto.
7676         (current-arch-default-insn-word-bitsize): Renamed from
7677         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7678         (-arch-read): Update.
7679
7680         * hardware.scm (hw:attr-list): Move here ...
7681         * opcodes.scm: ... from here.
7682
7683         * ifield.scm (fld:bitrange): Delete.
7684         (fld:word-offset,fld:word-length): New procs.
7685         (ifield?): Use class-instance.
7686         (<ifield>, method field-start): Rewrite.
7687         (ifld:enum): New proc.
7688         (<ifield>, methods field-mask,field-value): Rewrite.
7689         (-ifield-parse): Rewrite.
7690         (<multi-ifield> support): Rewrite.
7691         (ifld-beyond-base?): Rewrite.
7692         (ifld:std-attrs): New variable.
7693         (ifld:attr-list): New proc.
7694         * iformat.scm (-compute-insn-mask): Rewrite.
7695         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7696         Simplify.
7697         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7698         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7699         onto type.
7700         (<operand>): Ditto.  Forward onto index instead.
7701         (gen-ifld-decls,gen-ifld-defns): New procs.
7702         (ifld:insert,ifld:extract): New procs.
7703         (<ifield>): New methods gen-insert, gen-extract.
7704         (<multi-ifield>): Ditto.
7705         (<hw-index>): Forward gen-insert,gen-extract onto value.
7706         (<hw-asm>): Delete insert/extract support.
7707         (<hw-register,hw-memory,hw-immediate>): Ditto.
7708         (gen-hash-defines): Use string-list.
7709         Define CGEN_MAX_IFMT_OPERANDS.
7710         (gen-switch): Use string-list,string-list-map.
7711         (gen-fget-switch,gen-fset-switch): Use string-list.
7712         (gen-parse-switch,gen-insert-switch): Ditto.
7713         (gen-extract-switch,gen-print-switch): Ditto.
7714         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7715         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7716         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7717         (gen-ivalue-entry): New proc.
7718         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7719         computation.  Use 0 for operand ref table if ALIAS insn.
7720         (gen-minsn-table-entry): Use string-list.
7721         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7722         (gen-opcode-open): Record address of ifield table.
7723         (cgen-opc.h): Call gen-ifld-decls.
7724         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7725         * types.scm (<bitrange>): New members word-offset,word-length.
7726         Delete member total-length.  Delete methods start,mask,value.
7727         (bitrange:word-offset,bitrange:word-length): New procs.
7728         * sim-cpu.scm (gen-define-fields): Simplify.
7729         (gen-extract-fields): Simplify.
7730         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7731         (<ifield>): New methods gen-ifld-extract-decl.
7732         Delete method gen-ifld-extract-beyond.
7733         (<multi-ifield>): New methods gen-ifld-extract-decl.
7734         (<multi-ifield>, method gen-ifld-extract): Implement.
7735         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7736         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7737
7738         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7739         (-rtx-traverse-syntax-no-mode): New proc.
7740         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7741         (s-ifield): New proc.
7742         (s-shop): Don't prepend `unsigned' for unsigned modes.
7743         * rtx-funcs.scm (ifield): New rtx function.
7744         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7745         (delay): New rtx function.
7746         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7747
7748         * cos.scm (-elm-make-method-getter): Fix typo.
7749
7750         * utils.scm (backslash): Handle lists of strings.
7751
7752 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7753
7754         * fr30.cpu (f-rel9): Correct for pc+2.
7755         (label9): Use print_label9.
7756         * fr30.opc (print_label9): New function.
7757
7758 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7759
7760         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7761         * fr30.opc (parse_low_register_list): Renamed.
7762         (parse_hi_register_list): Renamed.
7763         (print_hi_register_list): Renamed.
7764         (print_low_register_list): Renamed.
7765
7766 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7767
7768         * fr30.cpu (f-rel9): Now a pc relative offset.
7769
7770 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7771
7772         * opcodes.scm (op-asm): Move to here, from operands.scm.
7773         (<op-asm>, method parse!): Validate arguments.
7774         (<operand>, method gen-function-name): Fix thinko.
7775         * operand.scm (<operand>, method make!): Don't set op-asm here.
7776         * utils.scm (list-elements-ok?): New proc.
7777
7778         * opcodes.scm: Clean up pass.
7779
7780 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7781
7782         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7783         the fr30_int function.
7784         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7785         (h-dr): Add FUN-ACCESS attribute.
7786
7787 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7788
7789         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7790         for C symbol for models array.
7791
7792 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7793
7794         * fr30.opc (parse_reglist_low): New function.
7795         (parse_reglist_hi): New function.
7796         (print_reglist_low): New function.
7797         (print_reglist_hi): New function.
7798         * fr30.cpu: Finish remaining insn stubs.
7799
7800 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7801
7802         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7803
7804         * fr30.cpu (ldi32m): Don't use for disassembly.
7805
7806 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7807
7808         * fr30.cpu (int): Implement it.
7809
7810 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7811
7812         * rtx-funcs.scm (nop): Fix C code.
7813
7814         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7815
7816         * fr30.cpu (f-i32): New ifield.
7817         (i32): New operand.
7818         (ldi32): New insn.
7819         (ldi32m): New macro insn.
7820         (inte): Provide simple version for now.
7821
7822         * sim-arch.scm: New file.
7823         * sim.scm: Move architecture support generation to sim-arch.scm.
7824         * cgen-sim.scm: Load sim-arch.scm.
7825         * dev.scm: Ditto.
7826
7827         * hardware.scm (pc?) New proc.
7828         (class <hardware-base>): Rewrite method 'pc?.
7829         (class <hardware>): Forward 'pc? to the hardware type.
7830         (class <hw-pc>): New method 'pc?.
7831
7832         Add support for variable length ISAs.
7833         * ifield.scm (ifld-beyond-base?): New proc.
7834         * m32r.cpu: Remove integral-insn? spec.
7835         * mach.scm (arch:derived,arch:set-derived!): New procs.
7836         (arch:app-data,arch:set-app-data!): New procs.
7837         (class <arch>): New members derived, app-data.
7838         (class <cpu>): Delete member integral-insn?.
7839         (cpu:integral-insn?): Delete.
7840         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7841         (-cpu-read): Delete integral-insn? support.
7842         (state:decode-assist): Delete.
7843         (state:int-insn?): Delete.
7844         (<derived-arch-data>): New class.
7845         (-adata-set-derived!): New proc.
7846         (mach-finish!): Call it.
7847         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7848         (gen-operand-instance): Add COND_REF support.
7849         (gen-operand-instance-table): Ditto.
7850         (gen-hash-defines): Update.
7851         (gen-extract-switch): Update type of `insn_value' arg.
7852         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7853         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7854         updated.
7855         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7856         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7857         beyond the base insn (for large insns).
7858         (-gen-extract-beyond-var-list): New proc.
7859         (gen-extract-fields): Handle large insns.
7860         (-gen-write-case): Update sem_arg computation.
7861         Update initial vpc computation.
7862         (gen-semantic-fn): Ditto.  Update type of `insn'.
7863         (-gen-sem-case): Update sem_arg computation.
7864         Update initial vpc computation.
7865         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7866         (-gen-extract-word): New proc.
7867         (<ifield>): New method gen-ifld-extract-beyond.
7868         (gen-ifld-extract-beyond): New proc.
7869         * types.scm (bitrange-overlap?): New proc.
7870
7871         * utils.scm (bits->bytes): New proc.
7872         (bytes->bits): New proc.
7873
7874         Move extraction support into decoder.
7875         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7876         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7877         support to sim-decode.scm.
7878         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7879         be array of IDESC,FMT entries.  Make the array const.
7880         (-gen-gcc-label-table): Make array const.
7881         (-gen-decode-switch): Branch to extraction code after insn has been
7882         identified.
7883         (-gen-decode-insn-globals): Delete extract handler from
7884         @cpu@_insn_sem.
7885         (gen-decode-fn): Add extraction support.
7886         (-gen-sem-fn-decls): Delete extraction fn decls.
7887         (-gen-idesc-decls): Update @cpu@_decode decl.
7888         (-gen-idesc-init-fn): Delete extraction support.
7889         (-gen-extract-decls): New proc.
7890
7891         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7892         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7893
7894         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7895         All callers updated.
7896         (table-entry:make): Record insn value as insn object, not name.
7897         All uses updated.
7898
7899         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7900         collision with C function.
7901         (path_dirname): Similarily.
7902         * hobbit.c,hobbit.h: Rebuild.
7903
7904 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7905
7906         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7907
7908 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7909
7910         * fr30.cpu: Implement more instruction stubs.
7911
7912 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7913
7914         * fr30.cpu: Implement more instruction stubs.
7915
7916 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7917
7918         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7919
7920         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7921
7922         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7923         (op:std-attrs): Ditto.
7924         * opcodes.scm (gen-operand-instance): Ditto.
7925         (gen-switch): Ditto.
7926         * m32r.cpu (condbit,accum): Update.
7927         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7928
7929 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7930
7931         * enum.scm (-enum-read): Fix typo.
7932
7933         * iformat.scm (-ifmt-search-key): Simplify a little.
7934
7935 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7936
7937         * doc/porting: semantics.c -> sem.c.
7938         * Makefile.in: Regenerate.
7939         * fr30.cpu (add): Change ADD to add. Add more registers and set
7940         status bits on 'add' instruction.
7941
7942 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7943
7944         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7945         of 0.
7946
7947 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7948
7949         * minsn.scm (minsn:enum): Update, call current-arch-name.
7950
7951         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7952
7953         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7954         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7955         (ARCH,CGEN,CGENFLAGS): New variables.
7956         (gas-test,sim-test): New rules.
7957         * Makefile.in: Rebuild.
7958         * configure.in (arch): Define.
7959         * configure: Rebuild.
7960
7961         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7962         * All .scm files: Ditto.
7963
7964         * dev.scm: Fix gas-test call to cpu-load.
7965         * gas-test.scm: Clean up pass to remove bit-rot.
7966         * sim-test.scm: Ditto.
7967
7968         * enum.scm (read-enum): Fix typo in `vals' handling.
7969
7970         * hardware.scm (-parse-hw-type): Fix typo.
7971         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7972         (def-hardware,define-normal-hardware): Ditto.
7973
7974         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7975         (display-var): Use it.
7976         * hobbit.c: Rebuild.
7977         * hobbit.h: Rebuild.
7978
7979         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7980         avoid hobbit problem.
7981         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7982         `parallel-insns-' to avoid hobbit problem.
7983
7984 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7985
7986         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7987         (parse_slo16,parse_ulo16): Ditto.
7988         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7989
7990 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7991
7992         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7993         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7994         * Makefile.in: Rebuild.
7995         * insn.scm (define-normal-insn): Expand pmacros.
7996         * mode.scm (<mode>): New member `host?'.  All uses updated.
7997         (mode:host?): New proc.
7998         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7999         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8000         (define-rtx-dual-mode): Ditto.
8001         (s-index-of): New proc.
8002         (s-unop): Use plain C for host mode operations.
8003         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8004         * rtx-funcs.scm (index-of): New rtx function.
8005         * sim.scm (<hw-index>): New method cxmake-get.
8006
8007 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
8008
8009         * sim-cpu.scm (-gen-engine-decls): Delete.
8010
8011 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
8012
8013         * doc/rtl (Example): Correct Typo.
8014         * doc/porting: Add 'make dep' step to opcodes port instructions.
8015         * fr30.opc: New file.
8016         * fr30.cpu: New file.
8017
8018 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8019
8020         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8021         * Makefile.am (GUILEINCDIR): New variable.
8022         (INCLUDES): Use it.
8023         * configure: Regenerate.
8024         * Makefile.in: Ditto.
8025         * aclocal.m4: Ditto.
8026
8027 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8028
8029         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8030         (cgen-semantics.c): Ditto.
8031         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8032         * sim-model.scm (cgen-model.c): Ditto.
8033         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8034         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8035
8036         * opcodes.scm (read-cpu.opc): Handle empty file.
8037
8038         * cos.scm (-elm-make-method-setter): Fix typo.
8039
8040         * cpu.scm (-init-parse-cpu!): Call types-init!.
8041         (-finish-parse-cpu!): Call types-finish!.
8042         * ifield.scm (<ifield>): Delete members start,length.
8043         New member bitrange.
8044         (<ifield>, methods field-start,field-length): Update.
8045         (fld:start): New arg insn-len.  All callers updated.
8046         (<ifield>, methods field-mask,field-value): Update.
8047         (-ifield-parse): Update.
8048         (ifield-init!): Update.
8049         * iformat.scm (compute-insn-length): Simplify.
8050         (compute-insn-mask): Update.
8051         * insn.scm (insn:value): Update.
8052         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8053         (current-arch-default-insn-bitsize): New proc.
8054         (current-arch-insn-lsb0?): New proc.
8055         (-arch-parse,-arch-read): Update.
8056         (<cpu>): New member file-transform.
8057         (-cpu-parse,-cpu-read): Update.
8058         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8059         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8060         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8061         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8062         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8063         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8064         * operand.scm (op:start): Update call to field-start method.
8065         * sim-decode.scm (opcode-slots): New arg lsb0?.
8066         (fill-slot!,build-slots): Ditto.
8067         (build-decode-table-entry,build-decode-table-guts): Ditto.
8068         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8069         (gen-decode-fn): Ditto.
8070         (cgen-decode.c): Update call to gen-decode-fn.
8071         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8072         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8073         (cgen-cpuall.h): Call -gen-cpuall-includes.
8074         * types.scm (<bitrange>): New class.
8075         (types-init!,types-finish!): New procs.
8076         * utils-cgen.scm (parse-number): New proc.
8077         (parse-boolean): New proc.
8078         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8079         (word-mask): Rewrite.
8080         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8081         (m32rxf): New field `file-transform'.
8082         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8083
8084         * hobbit.h: Fix include file name.
8085
8086 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8087
8088         * slib: New directory of slib files used by cgen/hobbit.
8089         * hobbit.scm: New file.
8090         * hobbit.c: New file.
8091         * hobbit.h: New file.
8092         * hobscmif.h: New file.
8093         * hob-main.c: New file.
8094         * hobslib.scm: New file.
8095         * hob.sh: New file.
8096         * Makefile.am: Add support for compiling hobbit, and using compiled
8097         version of hobbit to compile cgen.
8098         * Makefile.in: Regenerate.
8099         * configure.in: Support --with-hobbit.
8100         * configure: Regenerate.
8101         * acconfig.h (WITH_HOBBIT): Add.
8102         * config.in: Regenerate.
8103
8104         * rtl.scm: New file, was cdl-c.scm.
8105         Definition of rtx funcs moved to rtx-funcs.scm.
8106         (semantic-in-out-operands): Rewrite to compute object form of
8107         semantic code.
8108         * rtx-funcs.scm: New file.
8109
8110         * cgen-gh.c: #include "config.h".
8111         (gh_cadddr,gh_cddddr): New fns.
8112         (cgh_vector_to_list): New fn.
8113         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8114         (cgh_init): Prefix qsort procs with "cgh-".
8115         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8116         * cgen.c: #include "config.h".
8117
8118         * attr.scm (bitset-attr?): New proc.
8119         (<bitset-attribute>, method parse-value): Value syntax changed from
8120         (val1 val2 ...) to val1,val2,....
8121         (<bitset-attribute>): New method gen-value.
8122         (<integer-attribute>): New method gen-value.
8123         (<enum-attribute>): New method gen-value.
8124         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8125         (<reader>): New class.
8126         (CURRENT-ARCH,CURRENT-READER): New globals.
8127         (keep-mach?): Move here from mach.scm.
8128         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8129         (<arch>): New class.
8130         (<arch-data>): New class.
8131         (<cpu>): Make subclass of <ident>.
8132         (*ENDIAN* variables): Delete.
8133         (process-state-vars): Delete.
8134         (mach-finish!): Add `base' value to MACH attribute.
8135         * hardware.scm (<hardware>): Make subclass of <ident>.
8136         (hw:std-attrs): New global.
8137         (hw-profilable?): New proc.
8138         * ifield.scm (<ifield>): Make subclass of <ident>.
8139         (sort-ifield-list): Move here from iformat.scm.
8140         * iformat.scm (<iformat>): Renamed from <insn-format>.
8141         Make subclass of <ident>.
8142         (-ifmt-search-key): Include cti? in categorization of formats.
8143         (ifmt-analyze): Compile semantics (turn to object form).
8144         * insn.scm (<insn>): Make subclass of <ident>.
8145         New member compiled-semantics.
8146         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8147         * mode.scm (<mode>): Make subclass of <ident>.
8148         (UBI): Delete.
8149         * model.scm (<unit>): Make subclass of <ident>.
8150         New members inputs,outputs.
8151         (<model>): Make subclass of <ident>.  New member state.
8152         (-unit-parse): Parse inputs,outputs.
8153         (<iunit>): New class.
8154         (-insn-timing-parse-model): New proc.
8155         (parse-insn-timing): Function unit spec rewritten.
8156         * operand.scm (<operand>): Make subclass of <ident>.
8157         New members sem-name,num,cond?  New method gen-pretty-name.
8158         (hw-index-scalar): New global.
8159         (op-nub-hw): Move here from rtl.scm.
8160         (op:lookup-sem-name,op-profilable?): New procs.
8161         * pmacros.scm: Rewrite to pass through hobbit.
8162         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8163         * utils.scm (logit): Make a macro.
8164         (bit-set?): Rewrite.
8165         (high-part): Rewrite.
8166
8167         * m32r.cpu (define-arch): Move to top of file.
8168         (cpu family m32rbf): Renamed from m32rb.
8169         (model m32r/d): Function unit spec rewritten.
8170         (all insns): Ditto.  Replace UBI with BI.
8171
8172         * opcodes.scm (gen-attr-table-decls): Declare
8173         @arch@_cgen_hw_attr_table.
8174         (gen-attr-table-defns): Generate hw attribute table.
8175
8176         * sim-cpu.scm (-gen-engine-decls): New proc.
8177         (-gen-model-decls): New proc.
8178         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8179         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8180         (-gen-record-profile-args): Simplify.
8181         (-gen-parallel-sem-case): Delete.
8182         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8183         New local `written'.  Delete profiling code.
8184         (-gen-sem-case): Ditto.
8185         (-uncond-written-mask,-any-cond-written?): New procs.
8186         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8187         parallelly or serially, and write-back handlers for all parallel insns.
8188         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8189         support to initialization of struct insn_sem.
8190         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8191         (-gen-insn-sem-type): Add parallel write-back support to struct
8192         insn_sem.
8193         (-gen-idesc-init-fn): Add support for virtual insns.
8194         Add parallel write-back support.
8195         * sim-model.scm (gen-model-profile-fn): Delete
8196         (-gen-model-fn-decls): New proc.
8197         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8198         (-gen-model-init-fn): New proc.
8199         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8200         members in @mach@_init_cpu.
8201         (cgen-model.c): Generate model handlers for each insn.
8202         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8203         (<hw-pc>): New method gen-write.
8204         (<hw-register>, method gen-write): New arg `mode'.
8205         (<hw-register>): Delete method gen-record-profile!.
8206         New method gen-profile-index-type.
8207         (<hw-memory>, method gen-write): New arg `mode'.
8208         (<hw-address>, method gen-extract): Delete.
8209         (<hw-address>, method gen-write): New arg `mode'.
8210         (<hw-index>, method get-write-index): Rewrite.
8211         (<pc>, method cxmake-get-direct): Delete.
8212         (<pc>): New method cxmake-get.  Comment out methods
8213         gen-set-quiet,gen-set-trace.
8214         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8215         gen-profile-index-type,gen-profile-code.
8216         Delete method gen-pretty-name.  Rewrite method gen-write.
8217         Delete method cxmake-get-direct.
8218         (-op-gen-set-trace): Update `written'.
8219         (-op-gen-set-trace-parallel): Ditto.
8220         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8221         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8222         insns and their write-back handlers.
8223         (insn-op-lookup): New proc.
8224         (<unit>): New method gen-profile-code.
8225         (<iunit>): New method gen-profile-code.
8226         (gen-argbuf-elm): Add profiling elements.
8227         (gen-argbuf-type): Define cti insns separately in their own struct.
8228         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8229         insns.  Move semantic entries here from struct scache.
8230         Delete everything from struct scache except argbuf.
8231         (<insn>, method gen-profile-locals): Rewrite.
8232         (<insn>, method gen-profile-code): Rewrite.
8233         (sim-finish!): Create virtual pbb insns.
8234
8235 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8236
8237         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8238         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8239         (h-psw,h-bpsw,h-bbpsw): Define.
8240         (rte,trap): Handle bbpc,bbpsw.
8241         * opcodes.scm (max-operand-instances): Fix typo.
8242         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8243         hardware elements to be fun-access.
8244         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8245
8246 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8247
8248         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8249
8250 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8251
8252         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8253
8254 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8255
8256         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8257         architecture name.
8258         (mach m32r): Update.
8259
8260         * mach.scm (mach:supports?): New proc.
8261         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8262         gen-reg-access-{decls,defns}.
8263         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8264         (gen-mach-bfd-name): New proc.
8265         (gen-arch-reg-access-{decls,defns}): New procs.
8266         (cgen-arch.[ch]): Output register access cover fns.
8267
8268         * hardware.scm (hardware-builtin!): Set print handlers for
8269         h-addr,h-iaddr.
8270         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8271         `od'.
8272         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8273         (my_print_insn): Ditto.  Delete args buf, buflen.
8274         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8275         (-hw-asm-specs): Add `handlers' spec.
8276         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8277         `normal-hw-asm'.
8278         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8279         print.
8280         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8281         (<hw-asm>, parse!): New method.
8282         (gen-insn-table-entry): Print semantics.
8283         (gen-opcode-open): Renamed from gen-opcode-table.
8284
8285         * utils.scm (string-write): No longer a macro.
8286         (-string-write): Handle procedure args.
8287         * opcodes.scm: Update all calls to string-write.
8288         * sim-cpu.scm: Ditto.
8289         * sim-decode.scm: Ditto.
8290         * sim-model.scm: Ditto.
8291         * sim.scm: Ditto.
8292
8293 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8294
8295         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8296         (-gen-insn-builders,-gen-insn-builder): New procs.
8297
8298 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8299
8300         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8301         (gen-opcode-table): Properly terminate comment.
8302
8303 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8304
8305         * Version 0.6.0.
8306         Clean up pass over everything, so starting fresh.