OSDN Git Service

* sim.scm (/op-gen-written-update): Disable operand number is too
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-12-16  Doug Evans  <dje@sebabeach.org>
2
3         * sim.scm (/op-gen-written-update): Disable operand number is too
4         large warning, for now.
5
6 2009-12-11  Nick Clifton  <nickc@redhat.com>
7
8         * cpu/fr30.opc: Fix shadowed variable warnings.
9
10 2009-12-10  Doug Evans  <dje@sebabeach.org>
11
12         * gen-all: Rewrite.  Build more ports.  Split out building of sid.
13
14 2009-11-23  Doug Evans  <dje@sebabeach.org>
15
16         * hardware.scm (hw-pc?): New function.
17         * ifield.scm (ifld-signed?): New function.
18         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
19         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
20         (insn-cti?): New function.
21         * rtl.scm (/hw): Create <pc> object for pcs.
22         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
23         All callers updated.  Watch for sets to the pc.
24         (semantic-attrs): Watch for sets to the pc.
25         * sid.scm (<pc> cxmake-get): Handle raw-reg.
26         * sim.scm (<pc> cxmake-get): Handle raw-reg.
27         (<operand> cxmake-get): Add debugging printf.
28         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
29         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
30         (/gen-extract-word): Ditto.
31
32         * utils.scm (gen-c-hex-constant): New function.
33         * utils-sim.scm (/gen-decode-insn-entry): Call it.
34
35 2009-11-22  Doug Evans  <dje@sebabeach.org>
36
37         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
38         * read.scm (parse-error-continuable): New function.
39         (define /continuable-error-found?): New variable.
40         (/init-reader!): Initialize it.
41         (/finish-reader!): New function.
42         (cpu-load): Call it.
43         * utils-cgen.scm (obj-list-nub): New function.
44
45         * mach.scm (<derived-arch-data>): New member large-insn-word?.
46         (/adata-set-derived!): Set it.
47         (adata-large-insn-word?): New function.
48         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
49         here.
50         * sim-cpu.scm (cgen-cpu.h): #include it here.
51         (/gen-cpu-defines): Define CGEN_INSN_WORD.
52         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
53         CGEN_INSN_INT.
54         * sim-decode.scm (/gen-idesc-decls): Ditto.
55         (/gen-extract-case, /gen-decode-fn): Ditto.
56         * sim-model.scm (/gen-model-insn-fn): Ditto.
57         * sim.scm (gen-argbuf-type): Ditto.
58
59         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
60         (s-sequence): Call it.
61
62 2009-11-21  Doug Evans  <dje@sebabeach.org>
63
64         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
65         non-VOID-mode expressions with multiple statements.
66
67         * sim.scm (/operand-number-elaboration-written?): New variable.
68         (/op-gen-written-update op): New function.
69         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
70
71         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
72
73         * operand.scm (op-nub): Delete.
74
75         * dev-utils.scm: New file.
76         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
77         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
78         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
79         /loaded-file-record!, maybe-load): Delete.
80         Load cgen files directly instead of via maybe-load.
81
82 2009-11-14  Doug Evans  <dje@sebabeach.org>
83
84         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
85         expressions used in a void context.
86
87         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
88
89         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
90         * cpu/xc16x.opc: Ditto.
91
92 2009-11-12  Doug Evans  <dje@sebabeach.org>
93
94         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
95
96         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
97         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
98
99 2009-11-11  Doug Evans  <dje@sebabeach.org>
100
101         * html.scm (gen-insn-docs): Add logging message.
102
103 2009-11-05  Doug Evans  <dje@sebabeach.org>
104
105         * utils-cgen.scm (gen-set-macro2): New function.
106         * sim.scm (<hw-register> gen-get-macro): Call it.
107
108         * co-for-gen-all: New file.
109
110         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
111
112         * utils.scm (reduce): Delete.
113
114         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
115
116         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
117         regarding PREFIX attribute handling.
118
119         * operand.scm (<hw-index>): Add enum to possible types, all uses
120         updated.
121         (hw-index-constant?, hw-index-constant-value): New functions.
122         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
123         hw-index-enum-obj): New functions.
124         (/operand-parse): Handle enum indices.
125         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
126         hw-index-constant-value.
127         * rtl.scm (rtx-constant-value): Fix handling of enums.
128         * rtx-funcs.scm (enum): Ditto.
129         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
130         currently supported here.
131
132 2009-11-02  Doug Evans  <dje@sebabeach.org>
133
134         Specify isa(s) when doing ifield, operand, insn lookups.
135         ACU = all callers updated.
136         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
137         * enum.scm (define-full-insn-enum): Pass isa-name-list to
138         current-ifld-lookup.
139         * html.scm (get-insn-properties): Pass isa-name-list to
140         current-op-lookup.
141         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
142         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
143         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
144         (/parse-insn-format, syntax-break-out): Ditto.
145         * mach.scm (obj-filter-by-isa): New function.
146         (current-ifld-lookup): New optional arg maybe-isa-name-list.
147         (/ifld-already-defined?, /op-already-defined?): Simplify.
148         (current-op-lookup): New optional arg maybe-isa-name-list.
149         (current-insn-lookup): New arg isa-name-list, ACU.
150         (/insn-already-defined?, /minsn-already-defined?): Simplify.
151         (current-minsn-lookup): New arg isa-name-list, ACU.
152         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
153         current-op-lookup.
154         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
155         (gen-syntax-entry): Ditto.
156         * operand.scm (/operand-parse): Pass isa-name-list to
157         current-ifld-lookup.
158         (/derived-parse-encoding): New arg isa-name-list, ACU.
159         (/derived-parse-ifield-assertion): Ditto.
160         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
161         (/anyof-parse-choice): Ditto.
162         (anyof-satisfies-assertions?): Pass context to rtx-solve.
163         (/anyof-merge-syntax): New arg container, ACU.
164         (operand-builtin!): Add pc to all isas.
165         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
166         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
167         (rtl-c-parsed, rtl-c++-parsed): Ditto.
168         (rtl-c): New arg isa-name-list, ACU.
169         (rtl-c-expr, rtl-c++): Ditto.
170         (closure): New arg isa-name-list, ACU.
171         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
172         (/cstate-isas): New function.
173         (/rtx-canon-symbol-list): New function.
174         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
175         updated.
176         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
177         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
178         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
179         (rtx-canonicalize): New arg isa-name-list, ACU.
180         (rtx-canonicalize-stmt): Delete.
181         (tstate-make): New arg isas, ACU.
182         (tstate-isas, tstate--set-isas!): New functions.
183         (tstate-env-stack): Renamed from tstate-env, ACU.
184         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
185         (tstate-make-closure): Renamed from tstate-new-env, new arg
186         isa-name-list, ACU.
187         (/rtx-traverse-env): Delete.
188         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
189         SUMBOLLIST.
190         (/rtx-traverse): Include conditional flag in dump output.
191         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
192         (<eval-state>): New member isas.  Rename env to env-stack.
193         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
194         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
195         to env-stack.
196         (estate-make-for-eval): Provide #:isas.
197         (estate-make-closure): Renamed from estate-new-env.  New arg
198         isa-name-list, ACU.
199         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
200         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
201         (/rtx-trim-for-doc): Handle closures.
202         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
203         SYMBOLLIST.
204         (rtx-env-var-list): Delete.
205         (rtx-env-make): Handle already-compiled environments.
206         (rtx-var-alist-to-env): New function.
207         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
208         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
209         (rtx-operand-obj): New arg isa-name-list, ACU.
210         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
211         functions.
212         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
213         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
214         (/frag-compute-desired-frags): Minor simplification.
215         (/frag-pick-best): Ditto.
216         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
217         (/gen-sfrag-code): Update.
218         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
219         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
220         * utils.scm (non-null-intersection?): New function.
221
222         * gen-all (do_src): Manually run cgen-all for sid.
223
224 2009-11-01  Doug Evans  <dje@sebabeach.org>
225
226         * gen-all: New file.
227
228         * rtl-traverse.scm (/rtx-canon): Issue better error message for
229         invalid rtx function names.
230
231 2009-10-28  Doug Evans  <dje@sebabeach.org>
232
233         * cos.scm (object-assign!): New function.
234         * mode.scm (/mode-set-word-params!): Call it.
235
236 2009-10-25  Doug Evans  <dje@sebabeach.org>
237
238         Record bitset attributes internally as a list.
239         Record rtx attribute values internally as ((rtx-expr)).
240         * attr.scm (bitset-attr?): Delete, unused.
241         (<bitset-attribute> parse-value): Rewrite.
242         (/attr-parse): Rewrite bitset default value processing.
243         (/attr-read): Pick out values of scalar attributes to distinguish
244         them from bitset values which are a list.
245         Fix spelling errors for processing of default values.
246         Handle string attributes.
247         (bitset-attr->list): Delete, all callers updated.
248         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
249         All callers updated.
250         (atlist-source-form): Rewrite.
251         * hardware.scm (<hardware-base> 'get-isas): Update recognition
252         of all isas.
253         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
254         -> (ISA foo bar).
255         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
256         values are now lists.
257         * mach.scm (def-isa-attr!): Update, bitset attribute values,
258         including the default, are now lists.
259         (all-isas-attr-value): Result is now a list.
260         * doc/rtl.texi: Clean up pass over attribute docs.
261
262         Change internal representation of rtx attribute values.
263         * attr.scm (/attr-val-is-rtx?): New function.
264         (attr-value): Call it.
265         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
266         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
267         Disallow rtx values for bitset attributes.
268         (/attr-read): Record rtx in default value as ((rtx-expr)).
269         (/attr-eval): Update.
270
271 2009-10-24  Doug Evans  <dje@sebabeach.org>
272
273         * gen-all-doc: Add sh.cpu.
274         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
275         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
276
277         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
278         (/gen-sfrag-case): Ditto.
279         * sim-cpu.scm (/gen-sem-case): Ditto.
280
281         * doc/rtl.texi: Add note that different ifields, operands, insns,
282         and minsns may occur with the same name in different isas.
283         Add note on the canonical form of rtl expressions.
284
285 2009-10-23  Doug Evans  <dje@sebabeach.org>
286
287         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
288         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
289
290         * decode.scm: Tweak various comments.
291         (/opcode-slots): Add FIXME.
292         (/build-decode-table-guts): Add assert.
293         * utils-sim.scm (/gen-set-itype-and-extract): New function.
294         (/gen-bracketed-set-itype-and-extract): New function.
295         (/gen-decode-default-entry): Rewrite.
296         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
297         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
298         updated.  Don't unnecessarily emit check for whether all opcode bits
299         have been examined.
300         (/gen-decode-expr-set-itype): Delete.
301         (/gen-decode-expr-entry): Update.
302         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
303         updated.  Keep track of decoder tables used thus far.
304         (/gen-decoder-switch): Ditto.
305         * utils.scm (word-bit-value): New function.
306
307 2009-10-14  Doug Evans  <dje@sebabeach.org>
308
309         * ifield.scm (<ifield>, value): Provide default initial value.
310         (ifield-encode-mode): Delete
311         (ifield-decode-mode): Delete duplicate definition.
312         (<derived-ifield>, 'make!): Initialize members encode, decode.
313         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
314         ifld-encode-mode.
315         (<multi-ifield>, 'gen-insert): Ditto.
316         
317 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
318
319         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
320         for @foo@_init_idesc_table.
321
322 2009-09-30  Doug Evans  <dje@sebabeach.org>
323
324         * doc/intro.texi: Mention SID.
325         * doc/sim.texi: Ditto.
326         * doc/porting.text (Doing a simulator port): Add some text.
327
328 2009-09-27  Doug Evans  <dje@sebabeach.org>
329
330         * cos.scm (/class-table): New global.
331         (/class-uid, /class-set-uid!): New functions.
332         (/class-parent-name): Renamed from /class-parents.
333         (/class-make!): Change parents arg to parent-name, all callers updated.
334         Assign uid to class.
335         (/class-lookup-uid): New function.
336         (/class-parent-classes): Rewrite.
337         (/class-mi?): Delete.
338         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
339         Delete.
340         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
341         (/class-compute-class-desc, class-desc-dump): Update.
342         (/object-make!): Update.
343         (/object-make-with-values!): Delete arg class-desc, all callers
344         updated.
345         (/object-copy): Delete arg top?, all callers updated.
346         (/object-specialize): Delete.
347         (/object-elements, /object-top-class): Delete.
348         (/object-class-name, /object-class-desc): Update.
349         (/object-class-uid): New function.
350         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
351         class-make, /class-subclass? /class-lookup-element,
352         Update.
353         (/elm-delta, elm-list): Delete.
354         (/elm-make-method-getter, elm-get, elm-xget): Update.
355         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
356         (elm-make-getter, elm-make-setter): Update.
357         (/method-lookup-next): Update.
358         (send): Don't specialize class passed to method.
359         (send-next): New arg class-name, all callers updated.
360         (/class-parent, /class-parent-via-path, object-parent): Delete.
361         (class-cons-parent!, class-append-parent!): Delete.
362         (object-reset!): Init /class-table.
363
364         * cos.scm (/object-debug-classes): Delete.
365         (/object-debug-elements, /object-debug-methods): Delete.
366
367         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
368         (method-proc): Delete.
369         (method-make-virtual!, method-make-virtual-forward!): Delete.
370         * ifield.scm (<ifield> field-start): Update.
371         (<ifield> field-length, pretty-print): Update.
372         (<multi-ifield> field-length, field-start, pretty-print): Update.
373         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
374         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
375         (<array> gen-sym-defn): Ditto.
376         (<hardware-base> gen-defn): Renamed from gen-defn.
377         (<hw-register> gen-type): Update.
378         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
379         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
380         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
381         (<hw-immediate> gen-type): Update.
382         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
383         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
384         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
385         (<array> gen-sym-defn): Ditto.
386         (<hardware-base> gen-defn): Renamed from gen-defn.
387         (<hw-register> gen-type): Update.
388         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
389         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
390         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
391         (<hw-immediate> gen-type): Update.
392         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
393
394 2009-09-25  Doug Evans  <dje@sebabeach.org>
395
396         * operand.scm (/anyof-merge-setter): Handle set-quiet.
397         * rtl.scm (rtx-single-set?): Handle set-quiet.
398
399         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
400         rtl-cover-fns?, macro?.  All callers updated.
401         (estate-make-for-normal-rtl-c): Delete, have all callers call
402         estate-make-for-rtl-c directly.
403         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
404         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
405
406         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
407         replaces /par-replace-set-dests.
408         (/par-replace-set-src-expr-fn): New function, replaces
409         /par-replace-set-srcs.
410         (s-parallel): Rewrite.
411
412         * rtl.scm (rtx-pretty-strdump): New function.
413         * rtl-traverse.scm (/rtx-canon-error): Use it.
414         (<eval-state>): New member outer-expr.
415         (estate-error): Include outer expression in error message if present.
416
417 2009-09-23  Doug Evans  <dje@sebabeach.org>
418
419         * xc16x.cpu (h-cr): New hardware.
420         (muls): Comment out parts that won't compile, add fixme.
421         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
422         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
423         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
424
425         Rewrite rtl processing to require it to be "canonicalized" first,
426         and write a full canonicalizer / expression checker.
427         Remove all appearances of DFLT in canonical rtl.
428         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
429         then rtx-simplify.
430         * iformat.scm (ifmt-analyze) Use canonical semantics.
431         * insn (<insn>): New member canonical-semantics.
432         * mach.scm (<arch>): New member multi-insns-instantiated?.
433         (/instantiate-multi-insns!): New function.
434         (/canonicalize-insns!): New function.
435         (arch-analyze-insns!): Canonicalize insn semantics before processing
436         them.
437         * mode.scm (/mode-set-word-params!): New function.
438         (mode-void?): New function.
439         (mode-compatible?): VOID is compatible with VOID.
440         (/mode-word-sizes-defined?): New global.
441         (mode-set-word-modes!): Use/set it.
442         (mode-ensure-word-sizes-defined): Update.
443         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
444         Redo WI/UWI/AI/IAI handling.
445         (op:new-mode): No longer accept DFLT.
446         (<derived-operand> constructor): Ensure all fields are initialized.
447         (<anyof-operand> constructor): Ditto.
448         (/derived-parse-ifield-assertion): Delete arg `args'.
449         All callers updated.
450         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
451         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
452         (rtl-c-expr, rtl-c++): Ditto.
453         (/rtl-c-get): Use mode of operand, not containing expression.
454         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
455         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
456         estate-for-insn? instead.
457         (s-unop): Use mode of expression, not first operand.
458         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
459         (s-sequence): Remove DFLT support.
460         (ifield): Use mode of expression, not UINT.
461         (pc): Comment out, unused.
462         (int-attr): New rtx kind.
463         (attr): Deprecate.
464         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
465         * rtl-traverse.scm (/rtx-canon-debug?): New global.
466         (/make-cstate): New function.
467         (/cstate-context, /cstate-outer-expr): New functions.
468         (/rtx-canon-error): New function.
469         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
470         /rtx-get-last-cond-case-rtx): New functions.
471         (/rtx-canon-*): New functions.
472         (/rtx-canner-table, /rtx-operand-canoners): New globals.
473         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
474         (/rtx-option, /rtx-option-list?): Rewrite.
475         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
476         Rewritten, all callers updated.
477         (/rtx-canon-expr, /rtx-canon): New functions.
478         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
479         (rtx-canonicalize-stmt): New function.
480         (tstate-make): Remove arg `set?'.  All callers updated.
481         (tstate-new-set?): Delete.
482         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
483         moved to /rtx-canon-*.
484         (/rtx-traverse-normal-operand): New function.
485         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
486         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
487         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
488         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
489         Ditto.
490         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
491         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
492         (/rtx-make-traverser-table): Update.
493         (/rtx-traverse-operands): Remove mode processing, now done during
494         canonicalization.
495         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
496         (/rtx-traverse): Ditto.
497         (rtx-init-traverser-tables!): New function.
498         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
499         (rtx-verify-no-dflt-modes): New function.
500         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
501         (rtx-simplify-insn): Use insn-canonical-semantics.
502         (rtx-canonicalize): Moved to rtl-traverse.scm.
503         (/compile-expr-fn, rtx-compile): Delete.
504         (/rtx-trim-rtx-list): New function.
505         (/rtx-trim-for-doc): Handle set, if.
506         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
507         (/rtx-valid-mode-types): Update.
508         (/rtx-valid-matches): Update.
509         (/rtx-find-matchexpr-index): New function.
510         (rtx-lookup): Require rtx-kind to be the rtx name.
511         (def-rtx-node): New arg result-mode, all callers updated.
512         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
513         (rtx-lazy-sem-mode): Delete.
514         (/rtx-closure-make): New arg `mode', all callers updated.
515         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
516         (rtx-operand-obj): Rewrite.
517         (rtx-make-xop): New functions.
518         (/hw): Renamed from `hw', all callers updated.
519         Use the correct mode instead of DFLT for the index.
520         (rtl-builtin!): Call rtx-init-traversal-tables!.
521         (rtl-finish!): Update.
522         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
523         Update mode arg-type.
524         (pc): Comment out.
525         (int-attr): New rtx kind.
526         (attr): Deprecate.
527         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
528         (/frag-cost-compute!): Ditto.
529         * semantics.scm (/build-operand!): Delete args op-name, op.
530         New arg op-expr.  All callers updated.
531         (/build-mem-operand!): Remove DFLT support.
532         (semantic-compile): Update process-expr!, mode arg deleted.
533         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
534         rtl-c++ calls.
535         (/gen-sem-case, /gen-sfrag-code): Ditto.
536         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
537         (/op-gen-set-trace): New function.  If not doing profiling, or using
538         the pbb engine, call /op-gen-set-quiet.
539         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
540         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
541         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
542         * utils.scm (find-first-index): New function.
543         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
544
545         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
546         to COMPARE.
547         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
548
549 2009-09-21  Doug Evans  <dje@sebabeach.org>
550
551         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
552         All callers updated.  Add FIXME.
553         (all rtx functions): Rename local estate to *estate*.  It's an
554         artificial argument added to the rtx, so make it stand out.
555
556         * openrisc.cpu (or32 isa): Fix setup-semantics.
557
558         * rtl.scm (rtx-class-*?): Delete, unused.
559         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
560
561         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
562         (init-reader!): Set /CGEN-RTL-VERSION to default.
563
564         * read.scm (cpu-load): Print load parameters.
565
566         * dev.scm (load-doc): Set verbose-level to 2.
567
568 2009-09-20  Doug Evans  <dje@sebabeach.org>
569
570         * rtl.scm (rtx-strdump): Use write instead of display.
571
572 2009-09-17  Doug Evans  <dje@sebabeach.org>
573
574         * utils-cgen.scm (obj-csv-names): New function.
575         * utils-sim.scm (/sfmt-contents): Use it in logging message.
576
577 2009-09-12  Doug Evans  <dje@sebabeach.org>
578
579         Clean up pass of mode handling.
580         Make use of mode name vs <mode> object more consistent and clear.
581         * hardware.scm (/keyword-read): Default mode to the mode name,
582         not the <mode> object.
583         (/hw-parse-indices): Parse mode name and pass mode object to
584         <hw-asm> constructor.
585         (/hw-parse-values): Ditto.
586         (<hw-register> parse!): Pass mode name to /hw-parse-indices
587         and /hw-parse-values.
588         (<hw-memory> parse!): Ditto.
589         (<hw-address> parse!): Ditto.
590         * mode.scm (/mode-table): New global, replaces mode-list.
591         Modes stored in hashtable instead of list.
592         (/mode-class-table): New global.
593         (mode-list-non-alias-values): Update.
594         (mode:eq?, mode-compatible?, mode:add!): Update.
595         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
596         (mode-maybe-lookup): New function.
597         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
598         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
599         (mode-find, mode-set-word-modes!): Update
600         (mode-ensure-word-sizes-defined): Update.
601         (/sort-mode-classes!): New function.
602         (mode-builtin!): Update.  Sort mode classes here.
603         (mode-finish!): Sort mode classes here too.
604         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
605         All callers updated.
606         (rtl-c-set-quiet): Allow mode to be name of object.
607         (rtl-c-set-trace): Ditto.
608         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
609         <mode> object.  All callers updated.
610         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
611         (rtx-lazy-sem-mode): Ditto.
612         (<rtx-temp> make!): Assert mode arg is a <mode> object.
613         (rtx-env-make): Allow var-list modes to be name or object.
614         * sem-frags.scm (/frag-expr-assq-locals): New function.
615         (/frag-compute-locals!): Call it.
616         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
617         All callers updated.
618         * semantics.scm (/build-mem-operand!): Handle mode aliases.
619
620         * sim-test.scm (*): Symbols no longer can be passed to string-append.
621
622 2009-09-10  Doug Evans  <dje@sebabeach.org>
623
624         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
625         Improve error message for missing or too many bits.
626         (/insn-parse): Don't verify iformat for virtual insns.
627         
628         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
629         non-multi-insns.
630         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
631         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
632         * sid.scm (pbb-engine-insns): Ditto.
633         * sim-decode.scm (cgen-decode.c): Ditto.
634
635 2009-09-09  Doug Evans  <dje@sebabeach.org>
636
637         * rtl-traverse.scm: Comment tweaks.
638         * rtl-xform.scm: Comment and reformatting tweaks.
639         * doc/rtl.texi: Add text to docs on ifield-assertions.
640
641         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
642         saving.
643
644         Add support for controlling warnings/errors.
645         Add tests for iformat description errors.
646         * dev.scm (cload): New option #:diag.
647         * read.scm (<reader>): New member verify-iformat?.
648         (/parse-diagnostic, parse-warning): New functions.
649         (parse-error): Guts moved to /parse-diagnostic.
650         (/set-diagnostic-options!): New function.
651         (cpu-load): New arg diagnostic-options, all callers updated.
652         Recognize -w diagnostic-option-list.
653         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
654         (ifld-simple-ifields, ifields-simple-ifields): New function.
655         * insn.scm (/parse-insn-format-iflds): New function.
656         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
657         New arg isa, all callers updated.  Do some basic validation of the
658         ifield list if requested.
659         * mach.scm (/sanity-check-insns): Improve error message text.
660         * doc/running.texi: Document -w option.
661         * doc/porting.texi: Document #:trace, #:diag options to cload.
662
663         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
664
665         * dev.scm (*): Change default verbosity level to 2.
666
667         * ifield.scm (<ifield> pretty-print): New method.
668         (ifld-pretty-print): New function.
669         (<multi-ifield> pretty-print): New method.
670
671         * ifield.scm (<ifield> field-start): Delete word-len arg.
672         All callers updated.
673         (ifld-start): Ditto.
674         (<multi-ifield> field-start): Ditto.
675         * operand.scm (<hw-index> field-start): Ditto.
676
677         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
678         total-bitsize.  All callers updated.
679         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
680         New member /insn-base-value.
681         (insn-base-value): New function.
682         * mach.scm (/sanity-check-insns): New function.
683         (arch-analyze-insns!): Call it.
684
685 2009-09-08  Doug Evans  <dje@sebabeach.org>
686
687         * iformat.scm (ifields-base-ifields): Simplify.
688         (compute-insn-length): Simplify, call ifields-base-ifields.
689         (compute-insn-base-mask): Ditto.
690         * ifield.scm (ifld-known-values): Ditto.
691         (ifld-base-ifields): Ditto.
692         * insn.scm (insn-value): Ditto.
693         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
694
695 2009-09-08  DJ Delorie  <dj@redhat.com>
696
697         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
698         preprocessor macro, not an enum.
699
700 2009-09-08  Doug Evans  <dje@sebabeach.org>
701
702         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
703         to string-append.
704         (*): Remove trailing ":" from error messages passed to estate-error.
705
706 2009-09-07  Doug Evans  <dje@sebabeach.org>
707
708         * types.scm (<struct>): Delete.
709
710         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
711         updated.
712         (/pmacro-loc-error): New function.
713
714         * mach.scm (/isa-parse-decode-assist): New function.
715         (/isa-parse): Call it.
716
717         * decode.scm (/get-subopcode-value): New function.
718         (/opcode-slots): Call it.
719         (/fill-slot!): Add logging message.
720
721         * cos.scm (/object-error): Convert symbols to strings before passing
722         to string-append.
723
724         * read.scm (rtl-version-equal?): New function.
725         (rtl-version-at-least?, rtl-version-older?): New functions.
726
727         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
728         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
729         rtl versions >= 0.9.
730         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
731
732 2009-09-03  Doug Evans  <dje@sebabeach.org>
733
734         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
735         is simple.
736
737 2009-09-01  DJ Delorie  <dj@redhat.com>
738
739         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
740         (parse_unsigned16_range): Likewise.
741         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
742         isa.
743
744 2009-09-01  Doug Evans  <dje@sebabeach.org>
745
746         Pmacro .equals -> .equal?
747         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
748         -pmacro-builtin-equals.  All callers updated.
749         (pmacros-init!): Rename .equals to .equal?.
750         * doc/pmacros.texi: Update.
751         * testsuite/pmacros-1.test: Update.
752
753         * doc/porting.texi: Work around texi2html bug where it doesn't
754         properly escape <> inside double-quotes inside @code.
755
756         * doc/porting.texi (Doing an opcodes port): Add step to specify
757         the .opc file.
758
759 2009-08-29  Doug Evans  <dje@sebabeach.org>
760
761         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
762         rtl version 0.7.
763         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
764
765 2009-08-27  Doug Evans  <dje@sebabeach.org>
766
767         Add do-count rtl function.
768         * rtl-c.scm (s-do-count): New function.
769         (do-count): New rtl handler.
770         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
771         (-rtx-make-traverser-table): Add ITERATION.
772         * rtl.scm (rtx-make-iteration-limit-var): New function.
773         (rtx-env-make-iteration-locals): New function.
774         * rtx-funcs.scm (do-count): New rtl function.
775         * cpu/play.cpu: Add do-count-test insn.
776         * doc/rtl.texi: Add docs on do-count.
777
778 2009-08-26  Doug Evans  <dje@sebabeach.org>
779
780         * read.scm (parse-error): Change error message output format
781         to match context-owner-error.
782         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
783         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
784         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
785         (operand): Call estate-error instead of context-error.
786         (local, delay): Ditto.
787         (ref, attr): Call estate-error instead of error.
788         * rtl-traverse.scm (tstate-error): New function.
789         (-rtx-traverse-error): Call tstate-error instead of context-error.
790         (-rtx-traverse-operands, -rtx-traverse): Ditto.
791         (estate-error): New function.
792         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
793         instead of error.
794         (e-if): Call estate-error instead of error.
795         * rtx-funcs.scm (error): Call estate-error instead of context-error.
796         (member): Ditto.
797         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
798         Rewrite to call context-owner-error.
799         (context-owner-error): New function.
800
801         * ifield.scm (<ifield> constructor): New arg `location',
802         all callers updated.
803         * insn.scm (<insn> constructor): Ditto.
804         (<multi-insn> constructor): Ditto.
805         * minsn.scm (<macro-insn> constructor): Ditto.
806         * operand.scm (<operand> constructor): Ditto.
807         * utils-cgen.scm (builtin-location): New function.
808         (<source-ident>): Fix default value of member `location'.
809         (source-ident?): New function.
810
811         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
812         (estate-push-env, estate-with-modifiers): Ditto.
813         (estate-deepen): New function.
814
815 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
816
817         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
818         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
819         routines.
820
821 2009-08-25  Doug Evans  <dje@sebabeach.org>
822
823         * doc/pmacros.texi (pmacro default argument values): Add text.
824
825 2009-08-23  Doug Evans  <dje@sebabeach.org>
826
827         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
828         Rename member prefix -> name-prefix.
829         (<keyword> getters): Update.
830         (-keyword-parse): Update.  Default enum-prefix to NAME-.
831         (-keyword-read): Update.  Don't compute default value for
832         enum-prefix here.
833         (define-keyword): Update.
834         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
835         * read.scm (cgen-rtl-version): New function.
836         (-supported-rtl-versions): Add (0 8).
837         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
838         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
839         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
840         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
841         Update, print-name -> enum-prefix, make uppercase.
842         Remove unnecessary name-prefix spec.
843         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
844         * cpu/ip2k.cpu (register-names): Ditto.
845         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
846         * cpu/sparc.cpu (gr-names): Ditto.
847         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
848         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
849         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
850         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
851         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
852         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
853         prefix -> name-prefix.
854         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
855         Update, print-name -> enum-prefix, make uppercase.
856         (drc-names, xf-names): Ditto.
857         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
858         * doc/rtl.texi (Keywords): New section.
859         (hardware indices): Update text.
860         (rtl versions): Add 0.8.
861
862         Add define-rtl-version.
863         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
864         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
865         (cgen-lang-fixlevel): Delete.
866         (-supported-rtl-versions): New variable.
867         (-cmd-define-rtl-version): New function.
868         (init-reader!): New command define-rtl-version.
869         (-cgen): Add rtl version to --version output.
870         * doc/rtl.texi: Document rtl version support.
871         * cpu/play.cpu: Add define-rtl-version.
872
873 2009-08-22  Doug Evans  <dje@sebabeach.org>
874
875         * Makefile.am (OPTIONS): Define.
876         (desc): Just generate <arch>-desc.[ch] files.
877         * Makefile.in: Regenerate.
878         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
879         no .opc file.
880         (cgen-desc.c): Similarly.
881         * gen-all-desc: New file.
882         * opcodes.scm (opc-file-provided?): New function.
883
884         * mach.scm (current-*-add!): Update calls to parse-error.
885         * operand.scm (op:new-mode): Update call to parse-error.
886         * utils-cgen.scm (make-obj-context): New function.
887
888         * NEWS: Copy over entries from 1.1 branch.
889
890 2009-08-20  Doug Evans  <dje@sebabeach.org>
891
892         * gas-test.scm (<keyword> test-data): Catch invalid requests,
893         flag a warning and compensate.
894         (<hw-address test-data): Tweak for readability.
895         (<hw-iaddress test-data): Ditto.
896         (cgen-build.sh): Convert symbols to strings before passing to
897         string-append.
898         (cgen-allinsn.exp): Ditto.
899
900         * doc/pmacros.texi (.splice): Add more text.
901
902 2009-08-19  Doug Evans  <dje@sebabeach.org>
903
904         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
905         distinguish from 1.1.
906         * configure: Regenerate.
907         * read.scm (-CGEN-VERSION): Update.
908         * doc/version.texi: Update.
909
910         New builtin .pmacro?.
911         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
912         (pmacros-init!): Add .pmacro?.
913         * doc/pmacros.text: Document .pmacro?.
914         * testsuite/pmacros-1.test: Test .pmacro?.
915
916         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
917         of a pmacro begins before its arguments are evaluated, improves
918         readability.
919
920         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
921         * testsuite/pmacros-1.test: Ditto.  Add better tests.
922
923         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
924         in assembler syntax.
925         (Operands): Similarly.
926
927 2009-08-18  Doug Evans  <dje@sebabeach.org>
928
929         * ifield.scm (ifld-encode-mode): Add FIXME.
930         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
931         modes.
932         (<ifield> gen-extract): Similarly.
933
934         * read.scm (parse-error): Handle #f for context-location.
935         * utils-cgen.scm (unspecified-location): Fix building of
936         single-location.
937
938         * doc/rtl.texi: Document how to write hex and boolean values.
939
940         * gas-test.scm (<hw-asm> test-data): Handle () values.
941         (<keyword> test-data): Convert symbols to strings before passing
942         to string-append.
943         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
944         result for scalars.
945
946         * operand.scm (hw-index-scalar): Set `name'.
947         (hw-index-anyof, hw-index-derived): Ditto.
948
949 2009-08-17  Doug Evans  <dje@sebabeach.org>
950
951         * pmacros.scm (-pmacro-builtin-internal-test): New function.
952         (pmacros-init!): Add .internal-test.
953         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
954         * testsuite/testsuite.cpu (internal-verify): New pmacro.
955         * doc/pmacros.text: Document .internal-test.
956
957         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
958         (parse-comment): Allow numbers.
959         * doc/porting.texi: Document that names and comments may be lists.
960
961         * insn.scm (-insn-parse): Fix typo.
962
963         Rename .eval -> .exec.  Add new .eval.
964         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
965         (-pmacro-builtin-eval): New function.
966         (pmacros-init!): Add .exec.
967         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
968         * testsuite/location-1.test: Update.
969         * testsuite/pmacros-1.test: Add test for .eval.
970
971 2009-08-16  Doug Evans  <dje@sebabeach.org>
972
973         * doc/porting.texi: Remove support for Guile 1.4.
974
975         * read.scm (current-reader-location): Return unspecified location
976         if reader hasn't been initialized yet.
977
978 2009-08-13  Doug Evans  <dje@sebabeach.org>
979
980         * dev.scm: Document tracing options.
981
982         * pmacros.scm (pmacro-dump): New function.
983         (check-pmacro): Tweak debugging output.
984         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
985         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
986
987         Add .let* pmacro builtin.
988         * pmacros.scm (-pmacro-builtin-let*): New function.
989         (pmacros-init!): Add .let*.
990         * doc/pmacros.texi: Document .let*.
991         * testsuite/pmacros-1.test: Test .let*.
992
993 2009-08-12  Doug Evans  <dje@sebabeach.org>
994
995         Clean up cpu file parsing, pass context consistently instead of the
996         old "errtxt" argument.
997         NOTE: ACU == "All Callers Updated".
998         * attr.scm (-parse-simple-attribute): Renamed from
999         parse-simple-attribute, ACU.
1000         (-attr-parse): Change errtxt argument to context, ACU.
1001         (-attr-read): Ditto.
1002         (atlist-parse): Ditto.  Put context arg first.
1003         (attr-parse): Use parse-error instead of context-error.
1004         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1005         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1006         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1007         `context' arg is now a <context> object.  ACU.
1008         (-keyword-read): `context' arg is now a <context> object.  ACU.
1009         (-hw-parse-indices): Change errtxt argument to context, ACU.
1010         (-hw-parse-values, -hw-parse-handlers): Ditto.
1011         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1012         (-hw-validate-layout, -hw-create-getter-from-layout,
1013         -hw-create-setter-from-layout): Ditto.
1014         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1015         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1016         (<hw-address>:parse!): Ditto.
1017         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1018         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1019         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1020         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1021         * insn.scm (-insn-parse, -insn-read): Ditto.
1022         (parse-syntax): Ditto.  Put context arg first.
1023         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1024         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1025         (-parse-insn-format): Ditto.
1026         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1027         (-arch-parse-isas): Ditto.
1028         (-isa-read): Add context arg, ACU.
1029         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1030         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1031         context, ACU.
1032         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1033         (minsn-make-alias): Ditto.
1034         * mode.scm (-mode-parse): Ditto.
1035         (parse-mode-name): Ditto.  Put context arg first.
1036         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1037         errtxt argument to context, ACU.
1038         (-unit-parse, -model-parse, -model-read): Ditto.
1039         * operand.scm (-operand-parse-getter): Use parse-error instead of
1040         context-error.
1041         (-operand-parse-setter): Ditto.
1042         (-operand-parse): Change errtxt argument to context, ACU.
1043         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1044         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1045         * read.scm (reader-error): Delete.  Use parse-error instead.
1046         (parse-error): Change errtxt argument to context, ACU.  Split args
1047         argument into expr and maybe-help-text.
1048         (-reader-process-expanded-1!): Reorganize.
1049         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1050         * types.scm (parse-type): Ditto.
1051         * utils-cgen.scm (single-location->simple-string): New function.
1052         (<context>): Replace members file,lineno with location.
1053         (make-prefix-context): Renamed from context-make-prefix, ACU.
1054         (make-current-context): New function.
1055         (context-append, context-append-name): New functions.
1056         (context-make-reader): Delete.
1057         (parse-name): Change errtxt argument to context, ACU.
1058         Put context arg first.
1059         (parse-comment): Ditto.
1060         (parse-number): Change errtxt argument to context, ACU.
1061         (arg-list-validate-name, arg-list-check-no-args,
1062         arg-list-symbol-arg): Ditto.
1063
1064         * read.scm (-cmd-if): Don't assume test is a list.
1065
1066         * html.scm (get-insn-properties): Delete errtxt, unused.
1067
1068 2009-08-11  Doug Evans  <dje@sebabeach.org>
1069
1070         * doc/rtl.texi (hardware types): Add pc.
1071
1072 2009-08-07  Doug Evans  <dje@sebabeach.org>
1073
1074         Add -t option for tracing things like commands, pmacro expansion.
1075         * dev.scm (cload): New arg #:trace.
1076         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1077         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1078         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1079         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1080         (-reader-process-expanded-1!): Trace commands if requested.
1081         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1082         (-set-trace-options!): New function.
1083         (-init-reader!): New function.
1084         (cpu-load): New arg trace-options, all callers updated.
1085         Call -init-reader! and -set-trace-options!.
1086         (cgen-usage): Improve output formatting.
1087         (common-arguments): New option -t.
1088         (-cgen): Process -t.
1089         * utils-cgen.scm (single-location->string): Renamed from
1090         pretty-print-single-location.  All callers updated.
1091         (location->string): Renamed from pretty-print-location.
1092         All callers updated.
1093         (source-properties-location->string): New function.
1094         * doc/running.texi: Document -t.
1095
1096 2009-08-06  Doug Evans  <dje@sebabeach.org>
1097
1098         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1099         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1100         * utils.scm: ... here.
1101
1102 2009-08-05  Doug Evans  <dje@sebabeach.org>
1103
1104         Track source location better, for better error messages.
1105         * pmacros.scm (-pmacro-eval): Delete, unused.
1106         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1107         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1108         (scan-list, scan): Ditto.
1109         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1110         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1111         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1112         (scan-list1): New function.
1113         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1114         * read.scm (<reader>): New member `location'.
1115         (-reader-lookup-command): Renamed from reader-lookup-command,
1116         all callers updated.
1117         (reader-error): Rewrite to produce better source location info.
1118         (current-reader-location): New function.
1119         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1120         All callers updated.  Record source location of expression.
1121         (reader-process-expanded!): Renamed from reader-process-expanded.
1122         All callers updated.
1123         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1124         All callers updated.  Record source location of define-pmacro.
1125         * utils-cgen.scm (<location>): New class.
1126         (single-location): New (pseudo) class.
1127         (pretty-print-single-location, pretty-print-location): New functions.
1128         (location-top, location-push-single, location-push): New functions.
1129         (unspecified-location, current-input-location): New functions.
1130         (location-property): New object property.
1131         (location-property-set!): New function.
1132         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1133         All uses updated.
1134         * testsuite/location-1.test: New testcase.
1135         * testsuite/run-tests.sh: Fix fail count handling.
1136         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1137         to expect cgen to fail.
1138
1139         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1140
1141         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1142         (-cmd-if): Renamed from cmd-if.  All callers updated.
1143         Use reader-process-expanded! on then/else clauses instead of eval1.
1144
1145 2009-07-22  Doug Evans  <dje@sebabeach.org>
1146
1147         * modes.scm (TI,OI): New modes.
1148         * types.scm (parse-type): Improve error checking.  Don't hardwire
1149         mode names here.
1150         * utils.scm (non-negative-integer?): New function.
1151
1152         * pmacros.scm (-pmacro-builtin-find): New predicate.
1153         (pmacros-init!): Add .find.
1154         * doc/pmacros.tex: Document .find.
1155         * testsuite/pmacros-1.test: Test .find.
1156
1157 2009-07-20  Doug Evans  <dje@sebabeach.org>
1158
1159         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1160         commented out printfs.
1161         * rtl.scm (rtl-finish!): Whitespace tweaks.
1162         * model.scm (parse-insn-timing): Tweak logging message.
1163         * operand.scm: Comment and whitespace tweaks.
1164         (op:type): Tweak error message.
1165         (op-ifield): Tweak logging message.
1166         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1167         * read.scm: Whitespace cleanup.
1168         * utils.scm: Whitespace cleanup.
1169
1170 2009-07-19  Doug Evans  <dje@sebabeach.org>
1171
1172         Fix binding of nested pmacro parameters.
1173         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1174         All callers updated.
1175         (-pmacro-bulid-lambda): Ditto.
1176         * doc/pmacros.texi: Update.
1177         * testsuite/pmacros-1.test: Add testcase.
1178
1179         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1180         calculation.
1181         (-multi-ifield-make-default-extract): Ditto.
1182
1183         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1184         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1185         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1186         Define.
1187         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1188         * doc/rtl.texi: Update.
1189
1190         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1191
1192         Rename builtin boolean pmacros, for consistency with rtl.
1193         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1194         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1195         * doc/pmacros.texi: Update.
1196         * testsuite/pmacros-1.test: Update.
1197
1198 2009-07-17  Doug Evans  <dje@sebabeach.org>
1199
1200         Use hash tables to record ifields, operands, insns, macro-insns.
1201         * attr.scm (attr-builtin!): Tweak some comments.
1202         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1203         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1204         <ident>.
1205         (<multi-ifield>): New constructor.
1206         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1207         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1208         <ident>.
1209         (-sub-insn-make!): Add hack to avoid differences in generated code.
1210         (multi-insn-instantiate!): Add total number of multi-insns to
1211         logging message.
1212         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1213         minsn-list to foo-table.  New member next-ordinal.
1214         Update getters/setters.
1215         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1216         New functions.
1217         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1218         (-make-ident-object-table, -ident-object-table->list,
1219         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1220         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1221         -ifld-already-defined?): Rewrite.
1222         (current-op-list, current-op-add! current-op-lookup,
1223         -op-already-defined?): Rewrite.
1224         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1225         (current-insn-list, current-insn-add! current-insn-lookup,
1226         -insn-already-defined?): Rewrite.
1227         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1228         -minsn-already-defined?): Rewrite.
1229         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1230         (MAX-VIRTUAL-INSNS): Define.
1231         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1232         Update use of arch-insn-list.
1233         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1234         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1235         minsn-list.
1236         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1237         <ident>.  New constructor.
1238         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1239         <ident>.
1240         * sid.scm (-virtual-insn-add!): New function.
1241         (-create-virtual-insns!): Call it.
1242         (-fill-sim-insn-list!): Rewrite.
1243         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1244         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1245         * utils-cgen.scm (<ordered-ident>): New class.
1246         (obj-ordinal, obj-set-ordinal!): New functions.
1247         (add-ident-methods!): Delete.
1248
1249         * model.scm (parse-insn-timing): Change logging message to level 3.
1250
1251 2009-07-16  Doug Evans  <dje@sebabeach.org>
1252
1253         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1254         add a link to define-normal-insn-enum.
1255
1256         * doc/porting.texi (Conventions): Add docs on writing integers.
1257
1258         * cpu/simplify.inc (*): One line doc strings don't need \n.
1259         (df): Invoke define-full-ifield instead of claiming it's an alias.
1260         (dno): Define.
1261         (dnop): Mark as deprecated.
1262
1263         * cpu/play.cpu: Add example of hardware `layout'.
1264         * doc/porting.tex: Add docs on simplify.inc.
1265         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1266         and other things.
1267
1268         * ifield.scm: Whitespace/formatting cleanup.
1269
1270         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1271
1272         * read.scm (parse-error): Don't print single entry args as a list.
1273         (-reader-process-expanded-1): Convert symbol to string for
1274         string-append.
1275
1276         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1277
1278 2009-07-15  Doug Evans  <dje@sebabeach.org>
1279
1280         * cpu/simplify.inc (dno): New pmacro.
1281         * doc/porting.texi: Add section on simplify.inc.
1282         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1283
1284 2009-07-15  Doug Evans  <devans@sourceware.org>
1285
1286         * gen-all-doc: Generate index.html.
1287
1288 2009-07-13  Doug Evans  <dje@sebabeach.org>
1289
1290         Extend pmacro language, add testsuite.
1291         * Makefile.am (SUBDIRS): Add testsuite.
1292         * Makefile.in: Regenerate.
1293         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1294         testsuite/test-utils.sh.
1295         * configure: Regenerate.
1296         * dev.scm (cload): Handle testsuite app.
1297         (load-testsuite): New function.
1298         * pmacros.scm: (-pmacro-debug?): New global.
1299         (-smacro-table): New global.
1300         (-smacro-lookup, -smacro-set!): New functions.
1301         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1302         (-pmacro-syntactic-form?): New function.
1303         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1304         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1305         (-pmacro-expected-non-negative-integer): New function.
1306         (-pmacro-verify-non-negative-integer): New function.
1307         (-pmacro-expand-expr-list): New function.
1308         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1309         (-pmacro-process-args): Renamed from -pmacro-invoke.
1310         (-pmacro-apply, -smacro-apply): New functions.
1311         (-pmacro-expand): Rewrite syntactic form processing.
1312         (-pmacro-build-lambda): Reformat.
1313         (define-pmacro): Watch for more errors in definition.
1314         (pmacro-debug): New function.
1315         (pmacro-trace): Set/reset -pmacro-debug?.
1316         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1317         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1318         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1319         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1320         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1321         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1322         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1323         (pmacros-init!): Initialize -smacro-table.
1324         Rewrite pmacro initialization.
1325         * read.scm (reader-process-expanded): Renamed from
1326         -reader-process-expanded.  All callers updated.
1327         Recognize () as a no-op.
1328         (cpu-load): Tweak logging messages.
1329         * utils.scm (message): Add comment.
1330         * cpu/play.cpu: Add some instructions to play with .let.
1331         * doc/cgenint.texi: Move some debugging related docs to here from
1332         cgen.texi.
1333         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1334         * testsuite/Makefile.am: New file.
1335         * testsuite/Makefile.in: New file.
1336         * testsuite/test-utils.sh.in: New file.
1337         * testsuite/run-tests.sh: New file.
1338         * testsuite/testsuite.cpu: New file.
1339         * testsuite/pmacros-1.test: New file.
1340
1341         * decode.scm: Comment and formatting tweaks.
1342         (-build-decode-table-guts): Add more data to logging message.
1343
1344 2009-07-12  Doug Evans  <dje@sebabeach.org>
1345
1346         Delete files that now live in ../cpu.
1347         * cpu/iq10.cpu: Delete.
1348         * cpu/iq2000.cpu: Delete.
1349         * cpu/iq2000.opc: Delete.
1350         * cpu/iq2000m.cpu: Delete.
1351         * cpu/m32r.cpu: Delete.
1352         * cpu/m32r.opc: Delete.
1353
1354 2009-07-09  Doug Evans  <dje@sebabeach.org>
1355
1356         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1357         All callers updated.  Work around -ve shifts by referencing the
1358         entire value.
1359
1360         * utils.scm (message): Handle pairs.
1361
1362 2009-07-08  DJ Delorie  <dj@redhat.com>
1363
1364         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1365         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1366         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1367         written to.
1368
1369 2009-07-07  Doug Evans  <dje@sebabeach.org>
1370
1371         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1372         * cpu/play.opc: New file.
1373
1374         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1375         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1376         * doc/rtl.texi (Instructions): Update.
1377
1378         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1379         (opc-arguments, -OPC): Call set-opc-file-path!.
1380         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1381         (set-opc-file-path!): New function.
1382         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1383
1384         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1385         before passing to gen-c-args.
1386
1387 2009-07-06  DJ Delorie  <dj@redhat.com>
1388
1389         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1390         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1391         unspecified accesses to control registers.
1392
1393 2009-07-01  DJ Delorie  <dj@redhat.com>
1394
1395         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1396         unspecified accesses to control registers.
1397
1398         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1399         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1400
1401 2009-06-27  Doug Evans  <dje@sebabeach.org>
1402
1403         * gen-all-intrinsics: New file.
1404
1405 2009-06-24  Doug Evans  <dje@sebabeach.org>
1406
1407         * All *.scm files: Update copyright year.
1408         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1409
1410 2009-06-23  DJ Delorie  <dj@redhat.com>
1411
1412         * intrinsics.scm: Updates to support IVC2.
1413         (belongs-to-group?): Check IVC2 slots.
1414         (-slots-attribute): New.
1415         (targets::attributes): Add SLOTS.
1416         (target:add-well-known-intrinsics): Add CPMOV.
1417         (md-insn): Add CPTYPE and CRET?.
1418         (add-md-insn): Likewise.
1419         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1420         duplicate insns with different bit patterns.
1421         (write-cgen-insn?): Add cret? support.
1422         (intrinsics.h): Add vector types.
1423         (runtime-op): Add vector support.
1424         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1425
1426         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1427         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1428         (h-cr-ivc2): Default to typeless.
1429         (h-ccr-ivc2): Fix register width.
1430         (SLOTS): Fix values and default.
1431         (ivc2_*): Add control register names.
1432         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1433
1434         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1435         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1436
1437 2009-06-22  Doug Evans  <dje@sebabeach.org>
1438
1439         * semantics.scm (insn-build-known-values): Fix typo in comment.
1440
1441 2009-06-21  Doug Evans  <dje@sebabeach.org>
1442
1443         * rtl-xform.scm (rtx-simplify-insn): New function.
1444         * html.scm (gen-insn-docs): Call it.
1445         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1446         * iformat.scm (ifmt-analyze): Minor simplification.
1447
1448         * semantics.scm (semantic-compile): Change arg sem-code-list to
1449         sem-code.
1450         (semantic-attrs): Ditto.
1451         * iformat.scm (ifmt-analyze): Update.
1452         (ifmt-compute!): Update.
1453         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1454         rtl-xform.scm.
1455         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1456         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1457         * semantics.scm (rtx-simplify): Ditto.
1458         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1459         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1460         (-simplify-expr-fn): Move to rtl-xform.scm.
1461         (-solve-expr-fn, rtx-solve): Ditto.
1462         * rtl-xform.c: New file.
1463         * read.scm: Load it.
1464
1465         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1466         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1467         (-rtx-traverse, rtx-traverse): Ditto.
1468
1469 2009-06-20  Doug Evans  <dje@sebabeach.org>
1470
1471         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1472
1473         * configure.in: Update version to 1.1.
1474         * configure: Regenerate.
1475         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1476
1477 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1478             Doug Evans  <dje@sebabeach.org>
1479
1480         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1481         (cgen-desc.c): Ditto.
1482         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1483         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1484         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1485         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1486         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1487         (cgen-cpuall.h, cgen-ops.c): Ditto.
1488         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1489         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1490         (cgen-sem-switch.c): Ditto.
1491         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1492         * sim-model.c (cgen-model.c): Ditto.
1493
1494 2009-06-18  Doug Evans  <dje@sebabeach.org>
1495
1496         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1497
1498         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1499
1500         * dev.scm (cload): Change #:arch argument to take the path to the
1501         .cpu file instead of just the name of the architecture.
1502         * read.scm (arch-path): Remove trailing '/'.
1503         (cpu-load): Set `arch-path' to directory of .cpu file.
1504         (-cgen): Don't set `arch-path' here.
1505         (include): Update.
1506         * doc/porting.texi: Update.
1507
1508 2009-06-14  Doug Evans  <dje@sebabeach.org>
1509
1510         * gen-all-doc: Use files in ../cpu where possible.
1511
1512         * Makefile.am (ARCHFILE): Fix path.
1513         * Makefile.in: Regenerate.
1514         * html.scm: Use "pre" instead of "plaintext".
1515
1516         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1517         * doc/app.texi: Cleanup pass.
1518         * doc/cgen.texi: Cleanup pass.
1519         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1520         * doc/intro.texi: Cleanup pass.
1521         * doc/mdate-sh: New file.
1522         * doc/opcodes.texi: Cleanup pass.
1523         * doc/pmacros.texi: Cleanup pass.
1524         * doc/porting.texi: Cleanup pass.
1525         * doc/rtl.texi: Cleanup pass.
1526         * doc/running.texi: Cleanup pass.  Document more runtime options.
1527         * doc/stamp-vti: Update.
1528         * doc/version.texi: Update.
1529
1530         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1531         (GUILE): Fix definition.
1532         * Makefile.in: Regenerate with automake 1.9.6.
1533         * aclocal.m4: Regenerate with aclocal 1.9.6.
1534         * configure.in (AC_PREREQ): Set to 2.59.
1535         (GENINSRC_NEVER): Define.
1536         * configure: Regenerate with autoconf 2.59.
1537         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1538         (cgen.info,cgen.dvi): Delete.
1539         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1540         (noinst_TEXINFOS): Add cgenint.texi.
1541         (DOCFILES): Add missing files.
1542         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1543         * doc/Makefile.in: Regenerate with automake 1.9.6.
1544
1545         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1546
1547         * attr.scm: Removing trailing whitespace.
1548         * cgen-intrinsics.scm: Ditto.
1549         * cgen-sim.scm: Ditto.
1550         * cos.scm: Ditto.
1551         * enum.scm: Ditto.
1552         * guile.scm: Ditto.
1553         * sim.scm: Ditto.
1554
1555 2009-05-28  DJ Delorie  <dj@redhat.com>
1556
1557         * cpu/mep.opc (parse_signed16_range): New.
1558         (parse_unsigned16_range): New.
1559         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1560
1561 2009-05-26  DJ Delorie  <dj@redhat.com>
1562
1563         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1564         accumulator names.
1565         (f-ivc2-ccrn-c3hi): New.
1566         (f-ivc2-ccrn-c3lo): New.
1567         (f-ivc2-ccrn-c3): New.
1568         (ivc2c3ccrn): Use it.
1569
1570 2009-05-22  DJ Delorie  <dj@redhat.com>
1571
1572         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1573         (mep_config_map): Regenerate.
1574
1575         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1576         ivc2-specific names.
1577         (simm8p20): New.
1578         (cmovc): move to after field definitions, use ivc2-specific
1579         register names.
1580         (cpmovi_b_P0S_P1): New.
1581         
1582 2009-05-19  DJ Delorie  <dj@redhat.com>
1583
1584         * cpu/mep.opc: Regenerate configuration.
1585         (parse_cdisp10): Only check CPU flags, not COP flags.
1586         (check_configured_mach): Likewise.
1587
1588 2009-05-13  DJ Delorie  <dj@redhat.com>
1589
1590         * intrinsics.scm (insns.md): Add RTL predicates.
1591         (intrinsics.h): Remove old C intrinsics.
1592
1593 2009-04-29  DJ Delorie  <dj@redhat.com>
1594
1595         * mep-ivc2.cpu: New.
1596         * mep-core.cpu: Regenerated.  Add support for deferred register
1597         writes.
1598         (SLOT): Add IVC2 slot types.
1599         (sim-syscall): Rename to something more appropriate.
1600         * mep-ext-cop.cpu: Regenerate.
1601         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1602         (print_slot_insn): New.
1603         (mep_examine_ivc2_insns): New.
1604         (mep_print_insn_set_ivc2_mode): New.
1605         (mep_print_insn): Support IVC2 slotting.
1606         
1607 2009-04-20  DJ Delorie  <dj@redhat.com>
1608
1609         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1610         (guess-mode): Drop COP* syntax.
1611         (need-insn): Add "--syscall--" to the list.
1612         (enum-type): Drop COP* syntax.
1613         (intrinsics.h): Likewise.
1614         (intrinsic-protos.h): Change file header to allow it to be
1615         included.
1616
1617 2009-04-17  DJ Delorie  <dj@redhat.com>
1618
1619         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1620         (lhucpm1): Limit to C5 mach.
1621         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1622         * cpu/mep-core.cpu (extend-cdisp10): New.
1623         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1624         
1625 2009-04-08  DJ Delorie  <dj@redhat.com>
1626
1627         * cpu/mep-c5.cpu: New.
1628         * cpu/mep-core.cpu: Add C5 support.
1629         * cpu/mep.opc: Likewise.
1630
1631 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1632
1633         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1634         about calling memset with a zero length.
1635
1636 2009-02-03  DJ Delorie  <dj@redhat.com>
1637
1638         * cpu/mep-core.cpu: Update to new MeP configuration.
1639         * cpu/mep-ext-cop.cpu: Likewise.
1640         * cpu/mep.opc: Likewise.
1641
1642 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1643
1644         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1645
1646 2008-06-17  Dave Brolley  <brolley@redhat.com>
1647
1648         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1649         (h-gr): Likewise.
1650
1651 2007-11-13  Dave Brolley  <brolley@redhat.com>
1652
1653         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1654
1655 2007-11-05  Dave Brolley  <brolley@redhat.com>
1656
1657         * intrinsics.scm,cgen-intrinsics.scm: New application which
1658         generates code to support intrinsic functions for insns in the
1659         mep architecture in gcc.
1660
1661 2007-09-21  Dave Brolley  <brolley@redhat.com>
1662
1663         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1664         (rn3us): CDATA attribute now LONG.
1665         
1666 2007-08-21  Dave Brolley  <brolley@redhat.com>
1667
1668         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1669         than 32 bits.
1670
1671 2007-07-05  Nick Clifton  <nickc@redhat.com>
1672
1673         * utils.scm (copyright-fsf): Update copyright notice to refer to
1674         the GPL version 3.
1675
1676 2007-05-22  Nick Clifton  <nickc@redhat.com>
1677
1678         * doc/cgen.texi: Use @copying around the copyright notice.
1679         * doc/internals.texi: Likewise.
1680
1681 2007-02-05  Dave Brolley  <brolley@redhat.com>
1682
1683         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1684
1685 2007-02-05  Dave Brolley  <brolley@redhat.com>
1686
1687         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1688         in the generated code for @arch@_cgen_init_asm if it is defined.
1689
1690         * Contribute the following changes:
1691         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1692
1693         * attr.scm (<string-attribute>): New attribute class.
1694         (attr-kind): Handle <string-attribute>.
1695         (parse-simple-attribute): New function.
1696         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1697         (<bitset-attribute> 'parse-value): Likewise.
1698         (<boolean-attribute> 'parse-value): Likewise.
1699         (<enum-attribute> 'parse-value): Likewise.
1700         (<string-attribute> 'parse-value): New function.
1701         (-attr-parse): Handle <string-attribute>.
1702         (-attr-read): Likewise.
1703         (<string-attribute> 'gen-value-for-defn-raw): New function.
1704         (<string-attribute> 'gen-value-for-defn): New function.
1705
1706 2006-11-07  Dave Brolley  <brolley@redhat.com>
1707
1708         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1709         necessary.
1710
1711 2006-10-18  Dave Brolley  <brolley@redhat.com>
1712
1713         * Contribute the following changes:
1714
1715         2006-07-11  Dave Brolley  <brolley@redhat.com>
1716
1717         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1718         (movcol): New insn.
1719         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1720         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1721         hardware or memory mode which was used.
1722         * sid-cpu.scm (hw-need-write-stack?): New function.
1723         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1724         identify hardware which uses write stacks.
1725         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1726         Initialized to an empty list.
1727         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1728         hw-need-write-stack?.
1729         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1730         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1731         (used-in-delay-rtl?): New method of <hardware-base>.
1732         (hw-used-in-delay-rtl?): New function.
1733
1734         2006-06-20  Dave Brolley  <brolley@redhat.com>
1735
1736         * sid.scm (gen-attr-type): Removed.
1737         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1738         (SH2a-MACH): Add sh5.
1739         (sh2a-nofpu-models): Add units for sh5.
1740         (sh2a-fpu-models): Likewise.
1741
1742         2006-06-15  Dave Brolley  <brolley@redhat.com>
1743
1744         * cpu/sh-sim.cpu: New file.
1745         * cpu/sh-sid.cpu: New file.
1746         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1747         (All fields): Remap for (insn-lsb0? #f)
1748         (All insns): Add timing specs.
1749         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1750         'xattrs' and .splice it in.
1751         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1752         (h-frc,h-drc): Add PROFILE attribute.
1753         (h-fpccr): Removed.
1754         (h-vbr): New hardware.
1755         (All fields): Remap for (insn-lsb0? #f)
1756         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1757         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1758         (fpscr): Use h-fpscr.
1759         (fsdm,fsdn): Use h-fsd.
1760         (dshci): Add xtiming argument and splice it in.
1761         (dr,xd): pmacros removed.
1762         (All insns): Add timing specs, *-MACH attribibutes,
1763         SH4{A}-GROUP attributes.
1764         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1765         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1766         we're being processed for sim or sid.
1767         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1768         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1769         (define-isa compact): Add (isa-parallel-insns 2).
1770         (define-isa media): Add (isa-parallel-insns 2). Add
1771         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1772         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1773         sh4a, sh4al
1774         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1775         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1776         (SH4al-MACH, SH5-MACH): New pmacros.
1777         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1778         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1779         (sh5-media-fp-units, common-model, common-model-with-fp) 
1780         (sh3-model, sh3e-model): New pmacros.
1781         (define-model sh2): New model.
1782         (define-model sh2e): New model.
1783         (define-model sh3): New model.
1784         (define-model sh3e): New model.
1785         (define-model sh2a-nofpu): New model.
1786         (define-model sh2a-fpu): New model.
1787         (define-model sh4-nofpu): New model.
1788         (define-model sh4): New model.
1789         (define-model sh4a-nofpu): New model.
1790         (define-model sh4a): New model.
1791         (define-model sh4al): New model.
1792         (define-model sh5-media): New model.
1793         (define-model sh5): Add all units.
1794         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1795         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1796         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1797         (h-pc): Add PROFILE attribute.
1798         (h-fr): Likewise.
1799         (h-tr): Likewise.
1800         (h-gr,h-grc): Likewise.
1801         (h-cr): Set h-sr in setter.
1802         (h-frbit): Get/Set h-fpscr.
1803         (h-szbit,h-prbit): Likewise.
1804         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1805         Add getter and setter.
1806         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1807         Adjust getter and setter.
1808         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1809         Adjust getter and setter.
1810         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1811         (h-fsd,h-fmov): New hardware.
1812
1813 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1814
1815         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1816         doc/notes.texi, doc/porting.texi, doc/running.texi,
1817         doc/sim.texi: Fix some typos.
1818
1819 2006-07-14  Dave Brolley  <brolley@redhat.com>
1820
1821         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1822         hardware or memory mode which was used.
1823         * sid-cpu.scm (hw-need-write-stack?): New function.
1824         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1825         identify hardware which uses write stacks.
1826         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1827         Initialized to an empty list.
1828         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1829         hw-need-write-stack?.
1830         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1831         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1832         (used-in-delay-rtl?): New method of <hardware-base>.
1833         (hw-used-in-delay-rtl?): New function.
1834
1835 2006-06-20  Dave Brolley  <brolley@redhat.com>
1836
1837         * sid.scm (gen-attr-type): Removed.
1838
1839 2006-05-10  Dave Brolley  <brolley@redhat.com>
1840
1841         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1842         support for (if (application-is? <appname>) (...) (...)).
1843         (-cgen): Add trailing "/" to arch-path.
1844         * utils.scm (dirname): Removed. dirname is a primitive function.
1845
1846 2006-05-09  Dave Brolley  <brolley@redhat.com>
1847
1848         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1849         'entire_insn' not 'base_insn'.
1850         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1851         is null.
1852         * sim.scm (-gen-arch-model-decls): Likewise.
1853         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1854         abuf->written if profiling.
1855         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1856         object->string om the mode.
1857         (-hw-gen-write-stack-decl): Likewise.
1858         * read.scm (include): Use arch-path as file location.
1859         (arch-path): Define it with a default setting.
1860         (-cgen): Update arch-path when "-a" option is specified.
1861         * utils.scm (dirname): New function.
1862
1863 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1864
1865         * configure.in: Remove AC_ARG_PROGRAM.
1866         * configure: Regenerate with autoconf 2.59.
1867
1868 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1869
1870         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1871         SIMULATOR.
1872
1873 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1874
1875         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1876         or an error message otherwise.
1877         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1878         Fix up comments to correctly describe the functions.
1879
1880 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1881             Anil Paranjape   <anilp1@kpitcummins.com>
1882             Shilin Shakti    <shilins@kpitcummins.com>
1883
1884         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1885         CPU description.
1886         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1887
1888 2006-02-10  Nick Clifton  <nickc@redhat.com>
1889
1890         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1891
1892 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1893
1894         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1895         for concatenation.
1896         (-hw-gen-write-stack-decl): Likewise.
1897
1898 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1899
1900         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1901         non-(adata-integral-insn? CURRENT-ARCH) case.
1902
1903 2005-10-28  Dave Brolley  <brolley@redhat.com>
1904
1905         Contribute the following changes:
1906         2005-09-19  Dave Brolley  <brolley@redhat.com>
1907
1908         * attr.scm (gen-value-for-defn-raw): New methods.
1909         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1910         gen-value-for-defn-raw.
1911         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1912
1913         2002-12-13  Dave Brolley  <brolley@redhat.com>
1914
1915         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1916         (-gen-attr-accessors): New function.
1917         (gen-obj-attr-defn): Update terminating initializer.
1918         (gen-obj-attr-end-defn): New function.
1919         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1920         * sid-cpu.scm (cgen-desc.h): Generate code to include
1921         "opcode/cgen-bitset.h"
1922         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1923         name.
1924         * desc.scm ('gen-defn): Update terminating initializer.
1925         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1926         terminatinig initializer.
1927         (gen-hw-decls): Ditto.
1928         (gen-operand-decls): Ditto.
1929         (gen-insn-decls): Ditto.
1930         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1931         (gen-insn-table): Update terminating initializer.
1932         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1933         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1934         * attr.scm (charmask-bytes): New function.
1935         (bitset-attr->charmask): New function.
1936         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1937         differences for SID-SIMULATOR.
1938         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1939         (<enum-attribute>): Ditto.
1940
1941 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1942
1943         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1944
1945 2005-10-24  DJ Delorie  <dj@redhat.com>
1946
1947         * operand.scm (-anyof-merge-syntax): Print a more useful error
1948         message.
1949
1950 2005-10-19  Nick Clifton  <nickc@redhat.com>
1951
1952         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1953         patch.
1954
1955 2005-10-18  Andreas Schwab  <schwab@suse.de>
1956
1957         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1958
1959 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1960
1961         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1962         size.
1963
1964 2005-08-02  Dave Brolley  <brolley@redhat.com>
1965
1966         * rtl-c.scm (s-unop): Don't dereference
1967         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1968         (s-binop, s-convop, s-cmpop): Likewise.
1969
1970 2005-07-29  Dave Brolley  <brolley@redhat.com>
1971
1972         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1973         if with-profile or with-parallel-write.
1974         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1975         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1976         string-append.
1977
1978 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1979
1980         * cpu/fr30.opc (print_register_list): Correct format strings.
1981         * cpu/ip2k.opc: Likewise.
1982
1983 2005-07-05  Nick Clifton  <nickc@redhat.com>
1984
1985         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1986         unsigned in order to avoid compile time warnings about sign
1987         conflicts.
1988
1989 2005-07-01  Nick Clifton  <nickc@redhat.com>
1990
1991         * desc-cpu.scm: Update to ISO C90 function declaration style.
1992         * opc-asmdis.scm: Likewise.
1993         * opc-ibld.scm: Likewise.
1994         * opc-itab.scm: Likewise.
1995         * cpu/fr30.opc: Likewise.
1996         * cpu/i960.opc: Likewise.
1997         * cpu/ip2k.opc: Likewise.
1998         * cpu/iq2000.opc: Likewise.
1999         * cpu/m32r.opc: Likewise.
2000         * cpu/openrisc.opc: Likewise.
2001         * cpu/sh.opc: Likewise.
2002         * cpu/sparc.opc: Likewise.
2003         * cpu/xstormy16.opc: Likewise.
2004
2005 2005-06-15  Dave Brolley  <brolley@redhat.com>
2006
2007         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2008         (cgen-cpu.h): Call it.
2009
2010         Contributed on behalf of Graydon Hoare
2011         2001-06-05  graydon hoare  <graydon@redhat.com>
2012
2013         * utils.scm (foldl): Define.
2014         (foldr): Define.
2015         (filter): Define.
2016         (union): Define.
2017         (intersection): Simplify.
2018         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2019         (-op-gen-delayed-set-maybe-trace): Define.
2020         (<operand> 'gen-set-{quiet,trace}): Delegate to
2021         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2022         up and needs cleaning.
2023         (-with-parallel?): Hardwire with-parallel to #t.
2024         (<operand> 'cxmake-get): Replace with lookahead-aware code
2025         * sid-decode.scm: Remove per-insn writeback fns.
2026         (-gen-idesc-decls): Redefine sem_fn type.
2027         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2028         with write stack stuff.
2029         (cgen-write.cxx): Replace per-insn writebacks with single write
2030         stack writeback. Add write stack reset function.
2031         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2032         stack stuff.
2033         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2034         estate attribute set.
2035         (delay): Set #:delayed attribute to calculated delay, update
2036         maximum delay of cpu, check (delay ...) usage.
2037         * operand.scm (<operand>): Add delayed slot to <operand>.
2038         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2039         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2040         * doc/rtl.texi (Expressions): Add section on (delay ...).
2041
2042 2005-06-13  Jim Blandy  <jimb@redhat.com>
2043
2044         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2045         as well as strings.
2046
2047 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2048
2049         * doc/porting.texi: Change all mention of md_apply_fix3 and
2050         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2051         respectively.
2052
2053 2005-05-18  Dave Brolley  <brolley@redhat.com>
2054
2055         * utils-sim.scm (-gen-decode-default-entry): New function.
2056         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2057         code to check that all opcodes bits match.
2058         (-gen-decoder-switch): Use -gen-decode-default-entry.
2059
2060 2005-05-16  Jim Blandy  <jimb@redhat.com>
2061
2062         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2063         fetched by one of our GETIMEM* methods.
2064         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2065         base-insn-sized chunks.
2066
2067 2005-05-10  Nick Clifton  <nickc@redhat.com>
2068
2069         * Update the address and phone number of the FSF organization in
2070         the GPL notices in the following files:
2071         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2072         cpu/powerpc.cpu, slib/random.scm
2073
2074 2005-05-06  Jim Blandy  <jimb@redhat.com>
2075
2076         * pprint.scm, cos-pprint.scm: Add documentation.
2077
2078         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2079
2080         * pprint.scm, cos-pprint.scm: New files.
2081
2082 2005-04-04  Nick Clifton  <nickc@redhat.com>
2083
2084         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2085         avoid a compile time warning.
2086
2087 2005-03-18  Nick Clifton  <nickc@redhat.com>
2088
2089         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2090         "percent-operand" from "%operand" as the latter confuses xgettext
2091         into thinking that it is a C printf formating directive, which
2092         prevents proper translation.
2093
2094 2005-02-23  Nick Clifton  <nickc@redhat.com>
2095
2096         * opcodes.scm (gen-parse-number): Add a cast to the desired
2097         pointer signed'ness in order to prevent compile time warnings.
2098         * cpu/ip2k.opc: Fixed compile time warnings about differing
2099         signed'ness of pointers passed to functions.
2100         * cpu/iq2000.opc: Likewise.
2101         * cpu/m32r.opc: Likewise.
2102         * cpu/openrisc.opc: Likewise.
2103         * cpu/xstormy16.opc: Likewise.
2104
2105 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2106
2107         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2108         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2109
2110 2005-02-16  Dave Brolley  <brolley@redhat.com>
2111
2112         * utils.scm: Update copyright years.
2113         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2114         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2115         * operand.scm (-derived-operand-parse): Move logit message from level 1
2116         to level 2.
2117
2118 2005-02-15  Nick Clifton  <nickc@redhat.com>
2119
2120         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2121         prevent compile time warning messages.
2122         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2123         * utils-gen.scm (attr-int-gen-defn): Likewise.
2124         (attr-gen-defn): Likewise.
2125         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2126         (print_dollarhex16): Remove unused function.
2127
2128 2005-02-15  Jim Blandy  <jimb@redhat.com>
2129
2130         * guile.scm (cgen-call-with-debugging): Doc fix.
2131
2132         Make backtraces work more reliably.
2133         * guile.scm: Set up debugging parameters, and enable debugging and
2134         source positions while loading.
2135         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2136         functions.
2137         * read.scm: Don't set debugging parameters here.
2138         (catch-with-backtrace): Function deleted.
2139         (-cgen): Simply note the presence or absence of the -b option.
2140         Pass the flag to cgen-call-with-debugging, so debugging is turned
2141         off here if the user didn't request it, for faster computation.
2142         (cgen): Call cgen-debugging-stack-start here, instead of
2143         catch-with-backtrace.
2144
2145         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2146         trailing -s.
2147         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2148         Don't write out the trailing -s here.
2149         * Makefile.in: Regenerated.
2150         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2151         fixup.scm here; let the caller decide which Scheme's customization
2152         file to preload.
2153         * dev.scm: Load guile.scm, not fixup.scm.
2154         * fixup.scm: Deleted; contents have all moved to guile.scm.
2155         * README: Doc fix.
2156
2157         * guile.scm (debug-write): New function.
2158
2159 2005-02-14  Jim Blandy  <jimb@redhat.com>
2160
2161         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2162         transformer procedure, not eval.  Transformer procedures take one
2163         argument.
2164
2165 2005-02-11  Nick Clifton  <nickc@redhat.com>
2166
2167         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2168         to 'bfd_vma *' in order avoid compile time warning message.
2169
2170 2005-02-09  Jim Blandy  <jimb@redhat.com>
2171
2172         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2173         corresponding change in the sim/common directory.)
2174
2175 2005-02-07  Jim Blandy  <jimb@redhat.com>
2176
2177         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2178         changes in the opcodes directory.)
2179
2180         * guile.scm: New file, containing Guile-specific definitions and
2181         adaptations.  This is loaded by the app-specific shell scripts.
2182         Initially identical to fixup.scm.
2183         * cgen-sid.scm: Don't load fixup.scm here.
2184
2185         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2186         latter is a macro.
2187
2188 2005-01-27  Jim Blandy  <jimb@redhat.com>
2189
2190         * utils.scm (string/symbol->append): Renamed from 'concat'.
2191         * opcodes.scm (gen-switch): Use new name.
2192         * insn.scm (-sub-insn-make!): Same.
2193         * rtl.scm (rtx-dump): Same.
2194         * semantics.scm (semantic-compile): Same.
2195
2196 2005-01-20  Jim Blandy  <jimb@redhat.com>
2197
2198         * opcodes.scm (gen-switch): Use concat instead of string-map.
2199
2200         * utils.scm (concat): New function.
2201         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2202         * rtl.scm (rtx-dump): Same.
2203         * semantics.scm (semantic-compile): Same.
2204
2205 2004-12-16  Jim Blandy  <jimb@redhat.com>
2206
2207         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2208         applied to symbols.  Process everything as strings, and then
2209         convert to a symbol at the end.
2210
2211         * read.scm (debug-repl): Temporarily redirect input and output to
2212         /dev/tty while we debug, so we don't interfere with whatever CGEN
2213         is reading or writing.
2214         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2215         New functions.
2216
2217 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2218
2219         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2220         will work with newer versions of guile.
2221
2222 2004-10-27  Nick Clifton  <nickc@redhat.com>
2223
2224         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2225         * cpu/iq2000.cpu: Likewise.
2226
2227 2004-07-21  DJ Delorie  <dj@redhat.com>
2228
2229         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2230
2231 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2232
2233         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2234         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2235
2236 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2237
2238         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2239
2240 2004-03-22  Dave Brolley  <brolley@redhat.com>
2241
2242         * utils.scm (copyright-fsf): Update copyright years.
2243         (copyright-red-hat): Ditto.
2244         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2245         code.
2246         (-op-gen-set-trace-parallel): Ditto.
2247
2248 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2249
2250         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2251         disassembling codes for 0x*2 addresses.
2252
2253 2004-01-29  Dave Brolley  <brolley@redhat.com>
2254
2255         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2256         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2257         in the extra bit positions.
2258
2259 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2260
2261         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2262
2263 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2264
2265         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2266         "short" being 16 bit.
2267         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2268         internationalize error message.
2269         (parse_lo16): Likewise.  Remove useless code.
2270
2271 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2272
2273         * cpu/m32r.cpu : Add new model m32r2.
2274         Add new instructions.
2275         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2276         Changed PIPE attr of push from O to OS.
2277         Care for Little-endian of M32R.
2278         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2279         Care for Little-endian of M32R.
2280         (parse_slo16): signed extension for value.
2281
2282 2003-10-26  Dave Brolley  <brolley@redhat.com>
2283
2284         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2285         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2286         (-gen-extract-fn): Call -gen-record-profile-args.
2287
2288 2003-10-21  Dave Brolley  <brolley@redhat.com>
2289
2290         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2291         a static const int.
2292         * decode.scm (-opcode-slots): Correct typo in logit call.
2293
2294 2003-10-09  Jim Blandy  <jimb@redhat.com>
2295
2296         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2297         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2298
2299         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2300
2301 2003-10-06  Dave Brolley  <brolley@redhat.com>
2302
2303         * gen-all-doc: Add fr550.
2304
2305 2003-09-11  Doug Evans  <dje@sebabeach.org>
2306
2307         * Makefile.am (ARCHFILE): New var.
2308         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2309         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2310         * Makefile.in: Regenerate.
2311
2312 2003-09-08  Dave Brolley  <brolley@redhat.com>
2313
2314         On behalf of Doug Evans <dje@sebabeach.org>
2315         Pass in paths to input files, instead of assuming they live in
2316         $srcdir/cpu.  Plus misc. option processing cleanup.
2317         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2318         Add pre-process pass to all options.
2319         * cgen-gas.scm (gas-arguments): Ditto.
2320         * cgen-sid.scm (sim-arguments): Ditto.
2321         * cgen-sim.scm (sim-arguments): Ditto.
2322         * cgen-stest.scm (stest-arguments): Ditto.
2323         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2324         (-opc-file-path): New global.
2325         (opc-file-path): New fn.
2326         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2327         All callers updated.
2328         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2329         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2330         Replace srcdir arg with opc-file.  All callers updated.
2331         * read.scm (-opt-spec-update): Delete.
2332         (opt-get-first-pass,opt-get-second-pass): New fns.
2333         (-cgen): Process application-specific arguments in two passes.
2334
2335 2003-08-29  Dave Brolley  <brolley@redhat.com>
2336
2337         * cpu/frv.cpu: Removed.
2338         * cpu/frv.opc: Removed.
2339
2340 2003-08-21  Nick Clifton  <nickc@redhat.com>
2341
2342         * cpu/frv.cpu (mbtoh): Replace input parameter to
2343         u-media-dual-expand and u-media-dual-btoh with output parameter.
2344         (cmbtoh): Add profiling hack.
2345
2346 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2347
2348         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2349
2350 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2351
2352         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2353         the elements for the END record of CGEN_OPINST, silencing warnings.
2354
2355 2003-07-15  Doug Evans  <dje@sebabeach.org>
2356
2357         Add guile 1.6.4 support.
2358         - empty list must be quoted
2359         - string functions have stricter type checking
2360         - eval now takes a second argument
2361         - symbol-bound? is deprecated
2362         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2363         (bitset-attr->list): Ensure arg to string-cut is a string.
2364         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2365         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2366         * cos.scm (-class-list): Must quote empty list.
2367         (-class-parent-classes,-class-compute-class-desc): Ditto.
2368         (class-make,make,object-reset!): Ditto.
2369         (method-make-make!): Call eval1 instead of eval.
2370         (method-make-forward!,method-make-virtual-forward!): Ditto.
2371         * decode.scm (subdtable-add): Use stringsym-append instead of
2372         string-append.
2373         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2374         (-build-decode-table-entry): Fetch string name of insn.
2375         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2376         (-gen-mach-table-defns): Ditto for mach.
2377         (gen-ifld-defns): Ditto for ifld.
2378         (gen-hw-table-defns): Ditto for hw.
2379         (gen-operand-table): Ditto for op.
2380         (gen-insn-table-entry): Ditto for insn.
2381         * desc.scm (gen-attr-table-defn): Ditto for attr.
2382         (<keyword>,gen-defn): Don't pass symbols to string-append.
2383         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2384         symbol-append.
2385         (enum-vals-upcase): Use symbol-upcase to build result.
2386         (-enum-parse): Use stringsym-append to build errtxt.
2387         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2388         (eval1): New function.
2389         (symbol-bound?): Provide own version if >= guile 1.6.
2390         * hardware.scm (define-keyword): Use string-append instead of
2391         symbol-append.
2392         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2393         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2394         before using.
2395         (gen-list-entry): Handle either symbol or string `name' arg.
2396         (gen-obj-doc-header): Fetch string name of `o' arg.
2397         (define-cpu-intro): Ditto for cpu.
2398         (gen-mach-intro): Ditto for mach.
2399         (gen-model-intro): Ditto for model.
2400         (gen-isa-intro): Ditto for isa.
2401         (gen-machine-doc-1): Ditto for isa.
2402         (gen-reg-doc-1): Convert mach to string first.
2403         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2404         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2405         to string first.
2406         (gen-insn-categories): Fetch string name of mach.  Convert
2407         enum-val-name to string first.
2408         (gen-insn-docs): Fetch string name of mach.
2409         * ifield.scm (ifld-ilk): Result is a string.
2410         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2411         Fetch string name of ifld.
2412         (-sfmt-search-key): Similarily for ifld and op.
2413         * insn.scm (syntax-make): Fetch string name of syntax element.
2414         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2415         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2416         * mode.scm (mode:c-type): Result is a string.
2417         (mode:enum): Fetch string name of mode.
2418         (-mode-parse): Use stringsym-append to build errtxt.
2419         * model.scm (model:enum): Fetch string name of model.
2420         (-model-parse): Use stringsym-append to build errtxt.
2421         (parse-insn-timing): Must quote empty list.
2422         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2423         (-gen-minsn-opcode-entry): Ditto.
2424         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2425         convert to string.
2426         (read-cpu.opc): Convert current-arch-name to a string before using.
2427         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2428         (<derived-operand>): Must quote empty list.
2429         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2430         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2431         of ifld.
2432         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2433         (-pmacro-sym): Must convert symbols to strings before passing to
2434         string-append.
2435         (-pmacro-str): Ditto.
2436         (pmacros-init!): Use eval1 instead of eval.
2437         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2438         (keep-isa-atlist?): Ditto.
2439         (cmd-if): Use eval1 instead of eval.
2440         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2441         (-rtl-c-get): Fetch string name of src.
2442         (s-unop): Ditto for mode.
2443         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2444         (-gen-par-temp-defns,subword): Ditto.
2445         (join): Use stringsym-append instead of string-append.
2446         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2447         (rtx-traverse-debug): Fetch string name of rtx-obj.
2448         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2449         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2450         (rtx-pretty-name): Result is a string.
2451         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2452         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2453         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2454         before using.
2455         (-gen-sfrag-case): Fetch string name of user.
2456         * sid-model.scm (unit:enum): Fetch string name of unit.
2457         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2458         (<hw-memory>,gen-set-quiet): Ditto.
2459         (gen-mode-defs): Ditto.
2460         (sim-finish!): Convert current-arch-name to a string before using.
2461         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2462         (-gen-no-scache-semantic-fn): Ditto.
2463         (cgen-defs.h): Fetch string name of isa.
2464         (cgen-read.c): Convert current-arch-name to a string before using.
2465         (cgen-write.c): Ditto.
2466         * sim-model.scm (unit:enum): Fetch string name of unit.
2467         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2468         (-gen-model-timing-table): Fetch string name of model.
2469         (-gen-mach-model-table): Ditto.
2470         (-gen-mach-defns): Fetch string name of mach.
2471         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2472         (<hw-memory>,cxmake-get): Fetch string name of mode.
2473         (<hw-memory>,gen-set-quiet): Ditto.
2474         (gen-mode-defs): Ditto.
2475         (sim-finish!): Must quote empty list.
2476         * utils-cgen.scm (<ident>): Must quote empty list.
2477         (obj:str-name): New fn.
2478         (parse-comment): Result is a string.
2479         (parse-symbol): Result is a symbol.
2480         (parse-string): Result is a string.
2481         (keyword-list?): Convert arg to string before calling string-ref.
2482         (keyword-list->arg-list): Ditto.
2483         (gen-attr-name): Convert attr-name to string first.
2484         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2485         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2486         (gen-define-ifmt-ifields): Ditto for fld.
2487         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2488         map-over-string.
2489         (gen-file-name): Ditto.
2490         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2491         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2492         (reduce): Call eval1 instead of eval.
2493         * cpu/m32r.cpu (addi): Don't use `#.'.
2494
2495         * gen-all-sim: Fix some typos.
2496
2497 2003-07-08  Doug Evans  <dje@sebabeach.org>
2498
2499         * gen-all-doc: Ensure run from cgen src dir.
2500         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2501         * gen-all-sid: Similarily, in ./tmp-sid.
2502         * gen-all-sim: Similarily, in ./tmp-sim.
2503
2504 2003-06-20  Doug Evans  <dje@sebabeach.org>
2505
2506         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2507
2508 2003-06-19  Doug Evans  <dje@sebabeach.org>
2509
2510         * mach.scm (-ifld-already-defined?): New proc.
2511         (current-ifld-add!): Use it.
2512         (-op-already-defined?): New proc.
2513         (current-op-add!): Use it.
2514         (-insn-already-defined?): New proc.
2515         (current-insn-add!): Use it.
2516         (-minsn-already-defined?): New proc.
2517         (current-minsn-add!): Use it.
2518         (obj-isa-list): New proc.
2519         (isa-supports?): Use it.
2520
2521 2003-06-10  Doug Evans  <dje@sebabeach.org>
2522
2523         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2524         * cpu/m32r.cpu (all insns): Ditto.
2525
2526         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2527         "unspecified".
2528
2529         * gen-all-doc: Split arm and frv docs up a bit.
2530
2531         * cpu/arm.cpu: Add IDOC attribute.
2532         * cpu/frv.cpu: Ditto.
2533         * cpu/i960.cpu: Ditto.
2534         * cpu/openrisc.cpu: Ditto.
2535         * cpu/xstormy16.cpu: Ditto.
2536         * cpu/m32r.cpu: Ditto.
2537         (all insns): Explicitly specify IDOC attribute.
2538
2539         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2540         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2541         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2542         * Makefile.in: Regenerate.
2543         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2544         (-attr-read): Defer computing default value until we know the type.
2545         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2546         (<attr-list>:attr-present?): New method.
2547         (atlist-attr-present?,obj-attr-present?): New fns.
2548         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2549         (attr-builtin!): New insn attr IDOC.
2550         * cgen-doc.scm (doc-arguments): New args -I,-N.
2551         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2552         Support comment as fourth element of enum value.
2553         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2554         * html.scm (gen-html-header): New arg kind, all callers updated.
2555         (gen-table-of-contents): New arg insn-file, all callers updated.
2556         (gen-list-entry,gen-doc-header): New fn.
2557         (get-operands): Delete.
2558         (gen-iformat-table): Rewrite.
2559         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2560         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2561         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2562         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2563         (get-insns-for-category,gen-categories-insn-lists): New fns.
2564         (gen-insn-docs): Simplify each insn's semantics first.
2565         Print insn tables sorted by IDOC categories.
2566         (*insn-html-file-name*): New global.
2567         (cgen-insn.html): New fn.
2568         (cgen-all): Update.
2569         * insn.scm (<insn>): Create a setter for the `tmp' member.
2570         * semantics.scm (insn-build-known-values): Renamed from
2571         -build-known-values.  All callers updated.
2572
2573         * rtl.scm: Move traveral/evaluation support to ...
2574         * rtl-traverse.scm: New file.
2575         * read.scm: Maybe-load rtl-traverse.scm.
2576
2577         * rtl.scm (-rtx-valid-types): Add SETRTX.
2578
2579         * rtx-funcs.scm (nop,parallel): Fix mode.
2580
2581         * utils.scm (eqv-lookup-index): New fn.
2582         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2583
2584         * dev.scm (load-doc): Set APPLICATION.
2585
2586 2003-06-10  Dave Brolley  <brolley@redhat.com>
2587
2588         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2589         * sid-decode.scm: Generate #include of config.h into
2590         @prefix@-decode.cxx.
2591         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2592
2593 2003-06-07  Doug Evans  <dje@sebabeach.org>
2594
2595         * gen-all-sid: New file.
2596         * gen-all-opcodes: New file.
2597
2598 2003-06-05  Nick Clifton  <nickc@redhat.com>
2599
2600         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2601         version of the FRinti operand.
2602         (FRintjeven): Likewise for FRintj.
2603         (FRintkeven): Likewise for FRintk.
2604         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2605         media-quad-arith-sat-semantics, media-quad-arith-sat,
2606         conditional-media-quad-arith-sat, mdunpackh,
2607         media-quad-multiply-semantics, media-quad-multiply,
2608         conditional-media-quad-multiply, media-quad-complex-i,
2609         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2610         conditional-media-quad-multiply-acc, munpackh,
2611         media-quad-multiply-cross-acc-semantics, mdpackh,
2612         media-quad-multiply-cross-acc, mbtoh-semantics,
2613         media-quad-cross-multiply-cross-acc-semantics,
2614         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2615         media-quad-cross-multiply-acc-semantics, cmbtoh,
2616         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2617         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2618         cmhtob): Use new operands.
2619         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2620         (parse_even_register): New function.
2621
2622 2003-06-04  Doug Evans  <dje@sebabeach.org>
2623
2624         Better handling of 64 bit and mixed 32/64 bit architectures.
2625         * hardware.scm (hw-update-word-modes!): New fn.
2626         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2627         hw-update-word-modes!.
2628         (state-word-bitsize): Replace FIXME with requested check.
2629         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2630         * mode.scm (mode-find): Ignore INT,UINT.
2631         (-mode-word-sizes-kind): New global.
2632         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2633         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2634         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2635         of mode-list to ...
2636         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2637         unusable, correct values set later.
2638         (mode-finish!): Remove cruft.
2639         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2640         * opcodes.scm (opcodes-init!): Ditto.
2641         * rtx-funcs.scm (annul): Fix mode of pc.
2642         * cpu/ia64.cpu: Remove cruft that sets word modes.
2643         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2644
2645 2003-06-03  Nick Clifton  <nickc@redhat.com>
2646
2647         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2648         immediate value not unsigned.
2649
2650 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2651
2652         * cpu/sh.cpu: Amend comments to refer to SuperH.
2653         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2654         * cpu/sh64-media.cpu: Likewise.
2655         (Saturation): Update manual reference.
2656
2657 2003-05-15  Doug Evans  <dje@sebabeach.org>
2658
2659         * Makefile.am (srcroot): New var.
2660         (html): New rule.
2661         * Makefile.in: Regenerate.
2662         * cgen-doc.scm: New file.
2663         * html.scm: New file.
2664         * gen-all-doc: New file.
2665         * dev.scm (cload): Handle DOC application.
2666         (load-doc): New fn.
2667         * machs.scm (machs-for-cpu): New fn.
2668         * model.scm (models-for-cpu): New fn.
2669         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2670         All uses updated.
2671         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2672         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2673
2674         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2675         (-gen-decode-bits): Instead put in better fix here.
2676
2677         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2678
2679 2003-05-01  DJ Delorie  <dj@redhat.com>
2680
2681         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2682         word accesses.
2683         (set-alignfix-mem): Likewise.
2684
2685 2003-04-16  Dave Brolley  <brolley@redhat.com>
2686
2687         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2688         * utils.scm (copyright-fsf): Update generate copyright years.
2689         (copyright-cygnus): Ditto.
2690         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2691         operands.
2692         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2693         here.
2694         (<operand>'gen-profile-code): New parameter 'when'.
2695         (<iunit>'gen-profile-code): Ditto.
2696         (<insn>'gen-profile-code): Ditto.
2697         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2698         'insn_reference' for the 'after' function.
2699         * model.scm (unit:enum): Moved to sim-model.scm.
2700         * sim-model.scm (unit:enum): Moved from model.scm.
2701         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2702         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2703         * sid-model.scm (unit:enum): New version for sid.
2704         (gen-model-class-name): New function.
2705         (gen-model-unit-fn-decl): New function.
2706         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2707         (gen-model-unit-fn-name): New parameter 'when'.
2708         (-gen-model-insn-fn-name): Ditto.
2709         (-gen-model-insn-qualified-fn-name): New function.
2710         (-gen-model-insn-fn-decl): New function.
2711         (-gen-model-insn-fn-decls): New function.
2712         (-gen-model-insn-fn): New parameter 'when'. Call
2713         -gen-model-insn-qualified-fn-name.
2714         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2715         functions for modelling insn before and after execution.
2716         (-gen-model-class-decls): New function.
2717         (" (gen-model-class-name model) "): New function.
2718         (gen-model-classes): New function.
2719         (-gen-insn-timing): Generate functions for modelling insn before and after
2720         execution.
2721         (-gen-insn-unit-timing): Generate class-qualified names.
2722         (-gen-model-timing-table): Ditto.
2723         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2724         not needed (yet) by sid.
2725         (cgen-model.h): New function.
2726
2727 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2728
2729         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2730         * cpu/sh64-compact.cpu: Likewise.
2731         * cpu/sh64-media.cpu: Likewise.
2732
2733 2003-03-21  DJ Delorie  <dj@redhat.com>
2734
2735         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2736         which indicates if the sign flag is set from bit 15 or 7.
2737         Adjust all callers.
2738         (set-psw): New argument ws, propogate it.
2739         (set-psw-nowrite): Likewise.
2740         (set-mem-psw): Likewise.
2741         (set-psw-carry): Likewise.  Use temporaries to prevent
2742         prematurely overwriting needed inputs.
2743         (set-psw-rrotate17): Fix logic.
2744         (shrgrgr): Preserve carry for zero-bit shifts.
2745         (shrgrimm): Likewise.
2746         (shlgrgr): Likewise.
2747         (shlgrimm): Likewise.
2748         (asrgrgr): Likewise.
2749         (asrgrimm): Likewise.
2750         (reset): New.
2751
2752 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2753
2754         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2755
2756 2002-03-05  DJ Delorie  <dj@redhat.com>
2757
2758         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2759         prematurely overwriting needed inputs.
2760         (set-psw-sub): Likewise.
2761
2762 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2763
2764         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2765
2766 2003-02-18  DJ Delorie  <dj@redhat.com>
2767
2768         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2769         (movlmemimm): Just mask the address.
2770         (movhmemimm): Likewise.
2771         (movlmemgr): Likewise.
2772         (movhmemgr): Likewise.
2773         (set-psw): Always set the psw last.
2774         (set-psw-carry): Likewise.
2775         (set-psw-add): Likewise.
2776         (set-psw-sub): Likewise.
2777
2778         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2779         of 16 patterns from the set-psw-rotate17 function.
2780         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2781         movgriipostincgr, movgriipredecgr): Set psw correctly.
2782         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2783         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2784         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2785
2786 2003-02-11  Dave Brolley  <brolley@redhat.com>
2787
2788         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2789         @arch@_cgen-ifld_table.
2790         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2791         @arch@_cgen-ifld_table.
2792
2793 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2794
2795         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2796
2797 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2798
2799         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2800         empty ISAs.
2801
2802 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2803
2804         * utils-gen.scm (attr-int-gen-defn): Define.
2805
2806 2002-12-21  Doug Evans  <dje@sebabeach.org>
2807
2808         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2809         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2810
2811         * dev.scm (cload): Update location of .cpu files.
2812
2813 2002-12-19  Doug Evans  <dje@sebabeach.org>
2814
2815         * utils-sim.scm (gen-profile-sym): New fn.
2816         (<operand>,sbuf-profile-sym): New method.
2817         (<operand>,sbuf-profile-elm): Use it.
2818         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2819         of hardcoding symbol name.
2820         (<operand>,gen-profile-code): Ditto.
2821         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2822         symbol name.
2823
2824         * mode.scm (mode-sem-mode): New fn.
2825         * operand.scm (op:new-mode): Update. mode-name.
2826         (op-natural-mode?) New fn.
2827         * rtl.scm (hw): Set hw-name,mode-name.
2828
2829         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2830         Instead do:
2831         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2832         as size of IDESC-TABLE-VAR.
2833         (@prefix@_init_idesc_table): Ditto.
2834         * sim-model.scm (-gen-mach-defns): Ditto.
2835         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2836
2837         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2838
2839         * insn.scm (-parse-insn-format-symbol): Improve error message.
2840         (-parse-insn-format): Ditto.
2841
2842         * gen-all-sim: New script.
2843
2844 2002-12-16  DJ Delorie  <dj@delorie.com>
2845
2846         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2847
2848 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2849
2850         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2851         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2852         (parse_immediate16): Handle immediate16 values, which now include
2853         @hi(label) and @lo(label)
2854
2855 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2856
2857         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2858         Add braces and cast for union field.
2859         (gen-multi-ifield-nodes): Add braces and cast for union field.
2860         (cgen_operand_table): Similarly fix sentinel.
2861         (cgen_cpu_close): Constify "insns".  Formatting.
2862         (cgen-desc.c): Include xregex.h.
2863         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2864         Prototype.
2865         <opc.c>: Include safe-ctype.h.
2866         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2867         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2868         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2869         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2870         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2871         (parse_addr16): Correct type of "value".  Formatting.
2872         (parse_addr16_p): Likewise.
2873         (parse_addr16_cjp): Likewise.
2874         (parse_lit8): Likewise.
2875         (parse_bit3): Formatting.
2876         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2877         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2878         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2879         print_decimal.
2880         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2881         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2882         (print_dollarhex8): Likewise.
2883         (print_dollarhex16): Likewise.
2884         (print_dollarhex_addr16h): Likewise.
2885         (print_dollarhex_addr16l): Likewise.
2886         (print_dollarhex_p): Likewise.
2887         (print_dollarhex_cj): Likewise.
2888         (print_decimal): Likewise.
2889         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2890
2891 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2892
2893         * doc/rtl.texi (Model variants): Mention current limitations for
2894         unit inputs and outputs.
2895         (Hardware elements) <attribute PROFILE>: Be slightly more
2896         verbose.
2897         (Instructions) <timing>: input/output overrides have a direction
2898         operand.
2899
2900 2002-11-25  DJ Delorie  <dj@redhat.com>
2901
2902         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2903
2904 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2905
2906         * cpu/iq10.cpu: New file.
2907         * cpu/iq2000.cpu: Likewise.
2908         * cpu/iq2000.opc: Likewise.
2909         * cpu/iq2000m.cpu: Likewise.
2910
2911 2002-11-19  DJ Delorie  <dj@redhat.com>
2912
2913         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2914
2915 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2916
2917         * dev.scm: Call getenv with a string, not a symbol.
2918
2919 2002-10-08  Doug Evans  <dje@transmeta.com>
2920             Hans-Peter Nilsson  <hp@axis.com>
2921
2922         * types.scm (bitrange-overlap?): Handle lsb0?.
2923
2924 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2925
2926         From Robert Cragie <rcc@jennic.com>:
2927         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2928
2929 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2930             Ben Elliston  <bje@redhat.com>
2931             John Healy  <jhealy@redhat.com>
2932             Jeff Johnston  <jjohnstn@redhat.com>
2933             Alan Lehotsky  <alehotsky@redhat.com>
2934             Ubicom Inc. <SupportDesk@ubicom.com>
2935
2936         * cpu/ip2k.cpu: New file.
2937         * cpu/ip2k.opc: Likewise.
2938
2939 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2940
2941         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2942
2943 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2944
2945         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2946         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2947         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2948         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2949         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2950         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2951         (-sthi-byte): If there is a single byte to store, store it at
2952         proper address.
2953         (sthil, sthiq): Fix big-endian behaviour.
2954         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2955         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2956         (saturate): Use Dimode to check if saturation operation is required.
2957         (usaturate): Likewise.
2958         (mpermw): Fix mask.
2959         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2960         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2961         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2962         (msadubq): Fix subword index in second operand of first subtraction.
2963
2964 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2965
2966         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2967         code.
2968
2969 2002-06-18  Dave Brolley  <brolley@redhat.com>
2970
2971         * cpu/frv.cpu: New cpu description.
2972         * cpu/frv.opc: New cpu support code.
2973
2974 2002-05-21  Dave Brolley  <brolley@redhat.com>
2975
2976         * decode.scm (-opcode-slots): Don't consider bits beyond the
2977         length of the insn.
2978
2979 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2980
2981         * cpu/powerpc.cpu: New file.
2982
2983 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2984
2985         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2986
2987 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2988
2989         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2990         results are expanded recursively.
2991
2992 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2993
2994         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2995         call scan-symbol on it, to enable recursive macro-expansion.
2996
2997 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2998
2999         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3000         for multiple-isa configurations.
3001         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3002
3003 2002-02-04  Ben Elliston  <bje@redhat.com>
3004
3005         * cpu/sh.cpu, cpu/sh.opc: New files.
3006         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3007
3008 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
3009
3010         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3011         (Enumerated constants): Mention that an ifield must not specify a
3012         multi-ifield.
3013         (Instruction operands): Ditto for index.
3014         (Expressions) <parallel>: Remove misplaced mention of local
3015         variables.
3016         <if>: Mention that mode must be specified and non-VOID when the
3017         result is used.
3018
3019 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3020
3021         * doc/porting.texi: When referring to *.opc, mention they are in
3022         the cpu subdir.  Call top-level directory toplevel, not devo.
3023         Close string in define-normal-insn example.
3024
3025         * doc/pmacros.texi: Fix .substr typo to .substring.
3026         Mention that .sym expansions are not further expanded.
3027
3028 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3029
3030         * desc-cpu.scm (ifld-number-cache): Add.
3031         (ifld-number): Add.
3032         (gen-maybe-multi-ifld-of-op): Add.
3033         (gen-maybe-multi-ifld): Add.
3034         (gen-multi-ifield-nodes): Add.
3035         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3036
3037 2002-01-10  matthew green  <mrg@redhat.com>
3038
3039         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3040         (gr-Rb-names): ... to this.
3041         (h-Rb): New hardware piece.
3042         (h-Rbj): Use gr-Rb-names.
3043         (Rb): Use h-Rb.
3044         (holdx): New instruction.
3045
3046 2002-01-07  Ben Elliston  <bje@redhat.com>
3047
3048         * utils.scm (package-cygnus-simulators): Rename from this ..
3049         (package-red-hat-simulators): .. to this.
3050         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3051         * sid-cpu.scm (cgen-desc.h): Likewise.
3052         (cgen-cpu.h): Likewise.
3053         (cgen-defs.h): Likewise.
3054         (cgen-write.cxx): Likewise.
3055         (cgen-semantics.cxx): Likewise.
3056         (cgen-sem-switch.cxx): Likewise.
3057         * sid-decode.scm (cgen-decode.h): Likewise.
3058         (cgen-decode.cxx): Likewise.
3059         * sid-model.scm (cgen-model.cxx): Likewise.
3060         * sid.scm (option-set!): Likewise.
3061         * sim.scm (option-set!): Likewise.
3062
3063 2002-01-07  Ben Elliston  <bje@redhat.com>
3064
3065         * utils.scm (copyright-fsf): Add 2002.
3066         (copyright-cygnus): Rename to copyright-red-hat.
3067         (copyright-red-hat): Add 2002.
3068         (CURRENT-COPYRIGHT): Update comment.
3069         * opcodes.scm (option-set!): Update callers.
3070         * sid-model.scm (cgen-model.cxx): Likewise.
3071         * sid-cpu.scm: Likewise.
3072         * sid-decode.scm: Likewise.
3073         * sid.scm (option-set!): Handle "redhat" as an option for
3074         "copyright"; use copyright-red-hat.
3075         * sim.scm (option-set!): Likewise.
3076
3077 2002-01-03  Dave Brolley  <brolley@redhat.com>
3078
3079         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3080         number of insns in the list.  Update the population count function to
3081         identify and prioritize 3 catgories of useful bits.
3082         (-population-top-few): Don't consider bits with a population count of
3083         zero.
3084         (-build-decode-table-entry): Don't call
3085         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3086         identical insns at the next tree level.
3087         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3088         this function is no longer used.
3089         (filter-non-specialized-ambiguous-insns): New function.
3090         (filter-identical-ambiguous-insns): New function.
3091         (find-identical-insn): New function.
3092         (filter-harmlessly-ambiguous-insns): Removed.
3093
3094 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3095             matthew green  <mrg@redhat.com>
3096             Frank Ch. Eigler  <fche@redhat.com>
3097             Nick Clifton  <nickc@cambridge.redhat.com>
3098
3099         * cpu/xstormy16.cpu: New file.
3100         * cpu/xstormy16.opc: New file.
3101
3102 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3103
3104         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3105
3106 2001-11-14  Dave Brolley  <brolley@redhat.com>
3107
3108         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3109         of the field being extracted.
3110
3111 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3112
3113         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3114         (cos ...) and (sin ..) rtx.
3115
3116 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3117
3118         * desc-cpu.scm: Do not include ctype.h in generated desc
3119         files.  They will inherit safe-ctype.h instead.
3120
3121 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3122
3123         * desc-cpu.scm: Add missing function prototypes (for generated
3124         C files).  Fix compile time warning messages about unused
3125         parameters (for generated C files).
3126         * opc-asmdis.scm: The same.
3127         * opc-ibld.c: The same.
3128         * opc-itab.scm: The same.
3129         * cpu/fr30.opc: The same.
3130         * cpu/m32r.opc: The same.
3131         * cpu/openrisc.opc: The same.
3132
3133 2001-09-17  graydon hoare  <graydon@redhat.com>
3134
3135         * insn.scm (syntax-break-out): Correct logic in handling escaped
3136         syntax characters.
3137
3138 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3139
3140         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3141         call @arch@_cgen_build_insn_regex now that regex support is in
3142         libiberty.
3143
3144 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3145
3146         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3147         (mask-superset?): Look for strict supersets to allow rejection of
3148         duplicate insns.
3149
3150 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3151
3152         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3153         (cgen-desc.h): Call it.
3154         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3155         decode-size.
3156         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3157         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3158
3159 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3160
3161         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3162         mach->cpu insn-chunk-bitsize.
3163         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3164         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3165         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3166         (-cpu-parse, -cpu-read): Parse/initialize it.
3167         * doc/rtl.texi (define-cpu): Document it.
3168
3169 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3170
3171         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3172
3173 2001-07-06  Ben Elliston  <bje@redhat.com>
3174
3175         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3176
3177 2001-07-05  Ben Elliston  <bje@redhat.com>
3178
3179         * README: Update.
3180
3181         * read.scm (include): Include files from srcdir/cpu.
3182         (-cgen): Likewise for loading .cpu files.
3183         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3184         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3185         * *.opc: Likewise.
3186         * simplify.inc: Likewise.
3187
3188 2001-07-04  Ben Elliston  <bje@redhat.com>
3189
3190         * read.scm (include): Log "Including file" message at level 1,
3191         rather than outputting it with (display).
3192         (cpu-load): Log "Loading cpu description" and "Processing cpu
3193         description" messages at levels 1 and 2, respectively, rather than
3194         using (display).
3195
3196 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3197
3198         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3199         CGEN_KEYWORD_ENTRY initializers.
3200
3201         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3202         (<operand> 'test-data): Involve both the index and the hardware
3203         in testcase generation.
3204         (<hw-indx> 'test-data): Generate test data from the underlying
3205         object.
3206         (<ifield> 'test-data): Generate test data by computing bit
3207         patterns for the field, then decoding them.
3208         (<hw-address> 'test-data): Allow for new calling convention.
3209         (<hw-iaddress> 'test-data): Likewise.
3210         (<keyword> 'test-data): Convert index values into keywords.
3211         (<hw-asm> 'test-data): Convert index values into integer strings.
3212
3213         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3214
3215 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3216
3217         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3218         is required for multi-mode hw types (memory).
3219
3220 2001-05-11  Ben Elliston  <bje@redhat.com>
3221
3222         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3223         when generating allinsn.d from objdump output. Without it, the
3224         testsuite will treat $ as the regular expression for end of line.
3225
3226 2001-05-09  Ben Elliston  <bje@redhat.com>
3227
3228         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3229         with `cgen_cpu_open'; documentation had become out of date.
3230         * doc/rtl.texi (Instruction operands): Likewise.
3231
3232 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3233
3234         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3235         various-base-length instruction sets.
3236
3237 2001-04-02  Ben Elliston  <bje@redhat.com>
3238
3239         * sid-cpu.scm (-last-insn): New function.
3240         (-gen-sem-switch-engine): Loop through idesc while less than or
3241         equal to the last instruction enum, not less than the MAX enum.
3242         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3243         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3244         table's size to be the last instruction enum plus one, not
3245         @PREFIX@_INSN_MAX.
3246         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3247         instruction onto the instruction list.
3248
3249         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3250         using the size of the table and its elements.
3251         (-gen-decode-insn-globals): Define the idesc table's size to be
3252         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3253         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3254         last instruction enum plus one, not @CPU@_INSN_MAX.
3255
3256 2001-03-28  Ben Elliston  <bje@redhat.com>
3257
3258         * doc/version.texi (UPDATED, EDITION): Update.
3259         * doc/stamp-vti: Likewise.
3260
3261 2001-03-26  Ben Elliston  <bje@redhat.com>
3262
3263         * doc/credits.texi (Credits): Update.
3264
3265         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3266         specified prefix and, if necessary, escape `$' in gas-build.sh to
3267         prevent unwanted shell variable expansion.
3268
3269 2001-03-24  Ben Elliston  <bje@redhat.com>
3270
3271         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3272         (<keyword>,test-data): Likewise.
3273         (<hw-address>,test-data): Likewise.
3274         (<hw-iaddress>,test-data): Likewise.
3275         (-collate-test-set): New function.
3276         (build-test-set): Use it.
3277         (gen-gas-test): Generate five test cases per instruction.
3278         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3279
3280         * read.scm: Load "slib/random" if random is not defined.
3281         * slib/random.scm: New file.
3282
3283         * utils.scm: Remove comments about the Hobbit compiler.
3284         (copyright-cygnus): Add 2001.
3285         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3286         (package-gnu-simulators): Tidy.
3287
3288 2001-03-23  Ben Elliston  <bje@redhat.com>
3289
3290         * cgen-gas.scm: Inline documentation improvements.
3291
3292 2001-03-21  Ben Elliston  <bje@redhat.com>
3293
3294         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3295         given in a syntax string is undefined.
3296
3297         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3298         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3299
3300 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3301
3302         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3303         for arg_type CGEN_CPU_OPEN_BFDMACH.
3304
3305 2001-03-20  Ben Elliston  <bje@redhat.com>
3306
3307         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3308         instruction onto the instruction list. Define MAX_INSNS to be the
3309         value of the last instruction enum plus one.
3310
3311 2001-03-14  Nick Clifton  <nickc@redhat.com>
3312
3313         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3314
3315 2001-03-05  Dave Brolley  <brolley@redhat.com>
3316
3317         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3318         if the number of ifields is greater than zero.
3319
3320 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3321
3322         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3323         Emit LIKELY/UNLIKELY branch probability hints.
3324         * sid-decode.cpu (-gen-record-args): Ditto.
3325
3326 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3327
3328         * desc-cpu.scm (-gen-hash-defines): Rename
3329         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3330
3331 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3332
3333         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3334         writeback tracking.
3335         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3336         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3337         if unnecessary.
3338         * sid.scm (<operand> gen-write): Use unsigned long long expression
3339         for writeback.
3340         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3341         (<unit> gen-profile-code): Ditto.
3342
3343 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3344
3345         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3346         (regno ...) rtx.
3347
3348 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3349
3350         * operand.scm (<operand> pretty-sem-name): New field.
3351         (<operand> make): Initialize it from hw-name.
3352         (op:set-pretty-sem-name!): New function.
3353         (<operand> gen-pretty-name): Default to fetching new field.
3354         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3355         sem-name setting from -rtx-hw-name.
3356
3357 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3358
3359         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3360         its subsequent gen-pretty-name.
3361
3362         * read.scm: Increase thread working stack limit and backtrace
3363         depth limits.
3364
3365 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3366
3367         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3368
3369 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3370
3371         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3372         current insn plus 4.
3373         (h-delay-insn): New hardware register.
3374         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3375         (l-jalr): Likewise.
3376         (l-bal): Likewise.
3377
3378         * openrisc.opc (parse_hi16): Sign extend value.
3379         (parse_lo16): Likewise.
3380
3381 2001-01-06  Ben Elliston  <bje@redhat.com>
3382
3383         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3384         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3385         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3386         (-gen-semantic-fn-table): Likewise.
3387         (-gen-scache-semantic-fn): Likewise.
3388         (-gen-no-scache-semantic-fn): Likewise.
3389         (cgen-read.c): Likewise.
3390         (cgen-sem-switch.c): Likewise.
3391         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3392         is a filename prefix.
3393         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3394         (-gen-decode-insn-globals): Likewise.
3395         (-gen-idesc-decls): Likewise.
3396         (cgen-decode.h): Likewise.
3397         (cgen-decode.c): Likewise.
3398         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3399         (gen-cpu-insn-enum): Likewise.
3400         (sim-finish!): Likewise.
3401
3402 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3403
3404         * openrisc.cpu: New file.
3405         * openrisc.opc: Likewise.
3406
3407 2000-12-12  Ben Elliston  <bje@redhat.com>
3408
3409         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3410
3411 2000-12-07  Ben Elliston  <bje@redhat.com>
3412
3413         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3414         "insn" when there are zero ifields to extract.
3415
3416 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3417
3418         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3419         used by simple/non-scache simulators.
3420         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3421         regardless of with-scache?.
3422         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3423
3424 2000-12-03  Ben Elliston  <bje@redhat.com>
3425
3426         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3427         (cgen-desc.c): Likewise.
3428
3429 2000-12-01  Greg McGary  <greg@mcgary.org>
3430
3431         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3432
3433 2000-12-01  Ben Elliston  <bje@redhat.com>
3434
3435         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3436         definitions if run without with-multipla-isa?.
3437         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3438         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3439
3440 2000-11-24  Ben Elliston  <bje@redhat.com>
3441
3442         * sim-cpu.scm (-gen-hardware-struct): New function.
3443         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3444         hardware elements wich have share one or more ISAs with the ISAs
3445         being kept.
3446
3447         * sim.scm (-with-multiple-isa?): New symbol.
3448         (with-multiple-isa?): New function.
3449         (option-init!): Initialise -with-multiple-isa?.
3450         (option-set!): Handle with-multiple-isa option.
3451
3452 2000-11-21  Ben Elliston  <bje@redhat.com>
3453
3454         * utils.scm (copyright-fsf): Add the year 2000.
3455
3456 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3457
3458         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3459         unneeded "\n\n" from F() macro definition.
3460
3461 2000-11-15  Greg McGary  <greg@mcgary.org>
3462
3463         * utils-cgen.scm (gen-define-with-symcat): New function.
3464         * desc-cpu.scm (gen-ifld-defns): Use it.
3465         (gen-hw-table-defns): Use it.
3466         (-gen-hash-defines): Use it.
3467         (gen-operand-table): Use it.
3468         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3469         * opc-itab.scm (-gen-ifmt-table): Use it.
3470         (-gen-insn-opcode-table): Use it.
3471         (-gen-macro-insn-table): Use it.
3472         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3473         * sim-cpu.scm (cgen-semantics.c): Use it.
3474         (cgen-sem-switch.c): Use it.
3475
3476 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3477
3478         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3479         request to emit calls to insn extractors as functions rather than
3480         branches to inline blocks.
3481         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3482         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3483
3484         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3485         to extractor clauses.
3486
3487 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3488
3489         * decode.scm (-distinguishing-bit-population): Significantly
3490         improve popularity heuristic.  Renamed from
3491         (-mask-bit-population): Gone.
3492         (-population-above-threshold): Sort new bit numbers in order of
3493         popularity.
3494         (-population-top-few): Allow up to three more bits to be selected
3495         than requested.  Correct selection order to prefer better bits.
3496         Correct bug in fewer-than-requested case.  Keep threshold as
3497         floating-point.
3498         (decode-best-get-bits): Pass also the insn-values.
3499
3500         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3501         future optimization.
3502
3503         * utils.scm (message): Format nested lists better.
3504
3505 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3506
3507         * dev.scm: Add srcdir to %load-path.
3508
3509         * rtx-funcs.scm (subword): Mode of argument can be different
3510         than mode of result, so don't use OP0 to specify argument's mode.
3511
3512 2000-11-02  Ben Elliston  <bje@redhat.com>
3513
3514         * doc/porting.texi (Building a GAS test suite): Document my change
3515         to gas-build.sh.
3516
3517 2000-11-01  Ben Elliston  <bje@redhat.com>
3518
3519         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3520
3521 2000-10-31  Ben Elliston  <bje@redhat.com>
3522
3523         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3524         with no command line arguments if the gas build directory can be
3525         determined.
3526
3527 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3528
3529         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3530         op-ifld -> op-ifield.
3531
3532 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3533
3534         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3535
3536 2000-10-13  matthew green  <mrg@cygnus.com>
3537
3538         * utils-cgen.scm (get-ifetch): Move from here ...
3539         * sim.scm (get-ifetch): ... to here.
3540         * sid.scm (get-ifetch): Copy and port to c++.
3541
3542 2000-10-06  Dave Brolley  <brolley@redhat.com>
3543
3544         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3545         ifld-start + ifld-word-offset.
3546         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3547         the field is beyond the base number of bits.
3548         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3549         (gen-extract-ifields): Ditto.
3550         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3551         characters in the regular expression.
3552
3553 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3554
3555         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3556         preprocessor constant.
3557
3558 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3559
3560         * slib/logical.scm: New file from slib.  Provides robust bitwise
3561         logical operations for large integers.
3562         * read.scm: maybe-load it.
3563
3564 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3565
3566         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3567         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3568         single-isa predicate, but support keep-isa filtering.
3569
3570 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3571
3572         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3573         statement-expression and comma-expression contexts.
3574         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3575
3576 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3577
3578         * decode.scm (-population-top-few): Signal error gracefully if
3579         decoding is about to become ambiguous.
3580
3581 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3582
3583         * doc/rtl.texi (decode-assist): Describe this field as optional.
3584
3585 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3586
3587         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3588         with decode proc.
3589
3590 2000-09-05  Dave Brolley  <brolley@redhat.com>
3591
3592         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3593         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3594
3595 2000-08-29  Dave Brolley  <brolley@redhat.com>
3596
3597         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3598         adata-integral-insn is true for this architecture.
3599
3600 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3601
3602         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3603         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3604         * rtl-c.scm (-c-rtl-get): Improve an error message.
3605         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3606
3607 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3608
3609         * Makefile.in (DIST_COMMON): Regenerated.
3610         * ifield.scm (<derived-ifield> needed-iflds): New method.
3611         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3612         sfmts built from <derived-ifield>s.
3613         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3614         type symbol 'derived-ifield, not an unparseable string.
3615         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3616         (-sfmt-contents): Add tracing.
3617
3618         From Doug Evans <dje@transmeta.com>:
3619         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3620         C code.
3621
3622 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3623
3624         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3625         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3626         (-rtl-c-get): Rename from rtl-c-get.
3627         (rtl-c-get): New fn for getter logging.
3628
3629 2000-07-28  Ben Elliston  <bje@redhat.com>
3630
3631         * NEWS: Update.
3632
3633 2000-07-25  Ben Elliston  <bje@redhat.com>
3634
3635         * doc/credits.texi (Credits): Add Frank Eigler.
3636
3637 2000-07-24  Dave Brolley  <brolley@redhat.com>
3638
3639         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3640         fully.
3641         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3642         (<keyword>): Initialize all elements fully.
3643         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3644         fully.
3645         (-gen-mach-table-defns): Ditto.
3646         (-gen-ifld-defns): Ditto.
3647         (-gen-operand-table): Ditto.
3648         (-gen-insn-table): Ditto.
3649         (-gen-cpu-open): Nothing to do for the mach table.
3650
3651 2000-07-13  Ben Elliston  <bje@redhat.com>
3652
3653         * doc/version.texi (UPDATED): Update.
3654
3655 2000-07-05  Ben Elliston  <bje@redhat.com>
3656
3657         * configure.in (AC_PATH_PROG): Remove.
3658         * configure: Regenerate.
3659         * Makefile.am (GUILE): Locate guile dynamically.
3660         * Makefile.in: Regenerate.
3661         * doc/Makefile.in: Likewise.
3662
3663 2000-07-03  Ben Elliston  <bje@redhat.com>
3664
3665         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3666         * opc-itab.scm (cgen-opc.c): Likewise.
3667
3668 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3669
3670         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3671         guile 1.4 compatibility.
3672         (rtx-env-dump): Comment out buggy display calls.
3673
3674 2000-06-15  matthew green  <mrg@redhat.com>
3675
3676         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3677
3678 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3679
3680         * Makefile.in: Regenerated.
3681
3682         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3683         (gen-ifld-defns): Ditto.
3684         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3685         * rtl.c (rtl-finish!): Ditto.
3686         * opc-itab.scm (-gen-ifield-decls): Ditto.
3687         * opcodes.scm (gen-switch): Exclude derived operands.
3688         * operand.scm (op-iflds-used): Expand derived operands.
3689         (hw-index-derived): New dummy function to create dummy object.
3690         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3691         constructor.  Set object's hw-name and index fields.
3692         (-anyof-merge-subchoices): Set instance object's index also.
3693         (-anyof-name): New helper function.
3694         (anyof-merge-semantics): Correct replacement of operand names in
3695         anyof instance.
3696         (op-ifield): Tolerate derived-operands and their funny indices better.
3697         * ifield.scm (ifld-known-values): Expand derived ifields.
3698         (non-multi-ifields, non-derived-ifields): New utility functions.
3699         (ifld-decode-mode): Tolerate objects with unbound decode field.
3700         * iformat.scm (compute-insn-length): Expand derived ifields.
3701         (compute-insn-base-mask): Ditto.
3702         * insn.scm (insn-base-ifields): Remove.
3703         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3704         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3705         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3706         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3707         (-frag-test-data): Ditto.
3708         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3709         (-gen-sem-switch-engine); Ditto.
3710         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3711         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3712         (-gen-record-args): Tolerate unbound op-ifield.
3713         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3714         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3715         Exclude multi-insns.
3716         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3717         * utils-sim.scm (op-extract?): Handle derived operands.
3718
3719         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3720         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3721         * hardware.scm (hardware-for-mode): New function.
3722
3723         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3724         cleaning up decode tables.
3725         (mask-superset?): Little helper function for above.
3726         * decode.scm (-build-decode-table-entry): Call it.
3727         (-opcode-slots): Add some more tracing.
3728         * arm.cpu: Disable decode-splits construct due to implementation
3729         conflict with `filter-harmlessly-ambiguous-insns'
3730
3731         * decode.scm (-population-top-few): New function for better decode
3732         bit generation.  Includes minor helper functions.
3733         (decode-get-best-bits): Call it instead.
3734         (OLDdecode-get-best-bits): Renamed previous version of above.
3735
3736
3737 2000-06-13  Ben Elliston  <bje@redhat.com>
3738
3739         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3740         for the Guile library directory.
3741         * configure: Regenerate.
3742         * Makefile.in, doc/Makefile.in: Regenerate.
3743
3744         * Makefile.in, doc/Makefile.in: Regenerate.
3745         * configure.in: Remove unnecessary tests. Move to version 1.0.
3746         * acconfig.h, config.in: Remove.
3747         * configure, aclocal.m4: Regenerate.
3748         * doc/stamp-vti, doc/version.texi: Likewise.
3749         * AUTHORS: New file.
3750
3751 2000-06-07 Ben Elliston  <bje@redhat.com>
3752
3753         * fixup.scm (symbol-bound?): Reduce debugging output.
3754
3755 2000-06-02  matthew green  <mrg@redhat.com>
3756
3757         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3758         a given instruction, replacing derived fields with their subfields.
3759         (insn-value): Use `insn-base-ifields' to find all constant values.
3760         (multi-insn-instantiate!): Comment some debug messages.
3761
3762 2000-06-01  Ben Elliston  <bje@redhat.com>
3763
3764         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3765         symbol names used in a (c-call ..) rtx.
3766
3767         * sim-test.scm (build-test-set): Return (()) for an instruction
3768         with no operands, so it too is included in the generated test set.
3769
3770 2000-05-31  Ben Elliston  <bje@redhat.com>
3771
3772         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3773         (sim-test): Likewise.
3774         * Makefile.in: Regenerate.
3775
3776 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3777
3778         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3779         stack traceback, in an order that resembles gdb's `bt'.
3780
3781 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3782
3783         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3784         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3785         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3786         multi insns.
3787         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3788         virtual functions.
3789         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3790         * iformat.scm (ifmt-expanded-ifields): Gone.
3791         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3792         work.
3793         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3794         ifmt entries.
3795
3796         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3797         code.
3798
3799 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3800
3801         * sid.scm (with-any-profile?): New function clone.
3802
3803 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3804
3805         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3806
3807 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3808
3809         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3810         (-multi-ifield-read): Parse them.
3811         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3812         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3813         (multi-ifield gen-extract): Add decode hook.
3814         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3815
3816         * insn.scm (syntax-break-out): More correctly handle \-escaped
3817         syntax characters.
3818         (syntax-make-elements): Ditto.
3819         * opc-itab.scm (compute-syntax): Ditto.
3820
3821 2000-05-17  Ben Elliston  <bje@redhat.com>
3822
3823         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3824
3825 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3826
3827         * gas-test.scm (build-test-set): Return (()) for an instruction
3828         with no operands, so it too is included in the generated test set.
3829
3830 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3831
3832         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3833         IFMT_OPERANDS and SYNTAX_BYTES.
3834
3835 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3836
3837         * sim.scm (with-any-profile?): New function.
3838         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3839         to decide whether or not to include profiling counters.
3840
3841 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3842
3843         Fuller derived-operand support for opcodes.
3844         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3845         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3846         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3847         (gen-operand-table): Omit derived- and anyof- operands from table.
3848         (gen-insn-table): Omit multi-insns from table.
3849         * iformat.scm (ifmt-expanded-fields): New function to expand
3850         subfields of derived-ifields.
3851         (ifmt-compute!): Ignore remaining multi-insns.
3852         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3853         multi-insns.
3854         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3855         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3856         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3857         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3858         (gen-switch): Omit anyof-operands.
3859         * operand.scm (-anyof-syntax): New function.
3860         (-anyof-merge-syntax): Call it.
3861         * utils.scm (collect): New idiomatic function.
3862
3863 2000-05-10  Ben Elliston  <bje@redhat.com>
3864
3865         * m68k.cpu: New file (work in progress).
3866
3867 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3868
3869         * Makefile.am (all-local): New target.  Create stamp-cgen.
3870         * Makefile.in: Regenerated.
3871         * doc/Makefile.in: Regenerated.
3872
3873 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3874
3875         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3876         (-operand-parse-setter): Ditto.
3877         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3878         for CACHE-ADDR operands.
3879         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3880         trace entries.  Widen byte-wide values for printing.
3881         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3882         Widen byte-wide values for printing.  Hexify memory addresses.
3883
3884 2000-04-23  matthew green  <mrg@redhat.com>
3885
3886         * m32r.cpu: Fix a typo.
3887
3888 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3889
3890         * ia64.cpu (define-model): Change merced to Itanium.
3891         (f-qp): Change quilifying to qualifying.
3892         (movbr_ph, movbr_pvec): Delete.
3893         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3894
3895 2000-04-07  Ben Elliston  <bje@redhat.com>
3896
3897         * doc/porting.texi (Building a simulator test suite): Clarify
3898         where generated test cases are placed.
3899
3900 2000-04-07  Ben Elliston  <bje@redhat.com>
3901
3902         * Makefile.am (gas-test): Remove dependency on `cgen'.
3903         (sim-test): Ditto.
3904         * Makefile.in: Regenerate.
3905
3906 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3907
3908         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3909         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3910         type reconfiguration.
3911         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3912         with-profile?.
3913
3914 2000-03-30  Ben Elliston  <bje@redhat.com>
3915
3916         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3917
3918 2000-03-24  Ben Elliston  <bje@redhat.com>
3919
3920         * Makefile.am (stamp-cgen): Reinstate target.
3921         * Makefile.in: Regenerate.
3922
3923 2000-03-22  Ben Elliston  <bje@redhat.com>
3924
3925         * slib/ppfile.scm: Remove; unused.
3926         * slib/defmacex.scm: Likewise.
3927
3928 2000-03-21  Ben Elliston  <bje@redhat.com>
3929
3930         * doc/internals.texi (Source file overview): Document.
3931
3932         * Makefile.am (GUILEDIR): Remove.
3933         (CGEN): Ditto. Callers use $(GUILE) instead.
3934         (GUILEFLAGS): Ditto.
3935         (CGENFILES): Ditto.
3936         (APPDESCFILES): Ditto.
3937         (OPCODESFILES): Ditto.
3938         (SIMFILES): Ditto.
3939         (pkgdata_SCRIPTS): Ditto.
3940         (stamp-cgen): Remove target.
3941         * Makefile.in: Regenerate.
3942
3943         * configure.in: Remove header and library tests.
3944         * configure: Regenerate.
3945         * config.in: Likewise.
3946
3947 2000-03-20  Ben Elliston  <bje@redhat.com>
3948
3949         * read.scm: Cease loading "hob-sup.scm".
3950         * utils.scm: Inherit the fastcall family of procedures (for now).
3951         * hob-sup.scm: Remove.
3952
3953 2000-03-20  Ben Elliston  <bje@redhat.com>
3954
3955         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3956         * configure: Regenerate.
3957         * gdbinit.in: Remove.
3958
3959 2000-03-17  Ben Elliston  <bje@redhat.com>
3960
3961         * Makefile.am (CGEN): Use guile, not cgen.
3962         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3963         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3964         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3965         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3966         (HOB_OBJS): Likewise.
3967         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3968         (CGENOBJS): Likewise.
3969         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3970         (hobbit, hobbit.o, hobbit.c): Remove targets.
3971         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3972         (CLEANFILES): Update.
3973         * acconfig.h (WITH_HOBBIT): Remove.
3974         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3975         option --with-cgen-hobbit.
3976         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3977         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3978         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3979         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3980         * Makefile.in: Regenerate.
3981         * config.in: Likewise.
3982         * aclocal.m4: Likewise.
3983         * configure: Likewise.
3984         * README (Hobbit support): Remove.
3985         * doc/internals.texi (Conventions): Do not mention Hobbit.
3986         * doc/porting.texi (Supported Guile versions): Likewise.
3987
3988 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3989
3990         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3991         callback convention to new sid sidutil::basic_cpu code.
3992         (-gen-sfrag-engine-fn): Ditto.
3993         * sid.scm (-create-virtual-insns!): Ditto.
3994         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3995         mode.
3996         (cxmake-skip): Implement properly for pbb mode.
3997
3998 2000-03-03  Ben Elliston  <bje@redhat.com>
3999
4000         * doc/internals.texi: New file.
4001
4002 2000-02-29  Ben Elliston  <bje@redhat.com>
4003
4004         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4005         * doc/porting.texi: Formatting tweaks.
4006
4007 2000-02-25  Nick Clifton  <nickc@cygnus.com>
4008
4009         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4010         field.
4011
4012 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4013
4014         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4015         mode.
4016
4017 2000-02-23  Andrew Haley  <aph@cygnus.com>
4018
4019         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4020         instruction.
4021
4022 2000-02-24  Ben Elliston  <bje@redhat.com>
4023
4024         * doc/rtl.texi (Derived operands): Add some cindex entries.
4025
4026 2000-02-23  Ben Elliston  <bje@redhat.com>
4027
4028         * ia32.cpu (dndo): Move general purpose macro from here ..
4029         * simplify.inc (dndo): .. to here.
4030
4031 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4032
4033         * arm.cpu (h-tbit): Add c-call setter function.
4034         (h-mbits): Ditto.
4035
4036 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4037
4038         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4039         (-frag-cost-compute!): Ditto.
4040         * utils.scm (copyright-cygnus): Add Y2K.
4041         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4042
4043 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4044
4045         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4046         flags field of the CGEN_CPU_TABLE structure.
4047
4048 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4049
4050         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4051         All references updated.
4052
4053 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4054
4055         * ia32.cpu: Rewrite addressing mode support.
4056
4057         * ifield.scm (<ifield>): New member `follows'.
4058         (ifld-known-values): New proc.
4059         (<ifield>): New method set-word-offset!.
4060         (ifld-set-word-offset!): New proc.
4061         (ifld-new-word-offset): New proc.
4062         (<ifield>): New method next-word.
4063         (<multi-ifield>): New method next-word.
4064         (ifld-next-word): New proc.
4065         (ifld-precedes?): New proc.
4066         (-ifield-parse): New args word-offset,word-length,follows.
4067         All callers updated.  Handle CISC-style vs RISC-style ifields.
4068         (-ifield-read): Recognize word-offset,word-length,follows specs.
4069         (-ifld-parse-follows): New proc.
4070         (-multi-ifield-make-default-insert): New proc.
4071         (-multi-ifield-make-default-extract): New proc.
4072         (-multi-ifield-parse): Provide default values for insert,extract
4073         handlers if not specified.
4074         (<derived-ifield>): New class.
4075         (derived-ifield?): New predicate.
4076         (ifld-derived-operand?): New predicate.
4077         (f-anyof): New global.
4078         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4079         (f-derived,ifld-derived?): Delete.
4080         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4081         * insn.scm (-sub-insn-ifields): New proc.
4082         (-sub-insn-make!): New proc.
4083         (multi-insn-instantiate!): Provide initial implementation.
4084         (-insn-parse): If insn contains "anyof" operands, create a
4085         <multi-insn> object instead of a plain <insn>.
4086         (-parse-insn-format-symbol): Rewrite derived operand handling.
4087         Add anyof operand handling.
4088         (-parse-insn-format-ifield-spec): Rewrite.
4089         (-parse-insn-format-operand-spec): Delete.
4090         (-parse-insn-format-list): Delete support for `(operand value)'.
4091         (anyof-operand-format?): Replaces derived-operand-format?.
4092         * operand.scm (-operand-parse-getter): Improve error messages.
4093         (-operand-parse-setter): Ditto.
4094         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4095         ifield-assertion.
4096         (<anyof-operand>): Change baseclass from <derived-operand> to
4097         <operand>.  Delete member values.  New members base-ifield,choices.
4098         (anyof-operand?): New predicate.
4099         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4100         (-derived-operand-parse): Rewrite.
4101         (-derived-operand-read): Rewrite.
4102         (-anyof-parse-choice): New proc.
4103         (-anyof-operand-parse): Rewrite.
4104         (-anyof-operand-read,define-anyof-operand): New procs.
4105         (<anyof-value>): Rewrite.
4106         (-anyof-initial-known): New proc.
4107         (anyof-satisfies-assertions?): New proc.
4108         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4109         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4110         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4111         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4112         (-anyof-value-from-derived): New proc.
4113         (-anyof-all-choices-1,anyof-all-choices): New procs.
4114         (operand-init!): Create define-anyof-operand reader command.
4115
4116         * insn (syntax-break-out): Take syntax as argument instead of insn.
4117         All callers updated.
4118         (syntax-make): Move here, from ???.
4119
4120         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4121         bitrange-foo. All uses updated.
4122         (bitrange-next-word): New proc.
4123
4124         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4125
4126         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4127         (rtx-make-const,rtx-make-enum): New procs.
4128         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4129         (rtx-mem-addr,rtx-mem-sel): New procs.
4130         (rtx-change-address): New proc.
4131         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4132         (rtx-make-set,rtx-single-set?): New procs.
4133         (rtx-combine): New proc.
4134
4135         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4136         (rtx-traverse-with-locals): Ditto.
4137         (-rtx-traverse,-rtx-traverse-*): Ditto.
4138
4139         * rtl.scm (define-subr): New proc.
4140         (rtl-init!): Create reader command `define-subr'.
4141
4142         * cos.c (_object_mi_p): Ensure argument is an object.
4143         (indent): New function.
4144         (_object_print_elms): Add pretty-printing support.
4145         (_object_print): Ditto.
4146
4147         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4148         (*floats-s->c-fun-table*): Ditto.
4149         * hobbit.c,hobbit.h: Rebuild.
4150         * hob-sup.c (fastcall7): New proc.
4151         * hob-sup.h (fastcall7): Declare.
4152         * hob-sup.scm (fastcall7): New macro.
4153
4154         * mach.scm (<arch>): New member subr-list.
4155         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4156         (arch-finish!): Reverse recorded subr list.
4157
4158         * read.scm (debug-env): New global.
4159         (debug-var-names,debug-var,debug-repl-env): New procs.
4160         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4161         (debug-quit): Renamed from `continue'.
4162
4163         * simplify.inc (dsmf): New pmacro.
4164
4165         * utils.scm (plus-scan): New proc.
4166         (split-bits): Rewrite.
4167         (split-value): New proc.
4168
4169 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4170
4171         * doc/Makefile.am (DOCFILES): Add notes.texi.
4172         * doc/Makefile.in: Rebuild.
4173
4174 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4175
4176         * ifield.scm (ifld-derived?): New proc.
4177         (f-derived): New global.
4178         (ifield-builtin!): Create ifield f-derived.
4179         (<multi-insn>): New class.
4180         (multi-insn?): New predicate.
4181         (multi-insn-instantiate!): New proc.
4182         (-insn-parse): Create <multi-insn> objects for insns with derived
4183         ifields.
4184         (-parse-insn-format-symbol): Handle derived ifields.
4185         (-parse-insn-format-ifield-spec): New proc.
4186         (-parse-insn-format-operand-spec): New proc.
4187         (-parse-insn-format-list): Simplify.
4188         (-parse-insn-format): No longer allow (ifield-object value) spec.
4189         (derived-operand-format?): New proc.
4190         (insn-alias?): New proc.
4191         (non-alias-insns): Rewrite.
4192         (insn-real?): Renamed from real-insn?, all callers updated.
4193         (virutal-insns): Rewrite.
4194         (multi-insns): New proc.
4195         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4196         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4197         Return #f if operand doesn't have an index or if index is not an
4198         ifield.
4199         (hw-index-anyof): New proc.
4200         (-operand-parse): Allow integer indices.
4201         (<derived-operand>): New class.
4202         (derived-operand?): New predicate.
4203         (<anyof-operand>): New class.
4204         (<anyof-value>): New class.
4205         (-anyof-parse-value,-anyof-operand-parse): New procs.
4206         (-derived-operand-parse,-derived-operand-read): New procs.
4207         (define-derived-operand,define-full-derived-operand): New procs.
4208         (operand-init!): New reader command define-derived-operand.
4209
4210         * utils.scm (list-take): Handle negative amount.
4211         (element?): Rewrite.
4212
4213 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4214
4215         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4216
4217 1999-10-04  Richard Henderson  <rth@cygnus.com>
4218
4219         * ia64.cpu: Checkpoint.
4220
4221 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4222
4223         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4224
4225         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4226         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4227
4228 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4229
4230         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4231         PC returned by sim_engine_invalid_insn.
4232
4233 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4234
4235         * ia32.cpu: New file.
4236
4237 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4238
4239         * utils.scm (bit-set?): Fix off by one error.
4240
4241         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4242
4243         * rtl.scm (hw): Check for valid hardware element before trying to
4244         get its mode.
4245
4246         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4247         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4248         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4249         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4250         compute_operand2_foo.
4251
4252         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4253         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4254         Call delayed_branch/branch methods instead of assigning to `vpc'.
4255         (<hw-pc>,cxmake-skip): Call skip method.
4256         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4257         (<pc>,cxmake-skip): Ditto.
4258         (-create-virtual-insns!): Ditto.
4259         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4260         (op:write): Ditto.
4261         (op:record-profile): Specify #:output-language "c++".
4262         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4263         @arch@_insn_attr.
4264         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4265         Define enums here.
4266         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4267         (gen-semantic-code): Ditto.
4268         (-gen-sem-case,-gen-sfrag-code): Ditto.
4269         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4270         (cgen-cpu.h): File is now #included by main cpu class, rather than
4271         subclassing.
4272         (cgen-defs.h): New proc.
4273         (-gen-scache-semantic-fn): Change result type to sem_status.
4274         New local `status'.  Call done_cti_insn/done_insn method at end.
4275         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4276         cgen-ops.h.
4277         (cgen-sem-switch.cxx): Ditto.
4278         * sid-decode.scm (-gen-idesc-decls): Update return type of
4279         @prefix@_sem_fn.
4280         (cgen-decode.h): Add using namespace @arch@.
4281         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4282
4283         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4284         (estate-output-language-c?,estate-output-language-c++?): New procs.
4285         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4286         (estate-make-for-normal-rtl-c++): New proc.
4287         (rtl-c++-parsed,rtl-c++): New proc.
4288         (s-c-call): Invoke cpu class method if c++.
4289         (join): Use s-c-raw-call.
4290
4291         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4292         (nop): Rewrite.
4293
4294         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4295         * rtl.scm (<eval-state>): New member `modifiers'.
4296         (<eval-state>,vmake!): Handle #:modifiers.
4297         (estate-with-modifiers): New proc.
4298
4299         * rtl.scm (rtx-side-effects?): New proc.
4300         (rtx-canonical-bool): Don't change expr if it has side effects.
4301         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4302         better.
4303
4304 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4305
4306         * sim.scm (gen-scache-type): Fix typo in last patch.
4307
4308 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4309
4310         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4311
4312 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4313
4314         * sid.scm (<hw-pc>,cxmake-skip): New method.
4315         (<pc>,cxmake-skip): New method.
4316
4317         * decode.scm (decode-build-table): Delete args startbit,index-list.
4318         All callers updated.
4319         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4320         All callers updated.
4321         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4322         to decode-get-best-bits.
4323         * sid-decode.scm (-gen-decode-fn): Ditto.
4324
4325         * hardware.scm (hw-bits): New proc.
4326         (-hw-parse): New arg layout.  All callers updated.
4327         (define-full-hardware): New arg layout.  All callers updated.
4328         (-hw-validate-layout): New proc.
4329         (-hw-create-[gs]etter-from-layout): New procs.
4330         (<hw-register>,parse!): Handle layout spec.
4331         * types.scm (type-bits): New proc.
4332
4333         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4334         UNARY, BINARY, TRINARY rtxs.
4335
4336         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4337         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4338         Support '- as "unused spot" indicator.
4339
4340 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4341
4342         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4343
4344 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4345
4346         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4347
4348         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4349         construction.
4350         (tstate-make): New arg `depth'.  All callers updated.
4351         (tstate-depth,tstate-set-depth!): New procs.
4352         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4353         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4354         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4355
4356 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4357
4358         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4359         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4360         * utils-sim.scm: Decoder generator support moved here.
4361         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4362         (-gen-decoder-switch): Sort entries for more fall-throughs.
4363
4364         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4365         * Makefile.in: Rebuild.
4366         * sim-test.scm (build-sim-testcase): Add logging message.
4367         * dev.scm (cload): Recognize SIM-TEST application.
4368         (load-stest): Set APPLICATION to SIM-TEST.
4369
4370         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4371
4372         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4373         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4374         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4375
4376         * insn.scm (syntax-break-out): Handle ${foo}.
4377
4378 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4379
4380         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4381         (bin_PROGRAMS): Define.
4382         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4383         (cgen-hob.c): Prepend $(srcdir)/ here.
4384         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4385         (libcpu_a_SOURCES): Delete.
4386         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4387         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4388         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4389         Add AC_CHECK_LIB(guile,main).
4390         * Makefile.in: Rebuild.
4391         * doc/Makefile.in: Rebuild.
4392         * aclocal.m4: Rebuild.
4393         * config.in: Rebuild.
4394         * configure: Rebuild.
4395
4396 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4397
4398         Rename rtx functions from name: to name, accept optional leading
4399         modifier and mode.
4400         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4401         * attr.scm (-attr-eval): Update.
4402         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4403         (<hw-register>,mode-ok?): Disallow VOID.
4404         (<hw-immediate>,mode-ok?): Disallow VOID.
4405         (<hw-address>,mode-ok?): Disallow VOID.
4406         * mode.scm (mode-name?): New proc.
4407         (VOID): Renamed from VM.
4408         (DFLT): Renamed from DM.
4409         (mode-builtin!): Update.
4410         * opcodes.scm (<ifield>,gen-insert): Update.
4411         (<ifield>,gen-extract): Update.
4412         (<multi-ifield>,gen-insert,gen-extract): Update.
4413         * operand.scm (op:mode): Update.
4414         (<pc>,make!): Update.
4415         (op:new-mode): Update.
4416         (-operand-read): Update.
4417         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4418         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4419         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4420         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4421         (rtx-make): Call -rtx-munge-mode&options.
4422         (rtx accessors): Rewrite.
4423         (rtx-pretty-name): Update.
4424         (-rtx-traverse-*): Update.
4425         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4426         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4427         (-rtx-make-traverse-table): Update.
4428         (-rtx-traverse-operands): Update.
4429         (-rtx-option?,-rtx-option-list?): New procs.
4430         (-rtx-munge-mode&options): New proc.
4431         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4432         (-rtx-traverse): Update.
4433         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4434         (rtx-compile-time-constant?): Update.
4435         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4436         (rtx-value): Update.
4437         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4438         * rtx-funcs.scm (*): Update.
4439         * rtl-c.scm (rtl-c-get): Update.
4440         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4441         (s-c-call,s-c-raw-call): Update.
4442         (s-boolifop,s-convop,s-if,s-cond): Update.
4443         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4444         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4445         (s-parallel,s-sequence): Update.
4446         (rtl-c-build-table): Update.
4447         * sem-frags.scm (-frag-hash-compute!): Update.
4448         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4449         for temporary bug compatibility with previous version.
4450         (-frag-expr-locals,-frag-expr-stmts): Update.
4451         (-frag-compute-desired-frags,-frag-pick-best): Update.
4452         * semantics.scm (-simplify-expr-fn): Update.
4453         (rtx-simplify): Update.
4454         (-rtx-ref-type): Update.  Account for modifiers.
4455         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4456         (-build-ifield-operand!): Update.
4457         (-build-known-values): Update.
4458         (semantic-compile): Update.
4459         (-gen-reg-access-defns): Update.
4460         (gen-semantic-code,-gen-sem-case): Update.
4461         (-gen-sfrag-code,-gen-sfrag-case): Update.
4462         * sim-cpu (gen-semantic-code): Update.
4463         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4464         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4465         (-hw-cxmake-get): Update.
4466         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4467         (<hw-index>,cxmake-get): Update.
4468         (<operand>,gen-type,gen-read,cxmake-get): Update.
4469         (<operand>,gen-set-quiet,gen-set-trace): Update.
4470         (<pc>,cxmake-get): Update.
4471         (sim-finish!): Update.
4472         * utils-gen.scm (-gen-ifld-extract-base): Update.
4473         (-gen-ifld-extract-beyond): Update.
4474         (gen-multi-ifld-extract): Update.
4475         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4476         * sid.scm (<hw-pc>,gen-write): Update.
4477         (-gen-decode-insn-globals): Update.
4478         (-hw-cxmake-get): Update.
4479         (<hw-register>,cxmake-get-raw): Update.
4480         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4481         (<hw-index>,cxmake-get): Update.
4482         (<operand>,gen-type,gen-read,cxmake-get): Update.
4483         (<operand>,gen-set-quiet,gen-set-trace): Update.
4484         (<pc>,cxmake-get): Update.
4485         (-create-virtual-insns!): Update.
4486         (-decode-split-build-assertion): Update.
4487         * *.cpu: Update.
4488         * simplify.inc: Update.
4489
4490 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4491
4492         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4493         Prefix queue function name with sim_ instead of @cpu@_.
4494
4495         * sim.scm (-with-parallel-only?): New global.
4496         (option-init!): Initialize it.
4497         (option-set!): Set it.
4498         (with-parallel-only?): New proc.
4499         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4500         and writeback markers if with-parallel-only.
4501         (-gen-idesc-init-fn): Update.
4502         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4503         with-generic-write.
4504
4505 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4506
4507         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4508         with the invalid insn handler.
4509
4510         * utils.scm (list-maybe-ref): New proc.
4511
4512         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4513         define-arch.
4514         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4515
4516         * i960.cpu (test*-*): Delete `expr' arg.
4517         (test-op,branch-op): Update.
4518
4519 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4520
4521         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4522         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4523         updated.
4524         (gen-reg-access-defn): Ditto.
4525         (-gen-hw-addr): Rewrite.
4526         (-op-gen-queued-write): Rewrite.
4527         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4528         (-gen-scache-semantic-fn): Handle with-generic-write.
4529         (-gen-no-scache-semantic-fn): Ditto.
4530
4531 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4532
4533         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4534
4535         * sim.scm (-with-generic-write?): New global.
4536         (option-init!): Initialize it.
4537         (option-set!): Set it.
4538         (with-generic-write?): New proc.
4539         (-gen-hw-addr): New proc.
4540         (-op-gen-queued-write): New proc.
4541         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4542
4543         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4544         turned off.
4545         (-gen-sem-switch): Preserve existing with-parallel? value.
4546         (-gen-sem-parallel-switch): Ditto.
4547         (-gen-write-case): Add /indent support.
4548         (cgen-write.c): Rewrite.
4549
4550         * utils.scm (-current-print-state): New global.
4551         (make-print-state): New proc.
4552         (pstate-indent,pstate-set-indent!): New procs.
4553         (pstate-cmd?,pstate-cmd-do): New procs.
4554         (/indent): New global.
4555         (/indent-set,/indent-add): New procs.
4556         (string-write): Set -current-print-state.
4557         (-string-write): New arg pstate, all callers updated.
4558         Handle print-state commands.
4559         (-string-list-flatten): New proc.
4560         (string-list->string): Use it.
4561
4562         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4563         (-gen-sem-fn-table-entry): New proc.
4564         (-gen-semantic-fn-table): New proc.
4565         (-gen-scache-semantic-fn): Make fn static.
4566         (-gen-no-scache-semantic-fn): Ditto.
4567         (cgen-semantics.c): Define macro SEM_FN_NAME.
4568         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4569         FAST,FULL.  Update @cpu@_insn_sem contents.
4570         (-gen-semf-fn-name): Delete.
4571         (-gen-sem-fn-decls): Delete.
4572         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4573         @cpu@_semf_init_idesc_table.
4574         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4575         handlers here.
4576         (cgen-decode.h): Print sfmt enum.
4577         * sid-decode.scm (-gen-semf-fn-name): Delete.
4578         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4579
4580         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4581         (ifmt-compute!): Ditto.
4582         * sim-decode.scm (-gen-decoder-switch): Ditto.
4583         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4584         (-gen-decoder-switch): Ditto.
4585
4586         * insn.scm (insn-virtual?): New proc.
4587
4588         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4589         convert to string.
4590         * mach.scm (<arch>): attr-list is now a pair of lists.
4591         (current-attr-list): Rewrite.
4592         (current-attr-add!,current-attr-lookup): Rewrite.
4593         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4594
4595 1999-08-06  Richard Henderson  <rth@cygnus.com>
4596
4597         * ia64.cpu: Initial checkpoint.
4598
4599 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4600
4601         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4602         (pmacros-init!): Update .apply help string.
4603
4604 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4605
4606         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4607         (<hw-pc>,cxmake-skip): New method.
4608         (<pc>,cxmake-skip): New method.
4609         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4610         (gen-argbuf-type): New member `skip_count'.
4611         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4612         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4613
4614         * utils-sim.scm: New file.
4615         * dev.scm (load-sim): Load it.
4616         (load-sid): Load it.
4617         * cgen-sid.scm: Load it.
4618         * cgen-sim.scm: Load it.
4619         * iformat.scm (<sformat>): New member sbuf, not initialized by
4620         default make.
4621         * rtx-funcs.scm (skip): Rewrite.
4622         * rtl-c.scm (skip): Rewrite.
4623         * m32r.cpu (sc,snc): Update `skip' usage.
4624         * mode.scm (mode-real-mode): New proc.
4625         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4626         Distinguish fragments by the <sformat-abuf> they use.
4627         * sim.scm (gen-profile-index-type): Delete.
4628         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4629         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4630         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4631         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4632         (-gen-argbuf-elm): Rewrite.
4633         (-gen-argbuf-hw-elm): Delete.
4634         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4635         of each sfmt.
4636         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4637         (sim-init!): Initialize them.
4638         (sim-analyze-insns!): Set them.
4639         (current-sbuf-list): New proc.
4640         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4641         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4642         * sim-model.scm (-gen-model-insn-fn): Ditto.
4643         * sim-decode.scm (-gen-extract-decls): Delete.
4644         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4645         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4646         sim.scm.
4647         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4648         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4649         (-gen-op-extract,-gen-op-trace-extract): New procs.
4650         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4651         gen-sfmt-argvars-foo and rewrite.
4652         (-gen-record-args): Rewrite.
4653         (-gen-extract-case): Tweak.
4654         * sid.scm (gen-profile-index-type): Delete.
4655         (ifield argbuf support): Move to utils-sim.scm.
4656         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4657         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4658         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4659         (-sim-sformat-argbuf-list): New global.
4660         (sim-init!): Initialize it.
4661         (sim-analyze-insns!): Set it.
4662         (current-sbuf-list): New proc.
4663         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4664         (-gen-argbuf-hw-elm): Delete.
4665         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4666         of each sfmt.
4667         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4668         (-gen-extract-decls): Delete.
4669         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4670         sid.scm.
4671         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4672         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4673         (-gen-op-extract,-gen-op-trace-extract): New procs.
4674         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4675         gen-sfmt-argvars-foo and rewrite.
4676         (-gen-record-args): Rewrite.
4677         (-gen-extract-case): Tweak.
4678
4679         * cgen-gh.c (gh_putc,gh_puts): New functions.
4680         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4681         * cos.c (_object_print_elms,_object_print): Use them.
4682         * hob-sup.c (fastcall_print): Use them.
4683         * configure.in: Check for scm_gen_puts, scm_puts.
4684         * config.in: Rebuild.
4685         * configure: Rebuild.
4686         * aclocal.m4: Rebuild.
4687         * Makefile.in: Rebuild.
4688
4689         * dev.scm (load-opc): Use load instead of maybe-load.
4690         (load-gtest,load-sim,load-stest): Ditto.
4691         (load-sid): Ditto.
4692
4693 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4694
4695         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4696         up to avoid g++ 'goto crosses initialization' warning.
4697         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4698         (-gen-sfrag-case): Update use of NEXT_FRAG.
4699
4700 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4701
4702         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4703
4704         * read.scm: Load sem-frags.scm.
4705         * sem-frags.scm (*): Lots rewritten.
4706         * sid.scm (-with-sem-frags?): New global
4707         (with-sem-frags?): New proc.
4708         (option-init!): Initialize -with-sem-frags?.
4709         (option-set!): Recognize with-sem-frags.
4710         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4711         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4712         if asked to.
4713         (-gen-sfrag-engine-decls): New proc.
4714         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4715         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4716         (-gen-sfrag-engine): New proc.
4717         (-gen-sem-case): Emit setup-semantics if specified.
4718         (-gen-sem-switch-engine): Update init/use of computed goto label.
4719         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4720         from local vars.
4721         (-gen-idesc-decls): Replace sem_address with cgoto.
4722         (-gen-scache-decls): Rewrite definition of `execute' member.
4723         * arm.cpu (arm isa): Enable decode-splits.
4724         * arm7.cpu (multiply insns): Rename result to mul-result.
4725
4726         Rename decode-specialize to decode-split.
4727         * decode.scm (*): Update.
4728         * insn.scm (*): Update.
4729         * mach.scm (*): Update.
4730         * sid.scm (*): Update.
4731
4732 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4733
4734         Record objects as a smob.
4735         * cos.c (scm_tc16_object): New static global.
4736         (cos_init): Initialize it.
4737         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4738         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4739         (_object_tag): Delete.
4740         (_object_make_smob): New function.
4741         (_object_make_x,_object_make_with_values_x): Rewrite.
4742         (_object_elements,_object_class_desc): Rewrite.
4743         (_object_copy,object_p): Rewrite.
4744         (_object_specialize): Rewrite.
4745         (_object_print_elms,_object_print): New functions.
4746         (object_smob): New static global.
4747         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4748
4749         * cos.c (_make_x_symbol): New static global.
4750         (object_make): Use it.
4751         (cos_init): Initialize it.
4752
4753 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4754
4755         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4756         instead to determine whether to use FLD macro.
4757         (<rtl-c-eval-state>): New member ifield-var?.
4758         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4759         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4760         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4761
4762         * rtl.scm (rtx-sequence-assq-locals): New proc.
4763
4764         * cos.scm (-object-error): Don't crash on non-objects.
4765
4766         * Makefile.am (CLEANFILES): Add hobbit.
4767         * Makefile.in: Rebuild.
4768
4769         * rtl-c.scm (s-c-call): Delete unnecessary code.
4770
4771 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4772
4773         * rtl-c.scm (ifield): Always reference value via `FLD'.
4774
4775         * cos.c (elm_bound_p): Return problem SCM boolean values.
4776
4777         * utils-cgen.scm (display-argv): New proc.
4778         * cgen-opc.scm (cgen): Call it.
4779         * cgen-sim.scm (cgen): Ditto.
4780         * cgen-gas.scm (cgen): Ditto.
4781         * cgen-stest.scm (cgen): Ditto.
4782         * cgen-sid.scm (cgen): Ditto.
4783
4784 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4785
4786         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4787         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4788         (-gen-extract-switch): Initialize result to 1.
4789         * opcodes.scm (gen-ifield-default-type): New proc.
4790         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4791         updated.
4792         (<hw-index>,gen-insert): Handle non-ifield indices.
4793         (<hw-index>,gen-extract): Ditto.
4794         (<hw-asm>,gen-parse): Ditto.
4795         (<hw-asm>,gen-print): Ditto.
4796         (<keyword>,gen-parse): Ditto.
4797         (<keyword>,gen-print): Ditto.
4798         (<operand>,gen-fget): Ditto.
4799         (<operand>,gen-fset): Ditto.
4800
4801         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4802         (-gen-hw-index): Ditto.
4803         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4804         (-gen-hw-index): Ditto.
4805
4806         * sem-frags.scm: New file.
4807
4808         * attr.scm (attr-parse): Add better checking of input.
4809
4810         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4811         All uses updated.
4812         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4813
4814         * ifield.scm (ifld-nil?): New proc.
4815
4816         * operand.scm (<operand>): New members getter,setter.
4817         (<operand>,make!): New args getter,setter.  All uses updated.
4818         (op:getter,op:setter): New procs.
4819         (<hw-index>,field-start): Return 0 for non-ifield indices.
4820         (<hw-index>,field-length): Return 0 for non-ifield indices.
4821         (-operand-parse-getter,-operand-parse-setter): New procs.
4822         (-operand-parse): New args getter,setter.  All callers updated.
4823         Always use hw-index-scalar for scalar operands.
4824         (-operand-read): Handle getter,setter.
4825         (define-full-operand): New args getter,setter.  All uses updated.
4826         * semantics.scm (-build-ifield-operand!): Update.
4827         (-build-index-of-operand!): Update.
4828         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4829         * simplify.inc (define-normal-operand): Update.
4830
4831         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4832         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4833         (s-binop,s-cmpop,s-convop): Ditto.
4834         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4835         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4836         (fcc-tests): New insn-enum.
4837         (fcc-value): Rename from fcc-type.
4838         * sparcfpu.cpu: New file.  All fp support moved here.
4839
4840         * rtl.scm (<rtx-func>): New member class.
4841         (rtx-class-*?): New procs.
4842         (def-rtx-node): New arg class.  All callers updated.
4843         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4844         * rtx-funcs.scm (*): Specify class.
4845
4846         * utils-cgen.scm (context-make-reader): New proc.
4847
4848         * utils.scm (assert-fail-msg): New variable.
4849         (assert): Use it.
4850         (list-drop,list-tail-drop): New procs.
4851
4852 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4853
4854         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4855         CGEN_MIN_INSN_SIZE deleted on March 22.
4856
4857         * ifield.scm (<ifield>,needed-iflds): New method.
4858         (<multi-ifield>,needed-iflds): New method.
4859         (ifld-needed-iflds): New proc.
4860         (multi-ifield?): New proc.
4861         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4862         (-sfmt-search-key): Include insn length in key.
4863         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4864         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4865         (-ifmt-lookup-ifmt!): Compute key here.
4866         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4867         All callers updated.
4868         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4869         All callers updated.
4870         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4871         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4872         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4873         to ifmt-build.
4874         * operand.scm (op-iflds-used): New proc.
4875         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4876         and sim-cpu.scm.
4877         And from sid.scm,sid-cpu.scm as well.
4878         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4879         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4880         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4881         (gen-extracted-ifld-value): Ditto.
4882         (-extract-chunk-specs): Ditto.
4883         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4884         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4885         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4886         (-extract-insert-subfields): New function.
4887         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4888         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4889         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4890         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4891         gen-extract-foo.
4892         (-gen-no-scache-semantic-fn): Ditto.
4893         (-gen-sem-case): Ditto.
4894         (-gen-read-case): Update calls to gen-define-ifields,
4895         gen-extract-ifields.
4896         * sim-decode.scm (-gen-record-args): Update.
4897         (-gen-sfmt-argvars-assigns): Update.
4898         (-gen-extract-case): Update.
4899         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4900         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4901         gen-extract-foo.
4902         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4903         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4904         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4905         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4906         gen-define-ifields, gen-extract-ifields.
4907         (-gen-record-args): Update.
4908         (gen-sfmt-argvars-assigns): Update.
4909         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4910         with gen-define-ifields.  Ditto for gen-extract-foo.
4911         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4912         procs rather than method calls.
4913
4914 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4915
4916         * sid.scm (-create-virtual-insns!): New local `context', pass it
4917         to insn-read.
4918
4919         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4920         (operand name) not (operand object), (local name) not (local object).
4921         (rtx-traverse-with-locals): New proc.
4922         (-compile-expr-fn): New proc.
4923         (rtx-compile): Rewrite.
4924         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4925         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4926         (rtl-c-set-trace): Ditto.
4927         (operand define-fn): Recognize operand name argument.
4928         (local define-fn): Recognize sequence temp name argument.
4929         * rtx-funcs.scm (operand): Argument is operand name, not object,
4930         so call current-op-lookup.
4931         (local): Similarily, so call rtx-temp-lookup.
4932
4933         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4934         (rtx-operand?): Ditto.
4935         (rtx-pretty-name): Ditto.
4936         (rtx-local-obj): Flag symbol argument as an error.
4937         (rtx-local-name): New proc.
4938         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4939
4940         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4941
4942         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4943         updated.
4944
4945         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4946         (and: QI rd #xff).
4947
4948         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4949         (*floats-s->c-fun-table*): Ditto.
4950         * hobbit.c,hobbit.h: Rebuild.
4951         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4952         * semantics.scm (rtx-simplify): Use /fastcall-make.
4953
4954         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4955
4956         * insn.scm (<insn>): Delete members condition, compiled-condition.
4957         (<insn>,make!): Update
4958         (<insn> getters,setters): Update.
4959         (-insn-parse,insn-read,define-full-insn): Update.
4960         * minsn.scm (minsn-make-alias): Update.
4961         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4962         (ifmt-compute!): Ditto.
4963         * sim.scm (sim-finish!): Update.
4964         * simplify.inc: (define-normal-insn): Update.
4965         * sid-cpu.scm (gen-semantic-code): Update.
4966
4967         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4968         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4969         (ifmt-compute!): Ditto.
4970
4971 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4972
4973         * minsn.scm (minsn-compute-iflds): Print better error message for
4974         missing ifields.
4975
4976 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4977
4978         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4979
4980         * Makefile.am (HOBFLAGS): New variable.
4981         (cgen-hob.c): Use it.
4982         (hobbit.c): Use it.
4983         (libcpu_a_SOURCES): Add hob-sup.c.
4984         (hob-sup.o): New rule.
4985         * Makefile.in: Rebuild.
4986         * cgen.c: #include hob-sup.h.
4987         (cgen_init_c): Call hobbit_init_support.
4988         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4989         (*special-scm->c-functions*): Add them.
4990         (display-c-expression): Handle *c-symbol*.
4991         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4992         (*floats-s->c-fun-table*): Ditto.
4993         (normalize): Recognize /fastcall-make.
4994         (normalize-fastcall-make): New proc.
4995         * hobbit.c,hobbit.h: Rebuild.
4996         * hob-sup.scm: New file.
4997         * hob-sup.c: New file.
4998         * hob-sup.h: New file.
4999         * read.scm: Load hob-sup.scm.
5000         * rtl.scm (-rtx-name-list): New variable.
5001         (rtx-name-list): New proc.
5002         (rtx-lookup): Try symbol first.
5003         (def-rtx-node): Add name to -rtx-name-list.
5004         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5005         (-rtx-traverse-anymode): New proc.
5006         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5007         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5008         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5009         (-rtx-traverse-{symornum,object}): New procs.
5010         (-rtx-make-traverse-table): Rewrite.
5011         (-rtx-traverse-operands): Rewrite arg-types handling.
5012         Handle #f result of traverser.
5013         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5014         Move debug handling here.
5015         (-rtx-traverse-debug): Delete.
5016         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5017         for each rtx.
5018         * semantics.scm (semantic-compile:process-expr!): Fix call to
5019         -rtx-traverse.
5020         * utils.scm (map1-improper): New proc.
5021
5022 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5023
5024         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5025         (h-mbits): Ditto.
5026         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5027         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5028         (<operand>,cxmake-get): Tweak.
5029         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5030
5031 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5032
5033         * thumb.cpu (dnti): Delete timing spec.
5034         (all insn): Update.
5035
5036         * arm.cpu (arm isa): New fields condition, setup-semantics.
5037         (thumb isa): New field setup-semantics.
5038         (h-gr): Add attribute CACHE-ADDR.
5039         * arm7.cpu (dnai): Delete condition.
5040         (eval-cond): Delete.
5041
5042         * mach.scm (<isa>): New member setup-semantics.
5043         (-isa-parse-setup-semantics): New proc.
5044         (-isa-parse): New arg setup-semantics.
5045         (-isa-read): Recognize setup-semantics.
5046
5047         * sid-cpu.scm (gen-extract-fields): Split into two:
5048         gen-extract-ifields, gen-extract-ifmt-ifields.
5049         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5050         tracing begin/end messages (done by caller now).
5051         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5052         tracing begin/end messages (done by x-before,x-after virtual insns).
5053         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5054         end so don't have to look it up again next time.
5055         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5056         (-decode-expr-ifield-tracking-key): New proc.
5057         (-decode-expr-ifield-tracking): New proc.
5058         (-decode-expr-ifield-values-used): New proc.
5059         (-decode-expr-ifield-mark-used!): New proc.
5060         (-gen-decode-expr-set-itype): New proc.
5061         (-gen-decode-expr-entry): Rewrite.
5062         (-gen-decode-table-entry): New proc.
5063         (-gen-decoder-switch): Use it.
5064         (-gen-virtual-insn-finder): New proc.
5065         (-gen-argbuf-elm): Move here from sid.scm.
5066         (-gen-argbuf-hw-elm): Ditto.
5067         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5068         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5069         conditional-execution isas.
5070         (-gen-decode-fn): Record conditional-exec ifield.
5071         * sid.scm (-current-pbb-engine?): New global.
5072         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5073         (<ifield>,gen-ifld-extract): New arg `indent'.
5074         (<multi-ifield>,gen-ifld-extract): Ditto.
5075         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5076         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5077         (-gen-arch-model-decls): Only scan real insns.
5078         (scache-engine-insns,pbb-engine-insns): New procs.
5079         (-create-virtual-insns!): New proc.
5080         (sim-finish!): Call it.
5081         (-decode-specialize-insn?): New proc.
5082         (-decode-specialize-build-assertion): New proc.
5083         (-decode-specialize-insn-1): New proc.
5084         (-decode-specialize-insn): New proc.
5085         (-fill-sim-insn-list!): New proc.
5086         (sim-analyze!): Create copies of insns to be specialized.
5087         * utils-cgen.scm (obj-set-name!): New proc.
5088
5089         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5090         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5091         semantic-attrs.
5092         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5093         sformats.
5094         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5095         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5096         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5097         (attr): Rewrite test for insn owner.
5098         (member): New rtx function.
5099         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5100         as separate function.
5101         (rtx-ifield?,rtx-ifield-name): New procs.
5102         (rtx-operand-obj): Rewrite.
5103         (rtx-operand-name): New proc.
5104         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5105         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5106         (tstate-make): New args owner, known.  All callers updated.
5107         (tstate-known-lookup): New proc.
5108         (rtx-traverse): New arg owner.  All callers updated.
5109         (rtx-make-bool): New proc.
5110         (rtl-find-ifields): Rewrite.
5111         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5112         * semantics.scm: ... here.
5113         (rtx-const-equal,rtx-const-list-equal): New procs.
5114         (-build-known-values): New proc.
5115         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5116         (semantic-attrs): Ditto.
5117         * rtx-funcs.scm (member,number-list): New rtx functions.
5118
5119         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5120         Rewrite.  Delete arg `all-attrs'. All callers updated.
5121         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5122         updated.
5123         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5124
5125         * decode.scm (subdtable-add): Handle `expr' entries.
5126         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5127         (exprtable-entry-*): Update.
5128         (exprtable-entry-iflds): New proc.
5129         (exprentry-cost): New proc.
5130         (exprtable-sort,-gen-exprtable-name): New procs.
5131         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5132         (exprtable-*): Update.
5133         (-build-decode-table-entry): Don't issue collision warning if all are
5134         specialized insns.  Sort exprtable entries before building table.
5135
5136         * read.scm (-reader-process-expanded-1): Move pretty printing of
5137         input to logging level 4.
5138
5139         * utils.scm (string-list->string): New proc.
5140
5141         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5142         semantics.
5143         (insn-read): Delete leading '-' in name.  All callers updated.
5144         (real-insn?): New proc.
5145         (real-insns): Rewrite.
5146         (insn-has-ifield?): New proc.
5147         (insn-builtin!): Create insn attribute SPECIALIZED.
5148
5149         * mach.scm (<arch>): Delete member app-data.
5150         (current-raw-insn-list): New proc.
5151         (insn-list-car,insn-list-splice!): New procs.
5152         (<decode-specialize>): New class.
5153         (-isa-parse-decode-specialize): New proc.
5154         (-isa-parse-decode-specializes): New proc.
5155         (<isa>): New members `condition', `decode-specializes'.
5156         (-isa-parse-condition): New proc.
5157         (-isa-parse): New args condition, decode-specializes.
5158         (-isa-read): Recognize condition, decode-specializes.
5159         (-isa-add-decode-specialize!): New proc.
5160         (modify-isa): New proc.
5161         (isa-conditional-exec?,state-conditional-exec?): New procs.
5162         (arch-init!): New reader command `modify-isa'.
5163
5164         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5165         (mode-signed,mode-unsigned?): New procs.
5166
5167 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5168
5169         * types.scm (<array>): New method get-shape.
5170         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5171         onto type.
5172         (hw-shape,hw-num-elms): New procs.
5173         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5174         if there's more than 255 registers.
5175         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5176
5177         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5178         with get/set specs.
5179
5180 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5181
5182         * cgen-sid.scm (sim-arguments): Add -X.
5183         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5184         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5185         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5186         Simplify by supporting pbb engine only.
5187         (-gen-sem-switch-init): New proc.
5188         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5189         (cgen-sem-switch.cxx): New proc.
5190         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5191         with with-pbb?.  Support dual scache/pbb engines.
5192         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5193         Support dual scache/pbb engines.
5194         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5195         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5196         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5197
5198 1999-05-10  Ben Elliston  <bje@cygnus.com>
5199
5200         * arm7.cpu: Remove coprocessor related fields, operands and insn
5201         definitions for now. Take the undefined instruction trap instead.
5202         (ldmda-wb): New instruction.
5203         (ldmib-wb): Likewise.
5204         (ldmdb-wb): Likewise.
5205         (stmdb-wb): Likewise.
5206         (stmib-wb): Likewise.
5207         (stmda-wb): Likewise.
5208
5209 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5210
5211         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5212         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5213
5214         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5215         hobbit can't handle optional third arg.
5216
5217 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5218
5219         * arm.cpu (h-tbit): Delete set spec.
5220         (h-mbits): Don't call arm_mbits_set in set spec.
5221         * arm.sim: New file.
5222         * hardware.scm (modify-hardware): New proc.
5223         (hardware-init!): Add modify-hardware command.
5224         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5225         (-hw-gen-set-quiet): Ditto.
5226         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5227         hardware attribute.  Load $arch.sim file if present.
5228         * utils-cgen.scm (keyword-list?): New proc.
5229         (keyword-list->arg-list,arg-list-validate-name): New procs.
5230         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5231
5232         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5233
5234         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5235         @cpu@_cpu_cgen.
5236
5237         * attr.scm (obj-prepend-atlist!): New proc.
5238
5239         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5240
5241         * sid.scm (<operand>,profilable?): Use op:type.
5242         * sim.scm (<operand>,profilable?): Use op:type.
5243
5244 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5245
5246         * utils.scm (find-index,find): Be more stack friendly.
5247
5248         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5249         (bic-imm): Ditto.
5250
5251 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5252
5253         * arm.cpu (h-gr-usr): New hardware element.
5254         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5255         (arm-mode): New keyword.
5256         (h-mbits): Add set spec.
5257         (h-spsr): Implement get/set specs.
5258
5259         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5260         (-reader-process-expanded-1): Pretty print logging output.
5261
5262         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5263         (cgen-cpu.h): Print enums before hardware elements.
5264         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5265         * sid-decode.scm (cgen-decode.cxx): Ditto.
5266         * sid-model.scm (cgen-model.cxx): Ditto.
5267
5268         * utils-cgen.scm (context-error): Accept variable number of
5269         trailing args.
5270
5271         * rtx-funcs.scm (error:): New rtx function.
5272         * rtl-c.scm (s-case-vm): New proc.
5273         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5274         (s-case): Simplify, handle non-VM result.
5275         (error:): New rtx function.
5276
5277 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5278
5279         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5280         (test-hi,test-ls): Fix cbit handling.
5281         (shift-type,h-operand2-shifttype): Move here ...
5282         * arm7.cpu: ... from here.
5283         (set-cond,set-cond-maybe,dnix): Delete, unused.
5284         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5285         * arm.cpu: ... to here.
5286         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5287         (alu-cmn): Use set-add-flags.
5288         (alu-tst): Use set-zn-flags.
5289         (alu-cmp): Use set-sub-flags.
5290         (lsl,lsr,asr): Set condition codes.
5291         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5292         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5293         alu-shift-op.
5294         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5295         All callers updated.
5296         (sub-sp): Rename from add-sp-neg.
5297         (f-lbwl-offset): Delete.
5298         (f-lbwl-hi,f-lbwl-lo): New ifields.
5299         (lbwl-hi,lbwl-lo): Update.
5300         (bl-hi): Add 4 to pc.
5301         (push-reg,pop-reg): Simplify.
5302         (push,push-lr): Push registers in correct order.
5303         (pop,pop-pc): Pop registers in correct order.
5304         (save-reg-inc,load-reg-inc): Simplify.
5305         (ldmia): Save registers in correct order.
5306
5307 1999-04-30  Ben Elliston  <bje@cygnus.com>
5308
5309         * arm7.cpu (f-op-hdt): Remove; unused.
5310         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5311         (f-ror-imm8): New multi-ifield.
5312         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5313         callers updated.
5314         (f-uimm12): New field.
5315         (ror-imm8): New operand.
5316         (uimm12): Likewise.
5317         (hdt-offset8): Reinstate operand.
5318         (offset4-hi,offset4-lo): Remove.
5319         (set-cond): Remove macro; unused.
5320         (set-cond-maybe): Likewise.
5321         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5322         (store-word/byte): Likewise.
5323         (load-halfword): Use hdt-offset8 multifield operand instead of two
5324         4-bit operands that are explicitly combined by semantic code.
5325         (do-halfword-store): Bug fix. Set address when not preindexing.
5326         (store-halfword): Also use hdt-offset8 operand.
5327         (arith-op): Avoid clobbering source registers when one of them is
5328         the destination register.
5329         (arith-imm-op): Likewise.
5330         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5331         (teq-imm): Likewise.
5332         (ldm-p): Rename to ldmdb.
5333         (stm-pw): Rename to stmdb-wb.
5334         (multi-action): New macro; test reg-list bits and execute a
5335         semantic fn if the bit is set.
5336         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5337         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5338         (all insns): Use dnai entries for simplicity rather than dni.
5339         (*): Use short-form of (const ..).
5340
5341 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5342
5343         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5344         member eval to evaluator.
5345         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5346         (tstate-make): Delete arg op-fn.  All callers updated.
5347         (tstate-op-fn,tstate-set-op-fn!): Delete.
5348         (rtx-traverse): Delete op-fn arg.  All callers updated.
5349         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5350         split out of -simplify-for-compilation.
5351
5352         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5353         (cgen_DEPENDENCIES): Add stamp-cgen.
5354         (stamp-cgen): New rule.
5355         * Makefile.in: Rebuild.
5356
5357         * rtl-c.scm (enum:): Define emitter for.
5358         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5359         enums as well.
5360         (rtx-constant-value,rtx-enum-value): New procs.
5361         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5362         (rtx-compile-time-constant?): Return #t for enums.
5363         (rtx-true?,rtx-false?): Handle enums.
5364         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5365         building result by hand.
5366         (rtx-simplify-eq-attr-insn): Ditto.
5367         * rtx-funcs.scm (enum:,enum): New rtx functions.
5368
5369         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5370         aliases-analyzed?.
5371         (arch-analyze-insns!): New proc.
5372         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5373         of calling ifmt-compute! directly.
5374         * sid.scm (-sim-insns-analyzed?): Delete.
5375         (sim-analyze!): Call arch-analyze-insns! instead of calling
5376         ifmt-compute! directly.
5377         * sim.scm (-sim-insns-analyzed?): Delete.
5378         (sim-analyze!): Call arch-analyze-insns! instead of calling
5379         ifmt-compute! directly.
5380
5381         * utils.scm (string-take-with-filler): New proc.
5382         (string-take): Use it.
5383
5384         * pgmr-tools.scm: New file.
5385         * read.scm: Load it.
5386         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5387
5388         * insn.scm (insn-base-mask): Renamed from insn:mask.
5389         All callers updated.
5390         (insn-base-mask-length): Renamed from insn:mask-length.
5391         All callers updated.
5392         (insn-foo): Renamed from insn:foo.  All callers updated.
5393         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5394         * iformat.scm (compute-insn-base-mask-length): Renamed from
5395         compute-insn-mask-length.  All callers updated.
5396         (compute-insn-base-mask): Renamed from compute-insn-mask.
5397         All callers updated.
5398
5399         * enum.scm (-enum-parse-prefix): New proc.
5400         (<enum>,make!): Don't parse enum values here.
5401         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5402         (define-full-insn-enum): Ditto.
5403         (enum-vals-upcase): New proc.
5404         * hardware.scm (define-keyword): Make enum prefix uppercase.
5405         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5406
5407         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5408         (<ifield>,field-extract): New method.
5409         (<multi-ifield>,field-extract): New method.
5410         (ifld-extract): New proc.
5411         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5412         (ifld-extract-fn-name): Renamed from ifld-extract.
5413
5414         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5415         All callers updated.
5416
5417         * ifield.scm (ifld-lsb0?): New proc.
5418         (sort-ifield-list): New arg up?.  All callers updated.
5419         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5420         rather than global state.
5421
5422 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5423
5424         * insn.scm (pretty-print-insn-format): New proc.
5425
5426         * Makefile.in: Rebuild.
5427         * aclocal.m4: Rebuild
5428         * configure: Rebuild.
5429
5430 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5431
5432         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5433         * configure: Rebuild.
5434         * aclocal.m4: Rebuild.
5435         * Makefile.in: Rebuild.
5436         * doc/Makefile.in: Rebuild.
5437         * doc/version.texi: Rebuild.
5438
5439 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5440
5441         * utils.scm (bits->bools): New proc.
5442
5443 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5444
5445         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5446         subfield's gen-ifld-extract-decl method.
5447
5448 1999-04-23  Ben Elliston  <bje@cygnus.com>
5449
5450         * arm7.cpu (ldrsh-pu): Remove.
5451         (do-halfword-load): New pmacro.
5452         (load-halfword): Likewise.
5453         (do-halfword-store): Likewise.
5454         (store-halfword): Likewise.
5455         (strh-*): New instructions.
5456         (ldrsb-*): Likewise.
5457         (ldrh-*): Likewise.
5458         (ldrsh-*): Likewise.
5459
5460 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5461
5462         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5463         fields.
5464
5465         * arm7.cpu (do-word/byte-store): Fix typo.
5466
5467 1999-04-22  Ben Elliston  <bje@cygnus.com>
5468
5469         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5470         register is the program counter (R15).
5471
5472         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5473         (str-*): Implement using store-word-byte. Remove older versions.
5474         (bic): Use the `inv' rtx for obtaining bitwise complements.
5475         (bic-imm): Likewise.
5476         (mvn): Likewise.
5477         (mvn-imm): Likewise.
5478         (store-indev-reg): Remove crufty pmacro.
5479         (load-indiv-reg): Likewise.
5480         (ldm-p): Reverse the order of register processing for decrement.
5481         (stm-p): Likewise.
5482         (stbi): Remove; handled by the str-* insns.
5483
5484 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5485
5486         * thumb.cpu (cmp): Fix carry bit computation.
5487         (alu-cmp): Ditto.
5488
5489 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5490
5491         * arm.cpu (h-tbit): Specify set spec.
5492         (h-cpsr): Ditto.
5493         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5494         (set-sub-flags): Interpret "carry bit" as a borrow.
5495         (all sub/cmp insns): Carry bit is actually a borrow bit.
5496         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5497         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5498         .pmacro instead.
5499         (hireg-add,hireg-cmp,hireg-move): Ditto.
5500
5501         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5502         (-CGEN-LANG-VERSION): Ditto.
5503
5504 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5505
5506         * pmacros.scm (-pmacro-make): New arg `default-values',
5507         all callers updated.
5508         (-pmacro-default-values): New proc.
5509         (-pmacro-process-keyworded-args): New proc.
5510         (-pmacro-process-args): New proc.
5511         (-pmacro-invoke): Process arguments before expanding macro.
5512         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5513         (define-pmacro): Handle default values specified in arg list.
5514         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5515         (rtx-boolif-op-arg[01]): New procs.
5516         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5517         (rtx-simplify): Handle not,orif,andif.
5518         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5519         * utils.scm (alist-copy): New proc.
5520         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5521         (ldr*): Rewrite.
5522         (swi): Explicitly set pc.
5523
5524         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5525
5526 1999-04-17  Ben Elliston  <bje@cygnus.com>
5527
5528         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5529         correctly adjusts the program counter now.
5530
5531         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5532         (f-signed?): Rename from `f-hdt-signed?'.
5533         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5534         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5535         (f-hdt-offset8): Use new field names.
5536         (ldr): Use `imm12' field, not `offset12', since we do our own
5537         address arithmetic.
5538         (str, str-*): Likewise.
5539         (ldu-*): Remove most; better not implemented than broken.
5540         (ldrh*): Likewise.
5541         (ldrsh-pu): New insn.
5542         (stri): Likewise.
5543         (stri-p): Likewise.
5544         (stbi): Likewise.
5545         (ldm-p): Likewise; replace (load-indiv-reg) version.
5546
5547 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5548
5549         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5550         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5551         (*): Explicitly specify mode in c-call.
5552         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5553         (arith-op): Ditto.
5554         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5555         (arith-imm-op): New pmacro.
5556         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5557         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5558
5559 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5560
5561         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5562
5563         * rtl.scm (rtl-find-ifields): Implement.
5564
5565         * utils-gen.scm: New file.
5566         * read.scm: Load it.
5567         * desc.scm: Move generic attribute code to utils-gen.scm.
5568         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5569         * Makefile.in: Rebuild.
5570
5571         * arm7.cpu (R15-OFFSET): New attribute.
5572         (dnai): New pmacro.
5573         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5574         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5575         for reg-shift version.
5576         (arith-op): Ditto.
5577         (data processing insns): Reorganize.  Use dnai.
5578
5579         * attr.scm (attr-kind): New proc.
5580         (attr-list-enum-list): Rewrite.
5581         (-attr-sort): Split result into two lists, bools and non-bools.
5582         (current-attr-list-for): Update.
5583
5584         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5585         * sid-cpu.scm (-gen-attr-decls): New proc.
5586         (-gen-insn-attr-decls): New proc.
5587         (cgen-desc.h): New proc.
5588         (cgen-cpu.h): Put everything in @cpu@ namespace.
5589         (gen-parallel-exec-type): Change prefix of parexec struct from
5590         @cpu@ to @prefix@.
5591         (-gen-trace-record-type): Ditto for trace_record struct.
5592         (-gen-write-case): Update.
5593         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5594         @prefix@.  Update scache struct references.
5595         (-gen-sem-case): Update scache struct references.
5596         (-gen-sem-switch-fn): Update idesc struct reference.
5597         Update insn_type enum reference.
5598         (cgen-write.cxx): Update scache,argbuf references.
5599         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5600         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5601         from @cpu@ to @prefix@.
5602         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5603         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5604         from @CPU@ to @PREFIX@.
5605         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5606         from @CPU@ to @PREFIX@.
5607         (-gen-decode-insn-globals): Generate insn attributes.
5608         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5609         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5610         semantic fn typedef.
5611         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5612         Change prefix of scache struct from @cpu@ to @prefix@.
5613         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5614         Change prefix of idesc struct from @cpu@ to @prefix@.
5615         Change prefix of insn_type enum from @cpu@ to @prefix@.
5616         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5617         from @cpu@ to @prefix@.
5618         (-gen-scache-decls): Change prefix of scache struct from
5619         @cpu@ to @prefix@.  Update idesc struct name.
5620         Update decode,execute methods.
5621         (-gen-extract-case): Update to type name changes.
5622         (-gen-decode-fn): Ditto.
5623         (cgen-decode.h): Put everything in @cpu@ namespace (except
5624         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5625         (cgen-decode.cxx): Add using namespace @cpu@.
5626         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5627         model_mark_get/set from @cpu@ to @prefix@.
5628         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5629         @prefix@.
5630         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5631         of model_insn_before/after from @cpu@ to @prefix@.
5632         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5633         Update insn_word type name.
5634         (-gen-model-timing-table): Update INSN_TIMING struct name.
5635         (-gen-model-init-fn): Update MODEL_DATA struct name.
5636         (-gen-mach-defns): Update name of init_idesc_table fn.
5637         (cgen-model.cxx): Add using namespace @cpu@.
5638         * sid.scm (gen-cpu-class): Delete.
5639         (gen-attr-type): New proc.
5640         (gen-obj-attr-sid-defn): New proc.
5641         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5642         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5643         @CPU@ to @PREFIX@.
5644         (gen-cpu-insn-enum): Update name of insn enum.
5645         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5646         (bx-hs): Ditto.
5647         (swi): Rename @cpu@_swi to @prefix@_swi.
5648
5649         * decode.scm (-build-decode-table-entry): Remove heuristic for
5650         distinguishing insns, and use insn ifield-assertion specs.
5651
5652         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5653         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5654         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5655         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5656         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5657         all callers updated.
5658         (gen-attr-name): New proc
5659         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5660         (gen-obj-attr-defn): Delete num_nonbools count.
5661
5662         * iformat.scm (ifmt-analyze): Handle insn-condition.
5663         (ifmt-compute!): Ditto.
5664         * insn.scm (<insn>): Specify default value for condition,
5665         post-cond-trap,compiled-condition,compiled-semantics.
5666         (<insn>,make!): New arg condition.
5667         (<insn>): Add getters for condition,compiled-condition.
5668         (-insn-parse): New arg condition, all callers updated.
5669         (-insn-read): Recognize condition spec.
5670         (define-full-insn): New arg condition.
5671         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5672         * semantics.scm (semantic-compile): Change arg sem-code to
5673         sem-code-list.
5674         (semantic-attrs): Ditto.
5675         * sim.scm (sim-finish!): Update calls to define-full-insn.
5676         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5677         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5678         * sid.scm (sim-finish!): Update call to define-full-insn.
5679
5680 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5681
5682         * Makefile.am (sim-cpu): Allow specification of ISA.
5683         * Makefile.in: Rebuild.
5684
5685 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5686
5687         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5688
5689 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5690
5691         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5692
5693         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5694
5695         * attr.scm (atlist?): New proc.
5696         (-attr-eval): Rewrite.
5697         (attr-parse): New proc.
5698         (atlist-parse): Use it.
5699
5700         * decode.scm (exprtable-entry-make): New proc.
5701         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5702         (exprtable-make,exprtable-insns): New procs.
5703
5704         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5705         All uses updated.
5706         (hardware-builtin!): Make h-memory a vector.
5707
5708         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5709         All callers updated.
5710         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5711
5712         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5713         All uses updated.
5714         (-insn-parse): Set semantics to #f if not specified.
5715         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5716         if simulator.
5717         (-parse-insn-format): Recognize `=' iformat spec.
5718
5719         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5720         (isa-max-insn-bitsize): Ditto.
5721
5722         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5723         rtl-c-with-alist.
5724         (<ifield>,gen-extract): Ditto.
5725         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5726         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5727         (gen-define-ifmt-ifields): New proc.
5728         (gen-semantic-code): Rewrite.
5729         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5730         (-gen-decoder-switch): Handle expression tables.
5731         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5732         gen-define-fields.
5733         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5734         instead of gen-define-fields.
5735         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5736         callers updated.
5737         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5738         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5739         (-gen-ifld-extract-beyond): Ditto.
5740         (<multi-ifield>,gen-ifld-extract): Ditto.
5741         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5742         rtl evaluation code.
5743         (op:read): Build an <eval-state> to pass to gen-read.
5744         (op:write): Build an <eval-state> to pass to gen-write.
5745         (op:record-profile): Build an <eval-state> to pass to
5746         gen-record-profile.
5747         * sim-cpu.scm (gen-semantic-code): Rewrite.
5748         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5749         rtl-c-with-alist.
5750         (-gen-ifld-extract-beyond): Ditto.
5751         (<multi-ifield>,gen-ifld-extract): Ditto.
5752         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5753         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5754         rtl evaluation code.
5755         (op:read): Build an <eval-state> to pass to gen-read.
5756         (op:write): Build an <eval-state> to pass to gen-write.
5757         (op:record-profile): Build an <eval-state> to pass to
5758         gen-record-profile.
5759
5760         * operand.scm (<operand>): Give `selector' default value of #f.
5761         Give `num' default value of -1.  Give `cond?' default value of #f.
5762         (op:new-mode): Delete arg `set?', all uses updated.
5763
5764         * read.scm (reader-error): Handle #f return from port-filename.
5765         (-init-parse-cpu!): Call rtl-c-init!.
5766         (reader-install-builtin!): Call rtl-builtin!.
5767
5768         * rtl-c.scm: New file.
5769         * semantics.scm: New file.
5770         * read.scm: Load them.
5771         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5772         to semantics.scm.
5773         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5774         type,eval,num.
5775         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5776         (-rtx-num-text,-rtx-max-num): New globals.
5777         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5778         (-rtx-macro-lookup): New proc.
5779         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5780         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5781         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5782         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5783         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5784         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5785         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5786         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5787         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5788         (rtx-pretty-name): New proc.
5789         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5790         (rtx-traverse-*): Rewrite rtx traversing.
5791         (rtx-eval-*): Rewrite rtx evaluation.
5792         (rtx-compile): New proc.
5793         (rtx-simplify): New proc.
5794         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5795         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5796         (ifield,index-of): Rewrite.
5797         (name): Renamed from `operand:'.
5798         (operand,xop,local): New rtx's.
5799         (current-insn): Rewrite.
5800         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5801         (cgen-hob.h): Remove rule for.
5802         (cgen-hob.o): Depend on cgen-hob.c only.
5803         * Makefile.in: Rebuild.
5804
5805         * utils-cgen.scm (vmake): New proc.
5806         (<context>): New class.
5807         (context-make-prefix,context-error): New procs.
5808
5809 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5810
5811         * i960.cpu: Add some ??? comments.
5812         (xnor, ornot): New instructions.
5813         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5814
5815 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5816
5817         * cos.scm (-object-error): Print better error message.
5818
5819         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5820         (-pmacro-env-ref): Renamed from -env-ref.
5821
5822 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5823
5824         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5825         (h-pc): Delete.
5826         (hardware-builtin!): Delete h-pc builtin.
5827         * arm.cpu (h-pc): Define.
5828         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5829         * arm7.cpu (set-logical-cc-maybe): Delete.
5830         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5831         (data processing insns): Rewrite.
5832         * m32r.cpu (h-pc): Define.
5833         * fr30.cpu (h-pc): Define.
5834         * i960.cpu (h-pc): Define.
5835         * sparc.cpu (h-pc): Define.
5836
5837         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5838         (s-parallel): Replace do {...} while (0) with {...}.
5839         (s-sequence): Ditto.
5840
5841         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5842         consistent.
5843         (-gen-write-case,-gen-sem-case): Ditto.
5844         (-gen-sem-case): Only specify `written' if profiling or
5845         parallel-write-back.
5846         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5847         (-gen-sem-switch-fn): New proc.
5848         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5849         based on with-sem-switch option.
5850         * sid-decode.scm (-gen-decode-insn-globals): Only define
5851         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5852         addresses in idesc_table if !with-sem-switch.
5853         (-gen-sem-fn-decls): Rewrite.
5854         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5855         member based on with-sem-switch.  Only define
5856         `idesc_table_initialized_p' member if with-sem-switch.
5857         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5858         * sid.scm (-with-sem-switch?): New variable.
5859         (option-init!): Initialize it.
5860         (option-set!): Set it.
5861         (with-sem-switch?): New proc.
5862         (-op-gen-set-trace): Only emit `written' reference if profiling.
5863         (sim-finish!): Use h_pc_set to set pc.
5864
5865 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5866
5867         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5868         All callers updated.
5869         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5870
5871         * sid.scm (gen-argbuf-type): Delete.
5872         (-gen-argbuf-fields-union): Move to ...
5873         * sid-decode.scm: ... here.
5874
5875         * read.scm (-reader-process-expanded-1): New proc.
5876         (-reader-process-expanded): Call it to catch nested begin's.
5877         (reader-process): Move `begin' handling to -reader-process-expanded.
5878
5879         * insn.scm (-insn-read): Fix name of `format' spec.
5880
5881         * pmacros.scm (.pmacro): New builtin.
5882         (scan-symbol): If procedure macro, return macro rather than its symbol.
5883         (check-macro): Don't do lookup, instead check if (car expr) is
5884         macro object.
5885         (scan-list): Handle .pmacro.
5886         (scan): No longer re-examine text for another macro invocation.
5887         (-pmacro-build-lambda): New proc.
5888         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5889         another, fetch the other's value (rather than doing it during
5890         expansion).
5891
5892 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5893
5894         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5895         * Makefile.in: Rebuild.
5896
5897         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5898         (-fill-slot!): Simplify.
5899         (-build-slots): Simplify.
5900
5901         * dev.scm (load-sid): Don't load sid-arch.scm.
5902
5903         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5904         switch's.
5905         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5906         switch's.
5907
5908 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5909
5910         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5911         * decode.scm: ... here.  New file.
5912         * sid-decode.scm: Use decoder computation code in decode.scm.
5913         * read.scm: Load decode.scm.
5914
5915         * arm.cpu (arm710 model): Add u-exec function unit.
5916         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5917         Add get/set specs to redirect reg 15 to h-pc.
5918         (h-*): Indicate for both ARM and THUMB isas.
5919         (cbit,nbit,vbit,zbit): Ditto.
5920         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5921         (h-cpsr): Make virtual.  Add get/set specs.
5922         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5923         (h-spsr): New virtual reg.
5924         * arm7.cpu (shift-type): New explicitly defined keyword.
5925         (h-operand2-shifttype): Use it.
5926         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5927         All callers updated.  Don't set cbit.
5928         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5929         shift-type enum as case choices.  Set cbit.
5930         (and,orr,eor,add-imm): Uncomment out.
5931         (undefined): Temporarily comment out.
5932         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5933         (lda-pc,lda-sp): Ditto.
5934         (ldr-pc): Rename from ldr.
5935         (cbranch): Mark insns as being thumb insns.
5936
5937         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5938
5939         * cgen-sid.scm: Don't load sid-arch.scm.
5940         (sim-arguments): Delete unused entries.
5941         * sid-arch.scm: Delete.
5942
5943         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5944         (<insn>,ifld-assertions): New member.
5945         (<insn>,make!): New arg ifld-assertions, all callers updated.
5946         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5947         (insn:fields): Delete.
5948         (-insn-parse): New arg ifld-assertions.  All callers updated.
5949         (-insn-read,define-insn): New procs.
5950         (define-full-insn): New arg ifld-assertions.  All callers updated.
5951         (insn-init!): New comment define-insn.
5952
5953         * model.scm (-model-parse): Ensure at least one unit specified.
5954
5955         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5956         (<c-expr-temp>,get-name): New method.
5957         (-rtx-make-current-closure,s-closure): New proc.
5958         (hw:): Wrap rtx indices in a closure.
5959         (-gen-case-prefix): New proc.
5960         (s-case): Simplify.
5961         * rtx-funcs.scm (case:): Fix call to s-case.
5962         (closure): New rtx func.
5963
5964         * hardware.scm (<hardware-base>): New member isas-cache.
5965         (<hardware-base>,get-isas): New method.
5966         (hardware-builtin): Indicate for all isas.
5967         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5968         * mach.scm (current-arch-mach-name-list): Return list of names.
5969         (current-isa-mach-name-list): Ditto.
5970         (define-arch): Install builtin objects here.
5971         * read.scm (keep-atlist?): Only keep if both mach and isa are
5972         being kept.
5973         (keep-mach-atlist?): New proc.
5974         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5975         (reader-install-builtin!): Renamed from -install-builtin!.
5976         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5977         -gen-cpu-reg-access-defns.  Rewrite.
5978         (gen-reg-access-defn): Delete.
5979         (-gen-hardware-struct): New proc.
5980         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5981         (gen-semantic-fn,-gen-all-semantics): Delete.
5982         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5983         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5984         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5985         Call sem-analyze-insns!.
5986         (cgen-semantics.cxx): Add multiple-isa support.
5987         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5988         (-gen-scache-decls,-gen-decode-fn): Ditto.
5989         (cgen-decode.h): Call sem-analyze-insns!.
5990         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5991         * sid.scm (-with-multiple-isa?): New variable.
5992         (option-init!): Initialize it.
5993         (option-set!): Set it.
5994         (with-multiple-isa?): New proc.
5995         (gen-cpu-ref): New arg isas.  All callers updated.
5996         (gen-cpu-class): New proc.
5997         (*-get-macro,*-set-macro): Delete.
5998         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5999         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6000         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6001         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6002         (-sim-insns-analyzed): New global variable.
6003         (sim-init!): Reset it.
6004         (sim-analyze-insns!): New proc.
6005         (sim-analyze!): Don't do instruction analysis here.
6006         (sim-finish!): Specify isa of x-invalid insn.
6007         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6008
6009 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
6010
6011         * thumb.cpu (cpu,mach,model): Delete.
6012         (dntf): New pmacro.  Use it for all field definitions.
6013         (dntop): New pmacro.  Use it for all operand definitions.
6014         (asr): Correct field list.
6015         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6016
6017         * utils-cgen.scm (define-getters): New macro to simplify
6018         writing class accessors.
6019         (define-setters): Ditto.
6020         (sanitize): Recognize isa elements.
6021
6022         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6023         state-parallel-exec?.
6024         * sid-model.scm (*): Ditto.
6025         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6026         state-decode-assist.
6027
6028         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6029         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6030         * sim-decode.scm (-gen-decode-switch): Ditto.
6031
6032         * sim-arch.scm (-regs-for-access-fns): Delete.
6033         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6034         (-gen-arch-reg-access-defns): Delete.
6035
6036         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6037         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6038         with state-parallel=exec?.
6039         (cgen-*): Call sim-analyze-insns! here.
6040         * sim-decode.scm (cgen-*): Ditto.
6041         * sim-model.scm (cgen-*): Ditto.
6042         * sim.scm (-sim-insns-analyzed): New global variable.
6043         (sim-init!): Reset it.
6044         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6045         already done the analysis.
6046
6047         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6048         MACH struct.
6049
6050         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6051         (arm arch): Update isa spec.
6052         (arm,thumb isas): Define.
6053         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6054         (arm7tdmi mach): Add isa spec.
6055         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6056         `const' on word number.
6057         * fr30.cpu (fr30 arch): Update isa spec.
6058         (fr30 isa): Define.
6059         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6060         moved to isa spec.
6061         * i960.cpu (i960 arch): Update isa spec.
6062         (i960 isa): Define.
6063         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6064         liw-insns,parallel-insns moved to isas spec.
6065         * m32r.cpu (m32r arch): Update isas spec.
6066         (m32r isa): Define.
6067         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6068         liw-insns,parallel-insns moved to isa spec.
6069         * sparc.cpu (sparc arch): Update isas spec.
6070         (sparc isa): Define.
6071         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6072         decode-assist moved to isa spec.
6073         * sparc64.cpu (sparc64 cpu): Ditto.
6074         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6075         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6076         (-gen-mach-table-defns): Output mach table.
6077         (-gen-hash-defines): Delete insn size macros, except for
6078         CGEN_MAX_INSN_SIZE.
6079         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6080         (cgen-desc.h): Define MAX_ISAS.
6081         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6082         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6083         (arch-* accessors): Renamed from arch:*.  All callers updated.
6084         (current-arch-isa-name-list): New proc.
6085         (-arch-parse-isas): Renamed from -arch-parse-isa.
6086         (def-isa-attr!): Rewrite.
6087         (<iframe>): New class.
6088         (<itype>): New class.
6089         (<isa>): Rewrite.
6090         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6091         (isa-integral-insn?,isa-parallel-exec?): New procs.
6092         (-isa-parse,-isa-read,define-isa): New proc.
6093         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6094         liw-insns moved to <isa>.
6095         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6096         (-cpu-parse,-cpu-read): Update.
6097         (state-*): Renamed from state:*.  All callers updated.
6098         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6099         not cpu.
6100         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6101         (state-decode-assist): New proc.
6102         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6103         (-adata-set-derived!): Rewrite.
6104         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6105         callers updated.
6106         (arch-init!): Add define-isa command.
6107         * read.scm (<reader>): Default keep-isa member to (all).
6108         (reader-* accessors): Renamed from reader:*.  All callers updated.
6109         (-keep-isa-set!): Call string->symbol on isa name list.
6110         (keep-isa-validate!): Rewrite.
6111         (current-isa): New proc.
6112         (keep-isa?): Recognize "all".
6113         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6114         Call -keep-isa-set!.
6115         (cmd-if): Recognize keep-isa?.
6116         (cpu-load): New arg keep-isa.  All callers updated.
6117         (-opt-spec-update): New proc.
6118         (common-arguments): First arg is string, not symbol.
6119         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6120
6121         * rtl.scm (rtx-get): Default mode of string arg is INT.
6122
6123         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6124
6125         * rtx-funcs.scm (join:): Pass cpu to handler.
6126
6127         * configure.in (guile_include_dir): Delete.
6128         * configure: Rebuild.
6129         * Makefile.in: Rebuild.
6130         * doc/Makefile.in: Rebuild.
6131
6132         * sid-cpu.scm (-extract-chunk-specs): New proc.
6133         (gen-define-fields): Use it.
6134         (-extract-chunk): New proc.
6135         (-gen-extract-beyond-var-list): Use it.
6136         (gen-extract-fields): Simplify.
6137
6138 1999-03-22  Ben Elliston  <bje@cygnus.com>
6139
6140         * arm7.cpu (ldri-p): New instruction.
6141         (swi): Do not vector through 0x8 yet--there is nothing there.
6142         (addi): Reinstate.
6143         (movi): Likewise.
6144         (all): Use (const x) in subreg expressions.
6145
6146 1999-03-19  Ben Elliston  <bje@cygnus.com>
6147
6148         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6149         (smlal): Likewise.
6150
6151 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6152
6153         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6154         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6155         * sim-cpu.scm (-extract-chunk-specs): New proc.
6156         (gen-define-fields): Use it.
6157         (-extract-chunk): New proc.
6158         (-gen-extract-beyond-var-list): Use it.
6159         (gen-extract-fields): Simplify.
6160
6161         Port to guile 1.3.1.
6162         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6163         (LIBIBERTY): New var.
6164         (HOB_OBJS): Add cgen-gh.o.
6165         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6166         * Makefile.in: Rebuild.
6167         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6168         * config.in: Rebuild.
6169         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6170         libncurses, libtermcap.
6171         Add checks for needed functions in guile 1.2 not in guile 1.3,
6172         and vice versa.  Add test for 3 argument scm_make_vector.
6173         * configure: Rebuild.
6174         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6175         definitions if guile doesn't have them.
6176         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6177         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6178         with gh_vector_set_x.
6179         (cgh_qsort): Replace gh_list_length with gh_length.
6180         * cgen-gh.h: Add decls for added functions.
6181         (cgh_qsort): Don't declare if IN_HOBBIT.
6182         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6183         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6184         scm_make_vector with gh_make_vector.
6185         * cos.scm: Use vector-length instead of length on vectors.
6186         * dev.scm (cload): Make varargs proc with keyword/value args.
6187         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6188         provide version that works with guile 1.2 or 1.3.
6189         Include private copy of scmhob.h.
6190         * scmhob.h: New file.  Keep our own copy for now.
6191
6192 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6193
6194         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6195         plain text.
6196         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6197         (-cx-temp-dump-stack): Pretty up output.
6198
6199         * arm.cpu: comment out thumb.cpu until isa support ready.
6200         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6201         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6202         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6203
6204         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6205
6206 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6207
6208         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6209         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6210
6211         * operand (op:new-mode): Improve error message.
6212
6213         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6214         * arm7.cpu: New file.
6215
6216 1999-03-12  Ben Elliston  <bje@cygnus.com>
6217
6218         * arm.cpu: Lots of minor fixes after desk checking.
6219
6220 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6221
6222         * thumb.cpu: snapshot of current work
6223
6224         * rtl.scm (rtx-get): Tweak error message.
6225
6226 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6227
6228         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6229         * Makefile.in: Rebuild.
6230
6231         * cos.c (cos_vector_copy): New function.
6232         (_object_copy): Use it.
6233
6234         * mode.scm (mode:eq?): Clean up.
6235         * rtl.scm (cx-new-mode): Copy attributes.
6236         (rtx-get): Don't make copy if <c-expr> with identical mode.
6237
6238         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6239         add new isas spec.
6240         (gr-names): h-gr register names moved here.
6241         (h-gr): Update.
6242         (cr-names): h-cr register names moved here.
6243         (h-cr): update.
6244         (dr-names): h-dr register names moved here.
6245         (h-dr): update.
6246         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6247         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6248         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6249         add new isas spec.
6250         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6251         add new isas spec.
6252         (gr-names): h-gr register names moved here.
6253         (h-gr): Update.
6254         (cr-names): h-cr register names moved here.
6255         (h-cr): update.
6256         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6257         (h-accums,h-psw): Ditto.
6258         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6259         add new isas spec.
6260         (gr-names): h-gr register names moved here.
6261         (h-gr-indices): Delete.
6262         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6263         (sparc64 h-gr): Ditto.
6264         (h-y): Add get/set specs.
6265         (fp regs): Rewrite.
6266         (fp operands): Rewrite.
6267         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6268         (h-tbr,h-cwp,h-wim): Ditto.
6269         * sparc64.cpu (h-fpsr): Add get/set specs.
6270         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6271         (fp-ld-op): New arg `dest', all callers updated.
6272         (*): Replace `make-di' with `join'.
6273
6274         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6275         present.
6276         (gen-semantic-code): Save/restore rtl generator state.
6277         (cgen-cpu.h): Call rtl-gen-init!.
6278         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6279         (-gen-ifld-extract-beyond): Ditto.
6280         (<multi-ifield>,gen-ifld-extract): Ditto.
6281         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6282         `gstate'.
6283         (-hw-gen-set-quiet-pc): Ditto.
6284         (<hw-pc>,gen-write): Ditto.
6285         (-hw-cxmake-get): Ditto.  Call getter function if present.
6286         (<hw-register>,cxmake-get-raw): New method.
6287         (<hw-register>,gen-set-quiet-raw): New method.
6288         (-hw-gen-set-quiet): New arg `gstate'.
6289         (hw-fun-access?): Delete.
6290         (gen-reg-access-defn): Output function contents.
6291         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6292         invocation.
6293         (-gen-hw-index): Ditto.
6294         (op:read): Update gen-read invocation.
6295         (op:write): Update gen-write invocation.
6296         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6297         operands.
6298         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6299         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6300         (<unit>,gen-profile-code): Update to sim.scm version.
6301
6302         * sim-arch.scm (-regs-for-access-fns): New proc.
6303         (-biggest-reg-mode): New proc.
6304         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6305         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6306         virtual regs separately.
6307         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6308         get/set specs.
6309         (gen-semantic-code): Save/restore rtl generator state.
6310         (cgen-cpu.h): Call rtl-gen-init!.
6311         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6312         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6313         renamed to mach-bfd-name.
6314         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6315         (-gen-ifld-extract-beyond): Ditto.
6316         (<multi-ifield>,gen-ifld-extract): Ditto.
6317         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6318         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6319         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6320         `gstate'.
6321         (hw-fun-access?): Delete.
6322         (-hw-gen-set-quiet-pc): New arg `gstate'.
6323         (<hw-register>,gen-get-macro): Rewrite.
6324         (<hw-register>,gen-set-macro): Rewrite.
6325         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6326         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6327         (<hw-register>,cxmake-get-raw): New method.
6328         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6329         (<hw-register>,gen-set-quiet-raw): New method.
6330         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6331         invocation.
6332         (-gen-hw-index): Ditto.
6333         (<hw-index>): New arg `gstate'.
6334         (-gen-hw-selector): Update call to rtx-c.
6335         (<pc>): New arg `gstate'.
6336         (op:read): Update gen-read invocation.
6337         (op:write): Update gen-write invocation.
6338         (<operand>,cxmake-get): Handle raw-reg.
6339         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6340         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6341         (<operand>,gen-set-quiet): Handle raw-reg.
6342         (<operand>,gen-set-trace): Handle raw-reg.
6343         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6344
6345         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6346         cgen_operand_type enum.
6347         (gen-operand-table): Add operand type enum.  Replace pointer to
6348         hardware element with its enum.  Null terminate table.
6349         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6350         Build operand table.
6351         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6352         * mach.scm (<arch-data>): New member `isas'.
6353         (adata-isas): New accessor.
6354         (<isa>): New class.
6355         (isa-default-insn-word-bitsize): New accessor.
6356         (isa-enum): New proc.
6357         (current-arch-default-insn-word-bitsize): Delete.
6358         (current-isa-list,current-isa-lookup): New procs.
6359         (-arch-parse-isa): New proc.
6360         (-arch-parse): Rewrite.
6361         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6362         (define-arch): Define ISA attribute.
6363         (def-isa-attr!,isa-supports?): New procs.
6364         (<mach>): New member `isas'.
6365         (mach-isas): New accessor.
6366         (-mach-parse): New arg `isas', all callers updated.
6367         (-mach-read): Recognize `isas'.
6368         (arch-finish!): Rewrite.
6369         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6370         @arch@_cgen_get_{int,vma}_operand.
6371         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6372         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6373         of pointer to table entry.
6374         * opcodes.scm (gen-switch): Handle multiply defined operands.
6375         * operand.scm (op-sort): New proc.
6376
6377         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6378         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6379         (hw-enum): Accept symbol argument.
6380         (hardware-builtin!): Delete attribute FUN-ACCESS.
6381         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6382
6383         * attr.scm (atlist-source-form): New proc.
6384         (attr-builtin!): New attr `PRIVATE'.
6385         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6386         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6387         if they have `PRIVATE' attribute.
6388         (gen-hw-table-defns): Output definitions of explicitly defined
6389         keyword tables.
6390         * hardware.scm (<keyword>): New member print-name.  Rename member
6391         `value' to `values', all uses updated.
6392         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6393         (keyword-parse): Rewrite.
6394         (-keyword-read): New proc.
6395         (define-keyword): New proc.
6396         (-hw-parse-keyword): New proc.
6397         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6398         `extern-keyword'.
6399         (-hw-parse-values): Ditto.
6400         (-hw-parse-get,-hw-parse-set): Rewrite.
6401         (hardware-init!): Add new comment define-keyword.
6402         * mach.scm (<arch>): New member `kw-list'.
6403         (arch:kw-list,arch_set-kw-list!): New accessors.
6404         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6405
6406         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6407         * mode.scm (mode-class-integral?): New proc.
6408         (mode-class-float?,mode-class-numeric?): New procs.
6409         (mode-integral?,mode-float?,mode-numeric?): New procs.
6410         (mode-compatible?): New proc.
6411         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6412         rtx-c-with-alist.
6413         (<ifield>,gen-extract): Ditto.
6414         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6415         (<gstate>): New class.
6416         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6417         (gstate-context,gstate-set-context!): New accessors.
6418         (gstate-macro?,gstate-set-macro?!): New accessors.
6419         (gstate-make,gstate-copy): New procs.
6420         (-rtl-current-gstate): New global.
6421         (current-gstate-simulator?): New proc.
6422         (current-gstate-context,current-gstate-macro?): New procs.
6423         (current-gstate,current-gstate-set!): New procs.
6424         (rtl-gen-init!): Rewrite.
6425         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6426         (tstate-make): New arg `gstate', all callers updated.
6427         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6428         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6429         (tstate-gstate,tstate-set-gstate!): New accessors.
6430         (tstate-copy): New proc.
6431         (tstate-new-cond?,tstate-new-set?): Rewrite.
6432         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6433         (rtx-traverse): New arg `gstate', all callers updated.
6434         (rtx-strdump): New proc.
6435         (-simplify-for-compilation): New arg `gstate', all callers updated.
6436         (semantic-in-out-operands): Ditto.
6437         (semantic-attrs): Ditto.
6438         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6439         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6440         (rtx-value): Rewrite.
6441         (<c-expr>,gen-name): New method.
6442         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6443         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6444         (cx-new-mode): New proc.
6445         (-rtx-c-with-tstate): New proc.
6446         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6447         callers updated.
6448         (-rtx-mode): Rewrite.
6449         (-rtx-mode-compatible?): New proc.
6450         (<c-expr-temp>): New member `value'.
6451         (cx-temp:value): New accessor.
6452         (<c-expr-temp>,make!): Override default method.
6453         (<c-expr-temp>,cxmake-get): Rewrite.
6454         (<c-expr-temp>,gen-set-quiet): Rewrite.
6455         (<c-expr-temp>,gen-set-trace): Rewrite.
6456         (gen-temp-defs): Use cx-temp:value.
6457         (record-temp!): New arg value, all callers updated.
6458         (cx-temp:cx:make): Delete.
6459         (-cx-temp-dump-stack): New proc.
6460         (rtx-get): New arg `gstate', all callers updated.  Do mode
6461         compatibility checks.  Ensure result has specified mode.
6462         (rtx-set-quiet): New arg `gstate', all callers updated.
6463         (rtx-set-trace): Ditto.
6464         (s-c-call): New arg `tstate', all callers updated.
6465         (s-c-raw-call): Ditto.
6466         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6467         (s-cmpop,s-if,e-if): Ditto.
6468         (s-subreg): New proc.
6469         (-par-new-temp!): New proc.
6470         (-par-next-temp!): Rewrite.
6471         (-par-replace-set-dests): Use -par-new-temp!.
6472         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6473         (s-sequence): Use -rtx-c-with-state.
6474         * rtx-funcs.scm (*): Update.
6475         (raw-reg:): New rtx function.
6476         (make-di): Delete.
6477         (join:,subreg:): New rtx functions.
6478
6479         * insn.scm (<insn>): New members pre-cond-trap, condition,
6480         post-cond-trap, compiled-condition.
6481
6482         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6483
6484         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6485
6486         * utils-cgen.scm (parse-symbol): New proc.
6487         (parse-string): New proc.
6488         (gen-get-macro,gen-set-macro): New arg `index-args'.
6489         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6490         Prepend \ to newlines.
6491
6492         * utils.scm (alist-remove-duplicates): Delete.
6493
6494         * sid.scm (sim-init!): Delete private debugging code.
6495
6496 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6497
6498         * cgen-sid.scm: New file for C++ simulator application.
6499         * sid-arch.scm: Ditto.
6500         * sid-cpu.scm: Ditto.
6501         * sid-decode.scm: Ditto.
6502         * sid-model.scm: Ditto.
6503         * sid.scm: Ditto.
6504         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6505
6506 1999-03-05  Ben Elliston  <bje@cygnus.com>
6507
6508         * arm.cpu: New file.
6509
6510 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6511
6512         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6513         * Makefile.in: Rebuild.
6514
6515         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6516         (-attr-parse): Validate default value.
6517
6518         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6519         (-CGEN-LANG-VERSION): Ditto.
6520         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6521         (<reader>): New member keep-isa plus accessors.
6522         (-keep-isa-set!,keep-isa-validate!): New procs.
6523         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6524         (common-arguments): New variable.
6525         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6526         (-debug-repl,continue): New procs.
6527         (-cgen,cgen): New procs.
6528         * cgen-gas.scm: Rewrite.
6529         * cgen-opc.scm: Rewrite.
6530         * cgen-sim.scm: Rewrite.
6531         * cgen-stest.scm: Rewrite.
6532
6533         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6534         (gas-test-finish!): Call opcodes-finish!.
6535         (gas-test-analyze!): Call opcodes-analyze!.
6536         (<hw-asm>): New method test-data.
6537         (<operand>,testdata): Rewrite.
6538         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6539         (sim-test-finish!): Call opcodes-finish!.
6540         (sim-test-analyze!): Call opcodes-analyze!.
6541         (<hw-asm>): New method test-data.
6542         (<operand>,testdata): Rewrite.
6543
6544 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6545
6546         * fixup.scm (reverse!): Define if missing.
6547         * *.scm: Use reverse! instead of list-reverse!.
6548
6549         * utils.scm (leading-id-char?): New proc.
6550         (id-char?): Rewrite.
6551         (chars-until-delimiter): New proc.
6552         * opc-itab.scm (extract-syntax-operands): Rewrite.
6553         (strip-mnemonic): Rewrite.
6554         (compute-syntax): Rewrite.
6555
6556         * pmacros.scm (-pmacro-substr): New proc.
6557         (pmacros-init!): Add builtin .substr.
6558
6559 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6560
6561         * thumb.cpu: New file.
6562
6563 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6564
6565         * Makefile.am (CGENCFLAGS): New variable.
6566         (WITH_HOBBIT): Use automake conditional.
6567         (CGEN_HOB_SRC): New variable.
6568         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6569         (*.o): Compile with CGENCFLAGS.
6570         (cgen-hob.c): Simplify.
6571         (cgen-nohob.c): New rule.
6572         (hobbit): Renamed from hob.x.
6573         (CLEANFILES): Add cgen-nohob.c.
6574         * Makefile.in: Rebuild.
6575         * doc/Makefile.in: Rebuild.
6576         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6577         (WITH_HOBBIT): Use AM_CONDITIONAL.
6578         * configure: Rebuild.
6579         * aclocal.m4: Rebuild.
6580
6581         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6582         with string-write-map.
6583
6584         * sim-cpu.scm (hw-need-storage?): New proc.
6585         (-gen-hardware-types): Use it.
6586         (gen-parallel-exec-elm): Call op-save-index?.
6587
6588         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6589
6590         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6591         UNSIGNED attribute.
6592         (-gen-ifld-extract-beyond): Ditto.
6593         (<integer>): Delete all references.
6594         (<sim-hardware>): Delete.
6595         (hw-profilable?): New proc.
6596         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6597         (<hw-register>): Rename method get-index-mode to save-index?.
6598         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6599         (<hw-register>,gen-sym-decl): Make virtual.
6600         (<hw-memory>,gen-sym-decl): Make virtual.
6601         (<hw-memory>): Rename method get-index-mode to save-index?.
6602         (<hw-address>,gen-sym-decl): Make virtual.
6603         (<operand>): New method save-index?.
6604         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6605
6606         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6607         prefix added.  All uses updated.
6608
6609         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6610         rather than pointer to table entry.
6611
6612         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6613         Remove all hw-asm,op-asm support.
6614         (-gen-parse-number,-gen-parse-address): New procs.
6615         (<keyword>,gen-parse): Redo function name computation.
6616         (<keyword>,gen-print): Ditto.
6617         (<operand>,gen-function-name): Rewrite.
6618         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6619         (opcodes-init!): Delete call to add-parser!.
6620
6621         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6622         Define enum using hardware semantic name.
6623         (-gen-hw-decl,-gen-hw-defn): New procs.
6624         (gen-hw-table-decls): Use -gen-hw-decl.
6625         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6626         CGEN_HW_ENTRY structs.
6627         (gen-operand-table): Output hw's enum, not pointer to table entry.
6628         (-gen-cpu-open): Build table of selected hardware elements.
6629
6630         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6631         (<hardware> support): Delete.
6632         (<hw-asm>): Delete, moved to hardware.scm.
6633         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6634         (<hw-asm>,gen-table-entry): New method.
6635         (<hw-asm>,parse!): Delete.
6636         (<keyword>,gen-table-entry): New method.
6637         (<keyword>,parse!): Delete.
6638         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6639         for gen-decl,gen-defn,gen-ref,gen-init.
6640         (desc-init!): Don't create parser for operand asm specs.
6641
6642         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6643         * ifield.scm (<ifield>): New member `mode'.
6644         (<ifield>,make!): New arg `mode'.
6645         (ifld-mode): Rewrite.
6646         (ifld-hw-type): Rewrite.
6647         (<ifield>,min-value): Rewrite.
6648         (<ifield>,max-value): Rewrite.
6649         (-ifield-parse): New arg `mode'.
6650         (-ifield-read): Update.
6651         (define-full-ifield): New arg `mode'.
6652         (define-full-multi-ifield): Ditto.
6653         (-multi-ifield-parse): Ditto.
6654         (-multi-ifield-read): Update.
6655         (define-full-multi-ifield): New arg `mode'.
6656         (ifield-builtin!): Update definition of f-nil.
6657         * simplify.inc (define-normal-ifield): Update call to
6658         define-full-ifield.
6659         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6660         (define-normal-hardware): Delete arg asm.  New args indices, values,
6661         handlers.  Update call to define-full-hardware.
6662         (define-simple-hardware,dsh): New pmacros.
6663         (define-normal-operand): Update call to define-full-operand.
6664         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6665         Specify INT/UINT mode instead.
6666         (h-gr,h-cr): Use "indices" instead of "asm".
6667         (h-dr,h-ps): Update keyword syntax.
6668         (h-r13,h-r14,h-r15): Ditto.
6669         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6670         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6671         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6672         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6673         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6674         Specify INT/UINT mode instead.
6675         (h-gr): Use "indices" instead of "asm".
6676         (h-cc): Update keyword syntax.
6677         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6678         Specify INT/UINT mode instead.
6679         (h-hi16,h-slo16,h-ulo16): Update.
6680         (h-gr,h-cr): Use "indices" instead of "asm".
6681         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6682         (h-accums): Update keyword syntax.
6683         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6684         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6685         Specify INT/UINT mode instead.
6686         (h-gr-indices): New pmacro.
6687         (h-gr32,h-gr64): Split up from h-gr.
6688         (h-a): Update type spec.  Use values instead of asm spec.
6689         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6690         (h-y,h-annul-p): Ditto.
6691         (h-asr): Update keyword spec.
6692         (h-lo10,h-lo13,h-hi22): Update.
6693         (get-freg-spec,set-freg-spec): New pmacros.
6694         (h-fr32,h-fr64): Split up from h-fr.
6695         (rdd): Comment out get/set specs.
6696         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6697         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6698         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6699         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6700         UNSIGNED.  Specify INT/UINT mode instead.
6701         (h-*): Use dsh instead of dnh where appropriate.
6702         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6703         (h-p,h-membarmask): Ditto.
6704         (membarmask): Use "handlers" instead of "asm".
6705
6706         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6707         values,handlers,getters,setters plus accessors.
6708         (hw-mode-ok?,hw-default-mode): New procs.
6709         (<hardware-base>): Rename method new-mode to mode-ok?
6710         (<hardware-base>): New method get-index-mode.
6711         (hw-index-mode): New proc.
6712         (pc?): Delete, moved to operand.scm.
6713         (address?): New proc.
6714         (<hardware>): Delete.
6715         (<hw-asm>): Definition moved here from desc.scm.
6716         (keyword-parse): New proc.
6717         (hardware-parsers): Delete.
6718         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6719         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6720         (-hw-parse-get,-hw-parse-set): New procs.
6721         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6722         indices,values,handlers,get,set.  Rewrite.
6723         (-hw-read-extra): Delete.
6724         (-hw-read): Update.
6725         (define-hardware): Don't add object if not selected.
6726         (define-full-hardware): Ditto.
6727         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6728         (<hw-register>): Member `type' moved to baseclass.  Delete member
6729         hw-asm.
6730         (<hw-register>,parse!): Rewrite.
6731         (<hw-register>): Delete methods get-rank,get-mode.
6732         (<hw-register>): Method new-mode renamed to mode-ok?
6733         (<hw-register>): New method get-index-mode.
6734         (<hw-pc>,parse!): Rewrite.
6735         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6736         (<hw-memory>,parse!): Rewrite.
6737         (<hw-memory>): Delete methods get-rank,get-mode.
6738         (<hw-memory>): Method new-mode renamed to mode-ok?
6739         (<hw-memory>): New method get-index-mode.
6740         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6741         hw-asm.
6742         (<hw-immediate>,parse!): Rewrite.
6743         (<hw-immediate>): Delete methods get-rank,get-mode.
6744         (<hw-immediate>): Method new-mode renamed to mode-ok?
6745         (<hw-address>): Delete member hw-asm.
6746         (<hw-address>,parse!): Rewrite.
6747         (<hw-address>): Delete methods get-rank,get-mode.
6748         (<hw-address>): Method new-mode renamed to mode-ok?
6749         (hw-profilable?): Delete.
6750         (hardware-init!): Delete hardware-parsers reference.
6751         Update argument specs of command define-full-hardware.
6752         (hardware-builtin!): Update definitions of hardware builtins.
6753         * operand.scm (<operand>): New members hw-name,mode-name.
6754         Delete member op-asm.  New member handlers.
6755         (<operand>,make!): Update.
6756         (op:hw-name,op:mode-name,op:handlers): New procs.
6757         (op:type): Rewrite.
6758         (op:mode): Rewrite.
6759         (<operand>): New method get-index-mode.
6760         (<pc>,make!): Update.
6761         (op:new-mode): Rewrite.
6762         (operand-parsers): Delete.
6763         (-operand-parse): Rewrite.  Return #f if insn not selected.
6764         (-op-read-extra): Delete.
6765         (-operand-read): Update.
6766         (define-operand,define-full-operand): Update.
6767         (operand-init!): Delete operand-parsers reference.
6768         Update syntax of define-full-operand command.
6769
6770         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6771         (define-full-insn): Update.
6772         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6773         (define-full-minsn): Update.
6774
6775         * mode.scm (<mode>): New member class.
6776         (mode:class): New proc.
6777         (mode?): Rewrite.
6778         (-mode-parse): New arg class.
6779         (define-full-mode): Update.
6780         (mode-find): Rewrite.
6781         (mode-make-int,mode-make-uint): New procs.
6782         (mode-init!): Update syntax of define-full-mode command.
6783         (mode-builtin!): Update definitions of builtin modes.
6784
6785         * model.scm (<profile>): Delete.
6786
6787         * read.scm (keep-atlist?): New proc.
6788         (keep-multiple?): New proc.
6789         (<parser-list>): Delete.
6790         (add-parser!,parse-spec!): Delete.
6791
6792         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6793         (def-rtx-syntax-node): Ditto.
6794         (-rtx-traverse-debug?): New variable.
6795         (tstate-make): New proc.
6796         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6797         (tstate-new-cond?,tstate-new-set?): New procs.
6798         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6799         tstate.  All callers updated.
6800         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6801         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6802         (-build-operand!): Replace arg cond? with tstate.
6803         (-build-reg-operand!,-build-mem-operand!): Ditto.
6804         (-build-index-of-operand!): Update making of <operand> object.
6805         (s-ifield): New arg tstate.  All callers updated.
6806         (hw:): New arg tstate.  All callers updated.  Replace call to
6807         current-hw-lookup with current-hw-sem-lookup-1.
6808         (s-index-of): New arg tstate.  All callers updated.
6809         (reg:,mem:): Ditto.
6810         (-rtx-use-sem-fn?): New proc.
6811         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6812         semantic cover fns.
6813         (s-convop): Only use semantic mode when using semantic cover fns.
6814         (s-cmpop): Call -rtx-use-sem-fn?.
6815         (s-cond,s-case): New arg tstate.  All callers updated.
6816         (s-parallel,s-sequence): Ditto.
6817
6818         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6819
6820         * types.scm (<scalar>): Rewrite implementation.
6821         (<integer>): Delete.
6822         (parse-type): Rewrite.
6823
6824         * utils-cgen.scm (parse-handlers): New proc.
6825
6826         * utils.scm (!=): New proc.
6827
6828 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6829
6830         * pmacros.scm (-pmacro-expand): Fix typo.
6831
6832 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6833
6834         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6835         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6836         * i960.cpu (build-hex2): New pmacro.
6837         (insn-opcode): Simplify.
6838         (insn-opcode2): Ditto.
6839
6840         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6841         * cgen-stest.scm (catch-with-backtrace): Ditto.
6842
6843 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6844
6845         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6846         All callers updated.
6847         (-pmacro-invoke): New proc.
6848         (-pmacro-sym,-pmacro-str): New procs.
6849         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6850         (pmacros-init!): Install builtins .iota, .map, .apply.
6851         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6852         (h-fr): Simplify register name spec.
6853         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6854         * utils.scm (num-args-ok?): New proc.
6855
6856 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6857
6858         * pmacros.scm (-pmacro-error): New proc.
6859         (-pmacro-expand): Use it.
6860         (-pmacro-splice): New proc.
6861         (pmacros-init!): Install new builtin .splice.
6862
6863         * sparc.cpu: Include sparc64.cpu when appropriate.
6864         (f-mmask,f-simm11): Moved to sparc64.cpu.
6865         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6866         (ANNUL attribute): Delete.
6867         (test-* pmacros): New arg cc, all callers updated.
6868         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6869         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6870         atomic-opc.
6871         (ldstub,swap): Moved to sparccom.cpu.
6872         * sparc64.cpu: Add more insns.
6873
6874 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6875
6876         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6877         CGEN_ATTR_VALUE.
6878         (cgen-sem-switch.c): Ditto.
6879         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6880         moved to cgen-engine.h.
6881         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6882         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6883         global.  Cache attributes and insn length in IDESC.
6884         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6885         @cpu@_opcode renamed to @cpu@_get_idata.
6886         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6887         done later underneath sim_resume.
6888         (@mach@_mach): Record @cpu@_prepare_run.
6889         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6890         updated.
6891         (-hw-gen-set-quiet-pc): Ditto.
6892         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6893         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6894         (<hw-addr>,cxmake-get): Ditto.
6895         (<hw-iaddr>,cxmake-get): Ditto.
6896         (<pc>,cxmake-get): Ditto.
6897         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6898         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6899         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6900         (<hw-pc>,gen-write): Use hw-selector-default.
6901         (<hw-register>,gen-write): Ditto.
6902         (<hw-memory>,gen-write): Ditto.
6903         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6904         (-gen-hw-selector): New proc.
6905
6906         * desc.scm: New file.
6907         * desc-cpu.scm: New file.
6908         * opcodes.scm: Split up into several smaller files.
6909         * opc-asmdis.scm: New file.
6910         * opc-ibld.scm: New file.
6911         * opc-itab.scm: New file.
6912         * opc-opinst.scm: New file.
6913         * Makefile.am (desc): New target.
6914         (opcodes): Update args to cgen-opc.scm.
6915         * Makefile.in: Rebuild.
6916         * aclocal.m4: Rebuild.
6917         * config.in: Rebuild.
6918         * configure.in: Update arg to AC_INIT.
6919         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6920         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6921         AC_PROG_INSTALL.
6922         * configure: Rebuild.
6923         * cgen-gas.scm: Update files to load.
6924         * cgen-opc.scm: Ditto.  Reorganize option letters.
6925         * cgen-sim.scm: Update files to load.
6926         * cgen-stest.scm: Ditto.
6927         * dev.scm (cload): New app "DESC".
6928         (load-opc): Update files to load.
6929         (load-gtest,load-sim,load-stest): Ditto.
6930
6931         * attr.scm (bool-attr?): New proc.
6932         (attr-list-enum-list): New proc.
6933         (-attr-sort): Rewrite.
6934         (attr-builtin!): Give ALIAS attribute a fixed index.
6935         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6936         calculate attribute enum list.
6937         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6938
6939         * insn.scm (-insn-parse): Renamed from parse-insn.
6940
6941         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6942         (-hw-read): Ditto.
6943
6944         * mode.scm (-mode-parse): Renamed from parse-mode.
6945
6946         * operand.scm (<operand>): New member `selector'.
6947         (<operand>,make!): Use default selector.
6948         (hw-selector-default): New variable.
6949         (hw-selector-default?): New proc.
6950
6951         * pmacros.scm (pmacros-init!): New proc.
6952         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6953         (-env-set!): Delete.
6954         (-pmacro-expand): New proc apply-macro.
6955         Use it in scan-list,scan.  Scan list first, then see if macro
6956         invocation.
6957         (define-pmacro): Rewrite.
6958         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6959
6960         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6961         selected if (current-mach) seen.
6962         (rtx?): Renamed from rtx-uneval?, all callers updated.
6963         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6964         updated.
6965         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6966         selector, all callers updated.
6967         (hw:): New arg selector, all callers updated.  Delete old comments
6968         and code.
6969         (reg:,mem:): Handle selectors
6970         * rtx-funcs.scm (reg:): Handle selectors.
6971
6972         * read.scm: Renamed from cpu.scm.
6973         (<command>): New class.
6974         (<reader>): New member commands.
6975         (reader-add-command!): New proc.
6976         (reader-lookup-command): New proc.
6977         (reader-error,-reader-process-expanded,reader-process): New procs.
6978         (reader-read-file!): New proc.
6979         (include): Call reader-read-file!.
6980         (cmd-if): New proc.
6981         (cpu-load): Call reader-read-file!.
6982         * utils.scm (num-args): New proc.
6983         * simplify.inc: New file.
6984         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6985         procs.  Move define-normal-foo procs (and abbreviated forms) to
6986         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6987         routines.
6988         * fr30.cpu: Include simplify.inc.
6989         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6990         * i960.cpu: Include simplify.inc.
6991         * m32r.cpu: Include simplify.inc.
6992         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6993         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6994         * sparc.cpu: Include simplify.inc.
6995         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6996         * utils-cgen.scm (parse-error): Moved to read.scm.
6997         (sanitize): Rewrite.
6998         (utils-init!): New proc.
6999
7000 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
7001
7002         * sparc.cpu: New file.
7003         * sparc32.cpu: New file.
7004         * sparc64.cpu: New file.
7005         * sparccom.cpu: New file.
7006         * sparc.opc: New file.
7007
7008 1999-01-27  Frank Eigler  <fche@cygnus.com>
7009
7010         * utils.scm (gen-copyright): New proc.
7011
7012 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7013
7014         Parameterize rtl parsing, rather than having lots of little handlers.
7015         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7016         Delete member traverse.
7017         (rtx:set-traverse!): Delete.
7018         (-rtx-valid-types,-rtx-valid-matches): New variables.
7019         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7020         instead of expression.  All callers updated.
7021         (def-rtx-node): New args arg-types,arg-modes.
7022         (def-rtx-syntax-node): Ditto.
7023         (def-rtx-dual-mode): Ditto.
7024         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7025         All callers updated.
7026         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7027         All callers updated.
7028         (rtx-macro-expand): New proc.
7029         (-rtx-traverse-check-args): Delete.
7030         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7031         an rtx specific traverser.
7032         (-rtx-any-mode?,-rtx-symornum?): New procs.
7033         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7034         (-rtx-traverse-no-mode): Delete.
7035         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7036         (-rtx-traverse-operands): Rewrite.
7037         (-rtx-traverse-expr): Rewrite.
7038         (rtx-traverse): Don't expand macros here, leave for caller to do.
7039         (rtx-simplify): Delete.
7040         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7041         attributes.
7042         (rtx-true?,rtx-false?): Ditto.
7043         (-rtx-ref-type): Set dest is operand 1 now.
7044         (-simplify-for-compilation): New proc.
7045         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7046         Expand macros before calling rtx-traverse.  Sort operands by name
7047         to avoid unnecessary semantic formats.
7048         (semantic-attrs): New proc.
7049         (rtx-uneval?): Handle (<rtx-func> ...).
7050         (s-boolifop): Delete arg mode.  All callers updated.
7051         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7052         (eq-attr): New arg obj.
7053         (eq-attr:): Delete.
7054         * m32r.cpu (rach): Update calls to andif.
7055
7056         * minsn.scm (-minsn-parse-expansion): Renamed from
7057         parse-minsn-expansion.
7058         (-minsn-parse): Renamed from parse-minsn.
7059         (-minsn-read): Renamed from read-minsn.
7060         (def-minsn): Don't check APPLICATION here.
7061         (def-full-minsn): New proc.
7062         (define-macro-insn): Check APPLICATION here.  Expand macros.
7063         (define-normal-macro-insn): Ditto.
7064
7065         * utils.scm (word-value): New arg start-lsb?.
7066         (word-mask,word-extract): Ditto.
7067         (split-bits,powers-of-2): Use integer-expt instead of expt.
7068         (bit-set?): Handle 32 bit values (which are bignums).
7069         (cg-logand,cg-logxor): New functions.
7070         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7071         (<ifield>,field-value): Update call to word-value.
7072         (<ifield>,min-value): Use integer-expt instead of expt.
7073         (<ifield>,max-value): Ditto.
7074
7075         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7076
7077         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7078
7079         Compute raw instruction format in addition to semantic based format.
7080         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7081         (<iformat> accessors): Rename accessors to ifmt-*.
7082         (<sformat>): New class.
7083         (fmt-enum): Renamed from fmt:enum.
7084         (-ifmt-search-key): Rewrite.
7085         (-sfmt-search-key): New proc.
7086         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7087         Compute iformat and sformat search keys.
7088         (ifmt-build): Update.
7089         (sfmt-build): New proc.
7090         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7091         (ifmt-compute!): Compute instruction format <iformat> based on
7092         instruction fields alone.  Compute new semantic format <sformat>
7093         based on instruction fields and semantic information.
7094         (ifmt:lookup): Delete.
7095         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7096         (current-sfmt-list): New proc.
7097         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7098         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7099         (insn-length,insn-length-bytes): Update.
7100         (insn:mask-length,insn:mask): Update.
7101         (insn-lookup-op): Update.
7102         * gas-test.scm (gas-test-analyze!): Update.
7103         (gen-gas-test): Ditto.
7104         * sim-test.scm (sim-test-analyze!): Update.
7105         (gen-sim-test): Ditto.
7106         * opcodes.scm (gen-operand-instance-table): Update.
7107         (gen-operand-instance-ref): Ditto.
7108         (max-operand-instances): Use heuristic if semantics not parsed.
7109         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7110         (opcodes-analyze!): Only scan semantics of building operand instance
7111         tables.
7112         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7113         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7114         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7115         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7116         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7117         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7118         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7119
7120         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7121         New arg lsb0?  All callers updated.
7122         (decode-bits): New arg lsb0?.  All callers updated.
7123         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7124         of expt.
7125         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7126         (build-slots): Call integer-expt instead of expt.
7127         (build-decode-table-entry): Handle crossing word boundaries better.
7128         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7129         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7130
7131         * enum.scm (define-enum): Rewrite.
7132         (define-normal-enum): Ditto.
7133         (def-full-insn-enum): New proc.
7134         (define-normal-insn-enum): Rewrite.
7135
7136         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7137         valid C.
7138         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7139
7140         * dev.scm: Add sid support.
7141
7142         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7143         (CLEANFILES): Add tmp-*.
7144         * Makefile.in: Rebuild.
7145
7146         * doc/Makefile.am: New file.
7147         * doc/Makefile.in: New file.
7148         * doc/cgen.texi: New file.
7149         * Makefile.am (SUBDIRS): Define.
7150         * Makefile.in: Rebuild.
7151         * configure.in: Create doc/Makefile.
7152         * configure: Rebuild.
7153
7154 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7155
7156         * insn.scm (insn:syn): Delete.
7157
7158 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7159
7160         * fr30.cpu (model fr30-1): Add state variables load-regs,
7161         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7162         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7163         (model m32rx): Ditto.
7164         (addi): Simplify function unit usage spec.
7165         (ld-plus): Rewrite operand names in function unit usage spec.
7166         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7167         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7168         overridden.  Allow operand to appear in input and output spec.
7169         (<insn>,gen-profile-code): string-append -> string-list.
7170
7171         * ifield.scm (define-ifield): Call pmacro-expand.
7172         (define-full-ifield,define-normal-ifield): Ditto.
7173         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7174
7175         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7176         with-scache and without-scache cases.
7177
7178 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7179
7180         * fr30.cpu (fr30-1): Add state variable h-gr.
7181         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7182         (all insns): First pass at providing cycle counts.
7183         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7184         when initializing unit output operands, ditto for input operands.
7185
7186         * insn.scm (insn-length,insn-length-bytes): New procs.
7187         * mach.scm (-adata-set-derived!): Use them.
7188         * sim-cpu.scm (-gen-sem-case): Ditto.
7189
7190         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7191         (-gen-write-case): Ditto.
7192         (gen-semantic-fn): Ditto.  Split into two:
7193         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7194         in non-scache case.
7195         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7196         scache/no-scache appropriately.  All callers updated.
7197         (-gen-sem-case): PCADDR->IADDR.
7198         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7199
7200         * sim-decode.scm (*): Replace string-append,string-map with
7201         string-list,string-list-map where the result is sufficiently large.
7202         (-gen-decode-insn-table): Go back to simple version for non-scache
7203         case: just record IDESC in decoder tables and leave field extraction
7204         to the caller.
7205         (-gen-decode-switch): Ditto.
7206         (-gen-decode-fn): Ditto.
7207         (-gen-extract-decls): Only emit format enum if with-scache?.
7208         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7209         non-scache case.
7210         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7211         (-gen-insn-timing): Ditto.
7212         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7213         with-scache case.
7214
7215         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7216         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7217
7218 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7219
7220         * cpu.scm (keep-mach-validate!): New proc.
7221         (include): New proc.
7222
7223         * mach.scm (current-arch-mach-name-list): New proc.
7224         (-parse-arch-machs): Always return canonical form.
7225         (def-arch): Validate user specified machs to be kept.
7226         (def-mach-attr!): Simplify.
7227
7228         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7229         (option-init!): Initialize it.
7230         (option-set!): Set it.
7231         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7232         output operand instance tables.
7233         (cgen-opc.in): Only output operand instance tables if asked to.
7234
7235         * sim.scm (option-init!,option-set!): Clarify returned value.
7236
7237         * sim.scm (gen-mach-bfd-name): Move from here.
7238         * utils-cgen.scm: To here.
7239
7240 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7241
7242         * fr30.cpu (ilm): Fix comment field.
7243         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7244         compute it.
7245
7246         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7247         (rtx-true?, rtx-false?): New procs.
7248         * rtx-funcs.scm (annul): Rename vpc to pc.
7249         (-rtx-traverse-if): Improve determination of whether then/else parts
7250         are conditionally executed.
7251
7252         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7253         outer level.
7254         (gen-argbuf-type): Simplify generated definition (big sem_fields
7255         union moved outside).
7256
7257 1999-01-11  Ben Elliston  <bje@cygnus.com>
7258
7259         * doc/porting.texi: New file.
7260
7261         * doc/intro.texi: New file.
7262         (Layout): Use @example to insert preformatted ASCII text (such as
7263         diagrams). @code is inappropriate here.
7264
7265 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7266
7267         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7268
7269         * m32r.opc (print_hash): Cast dis_info.
7270
7271         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7272         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7273         get/set macros.
7274
7275 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7276
7277         * i960.cpu (f-br-disp): Remove RELOC attribute.
7278         (f-ctrl-disp): Ditto.
7279         (callx-disp): set-quiet -> set for (reg h-gr 2).
7280         (callx-indirect,callx-indirect-offset): Ditto.
7281
7282         * Makefile.am (gas-test): Fix dependencies.
7283         * Makefile.in: Rebuild.
7284         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7285         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7286         (gas-test-analyze!): Use syntax-break-out.
7287         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7288         (sim-test-analyze!): Use syntax-break-out.
7289         (cgen-build.sh): Use gen-file-name.
7290         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7291         * insn.scm (syntax-break-out): New proc.
7292         * utils.scm (gen-file-name): New proc.
7293
7294         * fixup.scm (nil,<?,<=?,>?): Delete.
7295
7296         * utils.scm (count-true): Rewrite.
7297
7298         * slib/sort.scm: Move sort.scm to slib directory.
7299         * cpu.scm: Update.
7300
7301         * iformat.scm (ifmt-compute!): Record empty format.
7302
7303         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7304         internal procs outside.  Handle expression register numbers.
7305         Handle index-of.
7306
7307         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7308
7309         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7310         every register.
7311         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7312         (gen-semantic-fn,-gen-sem-case): Ditto.
7313         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7314         (cgen-semantics.c): Ditto.
7315         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7316         (gen-ifmt-argvars-defns): New proc.
7317         (gen-ifmt-argvars-assigns): New proc.
7318         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7319         (-gen-decode-fn): Handle non-with-scache case.
7320         (cgen-decode.c): Define WANT_CPU to @cpu@.
7321         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7322         (cgen-model.c): Define WANT_CPU to @cpu@.
7323         * sim.scm (gen-ifld-extract-argvar): New proc.
7324         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7325         with FUN-ACCESS specified.
7326         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7327         (<hw-register>,gen-extract): New arg local?.
7328         (<hw-address>,gen-extract): Ditto.
7329         (-hw-cxmake-get): Handle non-with-scache case.
7330         (-hw-gen-set-quiet): Ditto.
7331         (<hw-address>,cxmake-get): Handle non-with-scache case.
7332         (gen-op-extract-argvar): New proc.
7333         (<operand>,gen-record-profile): Rewrite.
7334         (<operand>,gen-profile-code): Rewrite.
7335         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7336         (gen-argbuf-fields-union): New proc.
7337         (gen-argbuf-type): Use it.  Handle non-scache case.
7338
7339         * *.scm: class:foo procs renamed to class-foo.
7340         * attr.scm (<attribute>): New member `for'.
7341         (-attr-parse): New first value in list for default if
7342         none specified.
7343         (non-bool-attr-list,attr:add!): Delete.
7344         (def-attr): Use current-attr-add!.
7345         (atlist-attr-value-no-default): New proc.
7346         (attr-lookup-default): Handle boolean attributes.
7347         (gen-attr-enum): New proc.
7348         (-attr-remove-meta-attrs-alist): New proc.
7349         (attr-nub): New proc.
7350         (current-attr-list-for): New proc.
7351         (current-{ifld,hw,op,insn}-attr-list): New procs.
7352         (attr-builtin!): New proc.
7353         * cpu.scm (keep-obj?): Rewrite.
7354         (-init-parse-cpu!): Call arch-init!.
7355         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7356         (-finish-parse-cpu!): Call arch-finish!.
7357         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7358         (def-enum,def-full-enum): Use current-enum-add!.
7359         (gen-obj-list-enums): New proc.
7360         * hardware.scm (hw:add!,hw:lookup): Delete.
7361         (def-hardware,def-hardware-ext): Use current-hw-add!.
7362         (hw:std-attrs,hw:attr-list): Delete.
7363         (hardware-builtin!): Define builtin hardware attributes.
7364         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7365         (def-ifield,def-full-ifield): Use current-ifld-add!.
7366         (ifld:std-attrs,ifld:attr-list): Delete.
7367         (ifield-builtin!): New proc.
7368         * insn.scm (insn:add!,insn:lookup): Delete.
7369         (def-full-insn): Use current-insn-add!.
7370         (insn:std-attrs): Delete.
7371         (insn-builtin!): New proc.
7372         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7373         minsn-list.
7374         (<arch-data>): New member machs.
7375         (current-attr-list,current-enum-list): New procs.
7376         (current-op-list,current-minsn-list): New procs.
7377         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7378         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7379         Ditto.
7380         (-parse-arch-machs): New proc.
7381         (-arch-parse): New arg machs, all callers updated.
7382         (-arch-read): Handle machs spec.
7383         (def-arch): Define MACH attribute here.
7384         (mach-init!,mach-finish!): Not here.
7385         (cpu:add!,cpu:lookup): Delete.
7386         (def-cpu): Use current-cpu-add!.
7387         (<mach>): New member bfd-name.
7388         (-mach-parse): New arg bfd-name, all callers updated.
7389         (-mach-read): Handle bfd-name spec.
7390         (mach:add!,mach:lookup): Delete.
7391         (def-mach): Use current-mach-add!.
7392         (def-mach-attr!): New proc.
7393         (arch-init!): New proc.
7394         (arch-finish!): New proc.  Reverse all object lists here.
7395         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7396         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7397         (define-normal-macro-insn): Ignore minsn if mach not kept.
7398         * mode.scm (mode-builtin!): New proc.
7399         * model.scm (model:add!,model:lookup): Delete.
7400         (def-model): Use current-model-add!.
7401         * opcodes.scm (insn:attr-list): Delete.
7402         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7403         (gen-attr-table-defn): Emit value for default.
7404         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7405         (op:attr-list): Delete.
7406         (gen-operand-decls,gen-insn-decls): New proc.
7407         (compute-insn-attr-list): Delete.
7408         (cgen-opc.h): Reorganize and simplify.
7409         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7410         (def-operand,def-full-operand): Use current-op-add!.
7411         (op:std-attrs): Delete.
7412         (operand-enum): Delete.
7413         (operand-builtin!): Define builtin operand attrs.
7414         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7415         (gen-attr-enum-decl): Use gen-obj-list-enums.
7416         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7417         Rewrite.
7418         * fr30.cpu (define-arch): Add machs spec.
7419         (f-i4): SIGNED attribute -> !UNSIGNED.
7420         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7421         (HASH-PREFIX): Define operand attribute.
7422         (NOT-IN-DELAY-SLOT): Define insn attribute.
7423         * i960.cpu (define-arch): Add machs spec.
7424         * m32r.cpu (define-arch): Add machs spec.
7425         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7426         (HASH-PREFIX): Define operand attribute.
7427         (FILL-SLOT): Define insn attribute.
7428
7429 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7430
7431         * fr30.cpu (stilm): Correct mask for and operation.
7432
7433 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7434
7435         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7436         Replace START/EXIT with start/pass.
7437         (gen-sim-test): Delete ".text".
7438
7439 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7440
7441         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7442
7443 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7444
7445         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7446         (h-sbit): Make it FUN-ACCESS.
7447         (h-gr): Reorder so that general regs are always printed by number.
7448
7449 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7450
7451         * i960.cpu (flushreg): Use nop.
7452
7453 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7454
7455         * m32r.cpu (default-alignment): Specify.
7456         * mach.scm (<arch-data>): New member default-alignment.
7457         (adata:default-alignment): New proc.
7458         (current-arch-default-alignment): New proc.
7459         (-arch-parse): New arg default-alignment.
7460         (parse-alignment): New proc.
7461         (-arch-read): Handle default-alignment spec.
7462
7463         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7464
7465         * insn.scm (f-%): Delete.
7466         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7467         be readded if proved useful.
7468         (gen-extract-fields): Ditto.  Use gen-ifetch.
7469         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7470         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7471
7472 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7473
7474         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7475
7476 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7477
7478         * fr30.cpu: Remove stub macros.
7479         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7480         (div2): Don't use addc/subc.
7481
7482 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7483
7484         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7485         if opcodes.
7486
7487 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7488
7489         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7490
7491 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7492
7493         * cpu.scm (keep-all?): New proc.
7494         (assert-keep-all): Use it.
7495         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7496         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7497         Check for spelling errors.
7498
7499 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7500
7501         * rtl.scm (s-convop): Call -rtx-sem-mode.
7502
7503 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7504
7505         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7506         (-parse-hw-profile): Ditto.
7507         (<hw-register>, parse!): Return `void' result.
7508         (<hw-pc>, parse!): Ditto.
7509         (<hw-memory>, parse!): Ditto.
7510         (<hw-immediate>, parse!): Ditto.
7511         (<hw-address>, parse!): Ditto.
7512
7513         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7514         (-ifld-parse-encode-decode): New proc.
7515         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7516         (-multi-ifield-parse): Set encode/decode to #f.
7517         (ifld:decode-mode): New proc.
7518         * utils.scm (nub): Rewrite.
7519         * operand.scm (op-nub): Rewrite.
7520         * sim.scm (<ifield>, gen-type): Rewrite.
7521         (-gen-ifld-argbuf-defn): New proc.
7522         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7523         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7524         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7525         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7526         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7527         New method gen-trace-extract.
7528         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7529         from gen-argbuf-elm, return "" if not caching register address.
7530         Rewrite gen-extract.  New method gen-trace-extract.
7531         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7532         gen-extract, gen-trace-extract, cxmake-get.
7533         (<hw-iaddress>): New method cxmake-get.
7534         (op-needed-iflds): New proc.
7535         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7536         (-gen-op-argbuf-defn): New proc.
7537         (gen-op-extract): Renamed from op:extract.
7538         (gen-op-trace-extract): Renamed from op:trace-extract.
7539         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7540         and rewritten.
7541         (gen-argbuf-elm): Rewrite.
7542         * sim-decode.scm (-gen-record-args): Update.
7543
7544         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7545
7546         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7547         argument position.  Flag symbolic macros in function position as
7548         an error.
7549         (define-pmacro): Handle quoting in definition of symbolic macros.
7550         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7551
7552 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7553
7554         * fr30.opc (parse_register_list): Account for reverse masks
7555         for load and store.
7556         (print_register_list): Ditto.
7557         (parse_low_register_list_ld): New function.
7558         (parse_hi_register_list_ld): New function.
7559         (parse_low_register_list_st): New function.
7560         (parse_hi_register_list_st): New function.
7561         (print_hi_register_list_ld): New function.
7562         (print_hi_register_list_st): New function.
7563         (print_low_register_list_ld): New function.
7564         (print_low_register_list_st): New function.
7565         * fr30.cpu (ldr15dr): Implement workaround.
7566         (ldm0,ldm1,stm0,stm1): Implemented.
7567
7568 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7569
7570         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7571         * configure: Regenerate.
7572         * Makefile.am (WITH_HOBBIT): Update.
7573         (cgen-hob.c): Remove Makefile dependency.
7574         (cgen.o): Depend on cgen-gh.h, config.h.
7575         * Makefile.in: Regenerate.
7576         * aclocal.m4: Regenerate.
7577
7578 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7579
7580         * i960.cpu, i960.opc: New files.
7581
7582 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7583
7584         * fr30.opc (parse_register_number): New function.
7585         (parse_register_list): New function.
7586         (parse_low_register_list): Use parse_register_list.
7587         (parse_hi_register_list): Use parse_register_list.
7588         * fr30.cpu (sth): Fix assembler syntax. Implement more
7589         insns.
7590
7591 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7592
7593         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7594         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7595         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7596         (-op-gen-set-trace-parallel): Ditto.
7597         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7598
7599         * fr30.cpu (call,calld): Fix setting of pc.
7600         (f-op5): Fix start bit number.
7601
7602 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7603
7604         * fr30.cpu (st): Fix operand ordering. Implement more
7605         insns.
7606
7607 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7608
7609         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7610         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7611         (fmt-semantic-operands): Move to sim.scm.
7612         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7613         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7614         (<hw-index>): New method get-name.
7615         (op-profilable?): Moved to sim.scm.
7616         (op-nub): New proc.
7617         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7618         (op-profilable?): Moved here from operand.scm.
7619         (gen-extract-type): Delete.
7620         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7621         (-gen-argfld-ref): New proc.
7622         (-gen-ifld-argfld-name): New proc.
7623         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7624         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7625         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7626         (<hardware-base>): Delete method gen-extract-type.  New method
7627         gen-argbuf-elm.
7628         (<hw-register): Ditto.  Update method gen-extract.
7629         (<operand>, method gen-argbuf-elm): Rewrite.
7630         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7631         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7632         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7633
7634         * sim-decode.scm (-gen-record-args): Tweak.
7635
7636         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7637
7638 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7639
7640         * doc/porting: Fix typo: gas->sim.
7641         * fr30.opc (print_m4): New function.
7642         * fr30.cpu: Implemented many insns.
7643
7644 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7645
7646         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7647
7648         * fr30.cpu (f-rel9): Delete RELOC attribute.
7649         (f-rel12): Add PCREL-ADDR attribute.
7650         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7651         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7652         * fr30.opc (print_label9): Delete.
7653
7654         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7655         code for CTI indicators.
7656         * insn.scm (insn-cti?): Simplify.
7657         * utils-cgen.scm (atlist:cti?): New proc.
7658
7659 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7660
7661         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7662         (f-i20-4,f-i20-16,f-i20): New fields.
7663         (i20): New operand.
7664         (ldi8): Implement.
7665         (ldi20): New insn.
7666         (ldi32m): Delete.
7667         (jmpd): Implement.
7668         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7669         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7670         * mach.scm (arch-data): Ditto.
7671         (current-arch-default-insn-word-bitsize): Renamed from
7672         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7673         (-arch-read): Update.
7674
7675         * hardware.scm (hw:attr-list): Move here ...
7676         * opcodes.scm: ... from here.
7677
7678         * ifield.scm (fld:bitrange): Delete.
7679         (fld:word-offset,fld:word-length): New procs.
7680         (ifield?): Use class-instance.
7681         (<ifield>, method field-start): Rewrite.
7682         (ifld:enum): New proc.
7683         (<ifield>, methods field-mask,field-value): Rewrite.
7684         (-ifield-parse): Rewrite.
7685         (<multi-ifield> support): Rewrite.
7686         (ifld-beyond-base?): Rewrite.
7687         (ifld:std-attrs): New variable.
7688         (ifld:attr-list): New proc.
7689         * iformat.scm (-compute-insn-mask): Rewrite.
7690         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7691         Simplify.
7692         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7693         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7694         onto type.
7695         (<operand>): Ditto.  Forward onto index instead.
7696         (gen-ifld-decls,gen-ifld-defns): New procs.
7697         (ifld:insert,ifld:extract): New procs.
7698         (<ifield>): New methods gen-insert, gen-extract.
7699         (<multi-ifield>): Ditto.
7700         (<hw-index>): Forward gen-insert,gen-extract onto value.
7701         (<hw-asm>): Delete insert/extract support.
7702         (<hw-register,hw-memory,hw-immediate>): Ditto.
7703         (gen-hash-defines): Use string-list.
7704         Define CGEN_MAX_IFMT_OPERANDS.
7705         (gen-switch): Use string-list,string-list-map.
7706         (gen-fget-switch,gen-fset-switch): Use string-list.
7707         (gen-parse-switch,gen-insert-switch): Ditto.
7708         (gen-extract-switch,gen-print-switch): Ditto.
7709         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7710         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7711         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7712         (gen-ivalue-entry): New proc.
7713         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7714         computation.  Use 0 for operand ref table if ALIAS insn.
7715         (gen-minsn-table-entry): Use string-list.
7716         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7717         (gen-opcode-open): Record address of ifield table.
7718         (cgen-opc.h): Call gen-ifld-decls.
7719         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7720         * types.scm (<bitrange>): New members word-offset,word-length.
7721         Delete member total-length.  Delete methods start,mask,value.
7722         (bitrange:word-offset,bitrange:word-length): New procs.
7723         * sim-cpu.scm (gen-define-fields): Simplify.
7724         (gen-extract-fields): Simplify.
7725         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7726         (<ifield>): New methods gen-ifld-extract-decl.
7727         Delete method gen-ifld-extract-beyond.
7728         (<multi-ifield>): New methods gen-ifld-extract-decl.
7729         (<multi-ifield>, method gen-ifld-extract): Implement.
7730         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7731         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7732
7733         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7734         (-rtx-traverse-syntax-no-mode): New proc.
7735         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7736         (s-ifield): New proc.
7737         (s-shop): Don't prepend `unsigned' for unsigned modes.
7738         * rtx-funcs.scm (ifield): New rtx function.
7739         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7740         (delay): New rtx function.
7741         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7742
7743         * cos.scm (-elm-make-method-getter): Fix typo.
7744
7745         * utils.scm (backslash): Handle lists of strings.
7746
7747 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7748
7749         * fr30.cpu (f-rel9): Correct for pc+2.
7750         (label9): Use print_label9.
7751         * fr30.opc (print_label9): New function.
7752
7753 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7754
7755         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7756         * fr30.opc (parse_low_register_list): Renamed.
7757         (parse_hi_register_list): Renamed.
7758         (print_hi_register_list): Renamed.
7759         (print_low_register_list): Renamed.
7760
7761 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7762
7763         * fr30.cpu (f-rel9): Now a pc relative offset.
7764
7765 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7766
7767         * opcodes.scm (op-asm): Move to here, from operands.scm.
7768         (<op-asm>, method parse!): Validate arguments.
7769         (<operand>, method gen-function-name): Fix thinko.
7770         * operand.scm (<operand>, method make!): Don't set op-asm here.
7771         * utils.scm (list-elements-ok?): New proc.
7772
7773         * opcodes.scm: Clean up pass.
7774
7775 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7776
7777         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7778         the fr30_int function.
7779         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7780         (h-dr): Add FUN-ACCESS attribute.
7781
7782 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7783
7784         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7785         for C symbol for models array.
7786
7787 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7788
7789         * fr30.opc (parse_reglist_low): New function.
7790         (parse_reglist_hi): New function.
7791         (print_reglist_low): New function.
7792         (print_reglist_hi): New function.
7793         * fr30.cpu: Finish remaining insn stubs.
7794
7795 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7796
7797         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7798
7799         * fr30.cpu (ldi32m): Don't use for disassembly.
7800
7801 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7802
7803         * fr30.cpu (int): Implement it.
7804
7805 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7806
7807         * rtx-funcs.scm (nop): Fix C code.
7808
7809         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7810
7811         * fr30.cpu (f-i32): New ifield.
7812         (i32): New operand.
7813         (ldi32): New insn.
7814         (ldi32m): New macro insn.
7815         (inte): Provide simple version for now.
7816
7817         * sim-arch.scm: New file.
7818         * sim.scm: Move architecture support generation to sim-arch.scm.
7819         * cgen-sim.scm: Load sim-arch.scm.
7820         * dev.scm: Ditto.
7821
7822         * hardware.scm (pc?) New proc.
7823         (class <hardware-base>): Rewrite method 'pc?.
7824         (class <hardware>): Forward 'pc? to the hardware type.
7825         (class <hw-pc>): New method 'pc?.
7826
7827         Add support for variable length ISAs.
7828         * ifield.scm (ifld-beyond-base?): New proc.
7829         * m32r.cpu: Remove integral-insn? spec.
7830         * mach.scm (arch:derived,arch:set-derived!): New procs.
7831         (arch:app-data,arch:set-app-data!): New procs.
7832         (class <arch>): New members derived, app-data.
7833         (class <cpu>): Delete member integral-insn?.
7834         (cpu:integral-insn?): Delete.
7835         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7836         (-cpu-read): Delete integral-insn? support.
7837         (state:decode-assist): Delete.
7838         (state:int-insn?): Delete.
7839         (<derived-arch-data>): New class.
7840         (-adata-set-derived!): New proc.
7841         (mach-finish!): Call it.
7842         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7843         (gen-operand-instance): Add COND_REF support.
7844         (gen-operand-instance-table): Ditto.
7845         (gen-hash-defines): Update.
7846         (gen-extract-switch): Update type of `insn_value' arg.
7847         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7848         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7849         updated.
7850         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7851         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7852         beyond the base insn (for large insns).
7853         (-gen-extract-beyond-var-list): New proc.
7854         (gen-extract-fields): Handle large insns.
7855         (-gen-write-case): Update sem_arg computation.
7856         Update initial vpc computation.
7857         (gen-semantic-fn): Ditto.  Update type of `insn'.
7858         (-gen-sem-case): Update sem_arg computation.
7859         Update initial vpc computation.
7860         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7861         (-gen-extract-word): New proc.
7862         (<ifield>): New method gen-ifld-extract-beyond.
7863         (gen-ifld-extract-beyond): New proc.
7864         * types.scm (bitrange-overlap?): New proc.
7865
7866         * utils.scm (bits->bytes): New proc.
7867         (bytes->bits): New proc.
7868
7869         Move extraction support into decoder.
7870         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7871         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7872         support to sim-decode.scm.
7873         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7874         be array of IDESC,FMT entries.  Make the array const.
7875         (-gen-gcc-label-table): Make array const.
7876         (-gen-decode-switch): Branch to extraction code after insn has been
7877         identified.
7878         (-gen-decode-insn-globals): Delete extract handler from
7879         @cpu@_insn_sem.
7880         (gen-decode-fn): Add extraction support.
7881         (-gen-sem-fn-decls): Delete extraction fn decls.
7882         (-gen-idesc-decls): Update @cpu@_decode decl.
7883         (-gen-idesc-init-fn): Delete extraction support.
7884         (-gen-extract-decls): New proc.
7885
7886         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7887         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7888
7889         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7890         All callers updated.
7891         (table-entry:make): Record insn value as insn object, not name.
7892         All uses updated.
7893
7894         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7895         collision with C function.
7896         (path_dirname): Similarily.
7897         * hobbit.c,hobbit.h: Rebuild.
7898
7899 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7900
7901         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7902
7903 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7904
7905         * fr30.cpu: Implement more instruction stubs.
7906
7907 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7908
7909         * fr30.cpu: Implement more instruction stubs.
7910
7911 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7912
7913         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7914
7915         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7916
7917         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7918         (op:std-attrs): Ditto.
7919         * opcodes.scm (gen-operand-instance): Ditto.
7920         (gen-switch): Ditto.
7921         * m32r.cpu (condbit,accum): Update.
7922         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7923
7924 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7925
7926         * enum.scm (-enum-read): Fix typo.
7927
7928         * iformat.scm (-ifmt-search-key): Simplify a little.
7929
7930 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7931
7932         * doc/porting: semantics.c -> sem.c.
7933         * Makefile.in: Regenerate.
7934         * fr30.cpu (add): Change ADD to add. Add more registers and set
7935         status bits on 'add' instruction.
7936
7937 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7938
7939         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7940         of 0.
7941
7942 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7943
7944         * minsn.scm (minsn:enum): Update, call current-arch-name.
7945
7946         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7947
7948         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7949         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7950         (ARCH,CGEN,CGENFLAGS): New variables.
7951         (gas-test,sim-test): New rules.
7952         * Makefile.in: Rebuild.
7953         * configure.in (arch): Define.
7954         * configure: Rebuild.
7955
7956         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7957         * All .scm files: Ditto.
7958
7959         * dev.scm: Fix gas-test call to cpu-load.
7960         * gas-test.scm: Clean up pass to remove bit-rot.
7961         * sim-test.scm: Ditto.
7962
7963         * enum.scm (read-enum): Fix typo in `vals' handling.
7964
7965         * hardware.scm (-parse-hw-type): Fix typo.
7966         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7967         (def-hardware,define-normal-hardware): Ditto.
7968
7969         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7970         (display-var): Use it.
7971         * hobbit.c: Rebuild.
7972         * hobbit.h: Rebuild.
7973
7974         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7975         avoid hobbit problem.
7976         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7977         `parallel-insns-' to avoid hobbit problem.
7978
7979 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7980
7981         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7982         (parse_slo16,parse_ulo16): Ditto.
7983         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7984
7985 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7986
7987         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7988         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7989         * Makefile.in: Rebuild.
7990         * insn.scm (define-normal-insn): Expand pmacros.
7991         * mode.scm (<mode>): New member `host?'.  All uses updated.
7992         (mode:host?): New proc.
7993         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7994         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7995         (define-rtx-dual-mode): Ditto.
7996         (s-index-of): New proc.
7997         (s-unop): Use plain C for host mode operations.
7998         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7999         * rtx-funcs.scm (index-of): New rtx function.
8000         * sim.scm (<hw-index>): New method cxmake-get.
8001
8002 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
8003
8004         * sim-cpu.scm (-gen-engine-decls): Delete.
8005
8006 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
8007
8008         * doc/rtl (Example): Correct Typo.
8009         * doc/porting: Add 'make dep' step to opcodes port instructions.
8010         * fr30.opc: New file.
8011         * fr30.cpu: New file.
8012
8013 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8014
8015         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8016         * Makefile.am (GUILEINCDIR): New variable.
8017         (INCLUDES): Use it.
8018         * configure: Regenerate.
8019         * Makefile.in: Ditto.
8020         * aclocal.m4: Ditto.
8021
8022 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8023
8024         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8025         (cgen-semantics.c): Ditto.
8026         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8027         * sim-model.scm (cgen-model.c): Ditto.
8028         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8029         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8030
8031         * opcodes.scm (read-cpu.opc): Handle empty file.
8032
8033         * cos.scm (-elm-make-method-setter): Fix typo.
8034
8035         * cpu.scm (-init-parse-cpu!): Call types-init!.
8036         (-finish-parse-cpu!): Call types-finish!.
8037         * ifield.scm (<ifield>): Delete members start,length.
8038         New member bitrange.
8039         (<ifield>, methods field-start,field-length): Update.
8040         (fld:start): New arg insn-len.  All callers updated.
8041         (<ifield>, methods field-mask,field-value): Update.
8042         (-ifield-parse): Update.
8043         (ifield-init!): Update.
8044         * iformat.scm (compute-insn-length): Simplify.
8045         (compute-insn-mask): Update.
8046         * insn.scm (insn:value): Update.
8047         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8048         (current-arch-default-insn-bitsize): New proc.
8049         (current-arch-insn-lsb0?): New proc.
8050         (-arch-parse,-arch-read): Update.
8051         (<cpu>): New member file-transform.
8052         (-cpu-parse,-cpu-read): Update.
8053         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8054         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8055         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8056         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8057         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8058         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8059         * operand.scm (op:start): Update call to field-start method.
8060         * sim-decode.scm (opcode-slots): New arg lsb0?.
8061         (fill-slot!,build-slots): Ditto.
8062         (build-decode-table-entry,build-decode-table-guts): Ditto.
8063         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8064         (gen-decode-fn): Ditto.
8065         (cgen-decode.c): Update call to gen-decode-fn.
8066         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8067         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8068         (cgen-cpuall.h): Call -gen-cpuall-includes.
8069         * types.scm (<bitrange>): New class.
8070         (types-init!,types-finish!): New procs.
8071         * utils-cgen.scm (parse-number): New proc.
8072         (parse-boolean): New proc.
8073         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8074         (word-mask): Rewrite.
8075         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8076         (m32rxf): New field `file-transform'.
8077         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8078
8079         * hobbit.h: Fix include file name.
8080
8081 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8082
8083         * slib: New directory of slib files used by cgen/hobbit.
8084         * hobbit.scm: New file.
8085         * hobbit.c: New file.
8086         * hobbit.h: New file.
8087         * hobscmif.h: New file.
8088         * hob-main.c: New file.
8089         * hobslib.scm: New file.
8090         * hob.sh: New file.
8091         * Makefile.am: Add support for compiling hobbit, and using compiled
8092         version of hobbit to compile cgen.
8093         * Makefile.in: Regenerate.
8094         * configure.in: Support --with-hobbit.
8095         * configure: Regenerate.
8096         * acconfig.h (WITH_HOBBIT): Add.
8097         * config.in: Regenerate.
8098
8099         * rtl.scm: New file, was cdl-c.scm.
8100         Definition of rtx funcs moved to rtx-funcs.scm.
8101         (semantic-in-out-operands): Rewrite to compute object form of
8102         semantic code.
8103         * rtx-funcs.scm: New file.
8104
8105         * cgen-gh.c: #include "config.h".
8106         (gh_cadddr,gh_cddddr): New fns.
8107         (cgh_vector_to_list): New fn.
8108         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8109         (cgh_init): Prefix qsort procs with "cgh-".
8110         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8111         * cgen.c: #include "config.h".
8112
8113         * attr.scm (bitset-attr?): New proc.
8114         (<bitset-attribute>, method parse-value): Value syntax changed from
8115         (val1 val2 ...) to val1,val2,....
8116         (<bitset-attribute>): New method gen-value.
8117         (<integer-attribute>): New method gen-value.
8118         (<enum-attribute>): New method gen-value.
8119         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8120         (<reader>): New class.
8121         (CURRENT-ARCH,CURRENT-READER): New globals.
8122         (keep-mach?): Move here from mach.scm.
8123         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8124         (<arch>): New class.
8125         (<arch-data>): New class.
8126         (<cpu>): Make subclass of <ident>.
8127         (*ENDIAN* variables): Delete.
8128         (process-state-vars): Delete.
8129         (mach-finish!): Add `base' value to MACH attribute.
8130         * hardware.scm (<hardware>): Make subclass of <ident>.
8131         (hw:std-attrs): New global.
8132         (hw-profilable?): New proc.
8133         * ifield.scm (<ifield>): Make subclass of <ident>.
8134         (sort-ifield-list): Move here from iformat.scm.
8135         * iformat.scm (<iformat>): Renamed from <insn-format>.
8136         Make subclass of <ident>.
8137         (-ifmt-search-key): Include cti? in categorization of formats.
8138         (ifmt-analyze): Compile semantics (turn to object form).
8139         * insn.scm (<insn>): Make subclass of <ident>.
8140         New member compiled-semantics.
8141         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8142         * mode.scm (<mode>): Make subclass of <ident>.
8143         (UBI): Delete.
8144         * model.scm (<unit>): Make subclass of <ident>.
8145         New members inputs,outputs.
8146         (<model>): Make subclass of <ident>.  New member state.
8147         (-unit-parse): Parse inputs,outputs.
8148         (<iunit>): New class.
8149         (-insn-timing-parse-model): New proc.
8150         (parse-insn-timing): Function unit spec rewritten.
8151         * operand.scm (<operand>): Make subclass of <ident>.
8152         New members sem-name,num,cond?  New method gen-pretty-name.
8153         (hw-index-scalar): New global.
8154         (op-nub-hw): Move here from rtl.scm.
8155         (op:lookup-sem-name,op-profilable?): New procs.
8156         * pmacros.scm: Rewrite to pass through hobbit.
8157         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8158         * utils.scm (logit): Make a macro.
8159         (bit-set?): Rewrite.
8160         (high-part): Rewrite.
8161
8162         * m32r.cpu (define-arch): Move to top of file.
8163         (cpu family m32rbf): Renamed from m32rb.
8164         (model m32r/d): Function unit spec rewritten.
8165         (all insns): Ditto.  Replace UBI with BI.
8166
8167         * opcodes.scm (gen-attr-table-decls): Declare
8168         @arch@_cgen_hw_attr_table.
8169         (gen-attr-table-defns): Generate hw attribute table.
8170
8171         * sim-cpu.scm (-gen-engine-decls): New proc.
8172         (-gen-model-decls): New proc.
8173         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8174         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8175         (-gen-record-profile-args): Simplify.
8176         (-gen-parallel-sem-case): Delete.
8177         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8178         New local `written'.  Delete profiling code.
8179         (-gen-sem-case): Ditto.
8180         (-uncond-written-mask,-any-cond-written?): New procs.
8181         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8182         parallelly or serially, and write-back handlers for all parallel insns.
8183         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8184         support to initialization of struct insn_sem.
8185         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8186         (-gen-insn-sem-type): Add parallel write-back support to struct
8187         insn_sem.
8188         (-gen-idesc-init-fn): Add support for virtual insns.
8189         Add parallel write-back support.
8190         * sim-model.scm (gen-model-profile-fn): Delete
8191         (-gen-model-fn-decls): New proc.
8192         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8193         (-gen-model-init-fn): New proc.
8194         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8195         members in @mach@_init_cpu.
8196         (cgen-model.c): Generate model handlers for each insn.
8197         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8198         (<hw-pc>): New method gen-write.
8199         (<hw-register>, method gen-write): New arg `mode'.
8200         (<hw-register>): Delete method gen-record-profile!.
8201         New method gen-profile-index-type.
8202         (<hw-memory>, method gen-write): New arg `mode'.
8203         (<hw-address>, method gen-extract): Delete.
8204         (<hw-address>, method gen-write): New arg `mode'.
8205         (<hw-index>, method get-write-index): Rewrite.
8206         (<pc>, method cxmake-get-direct): Delete.
8207         (<pc>): New method cxmake-get.  Comment out methods
8208         gen-set-quiet,gen-set-trace.
8209         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8210         gen-profile-index-type,gen-profile-code.
8211         Delete method gen-pretty-name.  Rewrite method gen-write.
8212         Delete method cxmake-get-direct.
8213         (-op-gen-set-trace): Update `written'.
8214         (-op-gen-set-trace-parallel): Ditto.
8215         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8216         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8217         insns and their write-back handlers.
8218         (insn-op-lookup): New proc.
8219         (<unit>): New method gen-profile-code.
8220         (<iunit>): New method gen-profile-code.
8221         (gen-argbuf-elm): Add profiling elements.
8222         (gen-argbuf-type): Define cti insns separately in their own struct.
8223         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8224         insns.  Move semantic entries here from struct scache.
8225         Delete everything from struct scache except argbuf.
8226         (<insn>, method gen-profile-locals): Rewrite.
8227         (<insn>, method gen-profile-code): Rewrite.
8228         (sim-finish!): Create virtual pbb insns.
8229
8230 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8231
8232         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8233         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8234         (h-psw,h-bpsw,h-bbpsw): Define.
8235         (rte,trap): Handle bbpc,bbpsw.
8236         * opcodes.scm (max-operand-instances): Fix typo.
8237         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8238         hardware elements to be fun-access.
8239         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8240
8241 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8242
8243         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8244
8245 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8246
8247         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8248
8249 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8250
8251         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8252         architecture name.
8253         (mach m32r): Update.
8254
8255         * mach.scm (mach:supports?): New proc.
8256         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8257         gen-reg-access-{decls,defns}.
8258         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8259         (gen-mach-bfd-name): New proc.
8260         (gen-arch-reg-access-{decls,defns}): New procs.
8261         (cgen-arch.[ch]): Output register access cover fns.
8262
8263         * hardware.scm (hardware-builtin!): Set print handlers for
8264         h-addr,h-iaddr.
8265         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8266         `od'.
8267         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8268         (my_print_insn): Ditto.  Delete args buf, buflen.
8269         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8270         (-hw-asm-specs): Add `handlers' spec.
8271         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8272         `normal-hw-asm'.
8273         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8274         print.
8275         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8276         (<hw-asm>, parse!): New method.
8277         (gen-insn-table-entry): Print semantics.
8278         (gen-opcode-open): Renamed from gen-opcode-table.
8279
8280         * utils.scm (string-write): No longer a macro.
8281         (-string-write): Handle procedure args.
8282         * opcodes.scm: Update all calls to string-write.
8283         * sim-cpu.scm: Ditto.
8284         * sim-decode.scm: Ditto.
8285         * sim-model.scm: Ditto.
8286         * sim.scm: Ditto.
8287
8288 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8289
8290         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8291         (-gen-insn-builders,-gen-insn-builder): New procs.
8292
8293 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8294
8295         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8296         (gen-opcode-table): Properly terminate comment.
8297
8298 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8299
8300         * Version 0.6.0.
8301         Clean up pass over everything, so starting fresh.