OSDN Git Service

* hardware.scm (hw-pc?): New function.
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-11-23  Doug Evans  <dje@sebabeach.org>
2
3         * hardware.scm (hw-pc?): New function.
4         * ifield.scm (ifld-signed?): New function.
5         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
6         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
7         (insn-cti?): New function.
8         * rtl.scm (/hw): Create <pc> object for pcs.
9         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
10         All callers updated.  Watch for sets to the pc.
11         (semantic-attrs): Watch for sets to the pc.
12         * sid.scm (<pc> cxmake-get): Handle raw-reg.
13         * sim.scm (<pc> cxmake-get): Handle raw-reg.
14         (<operand> cxmake-get): Add debugging printf.
15         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
16         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
17         (/gen-extract-word): Ditto.
18
19         * utils.scm (gen-c-hex-constant): New function.
20         * utils-sim.scm (/gen-decode-insn-entry): Call it.
21
22 2009-11-22  Doug Evans  <dje@sebabeach.org>
23
24         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
25         * read.scm (parse-error-continuable): New function.
26         (define /continuable-error-found?): New variable.
27         (/init-reader!): Initialize it.
28         (/finish-reader!): New function.
29         (cpu-load): Call it.
30         * utils-cgen.scm (obj-list-nub): New function.
31
32         * mach.scm (<derived-arch-data>): New member large-insn-word?.
33         (/adata-set-derived!): Set it.
34         (adata-large-insn-word?): New function.
35         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
36         here.
37         * sim-cpu.scm (cgen-cpu.h): #include it here.
38         (/gen-cpu-defines): Define CGEN_INSN_WORD.
39         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
40         CGEN_INSN_INT.
41         * sim-decode.scm (/gen-idesc-decls): Ditto.
42         (/gen-extract-case, /gen-decode-fn): Ditto.
43         * sim-model.scm (/gen-model-insn-fn): Ditto.
44         * sim.scm (gen-argbuf-type): Ditto.
45
46         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
47         (s-sequence): Call it.
48
49 2009-11-21  Doug Evans  <dje@sebabeach.org>
50
51         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
52         non-VOID-mode expressions with multiple statements.
53
54         * sim.scm (/operand-number-elaboration-written?): New variable.
55         (/op-gen-written-update op): New function.
56         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
57
58         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
59
60         * operand.scm (op-nub): Delete.
61
62         * dev-utils.scm: New file.
63         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
64         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
65         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
66         /loaded-file-record!, maybe-load): Delete.
67         Load cgen files directly instead of via maybe-load.
68
69 2009-11-14  Doug Evans  <dje@sebabeach.org>
70
71         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
72         expressions used in a void context.
73
74         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
75
76         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
77         * cpu/xc16x.opc: Ditto.
78
79 2009-11-12  Doug Evans  <dje@sebabeach.org>
80
81         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
82
83         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
84         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
85
86 2009-11-11  Doug Evans  <dje@sebabeach.org>
87
88         * html.scm (gen-insn-docs): Add logging message.
89
90 2009-11-05  Doug Evans  <dje@sebabeach.org>
91
92         * utils-cgen.scm (gen-set-macro2): New function.
93         * sim.scm (<hw-register> gen-get-macro): Call it.
94
95         * co-for-gen-all: New file.
96
97         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
98
99         * utils.scm (reduce): Delete.
100
101         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
102
103         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
104         regarding PREFIX attribute handling.
105
106         * operand.scm (<hw-index>): Add enum to possible types, all uses
107         updated.
108         (hw-index-constant?, hw-index-constant-value): New functions.
109         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
110         hw-index-enum-obj): New functions.
111         (/operand-parse): Handle enum indices.
112         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
113         hw-index-constant-value.
114         * rtl.scm (rtx-constant-value): Fix handling of enums.
115         * rtx-funcs.scm (enum): Ditto.
116         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
117         currently supported here.
118
119 2009-11-02  Doug Evans  <dje@sebabeach.org>
120
121         Specify isa(s) when doing ifield, operand, insn lookups.
122         ACU = all callers updated.
123         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
124         * enum.scm (define-full-insn-enum): Pass isa-name-list to
125         current-ifld-lookup.
126         * html.scm (get-insn-properties): Pass isa-name-list to
127         current-op-lookup.
128         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
129         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
130         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
131         (/parse-insn-format, syntax-break-out): Ditto.
132         * mach.scm (obj-filter-by-isa): New function.
133         (current-ifld-lookup): New optional arg maybe-isa-name-list.
134         (/ifld-already-defined?, /op-already-defined?): Simplify.
135         (current-op-lookup): New optional arg maybe-isa-name-list.
136         (current-insn-lookup): New arg isa-name-list, ACU.
137         (/insn-already-defined?, /minsn-already-defined?): Simplify.
138         (current-minsn-lookup): New arg isa-name-list, ACU.
139         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
140         current-op-lookup.
141         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
142         (gen-syntax-entry): Ditto.
143         * operand.scm (/operand-parse): Pass isa-name-list to
144         current-ifld-lookup.
145         (/derived-parse-encoding): New arg isa-name-list, ACU.
146         (/derived-parse-ifield-assertion): Ditto.
147         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
148         (/anyof-parse-choice): Ditto.
149         (anyof-satisfies-assertions?): Pass context to rtx-solve.
150         (/anyof-merge-syntax): New arg container, ACU.
151         (operand-builtin!): Add pc to all isas.
152         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
153         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
154         (rtl-c-parsed, rtl-c++-parsed): Ditto.
155         (rtl-c): New arg isa-name-list, ACU.
156         (rtl-c-expr, rtl-c++): Ditto.
157         (closure): New arg isa-name-list, ACU.
158         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
159         (/cstate-isas): New function.
160         (/rtx-canon-symbol-list): New function.
161         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
162         updated.
163         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
164         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
165         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
166         (rtx-canonicalize): New arg isa-name-list, ACU.
167         (rtx-canonicalize-stmt): Delete.
168         (tstate-make): New arg isas, ACU.
169         (tstate-isas, tstate--set-isas!): New functions.
170         (tstate-env-stack): Renamed from tstate-env, ACU.
171         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
172         (tstate-make-closure): Renamed from tstate-new-env, new arg
173         isa-name-list, ACU.
174         (/rtx-traverse-env): Delete.
175         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
176         SUMBOLLIST.
177         (/rtx-traverse): Include conditional flag in dump output.
178         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
179         (<eval-state>): New member isas.  Rename env to env-stack.
180         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
181         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
182         to env-stack.
183         (estate-make-for-eval): Provide #:isas.
184         (estate-make-closure): Renamed from estate-new-env.  New arg
185         isa-name-list, ACU.
186         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
187         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
188         (/rtx-trim-for-doc): Handle closures.
189         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
190         SYMBOLLIST.
191         (rtx-env-var-list): Delete.
192         (rtx-env-make): Handle already-compiled environments.
193         (rtx-var-alist-to-env): New function.
194         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
195         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
196         (rtx-operand-obj): New arg isa-name-list, ACU.
197         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
198         functions.
199         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
200         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
201         (/frag-compute-desired-frags): Minor simplification.
202         (/frag-pick-best): Ditto.
203         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
204         (/gen-sfrag-code): Update.
205         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
206         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
207         * utils.scm (non-null-intersection?): New function.
208
209         * gen-all (do_src): Manually run cgen-all for sid.
210
211 2009-11-01  Doug Evans  <dje@sebabeach.org>
212
213         * gen-all: New file.
214
215         * rtl-traverse.scm (/rtx-canon): Issue better error message for
216         invalid rtx function names.
217
218 2009-10-28  Doug Evans  <dje@sebabeach.org>
219
220         * cos.scm (object-assign!): New function.
221         * mode.scm (/mode-set-word-params!): Call it.
222
223 2009-10-25  Doug Evans  <dje@sebabeach.org>
224
225         Record bitset attributes internally as a list.
226         Record rtx attribute values internally as ((rtx-expr)).
227         * attr.scm (bitset-attr?): Delete, unused.
228         (<bitset-attribute> parse-value): Rewrite.
229         (/attr-parse): Rewrite bitset default value processing.
230         (/attr-read): Pick out values of scalar attributes to distinguish
231         them from bitset values which are a list.
232         Fix spelling errors for processing of default values.
233         Handle string attributes.
234         (bitset-attr->list): Delete, all callers updated.
235         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
236         All callers updated.
237         (atlist-source-form): Rewrite.
238         * hardware.scm (<hardware-base> 'get-isas): Update recognition
239         of all isas.
240         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
241         -> (ISA foo bar).
242         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
243         values are now lists.
244         * mach.scm (def-isa-attr!): Update, bitset attribute values,
245         including the default, are now lists.
246         (all-isas-attr-value): Result is now a list.
247         * doc/rtl.texi: Clean up pass over attribute docs.
248
249         Change internal representation of rtx attribute values.
250         * attr.scm (/attr-val-is-rtx?): New function.
251         (attr-value): Call it.
252         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
253         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
254         Disallow rtx values for bitset attributes.
255         (/attr-read): Record rtx in default value as ((rtx-expr)).
256         (/attr-eval): Update.
257
258 2009-10-24  Doug Evans  <dje@sebabeach.org>
259
260         * gen-all-doc: Add sh.cpu.
261         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
262         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
263
264         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
265         (/gen-sfrag-case): Ditto.
266         * sim-cpu.scm (/gen-sem-case): Ditto.
267
268         * doc/rtl.texi: Add note that different ifields, operands, insns,
269         and minsns may occur with the same name in different isas.
270         Add note on the canonical form of rtl expressions.
271
272 2009-10-23  Doug Evans  <dje@sebabeach.org>
273
274         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
275         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
276
277         * decode.scm: Tweak various comments.
278         (/opcode-slots): Add FIXME.
279         (/build-decode-table-guts): Add assert.
280         * utils-sim.scm (/gen-set-itype-and-extract): New function.
281         (/gen-bracketed-set-itype-and-extract): New function.
282         (/gen-decode-default-entry): Rewrite.
283         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
284         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
285         updated.  Don't unnecessarily emit check for whether all opcode bits
286         have been examined.
287         (/gen-decode-expr-set-itype): Delete.
288         (/gen-decode-expr-entry): Update.
289         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
290         updated.  Keep track of decoder tables used thus far.
291         (/gen-decoder-switch): Ditto.
292         * utils.scm (word-bit-value): New function.
293
294 2009-10-14  Doug Evans  <dje@sebabeach.org>
295
296         * ifield.scm (<ifield>, value): Provide default initial value.
297         (ifield-encode-mode): Delete
298         (ifield-decode-mode): Delete duplicate definition.
299         (<derived-ifield>, 'make!): Initialize members encode, decode.
300         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
301         ifld-encode-mode.
302         (<multi-ifield>, 'gen-insert): Ditto.
303         
304 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
305
306         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
307         for @foo@_init_idesc_table.
308
309 2009-09-30  Doug Evans  <dje@sebabeach.org>
310
311         * doc/intro.texi: Mention SID.
312         * doc/sim.texi: Ditto.
313         * doc/porting.text (Doing a simulator port): Add some text.
314
315 2009-09-27  Doug Evans  <dje@sebabeach.org>
316
317         * cos.scm (/class-table): New global.
318         (/class-uid, /class-set-uid!): New functions.
319         (/class-parent-name): Renamed from /class-parents.
320         (/class-make!): Change parents arg to parent-name, all callers updated.
321         Assign uid to class.
322         (/class-lookup-uid): New function.
323         (/class-parent-classes): Rewrite.
324         (/class-mi?): Delete.
325         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
326         Delete.
327         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
328         (/class-compute-class-desc, class-desc-dump): Update.
329         (/object-make!): Update.
330         (/object-make-with-values!): Delete arg class-desc, all callers
331         updated.
332         (/object-copy): Delete arg top?, all callers updated.
333         (/object-specialize): Delete.
334         (/object-elements, /object-top-class): Delete.
335         (/object-class-name, /object-class-desc): Update.
336         (/object-class-uid): New function.
337         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
338         class-make, /class-subclass? /class-lookup-element,
339         Update.
340         (/elm-delta, elm-list): Delete.
341         (/elm-make-method-getter, elm-get, elm-xget): Update.
342         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
343         (elm-make-getter, elm-make-setter): Update.
344         (/method-lookup-next): Update.
345         (send): Don't specialize class passed to method.
346         (send-next): New arg class-name, all callers updated.
347         (/class-parent, /class-parent-via-path, object-parent): Delete.
348         (class-cons-parent!, class-append-parent!): Delete.
349         (object-reset!): Init /class-table.
350
351         * cos.scm (/object-debug-classes): Delete.
352         (/object-debug-elements, /object-debug-methods): Delete.
353
354         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
355         (method-proc): Delete.
356         (method-make-virtual!, method-make-virtual-forward!): Delete.
357         * ifield.scm (<ifield> field-start): Update.
358         (<ifield> field-length, pretty-print): Update.
359         (<multi-ifield> field-length, field-start, pretty-print): Update.
360         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
361         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
362         (<array> gen-sym-defn): Ditto.
363         (<hardware-base> gen-defn): Renamed from gen-defn.
364         (<hw-register> gen-type): Update.
365         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
366         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
367         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
368         (<hw-immediate> gen-type): Update.
369         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
370         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
371         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
372         (<array> gen-sym-defn): Ditto.
373         (<hardware-base> gen-defn): Renamed from gen-defn.
374         (<hw-register> gen-type): Update.
375         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
376         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
377         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
378         (<hw-immediate> gen-type): Update.
379         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
380
381 2009-09-25  Doug Evans  <dje@sebabeach.org>
382
383         * operand.scm (/anyof-merge-setter): Handle set-quiet.
384         * rtl.scm (rtx-single-set?): Handle set-quiet.
385
386         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
387         rtl-cover-fns?, macro?.  All callers updated.
388         (estate-make-for-normal-rtl-c): Delete, have all callers call
389         estate-make-for-rtl-c directly.
390         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
391         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
392
393         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
394         replaces /par-replace-set-dests.
395         (/par-replace-set-src-expr-fn): New function, replaces
396         /par-replace-set-srcs.
397         (s-parallel): Rewrite.
398
399         * rtl.scm (rtx-pretty-strdump): New function.
400         * rtl-traverse.scm (/rtx-canon-error): Use it.
401         (<eval-state>): New member outer-expr.
402         (estate-error): Include outer expression in error message if present.
403
404 2009-09-23  Doug Evans  <dje@sebabeach.org>
405
406         * xc16x.cpu (h-cr): New hardware.
407         (muls): Comment out parts that won't compile, add fixme.
408         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
409         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
410         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
411
412         Rewrite rtl processing to require it to be "canonicalized" first,
413         and write a full canonicalizer / expression checker.
414         Remove all appearances of DFLT in canonical rtl.
415         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
416         then rtx-simplify.
417         * iformat.scm (ifmt-analyze) Use canonical semantics.
418         * insn (<insn>): New member canonical-semantics.
419         * mach.scm (<arch>): New member multi-insns-instantiated?.
420         (/instantiate-multi-insns!): New function.
421         (/canonicalize-insns!): New function.
422         (arch-analyze-insns!): Canonicalize insn semantics before processing
423         them.
424         * mode.scm (/mode-set-word-params!): New function.
425         (mode-void?): New function.
426         (mode-compatible?): VOID is compatible with VOID.
427         (/mode-word-sizes-defined?): New global.
428         (mode-set-word-modes!): Use/set it.
429         (mode-ensure-word-sizes-defined): Update.
430         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
431         Redo WI/UWI/AI/IAI handling.
432         (op:new-mode): No longer accept DFLT.
433         (<derived-operand> constructor): Ensure all fields are initialized.
434         (<anyof-operand> constructor): Ditto.
435         (/derived-parse-ifield-assertion): Delete arg `args'.
436         All callers updated.
437         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
438         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
439         (rtl-c-expr, rtl-c++): Ditto.
440         (/rtl-c-get): Use mode of operand, not containing expression.
441         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
442         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
443         estate-for-insn? instead.
444         (s-unop): Use mode of expression, not first operand.
445         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
446         (s-sequence): Remove DFLT support.
447         (ifield): Use mode of expression, not UINT.
448         (pc): Comment out, unused.
449         (int-attr): New rtx kind.
450         (attr): Deprecate.
451         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
452         * rtl-traverse.scm (/rtx-canon-debug?): New global.
453         (/make-cstate): New function.
454         (/cstate-context, /cstate-outer-expr): New functions.
455         (/rtx-canon-error): New function.
456         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
457         /rtx-get-last-cond-case-rtx): New functions.
458         (/rtx-canon-*): New functions.
459         (/rtx-canner-table, /rtx-operand-canoners): New globals.
460         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
461         (/rtx-option, /rtx-option-list?): Rewrite.
462         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
463         Rewritten, all callers updated.
464         (/rtx-canon-expr, /rtx-canon): New functions.
465         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
466         (rtx-canonicalize-stmt): New function.
467         (tstate-make): Remove arg `set?'.  All callers updated.
468         (tstate-new-set?): Delete.
469         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
470         moved to /rtx-canon-*.
471         (/rtx-traverse-normal-operand): New function.
472         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
473         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
474         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
475         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
476         Ditto.
477         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
478         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
479         (/rtx-make-traverser-table): Update.
480         (/rtx-traverse-operands): Remove mode processing, now done during
481         canonicalization.
482         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
483         (/rtx-traverse): Ditto.
484         (rtx-init-traverser-tables!): New function.
485         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
486         (rtx-verify-no-dflt-modes): New function.
487         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
488         (rtx-simplify-insn): Use insn-canonical-semantics.
489         (rtx-canonicalize): Moved to rtl-traverse.scm.
490         (/compile-expr-fn, rtx-compile): Delete.
491         (/rtx-trim-rtx-list): New function.
492         (/rtx-trim-for-doc): Handle set, if.
493         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
494         (/rtx-valid-mode-types): Update.
495         (/rtx-valid-matches): Update.
496         (/rtx-find-matchexpr-index): New function.
497         (rtx-lookup): Require rtx-kind to be the rtx name.
498         (def-rtx-node): New arg result-mode, all callers updated.
499         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
500         (rtx-lazy-sem-mode): Delete.
501         (/rtx-closure-make): New arg `mode', all callers updated.
502         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
503         (rtx-operand-obj): Rewrite.
504         (rtx-make-xop): New functions.
505         (/hw): Renamed from `hw', all callers updated.
506         Use the correct mode instead of DFLT for the index.
507         (rtl-builtin!): Call rtx-init-traversal-tables!.
508         (rtl-finish!): Update.
509         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
510         Update mode arg-type.
511         (pc): Comment out.
512         (int-attr): New rtx kind.
513         (attr): Deprecate.
514         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
515         (/frag-cost-compute!): Ditto.
516         * semantics.scm (/build-operand!): Delete args op-name, op.
517         New arg op-expr.  All callers updated.
518         (/build-mem-operand!): Remove DFLT support.
519         (semantic-compile): Update process-expr!, mode arg deleted.
520         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
521         rtl-c++ calls.
522         (/gen-sem-case, /gen-sfrag-code): Ditto.
523         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
524         (/op-gen-set-trace): New function.  If not doing profiling, or using
525         the pbb engine, call /op-gen-set-quiet.
526         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
527         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
528         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
529         * utils.scm (find-first-index): New function.
530         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
531
532         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
533         to COMPARE.
534         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
535
536 2009-09-21  Doug Evans  <dje@sebabeach.org>
537
538         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
539         All callers updated.  Add FIXME.
540         (all rtx functions): Rename local estate to *estate*.  It's an
541         artificial argument added to the rtx, so make it stand out.
542
543         * openrisc.cpu (or32 isa): Fix setup-semantics.
544
545         * rtl.scm (rtx-class-*?): Delete, unused.
546         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
547
548         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
549         (init-reader!): Set /CGEN-RTL-VERSION to default.
550
551         * read.scm (cpu-load): Print load parameters.
552
553         * dev.scm (load-doc): Set verbose-level to 2.
554
555 2009-09-20  Doug Evans  <dje@sebabeach.org>
556
557         * rtl.scm (rtx-strdump): Use write instead of display.
558
559 2009-09-17  Doug Evans  <dje@sebabeach.org>
560
561         * utils-cgen.scm (obj-csv-names): New function.
562         * utils-sim.scm (/sfmt-contents): Use it in logging message.
563
564 2009-09-12  Doug Evans  <dje@sebabeach.org>
565
566         Clean up pass of mode handling.
567         Make use of mode name vs <mode> object more consistent and clear.
568         * hardware.scm (/keyword-read): Default mode to the mode name,
569         not the <mode> object.
570         (/hw-parse-indices): Parse mode name and pass mode object to
571         <hw-asm> constructor.
572         (/hw-parse-values): Ditto.
573         (<hw-register> parse!): Pass mode name to /hw-parse-indices
574         and /hw-parse-values.
575         (<hw-memory> parse!): Ditto.
576         (<hw-address> parse!): Ditto.
577         * mode.scm (/mode-table): New global, replaces mode-list.
578         Modes stored in hashtable instead of list.
579         (/mode-class-table): New global.
580         (mode-list-non-alias-values): Update.
581         (mode:eq?, mode-compatible?, mode:add!): Update.
582         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
583         (mode-maybe-lookup): New function.
584         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
585         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
586         (mode-find, mode-set-word-modes!): Update
587         (mode-ensure-word-sizes-defined): Update.
588         (/sort-mode-classes!): New function.
589         (mode-builtin!): Update.  Sort mode classes here.
590         (mode-finish!): Sort mode classes here too.
591         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
592         All callers updated.
593         (rtl-c-set-quiet): Allow mode to be name of object.
594         (rtl-c-set-trace): Ditto.
595         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
596         <mode> object.  All callers updated.
597         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
598         (rtx-lazy-sem-mode): Ditto.
599         (<rtx-temp> make!): Assert mode arg is a <mode> object.
600         (rtx-env-make): Allow var-list modes to be name or object.
601         * sem-frags.scm (/frag-expr-assq-locals): New function.
602         (/frag-compute-locals!): Call it.
603         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
604         All callers updated.
605         * semantics.scm (/build-mem-operand!): Handle mode aliases.
606
607         * sim-test.scm (*): Symbols no longer can be passed to string-append.
608
609 2009-09-10  Doug Evans  <dje@sebabeach.org>
610
611         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
612         Improve error message for missing or too many bits.
613         (/insn-parse): Don't verify iformat for virtual insns.
614         
615         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
616         non-multi-insns.
617         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
618         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
619         * sid.scm (pbb-engine-insns): Ditto.
620         * sim-decode.scm (cgen-decode.c): Ditto.
621
622 2009-09-09  Doug Evans  <dje@sebabeach.org>
623
624         * rtl-traverse.scm: Comment tweaks.
625         * rtl-xform.scm: Comment and reformatting tweaks.
626         * doc/rtl.texi: Add text to docs on ifield-assertions.
627
628         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
629         saving.
630
631         Add support for controlling warnings/errors.
632         Add tests for iformat description errors.
633         * dev.scm (cload): New option #:diag.
634         * read.scm (<reader>): New member verify-iformat?.
635         (/parse-diagnostic, parse-warning): New functions.
636         (parse-error): Guts moved to /parse-diagnostic.
637         (/set-diagnostic-options!): New function.
638         (cpu-load): New arg diagnostic-options, all callers updated.
639         Recognize -w diagnostic-option-list.
640         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
641         (ifld-simple-ifields, ifields-simple-ifields): New function.
642         * insn.scm (/parse-insn-format-iflds): New function.
643         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
644         New arg isa, all callers updated.  Do some basic validation of the
645         ifield list if requested.
646         * mach.scm (/sanity-check-insns): Improve error message text.
647         * doc/running.texi: Document -w option.
648         * doc/porting.texi: Document #:trace, #:diag options to cload.
649
650         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
651
652         * dev.scm (*): Change default verbosity level to 2.
653
654         * ifield.scm (<ifield> pretty-print): New method.
655         (ifld-pretty-print): New function.
656         (<multi-ifield> pretty-print): New method.
657
658         * ifield.scm (<ifield> field-start): Delete word-len arg.
659         All callers updated.
660         (ifld-start): Ditto.
661         (<multi-ifield> field-start): Ditto.
662         * operand.scm (<hw-index> field-start): Ditto.
663
664         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
665         total-bitsize.  All callers updated.
666         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
667         New member /insn-base-value.
668         (insn-base-value): New function.
669         * mach.scm (/sanity-check-insns): New function.
670         (arch-analyze-insns!): Call it.
671
672 2009-09-08  Doug Evans  <dje@sebabeach.org>
673
674         * iformat.scm (ifields-base-ifields): Simplify.
675         (compute-insn-length): Simplify, call ifields-base-ifields.
676         (compute-insn-base-mask): Ditto.
677         * ifield.scm (ifld-known-values): Ditto.
678         (ifld-base-ifields): Ditto.
679         * insn.scm (insn-value): Ditto.
680         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
681
682 2009-09-08  DJ Delorie  <dj@redhat.com>
683
684         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
685         preprocessor macro, not an enum.
686
687 2009-09-08  Doug Evans  <dje@sebabeach.org>
688
689         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
690         to string-append.
691         (*): Remove trailing ":" from error messages passed to estate-error.
692
693 2009-09-07  Doug Evans  <dje@sebabeach.org>
694
695         * types.scm (<struct>): Delete.
696
697         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
698         updated.
699         (/pmacro-loc-error): New function.
700
701         * mach.scm (/isa-parse-decode-assist): New function.
702         (/isa-parse): Call it.
703
704         * decode.scm (/get-subopcode-value): New function.
705         (/opcode-slots): Call it.
706         (/fill-slot!): Add logging message.
707
708         * cos.scm (/object-error): Convert symbols to strings before passing
709         to string-append.
710
711         * read.scm (rtl-version-equal?): New function.
712         (rtl-version-at-least?, rtl-version-older?): New functions.
713
714         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
715         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
716         rtl versions >= 0.9.
717         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
718
719 2009-09-03  Doug Evans  <dje@sebabeach.org>
720
721         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
722         is simple.
723
724 2009-09-01  DJ Delorie  <dj@redhat.com>
725
726         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
727         (parse_unsigned16_range): Likewise.
728         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
729         isa.
730
731 2009-09-01  Doug Evans  <dje@sebabeach.org>
732
733         Pmacro .equals -> .equal?
734         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
735         -pmacro-builtin-equals.  All callers updated.
736         (pmacros-init!): Rename .equals to .equal?.
737         * doc/pmacros.texi: Update.
738         * testsuite/pmacros-1.test: Update.
739
740         * doc/porting.texi: Work around texi2html bug where it doesn't
741         properly escape <> inside double-quotes inside @code.
742
743         * doc/porting.texi (Doing an opcodes port): Add step to specify
744         the .opc file.
745
746 2009-08-29  Doug Evans  <dje@sebabeach.org>
747
748         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
749         rtl version 0.7.
750         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
751
752 2009-08-27  Doug Evans  <dje@sebabeach.org>
753
754         Add do-count rtl function.
755         * rtl-c.scm (s-do-count): New function.
756         (do-count): New rtl handler.
757         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
758         (-rtx-make-traverser-table): Add ITERATION.
759         * rtl.scm (rtx-make-iteration-limit-var): New function.
760         (rtx-env-make-iteration-locals): New function.
761         * rtx-funcs.scm (do-count): New rtl function.
762         * cpu/play.cpu: Add do-count-test insn.
763         * doc/rtl.texi: Add docs on do-count.
764
765 2009-08-26  Doug Evans  <dje@sebabeach.org>
766
767         * read.scm (parse-error): Change error message output format
768         to match context-owner-error.
769         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
770         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
771         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
772         (operand): Call estate-error instead of context-error.
773         (local, delay): Ditto.
774         (ref, attr): Call estate-error instead of error.
775         * rtl-traverse.scm (tstate-error): New function.
776         (-rtx-traverse-error): Call tstate-error instead of context-error.
777         (-rtx-traverse-operands, -rtx-traverse): Ditto.
778         (estate-error): New function.
779         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
780         instead of error.
781         (e-if): Call estate-error instead of error.
782         * rtx-funcs.scm (error): Call estate-error instead of context-error.
783         (member): Ditto.
784         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
785         Rewrite to call context-owner-error.
786         (context-owner-error): New function.
787
788         * ifield.scm (<ifield> constructor): New arg `location',
789         all callers updated.
790         * insn.scm (<insn> constructor): Ditto.
791         (<multi-insn> constructor): Ditto.
792         * minsn.scm (<macro-insn> constructor): Ditto.
793         * operand.scm (<operand> constructor): Ditto.
794         * utils-cgen.scm (builtin-location): New function.
795         (<source-ident>): Fix default value of member `location'.
796         (source-ident?): New function.
797
798         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
799         (estate-push-env, estate-with-modifiers): Ditto.
800         (estate-deepen): New function.
801
802 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
803
804         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
805         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
806         routines.
807
808 2009-08-25  Doug Evans  <dje@sebabeach.org>
809
810         * doc/pmacros.texi (pmacro default argument values): Add text.
811
812 2009-08-23  Doug Evans  <dje@sebabeach.org>
813
814         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
815         Rename member prefix -> name-prefix.
816         (<keyword> getters): Update.
817         (-keyword-parse): Update.  Default enum-prefix to NAME-.
818         (-keyword-read): Update.  Don't compute default value for
819         enum-prefix here.
820         (define-keyword): Update.
821         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
822         * read.scm (cgen-rtl-version): New function.
823         (-supported-rtl-versions): Add (0 8).
824         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
825         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
826         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
827         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
828         Update, print-name -> enum-prefix, make uppercase.
829         Remove unnecessary name-prefix spec.
830         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
831         * cpu/ip2k.cpu (register-names): Ditto.
832         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
833         * cpu/sparc.cpu (gr-names): Ditto.
834         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
835         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
836         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
837         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
838         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
839         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
840         prefix -> name-prefix.
841         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
842         Update, print-name -> enum-prefix, make uppercase.
843         (drc-names, xf-names): Ditto.
844         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
845         * doc/rtl.texi (Keywords): New section.
846         (hardware indices): Update text.
847         (rtl versions): Add 0.8.
848
849         Add define-rtl-version.
850         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
851         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
852         (cgen-lang-fixlevel): Delete.
853         (-supported-rtl-versions): New variable.
854         (-cmd-define-rtl-version): New function.
855         (init-reader!): New command define-rtl-version.
856         (-cgen): Add rtl version to --version output.
857         * doc/rtl.texi: Document rtl version support.
858         * cpu/play.cpu: Add define-rtl-version.
859
860 2009-08-22  Doug Evans  <dje@sebabeach.org>
861
862         * Makefile.am (OPTIONS): Define.
863         (desc): Just generate <arch>-desc.[ch] files.
864         * Makefile.in: Regenerate.
865         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
866         no .opc file.
867         (cgen-desc.c): Similarly.
868         * gen-all-desc: New file.
869         * opcodes.scm (opc-file-provided?): New function.
870
871         * mach.scm (current-*-add!): Update calls to parse-error.
872         * operand.scm (op:new-mode): Update call to parse-error.
873         * utils-cgen.scm (make-obj-context): New function.
874
875         * NEWS: Copy over entries from 1.1 branch.
876
877 2009-08-20  Doug Evans  <dje@sebabeach.org>
878
879         * gas-test.scm (<keyword> test-data): Catch invalid requests,
880         flag a warning and compensate.
881         (<hw-address test-data): Tweak for readability.
882         (<hw-iaddress test-data): Ditto.
883         (cgen-build.sh): Convert symbols to strings before passing to
884         string-append.
885         (cgen-allinsn.exp): Ditto.
886
887         * doc/pmacros.texi (.splice): Add more text.
888
889 2009-08-19  Doug Evans  <dje@sebabeach.org>
890
891         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
892         distinguish from 1.1.
893         * configure: Regenerate.
894         * read.scm (-CGEN-VERSION): Update.
895         * doc/version.texi: Update.
896
897         New builtin .pmacro?.
898         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
899         (pmacros-init!): Add .pmacro?.
900         * doc/pmacros.text: Document .pmacro?.
901         * testsuite/pmacros-1.test: Test .pmacro?.
902
903         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
904         of a pmacro begins before its arguments are evaluated, improves
905         readability.
906
907         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
908         * testsuite/pmacros-1.test: Ditto.  Add better tests.
909
910         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
911         in assembler syntax.
912         (Operands): Similarly.
913
914 2009-08-18  Doug Evans  <dje@sebabeach.org>
915
916         * ifield.scm (ifld-encode-mode): Add FIXME.
917         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
918         modes.
919         (<ifield> gen-extract): Similarly.
920
921         * read.scm (parse-error): Handle #f for context-location.
922         * utils-cgen.scm (unspecified-location): Fix building of
923         single-location.
924
925         * doc/rtl.texi: Document how to write hex and boolean values.
926
927         * gas-test.scm (<hw-asm> test-data): Handle () values.
928         (<keyword> test-data): Convert symbols to strings before passing
929         to string-append.
930         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
931         result for scalars.
932
933         * operand.scm (hw-index-scalar): Set `name'.
934         (hw-index-anyof, hw-index-derived): Ditto.
935
936 2009-08-17  Doug Evans  <dje@sebabeach.org>
937
938         * pmacros.scm (-pmacro-builtin-internal-test): New function.
939         (pmacros-init!): Add .internal-test.
940         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
941         * testsuite/testsuite.cpu (internal-verify): New pmacro.
942         * doc/pmacros.text: Document .internal-test.
943
944         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
945         (parse-comment): Allow numbers.
946         * doc/porting.texi: Document that names and comments may be lists.
947
948         * insn.scm (-insn-parse): Fix typo.
949
950         Rename .eval -> .exec.  Add new .eval.
951         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
952         (-pmacro-builtin-eval): New function.
953         (pmacros-init!): Add .exec.
954         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
955         * testsuite/location-1.test: Update.
956         * testsuite/pmacros-1.test: Add test for .eval.
957
958 2009-08-16  Doug Evans  <dje@sebabeach.org>
959
960         * doc/porting.texi: Remove support for Guile 1.4.
961
962         * read.scm (current-reader-location): Return unspecified location
963         if reader hasn't been initialized yet.
964
965 2009-08-13  Doug Evans  <dje@sebabeach.org>
966
967         * dev.scm: Document tracing options.
968
969         * pmacros.scm (pmacro-dump): New function.
970         (check-pmacro): Tweak debugging output.
971         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
972         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
973
974         Add .let* pmacro builtin.
975         * pmacros.scm (-pmacro-builtin-let*): New function.
976         (pmacros-init!): Add .let*.
977         * doc/pmacros.texi: Document .let*.
978         * testsuite/pmacros-1.test: Test .let*.
979
980 2009-08-12  Doug Evans  <dje@sebabeach.org>
981
982         Clean up cpu file parsing, pass context consistently instead of the
983         old "errtxt" argument.
984         NOTE: ACU == "All Callers Updated".
985         * attr.scm (-parse-simple-attribute): Renamed from
986         parse-simple-attribute, ACU.
987         (-attr-parse): Change errtxt argument to context, ACU.
988         (-attr-read): Ditto.
989         (atlist-parse): Ditto.  Put context arg first.
990         (attr-parse): Use parse-error instead of context-error.
991         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
992         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
993         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
994         `context' arg is now a <context> object.  ACU.
995         (-keyword-read): `context' arg is now a <context> object.  ACU.
996         (-hw-parse-indices): Change errtxt argument to context, ACU.
997         (-hw-parse-values, -hw-parse-handlers): Ditto.
998         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
999         (-hw-validate-layout, -hw-create-getter-from-layout,
1000         -hw-create-setter-from-layout): Ditto.
1001         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1002         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1003         (<hw-address>:parse!): Ditto.
1004         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1005         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1006         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1007         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1008         * insn.scm (-insn-parse, -insn-read): Ditto.
1009         (parse-syntax): Ditto.  Put context arg first.
1010         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1011         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1012         (-parse-insn-format): Ditto.
1013         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1014         (-arch-parse-isas): Ditto.
1015         (-isa-read): Add context arg, ACU.
1016         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1017         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1018         context, ACU.
1019         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1020         (minsn-make-alias): Ditto.
1021         * mode.scm (-mode-parse): Ditto.
1022         (parse-mode-name): Ditto.  Put context arg first.
1023         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1024         errtxt argument to context, ACU.
1025         (-unit-parse, -model-parse, -model-read): Ditto.
1026         * operand.scm (-operand-parse-getter): Use parse-error instead of
1027         context-error.
1028         (-operand-parse-setter): Ditto.
1029         (-operand-parse): Change errtxt argument to context, ACU.
1030         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1031         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1032         * read.scm (reader-error): Delete.  Use parse-error instead.
1033         (parse-error): Change errtxt argument to context, ACU.  Split args
1034         argument into expr and maybe-help-text.
1035         (-reader-process-expanded-1!): Reorganize.
1036         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1037         * types.scm (parse-type): Ditto.
1038         * utils-cgen.scm (single-location->simple-string): New function.
1039         (<context>): Replace members file,lineno with location.
1040         (make-prefix-context): Renamed from context-make-prefix, ACU.
1041         (make-current-context): New function.
1042         (context-append, context-append-name): New functions.
1043         (context-make-reader): Delete.
1044         (parse-name): Change errtxt argument to context, ACU.
1045         Put context arg first.
1046         (parse-comment): Ditto.
1047         (parse-number): Change errtxt argument to context, ACU.
1048         (arg-list-validate-name, arg-list-check-no-args,
1049         arg-list-symbol-arg): Ditto.
1050
1051         * read.scm (-cmd-if): Don't assume test is a list.
1052
1053         * html.scm (get-insn-properties): Delete errtxt, unused.
1054
1055 2009-08-11  Doug Evans  <dje@sebabeach.org>
1056
1057         * doc/rtl.texi (hardware types): Add pc.
1058
1059 2009-08-07  Doug Evans  <dje@sebabeach.org>
1060
1061         Add -t option for tracing things like commands, pmacro expansion.
1062         * dev.scm (cload): New arg #:trace.
1063         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1064         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1065         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1066         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1067         (-reader-process-expanded-1!): Trace commands if requested.
1068         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1069         (-set-trace-options!): New function.
1070         (-init-reader!): New function.
1071         (cpu-load): New arg trace-options, all callers updated.
1072         Call -init-reader! and -set-trace-options!.
1073         (cgen-usage): Improve output formatting.
1074         (common-arguments): New option -t.
1075         (-cgen): Process -t.
1076         * utils-cgen.scm (single-location->string): Renamed from
1077         pretty-print-single-location.  All callers updated.
1078         (location->string): Renamed from pretty-print-location.
1079         All callers updated.
1080         (source-properties-location->string): New function.
1081         * doc/running.texi: Document -t.
1082
1083 2009-08-06  Doug Evans  <dje@sebabeach.org>
1084
1085         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1086         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1087         * utils.scm: ... here.
1088
1089 2009-08-05  Doug Evans  <dje@sebabeach.org>
1090
1091         Track source location better, for better error messages.
1092         * pmacros.scm (-pmacro-eval): Delete, unused.
1093         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1094         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1095         (scan-list, scan): Ditto.
1096         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1097         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1098         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1099         (scan-list1): New function.
1100         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1101         * read.scm (<reader>): New member `location'.
1102         (-reader-lookup-command): Renamed from reader-lookup-command,
1103         all callers updated.
1104         (reader-error): Rewrite to produce better source location info.
1105         (current-reader-location): New function.
1106         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1107         All callers updated.  Record source location of expression.
1108         (reader-process-expanded!): Renamed from reader-process-expanded.
1109         All callers updated.
1110         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1111         All callers updated.  Record source location of define-pmacro.
1112         * utils-cgen.scm (<location>): New class.
1113         (single-location): New (pseudo) class.
1114         (pretty-print-single-location, pretty-print-location): New functions.
1115         (location-top, location-push-single, location-push): New functions.
1116         (unspecified-location, current-input-location): New functions.
1117         (location-property): New object property.
1118         (location-property-set!): New function.
1119         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1120         All uses updated.
1121         * testsuite/location-1.test: New testcase.
1122         * testsuite/run-tests.sh: Fix fail count handling.
1123         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1124         to expect cgen to fail.
1125
1126         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1127
1128         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1129         (-cmd-if): Renamed from cmd-if.  All callers updated.
1130         Use reader-process-expanded! on then/else clauses instead of eval1.
1131
1132 2009-07-22  Doug Evans  <dje@sebabeach.org>
1133
1134         * modes.scm (TI,OI): New modes.
1135         * types.scm (parse-type): Improve error checking.  Don't hardwire
1136         mode names here.
1137         * utils.scm (non-negative-integer?): New function.
1138
1139         * pmacros.scm (-pmacro-builtin-find): New predicate.
1140         (pmacros-init!): Add .find.
1141         * doc/pmacros.tex: Document .find.
1142         * testsuite/pmacros-1.test: Test .find.
1143
1144 2009-07-20  Doug Evans  <dje@sebabeach.org>
1145
1146         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1147         commented out printfs.
1148         * rtl.scm (rtl-finish!): Whitespace tweaks.
1149         * model.scm (parse-insn-timing): Tweak logging message.
1150         * operand.scm: Comment and whitespace tweaks.
1151         (op:type): Tweak error message.
1152         (op-ifield): Tweak logging message.
1153         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1154         * read.scm: Whitespace cleanup.
1155         * utils.scm: Whitespace cleanup.
1156
1157 2009-07-19  Doug Evans  <dje@sebabeach.org>
1158
1159         Fix binding of nested pmacro parameters.
1160         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1161         All callers updated.
1162         (-pmacro-bulid-lambda): Ditto.
1163         * doc/pmacros.texi: Update.
1164         * testsuite/pmacros-1.test: Add testcase.
1165
1166         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1167         calculation.
1168         (-multi-ifield-make-default-extract): Ditto.
1169
1170         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1171         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1172         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1173         Define.
1174         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1175         * doc/rtl.texi: Update.
1176
1177         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1178
1179         Rename builtin boolean pmacros, for consistency with rtl.
1180         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1181         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1182         * doc/pmacros.texi: Update.
1183         * testsuite/pmacros-1.test: Update.
1184
1185 2009-07-17  Doug Evans  <dje@sebabeach.org>
1186
1187         Use hash tables to record ifields, operands, insns, macro-insns.
1188         * attr.scm (attr-builtin!): Tweak some comments.
1189         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1190         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1191         <ident>.
1192         (<multi-ifield>): New constructor.
1193         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1194         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1195         <ident>.
1196         (-sub-insn-make!): Add hack to avoid differences in generated code.
1197         (multi-insn-instantiate!): Add total number of multi-insns to
1198         logging message.
1199         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1200         minsn-list to foo-table.  New member next-ordinal.
1201         Update getters/setters.
1202         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1203         New functions.
1204         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1205         (-make-ident-object-table, -ident-object-table->list,
1206         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1207         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1208         -ifld-already-defined?): Rewrite.
1209         (current-op-list, current-op-add! current-op-lookup,
1210         -op-already-defined?): Rewrite.
1211         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1212         (current-insn-list, current-insn-add! current-insn-lookup,
1213         -insn-already-defined?): Rewrite.
1214         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1215         -minsn-already-defined?): Rewrite.
1216         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1217         (MAX-VIRTUAL-INSNS): Define.
1218         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1219         Update use of arch-insn-list.
1220         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1221         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1222         minsn-list.
1223         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1224         <ident>.  New constructor.
1225         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1226         <ident>.
1227         * sid.scm (-virtual-insn-add!): New function.
1228         (-create-virtual-insns!): Call it.
1229         (-fill-sim-insn-list!): Rewrite.
1230         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1231         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1232         * utils-cgen.scm (<ordered-ident>): New class.
1233         (obj-ordinal, obj-set-ordinal!): New functions.
1234         (add-ident-methods!): Delete.
1235
1236         * model.scm (parse-insn-timing): Change logging message to level 3.
1237
1238 2009-07-16  Doug Evans  <dje@sebabeach.org>
1239
1240         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1241         add a link to define-normal-insn-enum.
1242
1243         * doc/porting.texi (Conventions): Add docs on writing integers.
1244
1245         * cpu/simplify.inc (*): One line doc strings don't need \n.
1246         (df): Invoke define-full-ifield instead of claiming it's an alias.
1247         (dno): Define.
1248         (dnop): Mark as deprecated.
1249
1250         * cpu/play.cpu: Add example of hardware `layout'.
1251         * doc/porting.tex: Add docs on simplify.inc.
1252         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1253         and other things.
1254
1255         * ifield.scm: Whitespace/formatting cleanup.
1256
1257         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1258
1259         * read.scm (parse-error): Don't print single entry args as a list.
1260         (-reader-process-expanded-1): Convert symbol to string for
1261         string-append.
1262
1263         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1264
1265 2009-07-15  Doug Evans  <dje@sebabeach.org>
1266
1267         * cpu/simplify.inc (dno): New pmacro.
1268         * doc/porting.texi: Add section on simplify.inc.
1269         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1270
1271 2009-07-15  Doug Evans  <devans@sourceware.org>
1272
1273         * gen-all-doc: Generate index.html.
1274
1275 2009-07-13  Doug Evans  <dje@sebabeach.org>
1276
1277         Extend pmacro language, add testsuite.
1278         * Makefile.am (SUBDIRS): Add testsuite.
1279         * Makefile.in: Regenerate.
1280         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1281         testsuite/test-utils.sh.
1282         * configure: Regenerate.
1283         * dev.scm (cload): Handle testsuite app.
1284         (load-testsuite): New function.
1285         * pmacros.scm: (-pmacro-debug?): New global.
1286         (-smacro-table): New global.
1287         (-smacro-lookup, -smacro-set!): New functions.
1288         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1289         (-pmacro-syntactic-form?): New function.
1290         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1291         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1292         (-pmacro-expected-non-negative-integer): New function.
1293         (-pmacro-verify-non-negative-integer): New function.
1294         (-pmacro-expand-expr-list): New function.
1295         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1296         (-pmacro-process-args): Renamed from -pmacro-invoke.
1297         (-pmacro-apply, -smacro-apply): New functions.
1298         (-pmacro-expand): Rewrite syntactic form processing.
1299         (-pmacro-build-lambda): Reformat.
1300         (define-pmacro): Watch for more errors in definition.
1301         (pmacro-debug): New function.
1302         (pmacro-trace): Set/reset -pmacro-debug?.
1303         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1304         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1305         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1306         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1307         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1308         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1309         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1310         (pmacros-init!): Initialize -smacro-table.
1311         Rewrite pmacro initialization.
1312         * read.scm (reader-process-expanded): Renamed from
1313         -reader-process-expanded.  All callers updated.
1314         Recognize () as a no-op.
1315         (cpu-load): Tweak logging messages.
1316         * utils.scm (message): Add comment.
1317         * cpu/play.cpu: Add some instructions to play with .let.
1318         * doc/cgenint.texi: Move some debugging related docs to here from
1319         cgen.texi.
1320         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1321         * testsuite/Makefile.am: New file.
1322         * testsuite/Makefile.in: New file.
1323         * testsuite/test-utils.sh.in: New file.
1324         * testsuite/run-tests.sh: New file.
1325         * testsuite/testsuite.cpu: New file.
1326         * testsuite/pmacros-1.test: New file.
1327
1328         * decode.scm: Comment and formatting tweaks.
1329         (-build-decode-table-guts): Add more data to logging message.
1330
1331 2009-07-12  Doug Evans  <dje@sebabeach.org>
1332
1333         Delete files that now live in ../cpu.
1334         * cpu/iq10.cpu: Delete.
1335         * cpu/iq2000.cpu: Delete.
1336         * cpu/iq2000.opc: Delete.
1337         * cpu/iq2000m.cpu: Delete.
1338         * cpu/m32r.cpu: Delete.
1339         * cpu/m32r.opc: Delete.
1340
1341 2009-07-09  Doug Evans  <dje@sebabeach.org>
1342
1343         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1344         All callers updated.  Work around -ve shifts by referencing the
1345         entire value.
1346
1347         * utils.scm (message): Handle pairs.
1348
1349 2009-07-08  DJ Delorie  <dj@redhat.com>
1350
1351         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1352         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1353         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1354         written to.
1355
1356 2009-07-07  Doug Evans  <dje@sebabeach.org>
1357
1358         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1359         * cpu/play.opc: New file.
1360
1361         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1362         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1363         * doc/rtl.texi (Instructions): Update.
1364
1365         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1366         (opc-arguments, -OPC): Call set-opc-file-path!.
1367         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1368         (set-opc-file-path!): New function.
1369         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1370
1371         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1372         before passing to gen-c-args.
1373
1374 2009-07-06  DJ Delorie  <dj@redhat.com>
1375
1376         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1377         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1378         unspecified accesses to control registers.
1379
1380 2009-07-01  DJ Delorie  <dj@redhat.com>
1381
1382         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1383         unspecified accesses to control registers.
1384
1385         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1386         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1387
1388 2009-06-27  Doug Evans  <dje@sebabeach.org>
1389
1390         * gen-all-intrinsics: New file.
1391
1392 2009-06-24  Doug Evans  <dje@sebabeach.org>
1393
1394         * All *.scm files: Update copyright year.
1395         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1396
1397 2009-06-23  DJ Delorie  <dj@redhat.com>
1398
1399         * intrinsics.scm: Updates to support IVC2.
1400         (belongs-to-group?): Check IVC2 slots.
1401         (-slots-attribute): New.
1402         (targets::attributes): Add SLOTS.
1403         (target:add-well-known-intrinsics): Add CPMOV.
1404         (md-insn): Add CPTYPE and CRET?.
1405         (add-md-insn): Likewise.
1406         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1407         duplicate insns with different bit patterns.
1408         (write-cgen-insn?): Add cret? support.
1409         (intrinsics.h): Add vector types.
1410         (runtime-op): Add vector support.
1411         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1412
1413         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1414         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1415         (h-cr-ivc2): Default to typeless.
1416         (h-ccr-ivc2): Fix register width.
1417         (SLOTS): Fix values and default.
1418         (ivc2_*): Add control register names.
1419         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1420
1421         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1422         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1423
1424 2009-06-22  Doug Evans  <dje@sebabeach.org>
1425
1426         * semantics.scm (insn-build-known-values): Fix typo in comment.
1427
1428 2009-06-21  Doug Evans  <dje@sebabeach.org>
1429
1430         * rtl-xform.scm (rtx-simplify-insn): New function.
1431         * html.scm (gen-insn-docs): Call it.
1432         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1433         * iformat.scm (ifmt-analyze): Minor simplification.
1434
1435         * semantics.scm (semantic-compile): Change arg sem-code-list to
1436         sem-code.
1437         (semantic-attrs): Ditto.
1438         * iformat.scm (ifmt-analyze): Update.
1439         (ifmt-compute!): Update.
1440         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1441         rtl-xform.scm.
1442         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1443         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1444         * semantics.scm (rtx-simplify): Ditto.
1445         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1446         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1447         (-simplify-expr-fn): Move to rtl-xform.scm.
1448         (-solve-expr-fn, rtx-solve): Ditto.
1449         * rtl-xform.c: New file.
1450         * read.scm: Load it.
1451
1452         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1453         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1454         (-rtx-traverse, rtx-traverse): Ditto.
1455
1456 2009-06-20  Doug Evans  <dje@sebabeach.org>
1457
1458         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1459
1460         * configure.in: Update version to 1.1.
1461         * configure: Regenerate.
1462         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1463
1464 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1465             Doug Evans  <dje@sebabeach.org>
1466
1467         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1468         (cgen-desc.c): Ditto.
1469         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1470         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1471         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1472         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1473         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1474         (cgen-cpuall.h, cgen-ops.c): Ditto.
1475         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1476         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1477         (cgen-sem-switch.c): Ditto.
1478         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1479         * sim-model.c (cgen-model.c): Ditto.
1480
1481 2009-06-18  Doug Evans  <dje@sebabeach.org>
1482
1483         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1484
1485         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1486
1487         * dev.scm (cload): Change #:arch argument to take the path to the
1488         .cpu file instead of just the name of the architecture.
1489         * read.scm (arch-path): Remove trailing '/'.
1490         (cpu-load): Set `arch-path' to directory of .cpu file.
1491         (-cgen): Don't set `arch-path' here.
1492         (include): Update.
1493         * doc/porting.texi: Update.
1494
1495 2009-06-14  Doug Evans  <dje@sebabeach.org>
1496
1497         * gen-all-doc: Use files in ../cpu where possible.
1498
1499         * Makefile.am (ARCHFILE): Fix path.
1500         * Makefile.in: Regenerate.
1501         * html.scm: Use "pre" instead of "plaintext".
1502
1503         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1504         * doc/app.texi: Cleanup pass.
1505         * doc/cgen.texi: Cleanup pass.
1506         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1507         * doc/intro.texi: Cleanup pass.
1508         * doc/mdate-sh: New file.
1509         * doc/opcodes.texi: Cleanup pass.
1510         * doc/pmacros.texi: Cleanup pass.
1511         * doc/porting.texi: Cleanup pass.
1512         * doc/rtl.texi: Cleanup pass.
1513         * doc/running.texi: Cleanup pass.  Document more runtime options.
1514         * doc/stamp-vti: Update.
1515         * doc/version.texi: Update.
1516
1517         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1518         (GUILE): Fix definition.
1519         * Makefile.in: Regenerate with automake 1.9.6.
1520         * aclocal.m4: Regenerate with aclocal 1.9.6.
1521         * configure.in (AC_PREREQ): Set to 2.59.
1522         (GENINSRC_NEVER): Define.
1523         * configure: Regenerate with autoconf 2.59.
1524         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1525         (cgen.info,cgen.dvi): Delete.
1526         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1527         (noinst_TEXINFOS): Add cgenint.texi.
1528         (DOCFILES): Add missing files.
1529         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1530         * doc/Makefile.in: Regenerate with automake 1.9.6.
1531
1532         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1533
1534         * attr.scm: Removing trailing whitespace.
1535         * cgen-intrinsics.scm: Ditto.
1536         * cgen-sim.scm: Ditto.
1537         * cos.scm: Ditto.
1538         * enum.scm: Ditto.
1539         * guile.scm: Ditto.
1540         * sim.scm: Ditto.
1541
1542 2009-05-28  DJ Delorie  <dj@redhat.com>
1543
1544         * cpu/mep.opc (parse_signed16_range): New.
1545         (parse_unsigned16_range): New.
1546         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1547
1548 2009-05-26  DJ Delorie  <dj@redhat.com>
1549
1550         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1551         accumulator names.
1552         (f-ivc2-ccrn-c3hi): New.
1553         (f-ivc2-ccrn-c3lo): New.
1554         (f-ivc2-ccrn-c3): New.
1555         (ivc2c3ccrn): Use it.
1556
1557 2009-05-22  DJ Delorie  <dj@redhat.com>
1558
1559         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1560         (mep_config_map): Regenerate.
1561
1562         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1563         ivc2-specific names.
1564         (simm8p20): New.
1565         (cmovc): move to after field definitions, use ivc2-specific
1566         register names.
1567         (cpmovi_b_P0S_P1): New.
1568         
1569 2009-05-19  DJ Delorie  <dj@redhat.com>
1570
1571         * cpu/mep.opc: Regenerate configuration.
1572         (parse_cdisp10): Only check CPU flags, not COP flags.
1573         (check_configured_mach): Likewise.
1574
1575 2009-05-13  DJ Delorie  <dj@redhat.com>
1576
1577         * intrinsics.scm (insns.md): Add RTL predicates.
1578         (intrinsics.h): Remove old C intrinsics.
1579
1580 2009-04-29  DJ Delorie  <dj@redhat.com>
1581
1582         * mep-ivc2.cpu: New.
1583         * mep-core.cpu: Regenerated.  Add support for deferred register
1584         writes.
1585         (SLOT): Add IVC2 slot types.
1586         (sim-syscall): Rename to something more appropriate.
1587         * mep-ext-cop.cpu: Regenerate.
1588         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1589         (print_slot_insn): New.
1590         (mep_examine_ivc2_insns): New.
1591         (mep_print_insn_set_ivc2_mode): New.
1592         (mep_print_insn): Support IVC2 slotting.
1593         
1594 2009-04-20  DJ Delorie  <dj@redhat.com>
1595
1596         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1597         (guess-mode): Drop COP* syntax.
1598         (need-insn): Add "--syscall--" to the list.
1599         (enum-type): Drop COP* syntax.
1600         (intrinsics.h): Likewise.
1601         (intrinsic-protos.h): Change file header to allow it to be
1602         included.
1603
1604 2009-04-17  DJ Delorie  <dj@redhat.com>
1605
1606         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1607         (lhucpm1): Limit to C5 mach.
1608         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1609         * cpu/mep-core.cpu (extend-cdisp10): New.
1610         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1611         
1612 2009-04-08  DJ Delorie  <dj@redhat.com>
1613
1614         * cpu/mep-c5.cpu: New.
1615         * cpu/mep-core.cpu: Add C5 support.
1616         * cpu/mep.opc: Likewise.
1617
1618 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1619
1620         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1621         about calling memset with a zero length.
1622
1623 2009-02-03  DJ Delorie  <dj@redhat.com>
1624
1625         * cpu/mep-core.cpu: Update to new MeP configuration.
1626         * cpu/mep-ext-cop.cpu: Likewise.
1627         * cpu/mep.opc: Likewise.
1628
1629 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1630
1631         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1632
1633 2008-06-17  Dave Brolley  <brolley@redhat.com>
1634
1635         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1636         (h-gr): Likewise.
1637
1638 2007-11-13  Dave Brolley  <brolley@redhat.com>
1639
1640         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1641
1642 2007-11-05  Dave Brolley  <brolley@redhat.com>
1643
1644         * intrinsics.scm,cgen-intrinsics.scm: New application which
1645         generates code to support intrinsic functions for insns in the
1646         mep architecture in gcc.
1647
1648 2007-09-21  Dave Brolley  <brolley@redhat.com>
1649
1650         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1651         (rn3us): CDATA attribute now LONG.
1652         
1653 2007-08-21  Dave Brolley  <brolley@redhat.com>
1654
1655         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1656         than 32 bits.
1657
1658 2007-07-05  Nick Clifton  <nickc@redhat.com>
1659
1660         * utils.scm (copyright-fsf): Update copyright notice to refer to
1661         the GPL version 3.
1662
1663 2007-05-22  Nick Clifton  <nickc@redhat.com>
1664
1665         * doc/cgen.texi: Use @copying around the copyright notice.
1666         * doc/internals.texi: Likewise.
1667
1668 2007-02-05  Dave Brolley  <brolley@redhat.com>
1669
1670         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1671
1672 2007-02-05  Dave Brolley  <brolley@redhat.com>
1673
1674         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1675         in the generated code for @arch@_cgen_init_asm if it is defined.
1676
1677         * Contribute the following changes:
1678         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1679
1680         * attr.scm (<string-attribute>): New attribute class.
1681         (attr-kind): Handle <string-attribute>.
1682         (parse-simple-attribute): New function.
1683         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1684         (<bitset-attribute> 'parse-value): Likewise.
1685         (<boolean-attribute> 'parse-value): Likewise.
1686         (<enum-attribute> 'parse-value): Likewise.
1687         (<string-attribute> 'parse-value): New function.
1688         (-attr-parse): Handle <string-attribute>.
1689         (-attr-read): Likewise.
1690         (<string-attribute> 'gen-value-for-defn-raw): New function.
1691         (<string-attribute> 'gen-value-for-defn): New function.
1692
1693 2006-11-07  Dave Brolley  <brolley@redhat.com>
1694
1695         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1696         necessary.
1697
1698 2006-10-18  Dave Brolley  <brolley@redhat.com>
1699
1700         * Contribute the following changes:
1701
1702         2006-07-11  Dave Brolley  <brolley@redhat.com>
1703
1704         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1705         (movcol): New insn.
1706         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1707         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1708         hardware or memory mode which was used.
1709         * sid-cpu.scm (hw-need-write-stack?): New function.
1710         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1711         identify hardware which uses write stacks.
1712         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1713         Initialized to an empty list.
1714         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1715         hw-need-write-stack?.
1716         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1717         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1718         (used-in-delay-rtl?): New method of <hardware-base>.
1719         (hw-used-in-delay-rtl?): New function.
1720
1721         2006-06-20  Dave Brolley  <brolley@redhat.com>
1722
1723         * sid.scm (gen-attr-type): Removed.
1724         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1725         (SH2a-MACH): Add sh5.
1726         (sh2a-nofpu-models): Add units for sh5.
1727         (sh2a-fpu-models): Likewise.
1728
1729         2006-06-15  Dave Brolley  <brolley@redhat.com>
1730
1731         * cpu/sh-sim.cpu: New file.
1732         * cpu/sh-sid.cpu: New file.
1733         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1734         (All fields): Remap for (insn-lsb0? #f)
1735         (All insns): Add timing specs.
1736         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1737         'xattrs' and .splice it in.
1738         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1739         (h-frc,h-drc): Add PROFILE attribute.
1740         (h-fpccr): Removed.
1741         (h-vbr): New hardware.
1742         (All fields): Remap for (insn-lsb0? #f)
1743         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1744         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1745         (fpscr): Use h-fpscr.
1746         (fsdm,fsdn): Use h-fsd.
1747         (dshci): Add xtiming argument and splice it in.
1748         (dr,xd): pmacros removed.
1749         (All insns): Add timing specs, *-MACH attribibutes,
1750         SH4{A}-GROUP attributes.
1751         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1752         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1753         we're being processed for sim or sid.
1754         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1755         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1756         (define-isa compact): Add (isa-parallel-insns 2).
1757         (define-isa media): Add (isa-parallel-insns 2). Add
1758         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1759         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1760         sh4a, sh4al
1761         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1762         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1763         (SH4al-MACH, SH5-MACH): New pmacros.
1764         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1765         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1766         (sh5-media-fp-units, common-model, common-model-with-fp) 
1767         (sh3-model, sh3e-model): New pmacros.
1768         (define-model sh2): New model.
1769         (define-model sh2e): New model.
1770         (define-model sh3): New model.
1771         (define-model sh3e): New model.
1772         (define-model sh2a-nofpu): New model.
1773         (define-model sh2a-fpu): New model.
1774         (define-model sh4-nofpu): New model.
1775         (define-model sh4): New model.
1776         (define-model sh4a-nofpu): New model.
1777         (define-model sh4a): New model.
1778         (define-model sh4al): New model.
1779         (define-model sh5-media): New model.
1780         (define-model sh5): Add all units.
1781         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1782         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1783         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1784         (h-pc): Add PROFILE attribute.
1785         (h-fr): Likewise.
1786         (h-tr): Likewise.
1787         (h-gr,h-grc): Likewise.
1788         (h-cr): Set h-sr in setter.
1789         (h-frbit): Get/Set h-fpscr.
1790         (h-szbit,h-prbit): Likewise.
1791         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1792         Add getter and setter.
1793         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1794         Adjust getter and setter.
1795         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1796         Adjust getter and setter.
1797         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1798         (h-fsd,h-fmov): New hardware.
1799
1800 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1801
1802         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1803         doc/notes.texi, doc/porting.texi, doc/running.texi,
1804         doc/sim.texi: Fix some typos.
1805
1806 2006-07-14  Dave Brolley  <brolley@redhat.com>
1807
1808         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1809         hardware or memory mode which was used.
1810         * sid-cpu.scm (hw-need-write-stack?): New function.
1811         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1812         identify hardware which uses write stacks.
1813         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1814         Initialized to an empty list.
1815         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1816         hw-need-write-stack?.
1817         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1818         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1819         (used-in-delay-rtl?): New method of <hardware-base>.
1820         (hw-used-in-delay-rtl?): New function.
1821
1822 2006-06-20  Dave Brolley  <brolley@redhat.com>
1823
1824         * sid.scm (gen-attr-type): Removed.
1825
1826 2006-05-10  Dave Brolley  <brolley@redhat.com>
1827
1828         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1829         support for (if (application-is? <appname>) (...) (...)).
1830         (-cgen): Add trailing "/" to arch-path.
1831         * utils.scm (dirname): Removed. dirname is a primitive function.
1832
1833 2006-05-09  Dave Brolley  <brolley@redhat.com>
1834
1835         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1836         'entire_insn' not 'base_insn'.
1837         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1838         is null.
1839         * sim.scm (-gen-arch-model-decls): Likewise.
1840         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1841         abuf->written if profiling.
1842         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1843         object->string om the mode.
1844         (-hw-gen-write-stack-decl): Likewise.
1845         * read.scm (include): Use arch-path as file location.
1846         (arch-path): Define it with a default setting.
1847         (-cgen): Update arch-path when "-a" option is specified.
1848         * utils.scm (dirname): New function.
1849
1850 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1851
1852         * configure.in: Remove AC_ARG_PROGRAM.
1853         * configure: Regenerate with autoconf 2.59.
1854
1855 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1856
1857         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1858         SIMULATOR.
1859
1860 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1861
1862         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1863         or an error message otherwise.
1864         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1865         Fix up comments to correctly describe the functions.
1866
1867 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1868             Anil Paranjape   <anilp1@kpitcummins.com>
1869             Shilin Shakti    <shilins@kpitcummins.com>
1870
1871         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1872         CPU description.
1873         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1874
1875 2006-02-10  Nick Clifton  <nickc@redhat.com>
1876
1877         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1878
1879 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1880
1881         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1882         for concatenation.
1883         (-hw-gen-write-stack-decl): Likewise.
1884
1885 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1886
1887         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1888         non-(adata-integral-insn? CURRENT-ARCH) case.
1889
1890 2005-10-28  Dave Brolley  <brolley@redhat.com>
1891
1892         Contribute the following changes:
1893         2005-09-19  Dave Brolley  <brolley@redhat.com>
1894
1895         * attr.scm (gen-value-for-defn-raw): New methods.
1896         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1897         gen-value-for-defn-raw.
1898         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1899
1900         2002-12-13  Dave Brolley  <brolley@redhat.com>
1901
1902         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1903         (-gen-attr-accessors): New function.
1904         (gen-obj-attr-defn): Update terminating initializer.
1905         (gen-obj-attr-end-defn): New function.
1906         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1907         * sid-cpu.scm (cgen-desc.h): Generate code to include
1908         "opcode/cgen-bitset.h"
1909         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1910         name.
1911         * desc.scm ('gen-defn): Update terminating initializer.
1912         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1913         terminatinig initializer.
1914         (gen-hw-decls): Ditto.
1915         (gen-operand-decls): Ditto.
1916         (gen-insn-decls): Ditto.
1917         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1918         (gen-insn-table): Update terminating initializer.
1919         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1920         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1921         * attr.scm (charmask-bytes): New function.
1922         (bitset-attr->charmask): New function.
1923         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1924         differences for SID-SIMULATOR.
1925         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1926         (<enum-attribute>): Ditto.
1927
1928 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1929
1930         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1931
1932 2005-10-24  DJ Delorie  <dj@redhat.com>
1933
1934         * operand.scm (-anyof-merge-syntax): Print a more useful error
1935         message.
1936
1937 2005-10-19  Nick Clifton  <nickc@redhat.com>
1938
1939         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1940         patch.
1941
1942 2005-10-18  Andreas Schwab  <schwab@suse.de>
1943
1944         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1945
1946 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1947
1948         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1949         size.
1950
1951 2005-08-02  Dave Brolley  <brolley@redhat.com>
1952
1953         * rtl-c.scm (s-unop): Don't dereference
1954         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1955         (s-binop, s-convop, s-cmpop): Likewise.
1956
1957 2005-07-29  Dave Brolley  <brolley@redhat.com>
1958
1959         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1960         if with-profile or with-parallel-write.
1961         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1962         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1963         string-append.
1964
1965 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1966
1967         * cpu/fr30.opc (print_register_list): Correct format strings.
1968         * cpu/ip2k.opc: Likewise.
1969
1970 2005-07-05  Nick Clifton  <nickc@redhat.com>
1971
1972         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1973         unsigned in order to avoid compile time warnings about sign
1974         conflicts.
1975
1976 2005-07-01  Nick Clifton  <nickc@redhat.com>
1977
1978         * desc-cpu.scm: Update to ISO C90 function declaration style.
1979         * opc-asmdis.scm: Likewise.
1980         * opc-ibld.scm: Likewise.
1981         * opc-itab.scm: Likewise.
1982         * cpu/fr30.opc: Likewise.
1983         * cpu/i960.opc: Likewise.
1984         * cpu/ip2k.opc: Likewise.
1985         * cpu/iq2000.opc: Likewise.
1986         * cpu/m32r.opc: Likewise.
1987         * cpu/openrisc.opc: Likewise.
1988         * cpu/sh.opc: Likewise.
1989         * cpu/sparc.opc: Likewise.
1990         * cpu/xstormy16.opc: Likewise.
1991
1992 2005-06-15  Dave Brolley  <brolley@redhat.com>
1993
1994         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1995         (cgen-cpu.h): Call it.
1996
1997         Contributed on behalf of Graydon Hoare
1998         2001-06-05  graydon hoare  <graydon@redhat.com>
1999
2000         * utils.scm (foldl): Define.
2001         (foldr): Define.
2002         (filter): Define.
2003         (union): Define.
2004         (intersection): Simplify.
2005         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2006         (-op-gen-delayed-set-maybe-trace): Define.
2007         (<operand> 'gen-set-{quiet,trace}): Delegate to
2008         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2009         up and needs cleaning.
2010         (-with-parallel?): Hardwire with-parallel to #t.
2011         (<operand> 'cxmake-get): Replace with lookahead-aware code
2012         * sid-decode.scm: Remove per-insn writeback fns.
2013         (-gen-idesc-decls): Redefine sem_fn type.
2014         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2015         with write stack stuff.
2016         (cgen-write.cxx): Replace per-insn writebacks with single write
2017         stack writeback. Add write stack reset function.
2018         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2019         stack stuff.
2020         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2021         estate attribute set.
2022         (delay): Set #:delayed attribute to calculated delay, update
2023         maximum delay of cpu, check (delay ...) usage.
2024         * operand.scm (<operand>): Add delayed slot to <operand>.
2025         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2026         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2027         * doc/rtl.texi (Expressions): Add section on (delay ...).
2028
2029 2005-06-13  Jim Blandy  <jimb@redhat.com>
2030
2031         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2032         as well as strings.
2033
2034 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2035
2036         * doc/porting.texi: Change all mention of md_apply_fix3 and
2037         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2038         respectively.
2039
2040 2005-05-18  Dave Brolley  <brolley@redhat.com>
2041
2042         * utils-sim.scm (-gen-decode-default-entry): New function.
2043         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2044         code to check that all opcodes bits match.
2045         (-gen-decoder-switch): Use -gen-decode-default-entry.
2046
2047 2005-05-16  Jim Blandy  <jimb@redhat.com>
2048
2049         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2050         fetched by one of our GETIMEM* methods.
2051         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2052         base-insn-sized chunks.
2053
2054 2005-05-10  Nick Clifton  <nickc@redhat.com>
2055
2056         * Update the address and phone number of the FSF organization in
2057         the GPL notices in the following files:
2058         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2059         cpu/powerpc.cpu, slib/random.scm
2060
2061 2005-05-06  Jim Blandy  <jimb@redhat.com>
2062
2063         * pprint.scm, cos-pprint.scm: Add documentation.
2064
2065         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2066
2067         * pprint.scm, cos-pprint.scm: New files.
2068
2069 2005-04-04  Nick Clifton  <nickc@redhat.com>
2070
2071         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2072         avoid a compile time warning.
2073
2074 2005-03-18  Nick Clifton  <nickc@redhat.com>
2075
2076         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2077         "percent-operand" from "%operand" as the latter confuses xgettext
2078         into thinking that it is a C printf formating directive, which
2079         prevents proper translation.
2080
2081 2005-02-23  Nick Clifton  <nickc@redhat.com>
2082
2083         * opcodes.scm (gen-parse-number): Add a cast to the desired
2084         pointer signed'ness in order to prevent compile time warnings.
2085         * cpu/ip2k.opc: Fixed compile time warnings about differing
2086         signed'ness of pointers passed to functions.
2087         * cpu/iq2000.opc: Likewise.
2088         * cpu/m32r.opc: Likewise.
2089         * cpu/openrisc.opc: Likewise.
2090         * cpu/xstormy16.opc: Likewise.
2091
2092 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2093
2094         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2095         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2096
2097 2005-02-16  Dave Brolley  <brolley@redhat.com>
2098
2099         * utils.scm: Update copyright years.
2100         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2101         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2102         * operand.scm (-derived-operand-parse): Move logit message from level 1
2103         to level 2.
2104
2105 2005-02-15  Nick Clifton  <nickc@redhat.com>
2106
2107         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2108         prevent compile time warning messages.
2109         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2110         * utils-gen.scm (attr-int-gen-defn): Likewise.
2111         (attr-gen-defn): Likewise.
2112         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2113         (print_dollarhex16): Remove unused function.
2114
2115 2005-02-15  Jim Blandy  <jimb@redhat.com>
2116
2117         * guile.scm (cgen-call-with-debugging): Doc fix.
2118
2119         Make backtraces work more reliably.
2120         * guile.scm: Set up debugging parameters, and enable debugging and
2121         source positions while loading.
2122         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2123         functions.
2124         * read.scm: Don't set debugging parameters here.
2125         (catch-with-backtrace): Function deleted.
2126         (-cgen): Simply note the presence or absence of the -b option.
2127         Pass the flag to cgen-call-with-debugging, so debugging is turned
2128         off here if the user didn't request it, for faster computation.
2129         (cgen): Call cgen-debugging-stack-start here, instead of
2130         catch-with-backtrace.
2131
2132         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2133         trailing -s.
2134         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2135         Don't write out the trailing -s here.
2136         * Makefile.in: Regenerated.
2137         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2138         fixup.scm here; let the caller decide which Scheme's customization
2139         file to preload.
2140         * dev.scm: Load guile.scm, not fixup.scm.
2141         * fixup.scm: Deleted; contents have all moved to guile.scm.
2142         * README: Doc fix.
2143
2144         * guile.scm (debug-write): New function.
2145
2146 2005-02-14  Jim Blandy  <jimb@redhat.com>
2147
2148         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2149         transformer procedure, not eval.  Transformer procedures take one
2150         argument.
2151
2152 2005-02-11  Nick Clifton  <nickc@redhat.com>
2153
2154         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2155         to 'bfd_vma *' in order avoid compile time warning message.
2156
2157 2005-02-09  Jim Blandy  <jimb@redhat.com>
2158
2159         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2160         corresponding change in the sim/common directory.)
2161
2162 2005-02-07  Jim Blandy  <jimb@redhat.com>
2163
2164         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2165         changes in the opcodes directory.)
2166
2167         * guile.scm: New file, containing Guile-specific definitions and
2168         adaptations.  This is loaded by the app-specific shell scripts.
2169         Initially identical to fixup.scm.
2170         * cgen-sid.scm: Don't load fixup.scm here.
2171
2172         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2173         latter is a macro.
2174
2175 2005-01-27  Jim Blandy  <jimb@redhat.com>
2176
2177         * utils.scm (string/symbol->append): Renamed from 'concat'.
2178         * opcodes.scm (gen-switch): Use new name.
2179         * insn.scm (-sub-insn-make!): Same.
2180         * rtl.scm (rtx-dump): Same.
2181         * semantics.scm (semantic-compile): Same.
2182
2183 2005-01-20  Jim Blandy  <jimb@redhat.com>
2184
2185         * opcodes.scm (gen-switch): Use concat instead of string-map.
2186
2187         * utils.scm (concat): New function.
2188         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2189         * rtl.scm (rtx-dump): Same.
2190         * semantics.scm (semantic-compile): Same.
2191
2192 2004-12-16  Jim Blandy  <jimb@redhat.com>
2193
2194         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2195         applied to symbols.  Process everything as strings, and then
2196         convert to a symbol at the end.
2197
2198         * read.scm (debug-repl): Temporarily redirect input and output to
2199         /dev/tty while we debug, so we don't interfere with whatever CGEN
2200         is reading or writing.
2201         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2202         New functions.
2203
2204 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2205
2206         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2207         will work with newer versions of guile.
2208
2209 2004-10-27  Nick Clifton  <nickc@redhat.com>
2210
2211         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2212         * cpu/iq2000.cpu: Likewise.
2213
2214 2004-07-21  DJ Delorie  <dj@redhat.com>
2215
2216         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2217
2218 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2219
2220         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2221         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2222
2223 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2224
2225         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2226
2227 2004-03-22  Dave Brolley  <brolley@redhat.com>
2228
2229         * utils.scm (copyright-fsf): Update copyright years.
2230         (copyright-red-hat): Ditto.
2231         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2232         code.
2233         (-op-gen-set-trace-parallel): Ditto.
2234
2235 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2236
2237         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2238         disassembling codes for 0x*2 addresses.
2239
2240 2004-01-29  Dave Brolley  <brolley@redhat.com>
2241
2242         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2243         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2244         in the extra bit positions.
2245
2246 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2247
2248         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2249
2250 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2251
2252         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2253         "short" being 16 bit.
2254         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2255         internationalize error message.
2256         (parse_lo16): Likewise.  Remove useless code.
2257
2258 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2259
2260         * cpu/m32r.cpu : Add new model m32r2.
2261         Add new instructions.
2262         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2263         Changed PIPE attr of push from O to OS.
2264         Care for Little-endian of M32R.
2265         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2266         Care for Little-endian of M32R.
2267         (parse_slo16): signed extension for value.
2268
2269 2003-10-26  Dave Brolley  <brolley@redhat.com>
2270
2271         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2272         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2273         (-gen-extract-fn): Call -gen-record-profile-args.
2274
2275 2003-10-21  Dave Brolley  <brolley@redhat.com>
2276
2277         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2278         a static const int.
2279         * decode.scm (-opcode-slots): Correct typo in logit call.
2280
2281 2003-10-09  Jim Blandy  <jimb@redhat.com>
2282
2283         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2284         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2285
2286         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2287
2288 2003-10-06  Dave Brolley  <brolley@redhat.com>
2289
2290         * gen-all-doc: Add fr550.
2291
2292 2003-09-11  Doug Evans  <dje@sebabeach.org>
2293
2294         * Makefile.am (ARCHFILE): New var.
2295         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2296         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2297         * Makefile.in: Regenerate.
2298
2299 2003-09-08  Dave Brolley  <brolley@redhat.com>
2300
2301         On behalf of Doug Evans <dje@sebabeach.org>
2302         Pass in paths to input files, instead of assuming they live in
2303         $srcdir/cpu.  Plus misc. option processing cleanup.
2304         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2305         Add pre-process pass to all options.
2306         * cgen-gas.scm (gas-arguments): Ditto.
2307         * cgen-sid.scm (sim-arguments): Ditto.
2308         * cgen-sim.scm (sim-arguments): Ditto.
2309         * cgen-stest.scm (stest-arguments): Ditto.
2310         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2311         (-opc-file-path): New global.
2312         (opc-file-path): New fn.
2313         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2314         All callers updated.
2315         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2316         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2317         Replace srcdir arg with opc-file.  All callers updated.
2318         * read.scm (-opt-spec-update): Delete.
2319         (opt-get-first-pass,opt-get-second-pass): New fns.
2320         (-cgen): Process application-specific arguments in two passes.
2321
2322 2003-08-29  Dave Brolley  <brolley@redhat.com>
2323
2324         * cpu/frv.cpu: Removed.
2325         * cpu/frv.opc: Removed.
2326
2327 2003-08-21  Nick Clifton  <nickc@redhat.com>
2328
2329         * cpu/frv.cpu (mbtoh): Replace input parameter to
2330         u-media-dual-expand and u-media-dual-btoh with output parameter.
2331         (cmbtoh): Add profiling hack.
2332
2333 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2334
2335         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2336
2337 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2338
2339         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2340         the elements for the END record of CGEN_OPINST, silencing warnings.
2341
2342 2003-07-15  Doug Evans  <dje@sebabeach.org>
2343
2344         Add guile 1.6.4 support.
2345         - empty list must be quoted
2346         - string functions have stricter type checking
2347         - eval now takes a second argument
2348         - symbol-bound? is deprecated
2349         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2350         (bitset-attr->list): Ensure arg to string-cut is a string.
2351         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2352         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2353         * cos.scm (-class-list): Must quote empty list.
2354         (-class-parent-classes,-class-compute-class-desc): Ditto.
2355         (class-make,make,object-reset!): Ditto.
2356         (method-make-make!): Call eval1 instead of eval.
2357         (method-make-forward!,method-make-virtual-forward!): Ditto.
2358         * decode.scm (subdtable-add): Use stringsym-append instead of
2359         string-append.
2360         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2361         (-build-decode-table-entry): Fetch string name of insn.
2362         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2363         (-gen-mach-table-defns): Ditto for mach.
2364         (gen-ifld-defns): Ditto for ifld.
2365         (gen-hw-table-defns): Ditto for hw.
2366         (gen-operand-table): Ditto for op.
2367         (gen-insn-table-entry): Ditto for insn.
2368         * desc.scm (gen-attr-table-defn): Ditto for attr.
2369         (<keyword>,gen-defn): Don't pass symbols to string-append.
2370         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2371         symbol-append.
2372         (enum-vals-upcase): Use symbol-upcase to build result.
2373         (-enum-parse): Use stringsym-append to build errtxt.
2374         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2375         (eval1): New function.
2376         (symbol-bound?): Provide own version if >= guile 1.6.
2377         * hardware.scm (define-keyword): Use string-append instead of
2378         symbol-append.
2379         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2380         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2381         before using.
2382         (gen-list-entry): Handle either symbol or string `name' arg.
2383         (gen-obj-doc-header): Fetch string name of `o' arg.
2384         (define-cpu-intro): Ditto for cpu.
2385         (gen-mach-intro): Ditto for mach.
2386         (gen-model-intro): Ditto for model.
2387         (gen-isa-intro): Ditto for isa.
2388         (gen-machine-doc-1): Ditto for isa.
2389         (gen-reg-doc-1): Convert mach to string first.
2390         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2391         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2392         to string first.
2393         (gen-insn-categories): Fetch string name of mach.  Convert
2394         enum-val-name to string first.
2395         (gen-insn-docs): Fetch string name of mach.
2396         * ifield.scm (ifld-ilk): Result is a string.
2397         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2398         Fetch string name of ifld.
2399         (-sfmt-search-key): Similarily for ifld and op.
2400         * insn.scm (syntax-make): Fetch string name of syntax element.
2401         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2402         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2403         * mode.scm (mode:c-type): Result is a string.
2404         (mode:enum): Fetch string name of mode.
2405         (-mode-parse): Use stringsym-append to build errtxt.
2406         * model.scm (model:enum): Fetch string name of model.
2407         (-model-parse): Use stringsym-append to build errtxt.
2408         (parse-insn-timing): Must quote empty list.
2409         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2410         (-gen-minsn-opcode-entry): Ditto.
2411         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2412         convert to string.
2413         (read-cpu.opc): Convert current-arch-name to a string before using.
2414         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2415         (<derived-operand>): Must quote empty list.
2416         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2417         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2418         of ifld.
2419         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2420         (-pmacro-sym): Must convert symbols to strings before passing to
2421         string-append.
2422         (-pmacro-str): Ditto.
2423         (pmacros-init!): Use eval1 instead of eval.
2424         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2425         (keep-isa-atlist?): Ditto.
2426         (cmd-if): Use eval1 instead of eval.
2427         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2428         (-rtl-c-get): Fetch string name of src.
2429         (s-unop): Ditto for mode.
2430         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2431         (-gen-par-temp-defns,subword): Ditto.
2432         (join): Use stringsym-append instead of string-append.
2433         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2434         (rtx-traverse-debug): Fetch string name of rtx-obj.
2435         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2436         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2437         (rtx-pretty-name): Result is a string.
2438         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2439         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2440         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2441         before using.
2442         (-gen-sfrag-case): Fetch string name of user.
2443         * sid-model.scm (unit:enum): Fetch string name of unit.
2444         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2445         (<hw-memory>,gen-set-quiet): Ditto.
2446         (gen-mode-defs): Ditto.
2447         (sim-finish!): Convert current-arch-name to a string before using.
2448         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2449         (-gen-no-scache-semantic-fn): Ditto.
2450         (cgen-defs.h): Fetch string name of isa.
2451         (cgen-read.c): Convert current-arch-name to a string before using.
2452         (cgen-write.c): Ditto.
2453         * sim-model.scm (unit:enum): Fetch string name of unit.
2454         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2455         (-gen-model-timing-table): Fetch string name of model.
2456         (-gen-mach-model-table): Ditto.
2457         (-gen-mach-defns): Fetch string name of mach.
2458         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2459         (<hw-memory>,cxmake-get): Fetch string name of mode.
2460         (<hw-memory>,gen-set-quiet): Ditto.
2461         (gen-mode-defs): Ditto.
2462         (sim-finish!): Must quote empty list.
2463         * utils-cgen.scm (<ident>): Must quote empty list.
2464         (obj:str-name): New fn.
2465         (parse-comment): Result is a string.
2466         (parse-symbol): Result is a symbol.
2467         (parse-string): Result is a string.
2468         (keyword-list?): Convert arg to string before calling string-ref.
2469         (keyword-list->arg-list): Ditto.
2470         (gen-attr-name): Convert attr-name to string first.
2471         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2472         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2473         (gen-define-ifmt-ifields): Ditto for fld.
2474         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2475         map-over-string.
2476         (gen-file-name): Ditto.
2477         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2478         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2479         (reduce): Call eval1 instead of eval.
2480         * cpu/m32r.cpu (addi): Don't use `#.'.
2481
2482         * gen-all-sim: Fix some typos.
2483
2484 2003-07-08  Doug Evans  <dje@sebabeach.org>
2485
2486         * gen-all-doc: Ensure run from cgen src dir.
2487         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2488         * gen-all-sid: Similarily, in ./tmp-sid.
2489         * gen-all-sim: Similarily, in ./tmp-sim.
2490
2491 2003-06-20  Doug Evans  <dje@sebabeach.org>
2492
2493         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2494
2495 2003-06-19  Doug Evans  <dje@sebabeach.org>
2496
2497         * mach.scm (-ifld-already-defined?): New proc.
2498         (current-ifld-add!): Use it.
2499         (-op-already-defined?): New proc.
2500         (current-op-add!): Use it.
2501         (-insn-already-defined?): New proc.
2502         (current-insn-add!): Use it.
2503         (-minsn-already-defined?): New proc.
2504         (current-minsn-add!): Use it.
2505         (obj-isa-list): New proc.
2506         (isa-supports?): Use it.
2507
2508 2003-06-10  Doug Evans  <dje@sebabeach.org>
2509
2510         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2511         * cpu/m32r.cpu (all insns): Ditto.
2512
2513         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2514         "unspecified".
2515
2516         * gen-all-doc: Split arm and frv docs up a bit.
2517
2518         * cpu/arm.cpu: Add IDOC attribute.
2519         * cpu/frv.cpu: Ditto.
2520         * cpu/i960.cpu: Ditto.
2521         * cpu/openrisc.cpu: Ditto.
2522         * cpu/xstormy16.cpu: Ditto.
2523         * cpu/m32r.cpu: Ditto.
2524         (all insns): Explicitly specify IDOC attribute.
2525
2526         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2527         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2528         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2529         * Makefile.in: Regenerate.
2530         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2531         (-attr-read): Defer computing default value until we know the type.
2532         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2533         (<attr-list>:attr-present?): New method.
2534         (atlist-attr-present?,obj-attr-present?): New fns.
2535         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2536         (attr-builtin!): New insn attr IDOC.
2537         * cgen-doc.scm (doc-arguments): New args -I,-N.
2538         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2539         Support comment as fourth element of enum value.
2540         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2541         * html.scm (gen-html-header): New arg kind, all callers updated.
2542         (gen-table-of-contents): New arg insn-file, all callers updated.
2543         (gen-list-entry,gen-doc-header): New fn.
2544         (get-operands): Delete.
2545         (gen-iformat-table): Rewrite.
2546         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2547         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2548         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2549         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2550         (get-insns-for-category,gen-categories-insn-lists): New fns.
2551         (gen-insn-docs): Simplify each insn's semantics first.
2552         Print insn tables sorted by IDOC categories.
2553         (*insn-html-file-name*): New global.
2554         (cgen-insn.html): New fn.
2555         (cgen-all): Update.
2556         * insn.scm (<insn>): Create a setter for the `tmp' member.
2557         * semantics.scm (insn-build-known-values): Renamed from
2558         -build-known-values.  All callers updated.
2559
2560         * rtl.scm: Move traveral/evaluation support to ...
2561         * rtl-traverse.scm: New file.
2562         * read.scm: Maybe-load rtl-traverse.scm.
2563
2564         * rtl.scm (-rtx-valid-types): Add SETRTX.
2565
2566         * rtx-funcs.scm (nop,parallel): Fix mode.
2567
2568         * utils.scm (eqv-lookup-index): New fn.
2569         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2570
2571         * dev.scm (load-doc): Set APPLICATION.
2572
2573 2003-06-10  Dave Brolley  <brolley@redhat.com>
2574
2575         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2576         * sid-decode.scm: Generate #include of config.h into
2577         @prefix@-decode.cxx.
2578         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2579
2580 2003-06-07  Doug Evans  <dje@sebabeach.org>
2581
2582         * gen-all-sid: New file.
2583         * gen-all-opcodes: New file.
2584
2585 2003-06-05  Nick Clifton  <nickc@redhat.com>
2586
2587         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2588         version of the FRinti operand.
2589         (FRintjeven): Likewise for FRintj.
2590         (FRintkeven): Likewise for FRintk.
2591         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2592         media-quad-arith-sat-semantics, media-quad-arith-sat,
2593         conditional-media-quad-arith-sat, mdunpackh,
2594         media-quad-multiply-semantics, media-quad-multiply,
2595         conditional-media-quad-multiply, media-quad-complex-i,
2596         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2597         conditional-media-quad-multiply-acc, munpackh,
2598         media-quad-multiply-cross-acc-semantics, mdpackh,
2599         media-quad-multiply-cross-acc, mbtoh-semantics,
2600         media-quad-cross-multiply-cross-acc-semantics,
2601         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2602         media-quad-cross-multiply-acc-semantics, cmbtoh,
2603         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2604         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2605         cmhtob): Use new operands.
2606         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2607         (parse_even_register): New function.
2608
2609 2003-06-04  Doug Evans  <dje@sebabeach.org>
2610
2611         Better handling of 64 bit and mixed 32/64 bit architectures.
2612         * hardware.scm (hw-update-word-modes!): New fn.
2613         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2614         hw-update-word-modes!.
2615         (state-word-bitsize): Replace FIXME with requested check.
2616         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2617         * mode.scm (mode-find): Ignore INT,UINT.
2618         (-mode-word-sizes-kind): New global.
2619         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2620         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2621         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2622         of mode-list to ...
2623         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2624         unusable, correct values set later.
2625         (mode-finish!): Remove cruft.
2626         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2627         * opcodes.scm (opcodes-init!): Ditto.
2628         * rtx-funcs.scm (annul): Fix mode of pc.
2629         * cpu/ia64.cpu: Remove cruft that sets word modes.
2630         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2631
2632 2003-06-03  Nick Clifton  <nickc@redhat.com>
2633
2634         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2635         immediate value not unsigned.
2636
2637 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2638
2639         * cpu/sh.cpu: Amend comments to refer to SuperH.
2640         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2641         * cpu/sh64-media.cpu: Likewise.
2642         (Saturation): Update manual reference.
2643
2644 2003-05-15  Doug Evans  <dje@sebabeach.org>
2645
2646         * Makefile.am (srcroot): New var.
2647         (html): New rule.
2648         * Makefile.in: Regenerate.
2649         * cgen-doc.scm: New file.
2650         * html.scm: New file.
2651         * gen-all-doc: New file.
2652         * dev.scm (cload): Handle DOC application.
2653         (load-doc): New fn.
2654         * machs.scm (machs-for-cpu): New fn.
2655         * model.scm (models-for-cpu): New fn.
2656         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2657         All uses updated.
2658         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2659         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2660
2661         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2662         (-gen-decode-bits): Instead put in better fix here.
2663
2664         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2665
2666 2003-05-01  DJ Delorie  <dj@redhat.com>
2667
2668         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2669         word accesses.
2670         (set-alignfix-mem): Likewise.
2671
2672 2003-04-16  Dave Brolley  <brolley@redhat.com>
2673
2674         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2675         * utils.scm (copyright-fsf): Update generate copyright years.
2676         (copyright-cygnus): Ditto.
2677         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2678         operands.
2679         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2680         here.
2681         (<operand>'gen-profile-code): New parameter 'when'.
2682         (<iunit>'gen-profile-code): Ditto.
2683         (<insn>'gen-profile-code): Ditto.
2684         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2685         'insn_reference' for the 'after' function.
2686         * model.scm (unit:enum): Moved to sim-model.scm.
2687         * sim-model.scm (unit:enum): Moved from model.scm.
2688         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2689         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2690         * sid-model.scm (unit:enum): New version for sid.
2691         (gen-model-class-name): New function.
2692         (gen-model-unit-fn-decl): New function.
2693         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2694         (gen-model-unit-fn-name): New parameter 'when'.
2695         (-gen-model-insn-fn-name): Ditto.
2696         (-gen-model-insn-qualified-fn-name): New function.
2697         (-gen-model-insn-fn-decl): New function.
2698         (-gen-model-insn-fn-decls): New function.
2699         (-gen-model-insn-fn): New parameter 'when'. Call
2700         -gen-model-insn-qualified-fn-name.
2701         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2702         functions for modelling insn before and after execution.
2703         (-gen-model-class-decls): New function.
2704         (" (gen-model-class-name model) "): New function.
2705         (gen-model-classes): New function.
2706         (-gen-insn-timing): Generate functions for modelling insn before and after
2707         execution.
2708         (-gen-insn-unit-timing): Generate class-qualified names.
2709         (-gen-model-timing-table): Ditto.
2710         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2711         not needed (yet) by sid.
2712         (cgen-model.h): New function.
2713
2714 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2715
2716         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2717         * cpu/sh64-compact.cpu: Likewise.
2718         * cpu/sh64-media.cpu: Likewise.
2719
2720 2003-03-21  DJ Delorie  <dj@redhat.com>
2721
2722         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2723         which indicates if the sign flag is set from bit 15 or 7.
2724         Adjust all callers.
2725         (set-psw): New argument ws, propogate it.
2726         (set-psw-nowrite): Likewise.
2727         (set-mem-psw): Likewise.
2728         (set-psw-carry): Likewise.  Use temporaries to prevent
2729         prematurely overwriting needed inputs.
2730         (set-psw-rrotate17): Fix logic.
2731         (shrgrgr): Preserve carry for zero-bit shifts.
2732         (shrgrimm): Likewise.
2733         (shlgrgr): Likewise.
2734         (shlgrimm): Likewise.
2735         (asrgrgr): Likewise.
2736         (asrgrimm): Likewise.
2737         (reset): New.
2738
2739 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2740
2741         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2742
2743 2002-03-05  DJ Delorie  <dj@redhat.com>
2744
2745         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2746         prematurely overwriting needed inputs.
2747         (set-psw-sub): Likewise.
2748
2749 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2750
2751         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2752
2753 2003-02-18  DJ Delorie  <dj@redhat.com>
2754
2755         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2756         (movlmemimm): Just mask the address.
2757         (movhmemimm): Likewise.
2758         (movlmemgr): Likewise.
2759         (movhmemgr): Likewise.
2760         (set-psw): Always set the psw last.
2761         (set-psw-carry): Likewise.
2762         (set-psw-add): Likewise.
2763         (set-psw-sub): Likewise.
2764
2765         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2766         of 16 patterns from the set-psw-rotate17 function.
2767         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2768         movgriipostincgr, movgriipredecgr): Set psw correctly.
2769         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2770         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2771         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2772
2773 2003-02-11  Dave Brolley  <brolley@redhat.com>
2774
2775         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2776         @arch@_cgen-ifld_table.
2777         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2778         @arch@_cgen-ifld_table.
2779
2780 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2781
2782         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2783
2784 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2785
2786         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2787         empty ISAs.
2788
2789 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2790
2791         * utils-gen.scm (attr-int-gen-defn): Define.
2792
2793 2002-12-21  Doug Evans  <dje@sebabeach.org>
2794
2795         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2796         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2797
2798         * dev.scm (cload): Update location of .cpu files.
2799
2800 2002-12-19  Doug Evans  <dje@sebabeach.org>
2801
2802         * utils-sim.scm (gen-profile-sym): New fn.
2803         (<operand>,sbuf-profile-sym): New method.
2804         (<operand>,sbuf-profile-elm): Use it.
2805         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2806         of hardcoding symbol name.
2807         (<operand>,gen-profile-code): Ditto.
2808         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2809         symbol name.
2810
2811         * mode.scm (mode-sem-mode): New fn.
2812         * operand.scm (op:new-mode): Update. mode-name.
2813         (op-natural-mode?) New fn.
2814         * rtl.scm (hw): Set hw-name,mode-name.
2815
2816         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2817         Instead do:
2818         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2819         as size of IDESC-TABLE-VAR.
2820         (@prefix@_init_idesc_table): Ditto.
2821         * sim-model.scm (-gen-mach-defns): Ditto.
2822         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2823
2824         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2825
2826         * insn.scm (-parse-insn-format-symbol): Improve error message.
2827         (-parse-insn-format): Ditto.
2828
2829         * gen-all-sim: New script.
2830
2831 2002-12-16  DJ Delorie  <dj@delorie.com>
2832
2833         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2834
2835 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2836
2837         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2838         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2839         (parse_immediate16): Handle immediate16 values, which now include
2840         @hi(label) and @lo(label)
2841
2842 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2843
2844         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2845         Add braces and cast for union field.
2846         (gen-multi-ifield-nodes): Add braces and cast for union field.
2847         (cgen_operand_table): Similarly fix sentinel.
2848         (cgen_cpu_close): Constify "insns".  Formatting.
2849         (cgen-desc.c): Include xregex.h.
2850         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2851         Prototype.
2852         <opc.c>: Include safe-ctype.h.
2853         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2854         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2855         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2856         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2857         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2858         (parse_addr16): Correct type of "value".  Formatting.
2859         (parse_addr16_p): Likewise.
2860         (parse_addr16_cjp): Likewise.
2861         (parse_lit8): Likewise.
2862         (parse_bit3): Formatting.
2863         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2864         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2865         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2866         print_decimal.
2867         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2868         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2869         (print_dollarhex8): Likewise.
2870         (print_dollarhex16): Likewise.
2871         (print_dollarhex_addr16h): Likewise.
2872         (print_dollarhex_addr16l): Likewise.
2873         (print_dollarhex_p): Likewise.
2874         (print_dollarhex_cj): Likewise.
2875         (print_decimal): Likewise.
2876         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2877
2878 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2879
2880         * doc/rtl.texi (Model variants): Mention current limitations for
2881         unit inputs and outputs.
2882         (Hardware elements) <attribute PROFILE>: Be slightly more
2883         verbose.
2884         (Instructions) <timing>: input/output overrides have a direction
2885         operand.
2886
2887 2002-11-25  DJ Delorie  <dj@redhat.com>
2888
2889         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2890
2891 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2892
2893         * cpu/iq10.cpu: New file.
2894         * cpu/iq2000.cpu: Likewise.
2895         * cpu/iq2000.opc: Likewise.
2896         * cpu/iq2000m.cpu: Likewise.
2897
2898 2002-11-19  DJ Delorie  <dj@redhat.com>
2899
2900         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2901
2902 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2903
2904         * dev.scm: Call getenv with a string, not a symbol.
2905
2906 2002-10-08  Doug Evans  <dje@transmeta.com>
2907             Hans-Peter Nilsson  <hp@axis.com>
2908
2909         * types.scm (bitrange-overlap?): Handle lsb0?.
2910
2911 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2912
2913         From Robert Cragie <rcc@jennic.com>:
2914         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2915
2916 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2917             Ben Elliston  <bje@redhat.com>
2918             John Healy  <jhealy@redhat.com>
2919             Jeff Johnston  <jjohnstn@redhat.com>
2920             Alan Lehotsky  <alehotsky@redhat.com>
2921             Ubicom Inc. <SupportDesk@ubicom.com>
2922
2923         * cpu/ip2k.cpu: New file.
2924         * cpu/ip2k.opc: Likewise.
2925
2926 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2927
2928         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2929
2930 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2931
2932         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2933         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2934         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2935         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2936         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2937         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2938         (-sthi-byte): If there is a single byte to store, store it at
2939         proper address.
2940         (sthil, sthiq): Fix big-endian behaviour.
2941         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2942         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2943         (saturate): Use Dimode to check if saturation operation is required.
2944         (usaturate): Likewise.
2945         (mpermw): Fix mask.
2946         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2947         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2948         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2949         (msadubq): Fix subword index in second operand of first subtraction.
2950
2951 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2952
2953         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2954         code.
2955
2956 2002-06-18  Dave Brolley  <brolley@redhat.com>
2957
2958         * cpu/frv.cpu: New cpu description.
2959         * cpu/frv.opc: New cpu support code.
2960
2961 2002-05-21  Dave Brolley  <brolley@redhat.com>
2962
2963         * decode.scm (-opcode-slots): Don't consider bits beyond the
2964         length of the insn.
2965
2966 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2967
2968         * cpu/powerpc.cpu: New file.
2969
2970 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2971
2972         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2973
2974 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2975
2976         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2977         results are expanded recursively.
2978
2979 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2980
2981         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2982         call scan-symbol on it, to enable recursive macro-expansion.
2983
2984 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2985
2986         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2987         for multiple-isa configurations.
2988         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2989
2990 2002-02-04  Ben Elliston  <bje@redhat.com>
2991
2992         * cpu/sh.cpu, cpu/sh.opc: New files.
2993         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2994
2995 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2996
2997         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2998         (Enumerated constants): Mention that an ifield must not specify a
2999         multi-ifield.
3000         (Instruction operands): Ditto for index.
3001         (Expressions) <parallel>: Remove misplaced mention of local
3002         variables.
3003         <if>: Mention that mode must be specified and non-VOID when the
3004         result is used.
3005
3006 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3007
3008         * doc/porting.texi: When referring to *.opc, mention they are in
3009         the cpu subdir.  Call top-level directory toplevel, not devo.
3010         Close string in define-normal-insn example.
3011
3012         * doc/pmacros.texi: Fix .substr typo to .substring.
3013         Mention that .sym expansions are not further expanded.
3014
3015 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3016
3017         * desc-cpu.scm (ifld-number-cache): Add.
3018         (ifld-number): Add.
3019         (gen-maybe-multi-ifld-of-op): Add.
3020         (gen-maybe-multi-ifld): Add.
3021         (gen-multi-ifield-nodes): Add.
3022         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3023
3024 2002-01-10  matthew green  <mrg@redhat.com>
3025
3026         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3027         (gr-Rb-names): ... to this.
3028         (h-Rb): New hardware piece.
3029         (h-Rbj): Use gr-Rb-names.
3030         (Rb): Use h-Rb.
3031         (holdx): New instruction.
3032
3033 2002-01-07  Ben Elliston  <bje@redhat.com>
3034
3035         * utils.scm (package-cygnus-simulators): Rename from this ..
3036         (package-red-hat-simulators): .. to this.
3037         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3038         * sid-cpu.scm (cgen-desc.h): Likewise.
3039         (cgen-cpu.h): Likewise.
3040         (cgen-defs.h): Likewise.
3041         (cgen-write.cxx): Likewise.
3042         (cgen-semantics.cxx): Likewise.
3043         (cgen-sem-switch.cxx): Likewise.
3044         * sid-decode.scm (cgen-decode.h): Likewise.
3045         (cgen-decode.cxx): Likewise.
3046         * sid-model.scm (cgen-model.cxx): Likewise.
3047         * sid.scm (option-set!): Likewise.
3048         * sim.scm (option-set!): Likewise.
3049
3050 2002-01-07  Ben Elliston  <bje@redhat.com>
3051
3052         * utils.scm (copyright-fsf): Add 2002.
3053         (copyright-cygnus): Rename to copyright-red-hat.
3054         (copyright-red-hat): Add 2002.
3055         (CURRENT-COPYRIGHT): Update comment.
3056         * opcodes.scm (option-set!): Update callers.
3057         * sid-model.scm (cgen-model.cxx): Likewise.
3058         * sid-cpu.scm: Likewise.
3059         * sid-decode.scm: Likewise.
3060         * sid.scm (option-set!): Handle "redhat" as an option for
3061         "copyright"; use copyright-red-hat.
3062         * sim.scm (option-set!): Likewise.
3063
3064 2002-01-03  Dave Brolley  <brolley@redhat.com>
3065
3066         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3067         number of insns in the list.  Update the population count function to
3068         identify and prioritize 3 catgories of useful bits.
3069         (-population-top-few): Don't consider bits with a population count of
3070         zero.
3071         (-build-decode-table-entry): Don't call
3072         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3073         identical insns at the next tree level.
3074         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3075         this function is no longer used.
3076         (filter-non-specialized-ambiguous-insns): New function.
3077         (filter-identical-ambiguous-insns): New function.
3078         (find-identical-insn): New function.
3079         (filter-harmlessly-ambiguous-insns): Removed.
3080
3081 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3082             matthew green  <mrg@redhat.com>
3083             Frank Ch. Eigler  <fche@redhat.com>
3084             Nick Clifton  <nickc@cambridge.redhat.com>
3085
3086         * cpu/xstormy16.cpu: New file.
3087         * cpu/xstormy16.opc: New file.
3088
3089 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3090
3091         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3092
3093 2001-11-14  Dave Brolley  <brolley@redhat.com>
3094
3095         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3096         of the field being extracted.
3097
3098 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3099
3100         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3101         (cos ...) and (sin ..) rtx.
3102
3103 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3104
3105         * desc-cpu.scm: Do not include ctype.h in generated desc
3106         files.  They will inherit safe-ctype.h instead.
3107
3108 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3109
3110         * desc-cpu.scm: Add missing function prototypes (for generated
3111         C files).  Fix compile time warning messages about unused
3112         parameters (for generated C files).
3113         * opc-asmdis.scm: The same.
3114         * opc-ibld.c: The same.
3115         * opc-itab.scm: The same.
3116         * cpu/fr30.opc: The same.
3117         * cpu/m32r.opc: The same.
3118         * cpu/openrisc.opc: The same.
3119
3120 2001-09-17  graydon hoare  <graydon@redhat.com>
3121
3122         * insn.scm (syntax-break-out): Correct logic in handling escaped
3123         syntax characters.
3124
3125 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3126
3127         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3128         call @arch@_cgen_build_insn_regex now that regex support is in
3129         libiberty.
3130
3131 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3132
3133         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3134         (mask-superset?): Look for strict supersets to allow rejection of
3135         duplicate insns.
3136
3137 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3138
3139         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3140         (cgen-desc.h): Call it.
3141         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3142         decode-size.
3143         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3144         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3145
3146 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3147
3148         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3149         mach->cpu insn-chunk-bitsize.
3150         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3151         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3152         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3153         (-cpu-parse, -cpu-read): Parse/initialize it.
3154         * doc/rtl.texi (define-cpu): Document it.
3155
3156 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3157
3158         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3159
3160 2001-07-06  Ben Elliston  <bje@redhat.com>
3161
3162         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3163
3164 2001-07-05  Ben Elliston  <bje@redhat.com>
3165
3166         * README: Update.
3167
3168         * read.scm (include): Include files from srcdir/cpu.
3169         (-cgen): Likewise for loading .cpu files.
3170         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3171         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3172         * *.opc: Likewise.
3173         * simplify.inc: Likewise.
3174
3175 2001-07-04  Ben Elliston  <bje@redhat.com>
3176
3177         * read.scm (include): Log "Including file" message at level 1,
3178         rather than outputting it with (display).
3179         (cpu-load): Log "Loading cpu description" and "Processing cpu
3180         description" messages at levels 1 and 2, respectively, rather than
3181         using (display).
3182
3183 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3184
3185         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3186         CGEN_KEYWORD_ENTRY initializers.
3187
3188         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3189         (<operand> 'test-data): Involve both the index and the hardware
3190         in testcase generation.
3191         (<hw-indx> 'test-data): Generate test data from the underlying
3192         object.
3193         (<ifield> 'test-data): Generate test data by computing bit
3194         patterns for the field, then decoding them.
3195         (<hw-address> 'test-data): Allow for new calling convention.
3196         (<hw-iaddress> 'test-data): Likewise.
3197         (<keyword> 'test-data): Convert index values into keywords.
3198         (<hw-asm> 'test-data): Convert index values into integer strings.
3199
3200         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3201
3202 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3203
3204         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3205         is required for multi-mode hw types (memory).
3206
3207 2001-05-11  Ben Elliston  <bje@redhat.com>
3208
3209         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3210         when generating allinsn.d from objdump output. Without it, the
3211         testsuite will treat $ as the regular expression for end of line.
3212
3213 2001-05-09  Ben Elliston  <bje@redhat.com>
3214
3215         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3216         with `cgen_cpu_open'; documentation had become out of date.
3217         * doc/rtl.texi (Instruction operands): Likewise.
3218
3219 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3220
3221         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3222         various-base-length instruction sets.
3223
3224 2001-04-02  Ben Elliston  <bje@redhat.com>
3225
3226         * sid-cpu.scm (-last-insn): New function.
3227         (-gen-sem-switch-engine): Loop through idesc while less than or
3228         equal to the last instruction enum, not less than the MAX enum.
3229         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3230         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3231         table's size to be the last instruction enum plus one, not
3232         @PREFIX@_INSN_MAX.
3233         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3234         instruction onto the instruction list.
3235
3236         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3237         using the size of the table and its elements.
3238         (-gen-decode-insn-globals): Define the idesc table's size to be
3239         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3240         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3241         last instruction enum plus one, not @CPU@_INSN_MAX.
3242
3243 2001-03-28  Ben Elliston  <bje@redhat.com>
3244
3245         * doc/version.texi (UPDATED, EDITION): Update.
3246         * doc/stamp-vti: Likewise.
3247
3248 2001-03-26  Ben Elliston  <bje@redhat.com>
3249
3250         * doc/credits.texi (Credits): Update.
3251
3252         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3253         specified prefix and, if necessary, escape `$' in gas-build.sh to
3254         prevent unwanted shell variable expansion.
3255
3256 2001-03-24  Ben Elliston  <bje@redhat.com>
3257
3258         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3259         (<keyword>,test-data): Likewise.
3260         (<hw-address>,test-data): Likewise.
3261         (<hw-iaddress>,test-data): Likewise.
3262         (-collate-test-set): New function.
3263         (build-test-set): Use it.
3264         (gen-gas-test): Generate five test cases per instruction.
3265         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3266
3267         * read.scm: Load "slib/random" if random is not defined.
3268         * slib/random.scm: New file.
3269
3270         * utils.scm: Remove comments about the Hobbit compiler.
3271         (copyright-cygnus): Add 2001.
3272         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3273         (package-gnu-simulators): Tidy.
3274
3275 2001-03-23  Ben Elliston  <bje@redhat.com>
3276
3277         * cgen-gas.scm: Inline documentation improvements.
3278
3279 2001-03-21  Ben Elliston  <bje@redhat.com>
3280
3281         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3282         given in a syntax string is undefined.
3283
3284         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3285         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3286
3287 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3288
3289         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3290         for arg_type CGEN_CPU_OPEN_BFDMACH.
3291
3292 2001-03-20  Ben Elliston  <bje@redhat.com>
3293
3294         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3295         instruction onto the instruction list. Define MAX_INSNS to be the
3296         value of the last instruction enum plus one.
3297
3298 2001-03-14  Nick Clifton  <nickc@redhat.com>
3299
3300         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3301
3302 2001-03-05  Dave Brolley  <brolley@redhat.com>
3303
3304         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3305         if the number of ifields is greater than zero.
3306
3307 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3308
3309         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3310         Emit LIKELY/UNLIKELY branch probability hints.
3311         * sid-decode.cpu (-gen-record-args): Ditto.
3312
3313 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3314
3315         * desc-cpu.scm (-gen-hash-defines): Rename
3316         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3317
3318 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3319
3320         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3321         writeback tracking.
3322         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3323         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3324         if unnecessary.
3325         * sid.scm (<operand> gen-write): Use unsigned long long expression
3326         for writeback.
3327         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3328         (<unit> gen-profile-code): Ditto.
3329
3330 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3331
3332         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3333         (regno ...) rtx.
3334
3335 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3336
3337         * operand.scm (<operand> pretty-sem-name): New field.
3338         (<operand> make): Initialize it from hw-name.
3339         (op:set-pretty-sem-name!): New function.
3340         (<operand> gen-pretty-name): Default to fetching new field.
3341         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3342         sem-name setting from -rtx-hw-name.
3343
3344 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3345
3346         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3347         its subsequent gen-pretty-name.
3348
3349         * read.scm: Increase thread working stack limit and backtrace
3350         depth limits.
3351
3352 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3353
3354         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3355
3356 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3357
3358         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3359         current insn plus 4.
3360         (h-delay-insn): New hardware register.
3361         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3362         (l-jalr): Likewise.
3363         (l-bal): Likewise.
3364
3365         * openrisc.opc (parse_hi16): Sign extend value.
3366         (parse_lo16): Likewise.
3367
3368 2001-01-06  Ben Elliston  <bje@redhat.com>
3369
3370         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3371         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3372         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3373         (-gen-semantic-fn-table): Likewise.
3374         (-gen-scache-semantic-fn): Likewise.
3375         (-gen-no-scache-semantic-fn): Likewise.
3376         (cgen-read.c): Likewise.
3377         (cgen-sem-switch.c): Likewise.
3378         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3379         is a filename prefix.
3380         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3381         (-gen-decode-insn-globals): Likewise.
3382         (-gen-idesc-decls): Likewise.
3383         (cgen-decode.h): Likewise.
3384         (cgen-decode.c): Likewise.
3385         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3386         (gen-cpu-insn-enum): Likewise.
3387         (sim-finish!): Likewise.
3388
3389 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3390
3391         * openrisc.cpu: New file.
3392         * openrisc.opc: Likewise.
3393
3394 2000-12-12  Ben Elliston  <bje@redhat.com>
3395
3396         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3397
3398 2000-12-07  Ben Elliston  <bje@redhat.com>
3399
3400         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3401         "insn" when there are zero ifields to extract.
3402
3403 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3404
3405         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3406         used by simple/non-scache simulators.
3407         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3408         regardless of with-scache?.
3409         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3410
3411 2000-12-03  Ben Elliston  <bje@redhat.com>
3412
3413         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3414         (cgen-desc.c): Likewise.
3415
3416 2000-12-01  Greg McGary  <greg@mcgary.org>
3417
3418         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3419
3420 2000-12-01  Ben Elliston  <bje@redhat.com>
3421
3422         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3423         definitions if run without with-multipla-isa?.
3424         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3425         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3426
3427 2000-11-24  Ben Elliston  <bje@redhat.com>
3428
3429         * sim-cpu.scm (-gen-hardware-struct): New function.
3430         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3431         hardware elements wich have share one or more ISAs with the ISAs
3432         being kept.
3433
3434         * sim.scm (-with-multiple-isa?): New symbol.
3435         (with-multiple-isa?): New function.
3436         (option-init!): Initialise -with-multiple-isa?.
3437         (option-set!): Handle with-multiple-isa option.
3438
3439 2000-11-21  Ben Elliston  <bje@redhat.com>
3440
3441         * utils.scm (copyright-fsf): Add the year 2000.
3442
3443 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3444
3445         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3446         unneeded "\n\n" from F() macro definition.
3447
3448 2000-11-15  Greg McGary  <greg@mcgary.org>
3449
3450         * utils-cgen.scm (gen-define-with-symcat): New function.
3451         * desc-cpu.scm (gen-ifld-defns): Use it.
3452         (gen-hw-table-defns): Use it.
3453         (-gen-hash-defines): Use it.
3454         (gen-operand-table): Use it.
3455         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3456         * opc-itab.scm (-gen-ifmt-table): Use it.
3457         (-gen-insn-opcode-table): Use it.
3458         (-gen-macro-insn-table): Use it.
3459         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3460         * sim-cpu.scm (cgen-semantics.c): Use it.
3461         (cgen-sem-switch.c): Use it.
3462
3463 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3464
3465         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3466         request to emit calls to insn extractors as functions rather than
3467         branches to inline blocks.
3468         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3469         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3470
3471         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3472         to extractor clauses.
3473
3474 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3475
3476         * decode.scm (-distinguishing-bit-population): Significantly
3477         improve popularity heuristic.  Renamed from
3478         (-mask-bit-population): Gone.
3479         (-population-above-threshold): Sort new bit numbers in order of
3480         popularity.
3481         (-population-top-few): Allow up to three more bits to be selected
3482         than requested.  Correct selection order to prefer better bits.
3483         Correct bug in fewer-than-requested case.  Keep threshold as
3484         floating-point.
3485         (decode-best-get-bits): Pass also the insn-values.
3486
3487         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3488         future optimization.
3489
3490         * utils.scm (message): Format nested lists better.
3491
3492 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3493
3494         * dev.scm: Add srcdir to %load-path.
3495
3496         * rtx-funcs.scm (subword): Mode of argument can be different
3497         than mode of result, so don't use OP0 to specify argument's mode.
3498
3499 2000-11-02  Ben Elliston  <bje@redhat.com>
3500
3501         * doc/porting.texi (Building a GAS test suite): Document my change
3502         to gas-build.sh.
3503
3504 2000-11-01  Ben Elliston  <bje@redhat.com>
3505
3506         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3507
3508 2000-10-31  Ben Elliston  <bje@redhat.com>
3509
3510         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3511         with no command line arguments if the gas build directory can be
3512         determined.
3513
3514 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3515
3516         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3517         op-ifld -> op-ifield.
3518
3519 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3520
3521         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3522
3523 2000-10-13  matthew green  <mrg@cygnus.com>
3524
3525         * utils-cgen.scm (get-ifetch): Move from here ...
3526         * sim.scm (get-ifetch): ... to here.
3527         * sid.scm (get-ifetch): Copy and port to c++.
3528
3529 2000-10-06  Dave Brolley  <brolley@redhat.com>
3530
3531         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3532         ifld-start + ifld-word-offset.
3533         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3534         the field is beyond the base number of bits.
3535         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3536         (gen-extract-ifields): Ditto.
3537         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3538         characters in the regular expression.
3539
3540 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3541
3542         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3543         preprocessor constant.
3544
3545 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3546
3547         * slib/logical.scm: New file from slib.  Provides robust bitwise
3548         logical operations for large integers.
3549         * read.scm: maybe-load it.
3550
3551 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3552
3553         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3554         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3555         single-isa predicate, but support keep-isa filtering.
3556
3557 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3558
3559         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3560         statement-expression and comma-expression contexts.
3561         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3562
3563 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3564
3565         * decode.scm (-population-top-few): Signal error gracefully if
3566         decoding is about to become ambiguous.
3567
3568 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3569
3570         * doc/rtl.texi (decode-assist): Describe this field as optional.
3571
3572 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3573
3574         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3575         with decode proc.
3576
3577 2000-09-05  Dave Brolley  <brolley@redhat.com>
3578
3579         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3580         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3581
3582 2000-08-29  Dave Brolley  <brolley@redhat.com>
3583
3584         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3585         adata-integral-insn is true for this architecture.
3586
3587 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3588
3589         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3590         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3591         * rtl-c.scm (-c-rtl-get): Improve an error message.
3592         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3593
3594 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3595
3596         * Makefile.in (DIST_COMMON): Regenerated.
3597         * ifield.scm (<derived-ifield> needed-iflds): New method.
3598         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3599         sfmts built from <derived-ifield>s.
3600         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3601         type symbol 'derived-ifield, not an unparseable string.
3602         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3603         (-sfmt-contents): Add tracing.
3604
3605         From Doug Evans <dje@transmeta.com>:
3606         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3607         C code.
3608
3609 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3610
3611         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3612         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3613         (-rtl-c-get): Rename from rtl-c-get.
3614         (rtl-c-get): New fn for getter logging.
3615
3616 2000-07-28  Ben Elliston  <bje@redhat.com>
3617
3618         * NEWS: Update.
3619
3620 2000-07-25  Ben Elliston  <bje@redhat.com>
3621
3622         * doc/credits.texi (Credits): Add Frank Eigler.
3623
3624 2000-07-24  Dave Brolley  <brolley@redhat.com>
3625
3626         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3627         fully.
3628         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3629         (<keyword>): Initialize all elements fully.
3630         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3631         fully.
3632         (-gen-mach-table-defns): Ditto.
3633         (-gen-ifld-defns): Ditto.
3634         (-gen-operand-table): Ditto.
3635         (-gen-insn-table): Ditto.
3636         (-gen-cpu-open): Nothing to do for the mach table.
3637
3638 2000-07-13  Ben Elliston  <bje@redhat.com>
3639
3640         * doc/version.texi (UPDATED): Update.
3641
3642 2000-07-05  Ben Elliston  <bje@redhat.com>
3643
3644         * configure.in (AC_PATH_PROG): Remove.
3645         * configure: Regenerate.
3646         * Makefile.am (GUILE): Locate guile dynamically.
3647         * Makefile.in: Regenerate.
3648         * doc/Makefile.in: Likewise.
3649
3650 2000-07-03  Ben Elliston  <bje@redhat.com>
3651
3652         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3653         * opc-itab.scm (cgen-opc.c): Likewise.
3654
3655 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3656
3657         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3658         guile 1.4 compatibility.
3659         (rtx-env-dump): Comment out buggy display calls.
3660
3661 2000-06-15  matthew green  <mrg@redhat.com>
3662
3663         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3664
3665 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3666
3667         * Makefile.in: Regenerated.
3668
3669         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3670         (gen-ifld-defns): Ditto.
3671         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3672         * rtl.c (rtl-finish!): Ditto.
3673         * opc-itab.scm (-gen-ifield-decls): Ditto.
3674         * opcodes.scm (gen-switch): Exclude derived operands.
3675         * operand.scm (op-iflds-used): Expand derived operands.
3676         (hw-index-derived): New dummy function to create dummy object.
3677         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3678         constructor.  Set object's hw-name and index fields.
3679         (-anyof-merge-subchoices): Set instance object's index also.
3680         (-anyof-name): New helper function.
3681         (anyof-merge-semantics): Correct replacement of operand names in
3682         anyof instance.
3683         (op-ifield): Tolerate derived-operands and their funny indices better.
3684         * ifield.scm (ifld-known-values): Expand derived ifields.
3685         (non-multi-ifields, non-derived-ifields): New utility functions.
3686         (ifld-decode-mode): Tolerate objects with unbound decode field.
3687         * iformat.scm (compute-insn-length): Expand derived ifields.
3688         (compute-insn-base-mask): Ditto.
3689         * insn.scm (insn-base-ifields): Remove.
3690         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3691         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3692         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3693         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3694         (-frag-test-data): Ditto.
3695         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3696         (-gen-sem-switch-engine); Ditto.
3697         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3698         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3699         (-gen-record-args): Tolerate unbound op-ifield.
3700         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3701         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3702         Exclude multi-insns.
3703         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3704         * utils-sim.scm (op-extract?): Handle derived operands.
3705
3706         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3707         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3708         * hardware.scm (hardware-for-mode): New function.
3709
3710         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3711         cleaning up decode tables.
3712         (mask-superset?): Little helper function for above.
3713         * decode.scm (-build-decode-table-entry): Call it.
3714         (-opcode-slots): Add some more tracing.
3715         * arm.cpu: Disable decode-splits construct due to implementation
3716         conflict with `filter-harmlessly-ambiguous-insns'
3717
3718         * decode.scm (-population-top-few): New function for better decode
3719         bit generation.  Includes minor helper functions.
3720         (decode-get-best-bits): Call it instead.
3721         (OLDdecode-get-best-bits): Renamed previous version of above.
3722
3723
3724 2000-06-13  Ben Elliston  <bje@redhat.com>
3725
3726         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3727         for the Guile library directory.
3728         * configure: Regenerate.
3729         * Makefile.in, doc/Makefile.in: Regenerate.
3730
3731         * Makefile.in, doc/Makefile.in: Regenerate.
3732         * configure.in: Remove unnecessary tests. Move to version 1.0.
3733         * acconfig.h, config.in: Remove.
3734         * configure, aclocal.m4: Regenerate.
3735         * doc/stamp-vti, doc/version.texi: Likewise.
3736         * AUTHORS: New file.
3737
3738 2000-06-07 Ben Elliston  <bje@redhat.com>
3739
3740         * fixup.scm (symbol-bound?): Reduce debugging output.
3741
3742 2000-06-02  matthew green  <mrg@redhat.com>
3743
3744         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3745         a given instruction, replacing derived fields with their subfields.
3746         (insn-value): Use `insn-base-ifields' to find all constant values.
3747         (multi-insn-instantiate!): Comment some debug messages.
3748
3749 2000-06-01  Ben Elliston  <bje@redhat.com>
3750
3751         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3752         symbol names used in a (c-call ..) rtx.
3753
3754         * sim-test.scm (build-test-set): Return (()) for an instruction
3755         with no operands, so it too is included in the generated test set.
3756
3757 2000-05-31  Ben Elliston  <bje@redhat.com>
3758
3759         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3760         (sim-test): Likewise.
3761         * Makefile.in: Regenerate.
3762
3763 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3764
3765         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3766         stack traceback, in an order that resembles gdb's `bt'.
3767
3768 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3769
3770         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3771         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3772         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3773         multi insns.
3774         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3775         virtual functions.
3776         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3777         * iformat.scm (ifmt-expanded-ifields): Gone.
3778         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3779         work.
3780         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3781         ifmt entries.
3782
3783         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3784         code.
3785
3786 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3787
3788         * sid.scm (with-any-profile?): New function clone.
3789
3790 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3791
3792         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3793
3794 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3795
3796         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3797         (-multi-ifield-read): Parse them.
3798         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3799         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3800         (multi-ifield gen-extract): Add decode hook.
3801         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3802
3803         * insn.scm (syntax-break-out): More correctly handle \-escaped
3804         syntax characters.
3805         (syntax-make-elements): Ditto.
3806         * opc-itab.scm (compute-syntax): Ditto.
3807
3808 2000-05-17  Ben Elliston  <bje@redhat.com>
3809
3810         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3811
3812 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3813
3814         * gas-test.scm (build-test-set): Return (()) for an instruction
3815         with no operands, so it too is included in the generated test set.
3816
3817 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3818
3819         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3820         IFMT_OPERANDS and SYNTAX_BYTES.
3821
3822 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3823
3824         * sim.scm (with-any-profile?): New function.
3825         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3826         to decide whether or not to include profiling counters.
3827
3828 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3829
3830         Fuller derived-operand support for opcodes.
3831         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3832         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3833         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3834         (gen-operand-table): Omit derived- and anyof- operands from table.
3835         (gen-insn-table): Omit multi-insns from table.
3836         * iformat.scm (ifmt-expanded-fields): New function to expand
3837         subfields of derived-ifields.
3838         (ifmt-compute!): Ignore remaining multi-insns.
3839         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3840         multi-insns.
3841         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3842         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3843         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3844         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3845         (gen-switch): Omit anyof-operands.
3846         * operand.scm (-anyof-syntax): New function.
3847         (-anyof-merge-syntax): Call it.
3848         * utils.scm (collect): New idiomatic function.
3849
3850 2000-05-10  Ben Elliston  <bje@redhat.com>
3851
3852         * m68k.cpu: New file (work in progress).
3853
3854 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3855
3856         * Makefile.am (all-local): New target.  Create stamp-cgen.
3857         * Makefile.in: Regenerated.
3858         * doc/Makefile.in: Regenerated.
3859
3860 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3861
3862         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3863         (-operand-parse-setter): Ditto.
3864         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3865         for CACHE-ADDR operands.
3866         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3867         trace entries.  Widen byte-wide values for printing.
3868         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3869         Widen byte-wide values for printing.  Hexify memory addresses.
3870
3871 2000-04-23  matthew green  <mrg@redhat.com>
3872
3873         * m32r.cpu: Fix a typo.
3874
3875 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3876
3877         * ia64.cpu (define-model): Change merced to Itanium.
3878         (f-qp): Change quilifying to qualifying.
3879         (movbr_ph, movbr_pvec): Delete.
3880         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3881
3882 2000-04-07  Ben Elliston  <bje@redhat.com>
3883
3884         * doc/porting.texi (Building a simulator test suite): Clarify
3885         where generated test cases are placed.
3886
3887 2000-04-07  Ben Elliston  <bje@redhat.com>
3888
3889         * Makefile.am (gas-test): Remove dependency on `cgen'.
3890         (sim-test): Ditto.
3891         * Makefile.in: Regenerate.
3892
3893 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3894
3895         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3896         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3897         type reconfiguration.
3898         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3899         with-profile?.
3900
3901 2000-03-30  Ben Elliston  <bje@redhat.com>
3902
3903         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3904
3905 2000-03-24  Ben Elliston  <bje@redhat.com>
3906
3907         * Makefile.am (stamp-cgen): Reinstate target.
3908         * Makefile.in: Regenerate.
3909
3910 2000-03-22  Ben Elliston  <bje@redhat.com>
3911
3912         * slib/ppfile.scm: Remove; unused.
3913         * slib/defmacex.scm: Likewise.
3914
3915 2000-03-21  Ben Elliston  <bje@redhat.com>
3916
3917         * doc/internals.texi (Source file overview): Document.
3918
3919         * Makefile.am (GUILEDIR): Remove.
3920         (CGEN): Ditto. Callers use $(GUILE) instead.
3921         (GUILEFLAGS): Ditto.
3922         (CGENFILES): Ditto.
3923         (APPDESCFILES): Ditto.
3924         (OPCODESFILES): Ditto.
3925         (SIMFILES): Ditto.
3926         (pkgdata_SCRIPTS): Ditto.
3927         (stamp-cgen): Remove target.
3928         * Makefile.in: Regenerate.
3929
3930         * configure.in: Remove header and library tests.
3931         * configure: Regenerate.
3932         * config.in: Likewise.
3933
3934 2000-03-20  Ben Elliston  <bje@redhat.com>
3935
3936         * read.scm: Cease loading "hob-sup.scm".
3937         * utils.scm: Inherit the fastcall family of procedures (for now).
3938         * hob-sup.scm: Remove.
3939
3940 2000-03-20  Ben Elliston  <bje@redhat.com>
3941
3942         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3943         * configure: Regenerate.
3944         * gdbinit.in: Remove.
3945
3946 2000-03-17  Ben Elliston  <bje@redhat.com>
3947
3948         * Makefile.am (CGEN): Use guile, not cgen.
3949         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3950         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3951         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3952         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3953         (HOB_OBJS): Likewise.
3954         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3955         (CGENOBJS): Likewise.
3956         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3957         (hobbit, hobbit.o, hobbit.c): Remove targets.
3958         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3959         (CLEANFILES): Update.
3960         * acconfig.h (WITH_HOBBIT): Remove.
3961         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3962         option --with-cgen-hobbit.
3963         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3964         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3965         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3966         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3967         * Makefile.in: Regenerate.
3968         * config.in: Likewise.
3969         * aclocal.m4: Likewise.
3970         * configure: Likewise.
3971         * README (Hobbit support): Remove.
3972         * doc/internals.texi (Conventions): Do not mention Hobbit.
3973         * doc/porting.texi (Supported Guile versions): Likewise.
3974
3975 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3976
3977         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3978         callback convention to new sid sidutil::basic_cpu code.
3979         (-gen-sfrag-engine-fn): Ditto.
3980         * sid.scm (-create-virtual-insns!): Ditto.
3981         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3982         mode.
3983         (cxmake-skip): Implement properly for pbb mode.
3984
3985 2000-03-03  Ben Elliston  <bje@redhat.com>
3986
3987         * doc/internals.texi: New file.
3988
3989 2000-02-29  Ben Elliston  <bje@redhat.com>
3990
3991         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3992         * doc/porting.texi: Formatting tweaks.
3993
3994 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3995
3996         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3997         field.
3998
3999 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4000
4001         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4002         mode.
4003
4004 2000-02-23  Andrew Haley  <aph@cygnus.com>
4005
4006         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4007         instruction.
4008
4009 2000-02-24  Ben Elliston  <bje@redhat.com>
4010
4011         * doc/rtl.texi (Derived operands): Add some cindex entries.
4012
4013 2000-02-23  Ben Elliston  <bje@redhat.com>
4014
4015         * ia32.cpu (dndo): Move general purpose macro from here ..
4016         * simplify.inc (dndo): .. to here.
4017
4018 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4019
4020         * arm.cpu (h-tbit): Add c-call setter function.
4021         (h-mbits): Ditto.
4022
4023 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4024
4025         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4026         (-frag-cost-compute!): Ditto.
4027         * utils.scm (copyright-cygnus): Add Y2K.
4028         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4029
4030 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4031
4032         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4033         flags field of the CGEN_CPU_TABLE structure.
4034
4035 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4036
4037         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4038         All references updated.
4039
4040 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4041
4042         * ia32.cpu: Rewrite addressing mode support.
4043
4044         * ifield.scm (<ifield>): New member `follows'.
4045         (ifld-known-values): New proc.
4046         (<ifield>): New method set-word-offset!.
4047         (ifld-set-word-offset!): New proc.
4048         (ifld-new-word-offset): New proc.
4049         (<ifield>): New method next-word.
4050         (<multi-ifield>): New method next-word.
4051         (ifld-next-word): New proc.
4052         (ifld-precedes?): New proc.
4053         (-ifield-parse): New args word-offset,word-length,follows.
4054         All callers updated.  Handle CISC-style vs RISC-style ifields.
4055         (-ifield-read): Recognize word-offset,word-length,follows specs.
4056         (-ifld-parse-follows): New proc.
4057         (-multi-ifield-make-default-insert): New proc.
4058         (-multi-ifield-make-default-extract): New proc.
4059         (-multi-ifield-parse): Provide default values for insert,extract
4060         handlers if not specified.
4061         (<derived-ifield>): New class.
4062         (derived-ifield?): New predicate.
4063         (ifld-derived-operand?): New predicate.
4064         (f-anyof): New global.
4065         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4066         (f-derived,ifld-derived?): Delete.
4067         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4068         * insn.scm (-sub-insn-ifields): New proc.
4069         (-sub-insn-make!): New proc.
4070         (multi-insn-instantiate!): Provide initial implementation.
4071         (-insn-parse): If insn contains "anyof" operands, create a
4072         <multi-insn> object instead of a plain <insn>.
4073         (-parse-insn-format-symbol): Rewrite derived operand handling.
4074         Add anyof operand handling.
4075         (-parse-insn-format-ifield-spec): Rewrite.
4076         (-parse-insn-format-operand-spec): Delete.
4077         (-parse-insn-format-list): Delete support for `(operand value)'.
4078         (anyof-operand-format?): Replaces derived-operand-format?.
4079         * operand.scm (-operand-parse-getter): Improve error messages.
4080         (-operand-parse-setter): Ditto.
4081         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4082         ifield-assertion.
4083         (<anyof-operand>): Change baseclass from <derived-operand> to
4084         <operand>.  Delete member values.  New members base-ifield,choices.
4085         (anyof-operand?): New predicate.
4086         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4087         (-derived-operand-parse): Rewrite.
4088         (-derived-operand-read): Rewrite.
4089         (-anyof-parse-choice): New proc.
4090         (-anyof-operand-parse): Rewrite.
4091         (-anyof-operand-read,define-anyof-operand): New procs.
4092         (<anyof-value>): Rewrite.
4093         (-anyof-initial-known): New proc.
4094         (anyof-satisfies-assertions?): New proc.
4095         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4096         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4097         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4098         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4099         (-anyof-value-from-derived): New proc.
4100         (-anyof-all-choices-1,anyof-all-choices): New procs.
4101         (operand-init!): Create define-anyof-operand reader command.
4102
4103         * insn (syntax-break-out): Take syntax as argument instead of insn.
4104         All callers updated.
4105         (syntax-make): Move here, from ???.
4106
4107         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4108         bitrange-foo. All uses updated.
4109         (bitrange-next-word): New proc.
4110
4111         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4112
4113         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4114         (rtx-make-const,rtx-make-enum): New procs.
4115         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4116         (rtx-mem-addr,rtx-mem-sel): New procs.
4117         (rtx-change-address): New proc.
4118         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4119         (rtx-make-set,rtx-single-set?): New procs.
4120         (rtx-combine): New proc.
4121
4122         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4123         (rtx-traverse-with-locals): Ditto.
4124         (-rtx-traverse,-rtx-traverse-*): Ditto.
4125
4126         * rtl.scm (define-subr): New proc.
4127         (rtl-init!): Create reader command `define-subr'.
4128
4129         * cos.c (_object_mi_p): Ensure argument is an object.
4130         (indent): New function.
4131         (_object_print_elms): Add pretty-printing support.
4132         (_object_print): Ditto.
4133
4134         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4135         (*floats-s->c-fun-table*): Ditto.
4136         * hobbit.c,hobbit.h: Rebuild.
4137         * hob-sup.c (fastcall7): New proc.
4138         * hob-sup.h (fastcall7): Declare.
4139         * hob-sup.scm (fastcall7): New macro.
4140
4141         * mach.scm (<arch>): New member subr-list.
4142         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4143         (arch-finish!): Reverse recorded subr list.
4144
4145         * read.scm (debug-env): New global.
4146         (debug-var-names,debug-var,debug-repl-env): New procs.
4147         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4148         (debug-quit): Renamed from `continue'.
4149
4150         * simplify.inc (dsmf): New pmacro.
4151
4152         * utils.scm (plus-scan): New proc.
4153         (split-bits): Rewrite.
4154         (split-value): New proc.
4155
4156 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4157
4158         * doc/Makefile.am (DOCFILES): Add notes.texi.
4159         * doc/Makefile.in: Rebuild.
4160
4161 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4162
4163         * ifield.scm (ifld-derived?): New proc.
4164         (f-derived): New global.
4165         (ifield-builtin!): Create ifield f-derived.
4166         (<multi-insn>): New class.
4167         (multi-insn?): New predicate.
4168         (multi-insn-instantiate!): New proc.
4169         (-insn-parse): Create <multi-insn> objects for insns with derived
4170         ifields.
4171         (-parse-insn-format-symbol): Handle derived ifields.
4172         (-parse-insn-format-ifield-spec): New proc.
4173         (-parse-insn-format-operand-spec): New proc.
4174         (-parse-insn-format-list): Simplify.
4175         (-parse-insn-format): No longer allow (ifield-object value) spec.
4176         (derived-operand-format?): New proc.
4177         (insn-alias?): New proc.
4178         (non-alias-insns): Rewrite.
4179         (insn-real?): Renamed from real-insn?, all callers updated.
4180         (virutal-insns): Rewrite.
4181         (multi-insns): New proc.
4182         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4183         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4184         Return #f if operand doesn't have an index or if index is not an
4185         ifield.
4186         (hw-index-anyof): New proc.
4187         (-operand-parse): Allow integer indices.
4188         (<derived-operand>): New class.
4189         (derived-operand?): New predicate.
4190         (<anyof-operand>): New class.
4191         (<anyof-value>): New class.
4192         (-anyof-parse-value,-anyof-operand-parse): New procs.
4193         (-derived-operand-parse,-derived-operand-read): New procs.
4194         (define-derived-operand,define-full-derived-operand): New procs.
4195         (operand-init!): New reader command define-derived-operand.
4196
4197         * utils.scm (list-take): Handle negative amount.
4198         (element?): Rewrite.
4199
4200 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4201
4202         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4203
4204 1999-10-04  Richard Henderson  <rth@cygnus.com>
4205
4206         * ia64.cpu: Checkpoint.
4207
4208 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4209
4210         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4211
4212         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4213         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4214
4215 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4216
4217         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4218         PC returned by sim_engine_invalid_insn.
4219
4220 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4221
4222         * ia32.cpu: New file.
4223
4224 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4225
4226         * utils.scm (bit-set?): Fix off by one error.
4227
4228         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4229
4230         * rtl.scm (hw): Check for valid hardware element before trying to
4231         get its mode.
4232
4233         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4234         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4235         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4236         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4237         compute_operand2_foo.
4238
4239         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4240         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4241         Call delayed_branch/branch methods instead of assigning to `vpc'.
4242         (<hw-pc>,cxmake-skip): Call skip method.
4243         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4244         (<pc>,cxmake-skip): Ditto.
4245         (-create-virtual-insns!): Ditto.
4246         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4247         (op:write): Ditto.
4248         (op:record-profile): Specify #:output-language "c++".
4249         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4250         @arch@_insn_attr.
4251         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4252         Define enums here.
4253         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4254         (gen-semantic-code): Ditto.
4255         (-gen-sem-case,-gen-sfrag-code): Ditto.
4256         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4257         (cgen-cpu.h): File is now #included by main cpu class, rather than
4258         subclassing.
4259         (cgen-defs.h): New proc.
4260         (-gen-scache-semantic-fn): Change result type to sem_status.
4261         New local `status'.  Call done_cti_insn/done_insn method at end.
4262         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4263         cgen-ops.h.
4264         (cgen-sem-switch.cxx): Ditto.
4265         * sid-decode.scm (-gen-idesc-decls): Update return type of
4266         @prefix@_sem_fn.
4267         (cgen-decode.h): Add using namespace @arch@.
4268         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4269
4270         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4271         (estate-output-language-c?,estate-output-language-c++?): New procs.
4272         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4273         (estate-make-for-normal-rtl-c++): New proc.
4274         (rtl-c++-parsed,rtl-c++): New proc.
4275         (s-c-call): Invoke cpu class method if c++.
4276         (join): Use s-c-raw-call.
4277
4278         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4279         (nop): Rewrite.
4280
4281         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4282         * rtl.scm (<eval-state>): New member `modifiers'.
4283         (<eval-state>,vmake!): Handle #:modifiers.
4284         (estate-with-modifiers): New proc.
4285
4286         * rtl.scm (rtx-side-effects?): New proc.
4287         (rtx-canonical-bool): Don't change expr if it has side effects.
4288         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4289         better.
4290
4291 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4292
4293         * sim.scm (gen-scache-type): Fix typo in last patch.
4294
4295 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4296
4297         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4298
4299 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4300
4301         * sid.scm (<hw-pc>,cxmake-skip): New method.
4302         (<pc>,cxmake-skip): New method.
4303
4304         * decode.scm (decode-build-table): Delete args startbit,index-list.
4305         All callers updated.
4306         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4307         All callers updated.
4308         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4309         to decode-get-best-bits.
4310         * sid-decode.scm (-gen-decode-fn): Ditto.
4311
4312         * hardware.scm (hw-bits): New proc.
4313         (-hw-parse): New arg layout.  All callers updated.
4314         (define-full-hardware): New arg layout.  All callers updated.
4315         (-hw-validate-layout): New proc.
4316         (-hw-create-[gs]etter-from-layout): New procs.
4317         (<hw-register>,parse!): Handle layout spec.
4318         * types.scm (type-bits): New proc.
4319
4320         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4321         UNARY, BINARY, TRINARY rtxs.
4322
4323         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4324         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4325         Support '- as "unused spot" indicator.
4326
4327 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4328
4329         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4330
4331 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4332
4333         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4334
4335         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4336         construction.
4337         (tstate-make): New arg `depth'.  All callers updated.
4338         (tstate-depth,tstate-set-depth!): New procs.
4339         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4340         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4341         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4342
4343 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4344
4345         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4346         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4347         * utils-sim.scm: Decoder generator support moved here.
4348         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4349         (-gen-decoder-switch): Sort entries for more fall-throughs.
4350
4351         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4352         * Makefile.in: Rebuild.
4353         * sim-test.scm (build-sim-testcase): Add logging message.
4354         * dev.scm (cload): Recognize SIM-TEST application.
4355         (load-stest): Set APPLICATION to SIM-TEST.
4356
4357         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4358
4359         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4360         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4361         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4362
4363         * insn.scm (syntax-break-out): Handle ${foo}.
4364
4365 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4366
4367         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4368         (bin_PROGRAMS): Define.
4369         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4370         (cgen-hob.c): Prepend $(srcdir)/ here.
4371         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4372         (libcpu_a_SOURCES): Delete.
4373         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4374         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4375         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4376         Add AC_CHECK_LIB(guile,main).
4377         * Makefile.in: Rebuild.
4378         * doc/Makefile.in: Rebuild.
4379         * aclocal.m4: Rebuild.
4380         * config.in: Rebuild.
4381         * configure: Rebuild.
4382
4383 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4384
4385         Rename rtx functions from name: to name, accept optional leading
4386         modifier and mode.
4387         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4388         * attr.scm (-attr-eval): Update.
4389         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4390         (<hw-register>,mode-ok?): Disallow VOID.
4391         (<hw-immediate>,mode-ok?): Disallow VOID.
4392         (<hw-address>,mode-ok?): Disallow VOID.
4393         * mode.scm (mode-name?): New proc.
4394         (VOID): Renamed from VM.
4395         (DFLT): Renamed from DM.
4396         (mode-builtin!): Update.
4397         * opcodes.scm (<ifield>,gen-insert): Update.
4398         (<ifield>,gen-extract): Update.
4399         (<multi-ifield>,gen-insert,gen-extract): Update.
4400         * operand.scm (op:mode): Update.
4401         (<pc>,make!): Update.
4402         (op:new-mode): Update.
4403         (-operand-read): Update.
4404         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4405         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4406         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4407         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4408         (rtx-make): Call -rtx-munge-mode&options.
4409         (rtx accessors): Rewrite.
4410         (rtx-pretty-name): Update.
4411         (-rtx-traverse-*): Update.
4412         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4413         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4414         (-rtx-make-traverse-table): Update.
4415         (-rtx-traverse-operands): Update.
4416         (-rtx-option?,-rtx-option-list?): New procs.
4417         (-rtx-munge-mode&options): New proc.
4418         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4419         (-rtx-traverse): Update.
4420         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4421         (rtx-compile-time-constant?): Update.
4422         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4423         (rtx-value): Update.
4424         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4425         * rtx-funcs.scm (*): Update.
4426         * rtl-c.scm (rtl-c-get): Update.
4427         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4428         (s-c-call,s-c-raw-call): Update.
4429         (s-boolifop,s-convop,s-if,s-cond): Update.
4430         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4431         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4432         (s-parallel,s-sequence): Update.
4433         (rtl-c-build-table): Update.
4434         * sem-frags.scm (-frag-hash-compute!): Update.
4435         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4436         for temporary bug compatibility with previous version.
4437         (-frag-expr-locals,-frag-expr-stmts): Update.
4438         (-frag-compute-desired-frags,-frag-pick-best): Update.
4439         * semantics.scm (-simplify-expr-fn): Update.
4440         (rtx-simplify): Update.
4441         (-rtx-ref-type): Update.  Account for modifiers.
4442         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4443         (-build-ifield-operand!): Update.
4444         (-build-known-values): Update.
4445         (semantic-compile): Update.
4446         (-gen-reg-access-defns): Update.
4447         (gen-semantic-code,-gen-sem-case): Update.
4448         (-gen-sfrag-code,-gen-sfrag-case): Update.
4449         * sim-cpu (gen-semantic-code): Update.
4450         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4451         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4452         (-hw-cxmake-get): Update.
4453         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4454         (<hw-index>,cxmake-get): Update.
4455         (<operand>,gen-type,gen-read,cxmake-get): Update.
4456         (<operand>,gen-set-quiet,gen-set-trace): Update.
4457         (<pc>,cxmake-get): Update.
4458         (sim-finish!): Update.
4459         * utils-gen.scm (-gen-ifld-extract-base): Update.
4460         (-gen-ifld-extract-beyond): Update.
4461         (gen-multi-ifld-extract): Update.
4462         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4463         * sid.scm (<hw-pc>,gen-write): Update.
4464         (-gen-decode-insn-globals): Update.
4465         (-hw-cxmake-get): Update.
4466         (<hw-register>,cxmake-get-raw): Update.
4467         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4468         (<hw-index>,cxmake-get): Update.
4469         (<operand>,gen-type,gen-read,cxmake-get): Update.
4470         (<operand>,gen-set-quiet,gen-set-trace): Update.
4471         (<pc>,cxmake-get): Update.
4472         (-create-virtual-insns!): Update.
4473         (-decode-split-build-assertion): Update.
4474         * *.cpu: Update.
4475         * simplify.inc: Update.
4476
4477 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4478
4479         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4480         Prefix queue function name with sim_ instead of @cpu@_.
4481
4482         * sim.scm (-with-parallel-only?): New global.
4483         (option-init!): Initialize it.
4484         (option-set!): Set it.
4485         (with-parallel-only?): New proc.
4486         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4487         and writeback markers if with-parallel-only.
4488         (-gen-idesc-init-fn): Update.
4489         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4490         with-generic-write.
4491
4492 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4493
4494         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4495         with the invalid insn handler.
4496
4497         * utils.scm (list-maybe-ref): New proc.
4498
4499         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4500         define-arch.
4501         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4502
4503         * i960.cpu (test*-*): Delete `expr' arg.
4504         (test-op,branch-op): Update.
4505
4506 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4507
4508         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4509         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4510         updated.
4511         (gen-reg-access-defn): Ditto.
4512         (-gen-hw-addr): Rewrite.
4513         (-op-gen-queued-write): Rewrite.
4514         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4515         (-gen-scache-semantic-fn): Handle with-generic-write.
4516         (-gen-no-scache-semantic-fn): Ditto.
4517
4518 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4519
4520         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4521
4522         * sim.scm (-with-generic-write?): New global.
4523         (option-init!): Initialize it.
4524         (option-set!): Set it.
4525         (with-generic-write?): New proc.
4526         (-gen-hw-addr): New proc.
4527         (-op-gen-queued-write): New proc.
4528         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4529
4530         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4531         turned off.
4532         (-gen-sem-switch): Preserve existing with-parallel? value.
4533         (-gen-sem-parallel-switch): Ditto.
4534         (-gen-write-case): Add /indent support.
4535         (cgen-write.c): Rewrite.
4536
4537         * utils.scm (-current-print-state): New global.
4538         (make-print-state): New proc.
4539         (pstate-indent,pstate-set-indent!): New procs.
4540         (pstate-cmd?,pstate-cmd-do): New procs.
4541         (/indent): New global.
4542         (/indent-set,/indent-add): New procs.
4543         (string-write): Set -current-print-state.
4544         (-string-write): New arg pstate, all callers updated.
4545         Handle print-state commands.
4546         (-string-list-flatten): New proc.
4547         (string-list->string): Use it.
4548
4549         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4550         (-gen-sem-fn-table-entry): New proc.
4551         (-gen-semantic-fn-table): New proc.
4552         (-gen-scache-semantic-fn): Make fn static.
4553         (-gen-no-scache-semantic-fn): Ditto.
4554         (cgen-semantics.c): Define macro SEM_FN_NAME.
4555         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4556         FAST,FULL.  Update @cpu@_insn_sem contents.
4557         (-gen-semf-fn-name): Delete.
4558         (-gen-sem-fn-decls): Delete.
4559         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4560         @cpu@_semf_init_idesc_table.
4561         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4562         handlers here.
4563         (cgen-decode.h): Print sfmt enum.
4564         * sid-decode.scm (-gen-semf-fn-name): Delete.
4565         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4566
4567         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4568         (ifmt-compute!): Ditto.
4569         * sim-decode.scm (-gen-decoder-switch): Ditto.
4570         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4571         (-gen-decoder-switch): Ditto.
4572
4573         * insn.scm (insn-virtual?): New proc.
4574
4575         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4576         convert to string.
4577         * mach.scm (<arch>): attr-list is now a pair of lists.
4578         (current-attr-list): Rewrite.
4579         (current-attr-add!,current-attr-lookup): Rewrite.
4580         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4581
4582 1999-08-06  Richard Henderson  <rth@cygnus.com>
4583
4584         * ia64.cpu: Initial checkpoint.
4585
4586 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4587
4588         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4589         (pmacros-init!): Update .apply help string.
4590
4591 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4592
4593         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4594         (<hw-pc>,cxmake-skip): New method.
4595         (<pc>,cxmake-skip): New method.
4596         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4597         (gen-argbuf-type): New member `skip_count'.
4598         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4599         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4600
4601         * utils-sim.scm: New file.
4602         * dev.scm (load-sim): Load it.
4603         (load-sid): Load it.
4604         * cgen-sid.scm: Load it.
4605         * cgen-sim.scm: Load it.
4606         * iformat.scm (<sformat>): New member sbuf, not initialized by
4607         default make.
4608         * rtx-funcs.scm (skip): Rewrite.
4609         * rtl-c.scm (skip): Rewrite.
4610         * m32r.cpu (sc,snc): Update `skip' usage.
4611         * mode.scm (mode-real-mode): New proc.
4612         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4613         Distinguish fragments by the <sformat-abuf> they use.
4614         * sim.scm (gen-profile-index-type): Delete.
4615         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4616         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4617         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4618         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4619         (-gen-argbuf-elm): Rewrite.
4620         (-gen-argbuf-hw-elm): Delete.
4621         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4622         of each sfmt.
4623         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4624         (sim-init!): Initialize them.
4625         (sim-analyze-insns!): Set them.
4626         (current-sbuf-list): New proc.
4627         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4628         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4629         * sim-model.scm (-gen-model-insn-fn): Ditto.
4630         * sim-decode.scm (-gen-extract-decls): Delete.
4631         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4632         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4633         sim.scm.
4634         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4635         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4636         (-gen-op-extract,-gen-op-trace-extract): New procs.
4637         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4638         gen-sfmt-argvars-foo and rewrite.
4639         (-gen-record-args): Rewrite.
4640         (-gen-extract-case): Tweak.
4641         * sid.scm (gen-profile-index-type): Delete.
4642         (ifield argbuf support): Move to utils-sim.scm.
4643         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4644         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4645         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4646         (-sim-sformat-argbuf-list): New global.
4647         (sim-init!): Initialize it.
4648         (sim-analyze-insns!): Set it.
4649         (current-sbuf-list): New proc.
4650         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4651         (-gen-argbuf-hw-elm): Delete.
4652         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4653         of each sfmt.
4654         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4655         (-gen-extract-decls): Delete.
4656         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4657         sid.scm.
4658         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4659         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4660         (-gen-op-extract,-gen-op-trace-extract): New procs.
4661         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4662         gen-sfmt-argvars-foo and rewrite.
4663         (-gen-record-args): Rewrite.
4664         (-gen-extract-case): Tweak.
4665
4666         * cgen-gh.c (gh_putc,gh_puts): New functions.
4667         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4668         * cos.c (_object_print_elms,_object_print): Use them.
4669         * hob-sup.c (fastcall_print): Use them.
4670         * configure.in: Check for scm_gen_puts, scm_puts.
4671         * config.in: Rebuild.
4672         * configure: Rebuild.
4673         * aclocal.m4: Rebuild.
4674         * Makefile.in: Rebuild.
4675
4676         * dev.scm (load-opc): Use load instead of maybe-load.
4677         (load-gtest,load-sim,load-stest): Ditto.
4678         (load-sid): Ditto.
4679
4680 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4681
4682         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4683         up to avoid g++ 'goto crosses initialization' warning.
4684         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4685         (-gen-sfrag-case): Update use of NEXT_FRAG.
4686
4687 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4688
4689         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4690
4691         * read.scm: Load sem-frags.scm.
4692         * sem-frags.scm (*): Lots rewritten.
4693         * sid.scm (-with-sem-frags?): New global
4694         (with-sem-frags?): New proc.
4695         (option-init!): Initialize -with-sem-frags?.
4696         (option-set!): Recognize with-sem-frags.
4697         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4698         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4699         if asked to.
4700         (-gen-sfrag-engine-decls): New proc.
4701         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4702         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4703         (-gen-sfrag-engine): New proc.
4704         (-gen-sem-case): Emit setup-semantics if specified.
4705         (-gen-sem-switch-engine): Update init/use of computed goto label.
4706         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4707         from local vars.
4708         (-gen-idesc-decls): Replace sem_address with cgoto.
4709         (-gen-scache-decls): Rewrite definition of `execute' member.
4710         * arm.cpu (arm isa): Enable decode-splits.
4711         * arm7.cpu (multiply insns): Rename result to mul-result.
4712
4713         Rename decode-specialize to decode-split.
4714         * decode.scm (*): Update.
4715         * insn.scm (*): Update.
4716         * mach.scm (*): Update.
4717         * sid.scm (*): Update.
4718
4719 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4720
4721         Record objects as a smob.
4722         * cos.c (scm_tc16_object): New static global.
4723         (cos_init): Initialize it.
4724         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4725         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4726         (_object_tag): Delete.
4727         (_object_make_smob): New function.
4728         (_object_make_x,_object_make_with_values_x): Rewrite.
4729         (_object_elements,_object_class_desc): Rewrite.
4730         (_object_copy,object_p): Rewrite.
4731         (_object_specialize): Rewrite.
4732         (_object_print_elms,_object_print): New functions.
4733         (object_smob): New static global.
4734         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4735
4736         * cos.c (_make_x_symbol): New static global.
4737         (object_make): Use it.
4738         (cos_init): Initialize it.
4739
4740 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4741
4742         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4743         instead to determine whether to use FLD macro.
4744         (<rtl-c-eval-state>): New member ifield-var?.
4745         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4746         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4747         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4748
4749         * rtl.scm (rtx-sequence-assq-locals): New proc.
4750
4751         * cos.scm (-object-error): Don't crash on non-objects.
4752
4753         * Makefile.am (CLEANFILES): Add hobbit.
4754         * Makefile.in: Rebuild.
4755
4756         * rtl-c.scm (s-c-call): Delete unnecessary code.
4757
4758 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4759
4760         * rtl-c.scm (ifield): Always reference value via `FLD'.
4761
4762         * cos.c (elm_bound_p): Return problem SCM boolean values.
4763
4764         * utils-cgen.scm (display-argv): New proc.
4765         * cgen-opc.scm (cgen): Call it.
4766         * cgen-sim.scm (cgen): Ditto.
4767         * cgen-gas.scm (cgen): Ditto.
4768         * cgen-stest.scm (cgen): Ditto.
4769         * cgen-sid.scm (cgen): Ditto.
4770
4771 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4772
4773         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4774         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4775         (-gen-extract-switch): Initialize result to 1.
4776         * opcodes.scm (gen-ifield-default-type): New proc.
4777         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4778         updated.
4779         (<hw-index>,gen-insert): Handle non-ifield indices.
4780         (<hw-index>,gen-extract): Ditto.
4781         (<hw-asm>,gen-parse): Ditto.
4782         (<hw-asm>,gen-print): Ditto.
4783         (<keyword>,gen-parse): Ditto.
4784         (<keyword>,gen-print): Ditto.
4785         (<operand>,gen-fget): Ditto.
4786         (<operand>,gen-fset): Ditto.
4787
4788         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4789         (-gen-hw-index): Ditto.
4790         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4791         (-gen-hw-index): Ditto.
4792
4793         * sem-frags.scm: New file.
4794
4795         * attr.scm (attr-parse): Add better checking of input.
4796
4797         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4798         All uses updated.
4799         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4800
4801         * ifield.scm (ifld-nil?): New proc.
4802
4803         * operand.scm (<operand>): New members getter,setter.
4804         (<operand>,make!): New args getter,setter.  All uses updated.
4805         (op:getter,op:setter): New procs.
4806         (<hw-index>,field-start): Return 0 for non-ifield indices.
4807         (<hw-index>,field-length): Return 0 for non-ifield indices.
4808         (-operand-parse-getter,-operand-parse-setter): New procs.
4809         (-operand-parse): New args getter,setter.  All callers updated.
4810         Always use hw-index-scalar for scalar operands.
4811         (-operand-read): Handle getter,setter.
4812         (define-full-operand): New args getter,setter.  All uses updated.
4813         * semantics.scm (-build-ifield-operand!): Update.
4814         (-build-index-of-operand!): Update.
4815         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4816         * simplify.inc (define-normal-operand): Update.
4817
4818         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4819         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4820         (s-binop,s-cmpop,s-convop): Ditto.
4821         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4822         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4823         (fcc-tests): New insn-enum.
4824         (fcc-value): Rename from fcc-type.
4825         * sparcfpu.cpu: New file.  All fp support moved here.
4826
4827         * rtl.scm (<rtx-func>): New member class.
4828         (rtx-class-*?): New procs.
4829         (def-rtx-node): New arg class.  All callers updated.
4830         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4831         * rtx-funcs.scm (*): Specify class.
4832
4833         * utils-cgen.scm (context-make-reader): New proc.
4834
4835         * utils.scm (assert-fail-msg): New variable.
4836         (assert): Use it.
4837         (list-drop,list-tail-drop): New procs.
4838
4839 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4840
4841         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4842         CGEN_MIN_INSN_SIZE deleted on March 22.
4843
4844         * ifield.scm (<ifield>,needed-iflds): New method.
4845         (<multi-ifield>,needed-iflds): New method.
4846         (ifld-needed-iflds): New proc.
4847         (multi-ifield?): New proc.
4848         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4849         (-sfmt-search-key): Include insn length in key.
4850         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4851         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4852         (-ifmt-lookup-ifmt!): Compute key here.
4853         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4854         All callers updated.
4855         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4856         All callers updated.
4857         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4858         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4859         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4860         to ifmt-build.
4861         * operand.scm (op-iflds-used): New proc.
4862         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4863         and sim-cpu.scm.
4864         And from sid.scm,sid-cpu.scm as well.
4865         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4866         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4867         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4868         (gen-extracted-ifld-value): Ditto.
4869         (-extract-chunk-specs): Ditto.
4870         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4871         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4872         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4873         (-extract-insert-subfields): New function.
4874         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4875         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4876         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4877         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4878         gen-extract-foo.
4879         (-gen-no-scache-semantic-fn): Ditto.
4880         (-gen-sem-case): Ditto.
4881         (-gen-read-case): Update calls to gen-define-ifields,
4882         gen-extract-ifields.
4883         * sim-decode.scm (-gen-record-args): Update.
4884         (-gen-sfmt-argvars-assigns): Update.
4885         (-gen-extract-case): Update.
4886         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4887         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4888         gen-extract-foo.
4889         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4890         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4891         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4892         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4893         gen-define-ifields, gen-extract-ifields.
4894         (-gen-record-args): Update.
4895         (gen-sfmt-argvars-assigns): Update.
4896         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4897         with gen-define-ifields.  Ditto for gen-extract-foo.
4898         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4899         procs rather than method calls.
4900
4901 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4902
4903         * sid.scm (-create-virtual-insns!): New local `context', pass it
4904         to insn-read.
4905
4906         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4907         (operand name) not (operand object), (local name) not (local object).
4908         (rtx-traverse-with-locals): New proc.
4909         (-compile-expr-fn): New proc.
4910         (rtx-compile): Rewrite.
4911         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4912         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4913         (rtl-c-set-trace): Ditto.
4914         (operand define-fn): Recognize operand name argument.
4915         (local define-fn): Recognize sequence temp name argument.
4916         * rtx-funcs.scm (operand): Argument is operand name, not object,
4917         so call current-op-lookup.
4918         (local): Similarily, so call rtx-temp-lookup.
4919
4920         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4921         (rtx-operand?): Ditto.
4922         (rtx-pretty-name): Ditto.
4923         (rtx-local-obj): Flag symbol argument as an error.
4924         (rtx-local-name): New proc.
4925         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4926
4927         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4928
4929         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4930         updated.
4931
4932         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4933         (and: QI rd #xff).
4934
4935         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4936         (*floats-s->c-fun-table*): Ditto.
4937         * hobbit.c,hobbit.h: Rebuild.
4938         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4939         * semantics.scm (rtx-simplify): Use /fastcall-make.
4940
4941         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4942
4943         * insn.scm (<insn>): Delete members condition, compiled-condition.
4944         (<insn>,make!): Update
4945         (<insn> getters,setters): Update.
4946         (-insn-parse,insn-read,define-full-insn): Update.
4947         * minsn.scm (minsn-make-alias): Update.
4948         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4949         (ifmt-compute!): Ditto.
4950         * sim.scm (sim-finish!): Update.
4951         * simplify.inc: (define-normal-insn): Update.
4952         * sid-cpu.scm (gen-semantic-code): Update.
4953
4954         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4955         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4956         (ifmt-compute!): Ditto.
4957
4958 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4959
4960         * minsn.scm (minsn-compute-iflds): Print better error message for
4961         missing ifields.
4962
4963 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4964
4965         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4966
4967         * Makefile.am (HOBFLAGS): New variable.
4968         (cgen-hob.c): Use it.
4969         (hobbit.c): Use it.
4970         (libcpu_a_SOURCES): Add hob-sup.c.
4971         (hob-sup.o): New rule.
4972         * Makefile.in: Rebuild.
4973         * cgen.c: #include hob-sup.h.
4974         (cgen_init_c): Call hobbit_init_support.
4975         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4976         (*special-scm->c-functions*): Add them.
4977         (display-c-expression): Handle *c-symbol*.
4978         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4979         (*floats-s->c-fun-table*): Ditto.
4980         (normalize): Recognize /fastcall-make.
4981         (normalize-fastcall-make): New proc.
4982         * hobbit.c,hobbit.h: Rebuild.
4983         * hob-sup.scm: New file.
4984         * hob-sup.c: New file.
4985         * hob-sup.h: New file.
4986         * read.scm: Load hob-sup.scm.
4987         * rtl.scm (-rtx-name-list): New variable.
4988         (rtx-name-list): New proc.
4989         (rtx-lookup): Try symbol first.
4990         (def-rtx-node): Add name to -rtx-name-list.
4991         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4992         (-rtx-traverse-anymode): New proc.
4993         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4994         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4995         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4996         (-rtx-traverse-{symornum,object}): New procs.
4997         (-rtx-make-traverse-table): Rewrite.
4998         (-rtx-traverse-operands): Rewrite arg-types handling.
4999         Handle #f result of traverser.
5000         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5001         Move debug handling here.
5002         (-rtx-traverse-debug): Delete.
5003         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5004         for each rtx.
5005         * semantics.scm (semantic-compile:process-expr!): Fix call to
5006         -rtx-traverse.
5007         * utils.scm (map1-improper): New proc.
5008
5009 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5010
5011         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5012         (h-mbits): Ditto.
5013         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5014         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5015         (<operand>,cxmake-get): Tweak.
5016         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5017
5018 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5019
5020         * thumb.cpu (dnti): Delete timing spec.
5021         (all insn): Update.
5022
5023         * arm.cpu (arm isa): New fields condition, setup-semantics.
5024         (thumb isa): New field setup-semantics.
5025         (h-gr): Add attribute CACHE-ADDR.
5026         * arm7.cpu (dnai): Delete condition.
5027         (eval-cond): Delete.
5028
5029         * mach.scm (<isa>): New member setup-semantics.
5030         (-isa-parse-setup-semantics): New proc.
5031         (-isa-parse): New arg setup-semantics.
5032         (-isa-read): Recognize setup-semantics.
5033
5034         * sid-cpu.scm (gen-extract-fields): Split into two:
5035         gen-extract-ifields, gen-extract-ifmt-ifields.
5036         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5037         tracing begin/end messages (done by caller now).
5038         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5039         tracing begin/end messages (done by x-before,x-after virtual insns).
5040         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5041         end so don't have to look it up again next time.
5042         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5043         (-decode-expr-ifield-tracking-key): New proc.
5044         (-decode-expr-ifield-tracking): New proc.
5045         (-decode-expr-ifield-values-used): New proc.
5046         (-decode-expr-ifield-mark-used!): New proc.
5047         (-gen-decode-expr-set-itype): New proc.
5048         (-gen-decode-expr-entry): Rewrite.
5049         (-gen-decode-table-entry): New proc.
5050         (-gen-decoder-switch): Use it.
5051         (-gen-virtual-insn-finder): New proc.
5052         (-gen-argbuf-elm): Move here from sid.scm.
5053         (-gen-argbuf-hw-elm): Ditto.
5054         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5055         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5056         conditional-execution isas.
5057         (-gen-decode-fn): Record conditional-exec ifield.
5058         * sid.scm (-current-pbb-engine?): New global.
5059         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5060         (<ifield>,gen-ifld-extract): New arg `indent'.
5061         (<multi-ifield>,gen-ifld-extract): Ditto.
5062         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5063         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5064         (-gen-arch-model-decls): Only scan real insns.
5065         (scache-engine-insns,pbb-engine-insns): New procs.
5066         (-create-virtual-insns!): New proc.
5067         (sim-finish!): Call it.
5068         (-decode-specialize-insn?): New proc.
5069         (-decode-specialize-build-assertion): New proc.
5070         (-decode-specialize-insn-1): New proc.
5071         (-decode-specialize-insn): New proc.
5072         (-fill-sim-insn-list!): New proc.
5073         (sim-analyze!): Create copies of insns to be specialized.
5074         * utils-cgen.scm (obj-set-name!): New proc.
5075
5076         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5077         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5078         semantic-attrs.
5079         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5080         sformats.
5081         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5082         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5083         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5084         (attr): Rewrite test for insn owner.
5085         (member): New rtx function.
5086         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5087         as separate function.
5088         (rtx-ifield?,rtx-ifield-name): New procs.
5089         (rtx-operand-obj): Rewrite.
5090         (rtx-operand-name): New proc.
5091         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5092         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5093         (tstate-make): New args owner, known.  All callers updated.
5094         (tstate-known-lookup): New proc.
5095         (rtx-traverse): New arg owner.  All callers updated.
5096         (rtx-make-bool): New proc.
5097         (rtl-find-ifields): Rewrite.
5098         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5099         * semantics.scm: ... here.
5100         (rtx-const-equal,rtx-const-list-equal): New procs.
5101         (-build-known-values): New proc.
5102         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5103         (semantic-attrs): Ditto.
5104         * rtx-funcs.scm (member,number-list): New rtx functions.
5105
5106         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5107         Rewrite.  Delete arg `all-attrs'. All callers updated.
5108         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5109         updated.
5110         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5111
5112         * decode.scm (subdtable-add): Handle `expr' entries.
5113         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5114         (exprtable-entry-*): Update.
5115         (exprtable-entry-iflds): New proc.
5116         (exprentry-cost): New proc.
5117         (exprtable-sort,-gen-exprtable-name): New procs.
5118         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5119         (exprtable-*): Update.
5120         (-build-decode-table-entry): Don't issue collision warning if all are
5121         specialized insns.  Sort exprtable entries before building table.
5122
5123         * read.scm (-reader-process-expanded-1): Move pretty printing of
5124         input to logging level 4.
5125
5126         * utils.scm (string-list->string): New proc.
5127
5128         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5129         semantics.
5130         (insn-read): Delete leading '-' in name.  All callers updated.
5131         (real-insn?): New proc.
5132         (real-insns): Rewrite.
5133         (insn-has-ifield?): New proc.
5134         (insn-builtin!): Create insn attribute SPECIALIZED.
5135
5136         * mach.scm (<arch>): Delete member app-data.
5137         (current-raw-insn-list): New proc.
5138         (insn-list-car,insn-list-splice!): New procs.
5139         (<decode-specialize>): New class.
5140         (-isa-parse-decode-specialize): New proc.
5141         (-isa-parse-decode-specializes): New proc.
5142         (<isa>): New members `condition', `decode-specializes'.
5143         (-isa-parse-condition): New proc.
5144         (-isa-parse): New args condition, decode-specializes.
5145         (-isa-read): Recognize condition, decode-specializes.
5146         (-isa-add-decode-specialize!): New proc.
5147         (modify-isa): New proc.
5148         (isa-conditional-exec?,state-conditional-exec?): New procs.
5149         (arch-init!): New reader command `modify-isa'.
5150
5151         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5152         (mode-signed,mode-unsigned?): New procs.
5153
5154 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5155
5156         * types.scm (<array>): New method get-shape.
5157         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5158         onto type.
5159         (hw-shape,hw-num-elms): New procs.
5160         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5161         if there's more than 255 registers.
5162         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5163
5164         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5165         with get/set specs.
5166
5167 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5168
5169         * cgen-sid.scm (sim-arguments): Add -X.
5170         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5171         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5172         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5173         Simplify by supporting pbb engine only.
5174         (-gen-sem-switch-init): New proc.
5175         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5176         (cgen-sem-switch.cxx): New proc.
5177         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5178         with with-pbb?.  Support dual scache/pbb engines.
5179         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5180         Support dual scache/pbb engines.
5181         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5182         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5183         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5184
5185 1999-05-10  Ben Elliston  <bje@cygnus.com>
5186
5187         * arm7.cpu: Remove coprocessor related fields, operands and insn
5188         definitions for now. Take the undefined instruction trap instead.
5189         (ldmda-wb): New instruction.
5190         (ldmib-wb): Likewise.
5191         (ldmdb-wb): Likewise.
5192         (stmdb-wb): Likewise.
5193         (stmib-wb): Likewise.
5194         (stmda-wb): Likewise.
5195
5196 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5197
5198         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5199         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5200
5201         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5202         hobbit can't handle optional third arg.
5203
5204 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5205
5206         * arm.cpu (h-tbit): Delete set spec.
5207         (h-mbits): Don't call arm_mbits_set in set spec.
5208         * arm.sim: New file.
5209         * hardware.scm (modify-hardware): New proc.
5210         (hardware-init!): Add modify-hardware command.
5211         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5212         (-hw-gen-set-quiet): Ditto.
5213         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5214         hardware attribute.  Load $arch.sim file if present.
5215         * utils-cgen.scm (keyword-list?): New proc.
5216         (keyword-list->arg-list,arg-list-validate-name): New procs.
5217         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5218
5219         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5220
5221         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5222         @cpu@_cpu_cgen.
5223
5224         * attr.scm (obj-prepend-atlist!): New proc.
5225
5226         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5227
5228         * sid.scm (<operand>,profilable?): Use op:type.
5229         * sim.scm (<operand>,profilable?): Use op:type.
5230
5231 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5232
5233         * utils.scm (find-index,find): Be more stack friendly.
5234
5235         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5236         (bic-imm): Ditto.
5237
5238 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5239
5240         * arm.cpu (h-gr-usr): New hardware element.
5241         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5242         (arm-mode): New keyword.
5243         (h-mbits): Add set spec.
5244         (h-spsr): Implement get/set specs.
5245
5246         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5247         (-reader-process-expanded-1): Pretty print logging output.
5248
5249         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5250         (cgen-cpu.h): Print enums before hardware elements.
5251         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5252         * sid-decode.scm (cgen-decode.cxx): Ditto.
5253         * sid-model.scm (cgen-model.cxx): Ditto.
5254
5255         * utils-cgen.scm (context-error): Accept variable number of
5256         trailing args.
5257
5258         * rtx-funcs.scm (error:): New rtx function.
5259         * rtl-c.scm (s-case-vm): New proc.
5260         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5261         (s-case): Simplify, handle non-VM result.
5262         (error:): New rtx function.
5263
5264 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5265
5266         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5267         (test-hi,test-ls): Fix cbit handling.
5268         (shift-type,h-operand2-shifttype): Move here ...
5269         * arm7.cpu: ... from here.
5270         (set-cond,set-cond-maybe,dnix): Delete, unused.
5271         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5272         * arm.cpu: ... to here.
5273         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5274         (alu-cmn): Use set-add-flags.
5275         (alu-tst): Use set-zn-flags.
5276         (alu-cmp): Use set-sub-flags.
5277         (lsl,lsr,asr): Set condition codes.
5278         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5279         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5280         alu-shift-op.
5281         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5282         All callers updated.
5283         (sub-sp): Rename from add-sp-neg.
5284         (f-lbwl-offset): Delete.
5285         (f-lbwl-hi,f-lbwl-lo): New ifields.
5286         (lbwl-hi,lbwl-lo): Update.
5287         (bl-hi): Add 4 to pc.
5288         (push-reg,pop-reg): Simplify.
5289         (push,push-lr): Push registers in correct order.
5290         (pop,pop-pc): Pop registers in correct order.
5291         (save-reg-inc,load-reg-inc): Simplify.
5292         (ldmia): Save registers in correct order.
5293
5294 1999-04-30  Ben Elliston  <bje@cygnus.com>
5295
5296         * arm7.cpu (f-op-hdt): Remove; unused.
5297         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5298         (f-ror-imm8): New multi-ifield.
5299         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5300         callers updated.
5301         (f-uimm12): New field.
5302         (ror-imm8): New operand.
5303         (uimm12): Likewise.
5304         (hdt-offset8): Reinstate operand.
5305         (offset4-hi,offset4-lo): Remove.
5306         (set-cond): Remove macro; unused.
5307         (set-cond-maybe): Likewise.
5308         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5309         (store-word/byte): Likewise.
5310         (load-halfword): Use hdt-offset8 multifield operand instead of two
5311         4-bit operands that are explicitly combined by semantic code.
5312         (do-halfword-store): Bug fix. Set address when not preindexing.
5313         (store-halfword): Also use hdt-offset8 operand.
5314         (arith-op): Avoid clobbering source registers when one of them is
5315         the destination register.
5316         (arith-imm-op): Likewise.
5317         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5318         (teq-imm): Likewise.
5319         (ldm-p): Rename to ldmdb.
5320         (stm-pw): Rename to stmdb-wb.
5321         (multi-action): New macro; test reg-list bits and execute a
5322         semantic fn if the bit is set.
5323         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5324         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5325         (all insns): Use dnai entries for simplicity rather than dni.
5326         (*): Use short-form of (const ..).
5327
5328 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5329
5330         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5331         member eval to evaluator.
5332         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5333         (tstate-make): Delete arg op-fn.  All callers updated.
5334         (tstate-op-fn,tstate-set-op-fn!): Delete.
5335         (rtx-traverse): Delete op-fn arg.  All callers updated.
5336         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5337         split out of -simplify-for-compilation.
5338
5339         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5340         (cgen_DEPENDENCIES): Add stamp-cgen.
5341         (stamp-cgen): New rule.
5342         * Makefile.in: Rebuild.
5343
5344         * rtl-c.scm (enum:): Define emitter for.
5345         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5346         enums as well.
5347         (rtx-constant-value,rtx-enum-value): New procs.
5348         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5349         (rtx-compile-time-constant?): Return #t for enums.
5350         (rtx-true?,rtx-false?): Handle enums.
5351         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5352         building result by hand.
5353         (rtx-simplify-eq-attr-insn): Ditto.
5354         * rtx-funcs.scm (enum:,enum): New rtx functions.
5355
5356         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5357         aliases-analyzed?.
5358         (arch-analyze-insns!): New proc.
5359         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5360         of calling ifmt-compute! directly.
5361         * sid.scm (-sim-insns-analyzed?): Delete.
5362         (sim-analyze!): Call arch-analyze-insns! instead of calling
5363         ifmt-compute! directly.
5364         * sim.scm (-sim-insns-analyzed?): Delete.
5365         (sim-analyze!): Call arch-analyze-insns! instead of calling
5366         ifmt-compute! directly.
5367
5368         * utils.scm (string-take-with-filler): New proc.
5369         (string-take): Use it.
5370
5371         * pgmr-tools.scm: New file.
5372         * read.scm: Load it.
5373         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5374
5375         * insn.scm (insn-base-mask): Renamed from insn:mask.
5376         All callers updated.
5377         (insn-base-mask-length): Renamed from insn:mask-length.
5378         All callers updated.
5379         (insn-foo): Renamed from insn:foo.  All callers updated.
5380         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5381         * iformat.scm (compute-insn-base-mask-length): Renamed from
5382         compute-insn-mask-length.  All callers updated.
5383         (compute-insn-base-mask): Renamed from compute-insn-mask.
5384         All callers updated.
5385
5386         * enum.scm (-enum-parse-prefix): New proc.
5387         (<enum>,make!): Don't parse enum values here.
5388         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5389         (define-full-insn-enum): Ditto.
5390         (enum-vals-upcase): New proc.
5391         * hardware.scm (define-keyword): Make enum prefix uppercase.
5392         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5393
5394         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5395         (<ifield>,field-extract): New method.
5396         (<multi-ifield>,field-extract): New method.
5397         (ifld-extract): New proc.
5398         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5399         (ifld-extract-fn-name): Renamed from ifld-extract.
5400
5401         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5402         All callers updated.
5403
5404         * ifield.scm (ifld-lsb0?): New proc.
5405         (sort-ifield-list): New arg up?.  All callers updated.
5406         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5407         rather than global state.
5408
5409 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5410
5411         * insn.scm (pretty-print-insn-format): New proc.
5412
5413         * Makefile.in: Rebuild.
5414         * aclocal.m4: Rebuild
5415         * configure: Rebuild.
5416
5417 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5418
5419         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5420         * configure: Rebuild.
5421         * aclocal.m4: Rebuild.
5422         * Makefile.in: Rebuild.
5423         * doc/Makefile.in: Rebuild.
5424         * doc/version.texi: Rebuild.
5425
5426 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5427
5428         * utils.scm (bits->bools): New proc.
5429
5430 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5431
5432         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5433         subfield's gen-ifld-extract-decl method.
5434
5435 1999-04-23  Ben Elliston  <bje@cygnus.com>
5436
5437         * arm7.cpu (ldrsh-pu): Remove.
5438         (do-halfword-load): New pmacro.
5439         (load-halfword): Likewise.
5440         (do-halfword-store): Likewise.
5441         (store-halfword): Likewise.
5442         (strh-*): New instructions.
5443         (ldrsb-*): Likewise.
5444         (ldrh-*): Likewise.
5445         (ldrsh-*): Likewise.
5446
5447 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5448
5449         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5450         fields.
5451
5452         * arm7.cpu (do-word/byte-store): Fix typo.
5453
5454 1999-04-22  Ben Elliston  <bje@cygnus.com>
5455
5456         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5457         register is the program counter (R15).
5458
5459         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5460         (str-*): Implement using store-word-byte. Remove older versions.
5461         (bic): Use the `inv' rtx for obtaining bitwise complements.
5462         (bic-imm): Likewise.
5463         (mvn): Likewise.
5464         (mvn-imm): Likewise.
5465         (store-indev-reg): Remove crufty pmacro.
5466         (load-indiv-reg): Likewise.
5467         (ldm-p): Reverse the order of register processing for decrement.
5468         (stm-p): Likewise.
5469         (stbi): Remove; handled by the str-* insns.
5470
5471 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5472
5473         * thumb.cpu (cmp): Fix carry bit computation.
5474         (alu-cmp): Ditto.
5475
5476 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5477
5478         * arm.cpu (h-tbit): Specify set spec.
5479         (h-cpsr): Ditto.
5480         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5481         (set-sub-flags): Interpret "carry bit" as a borrow.
5482         (all sub/cmp insns): Carry bit is actually a borrow bit.
5483         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5484         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5485         .pmacro instead.
5486         (hireg-add,hireg-cmp,hireg-move): Ditto.
5487
5488         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5489         (-CGEN-LANG-VERSION): Ditto.
5490
5491 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5492
5493         * pmacros.scm (-pmacro-make): New arg `default-values',
5494         all callers updated.
5495         (-pmacro-default-values): New proc.
5496         (-pmacro-process-keyworded-args): New proc.
5497         (-pmacro-process-args): New proc.
5498         (-pmacro-invoke): Process arguments before expanding macro.
5499         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5500         (define-pmacro): Handle default values specified in arg list.
5501         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5502         (rtx-boolif-op-arg[01]): New procs.
5503         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5504         (rtx-simplify): Handle not,orif,andif.
5505         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5506         * utils.scm (alist-copy): New proc.
5507         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5508         (ldr*): Rewrite.
5509         (swi): Explicitly set pc.
5510
5511         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5512
5513 1999-04-17  Ben Elliston  <bje@cygnus.com>
5514
5515         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5516         correctly adjusts the program counter now.
5517
5518         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5519         (f-signed?): Rename from `f-hdt-signed?'.
5520         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5521         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5522         (f-hdt-offset8): Use new field names.
5523         (ldr): Use `imm12' field, not `offset12', since we do our own
5524         address arithmetic.
5525         (str, str-*): Likewise.
5526         (ldu-*): Remove most; better not implemented than broken.
5527         (ldrh*): Likewise.
5528         (ldrsh-pu): New insn.
5529         (stri): Likewise.
5530         (stri-p): Likewise.
5531         (stbi): Likewise.
5532         (ldm-p): Likewise; replace (load-indiv-reg) version.
5533
5534 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5535
5536         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5537         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5538         (*): Explicitly specify mode in c-call.
5539         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5540         (arith-op): Ditto.
5541         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5542         (arith-imm-op): New pmacro.
5543         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5544         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5545
5546 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5547
5548         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5549
5550         * rtl.scm (rtl-find-ifields): Implement.
5551
5552         * utils-gen.scm: New file.
5553         * read.scm: Load it.
5554         * desc.scm: Move generic attribute code to utils-gen.scm.
5555         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5556         * Makefile.in: Rebuild.
5557
5558         * arm7.cpu (R15-OFFSET): New attribute.
5559         (dnai): New pmacro.
5560         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5561         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5562         for reg-shift version.
5563         (arith-op): Ditto.
5564         (data processing insns): Reorganize.  Use dnai.
5565
5566         * attr.scm (attr-kind): New proc.
5567         (attr-list-enum-list): Rewrite.
5568         (-attr-sort): Split result into two lists, bools and non-bools.
5569         (current-attr-list-for): Update.
5570
5571         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5572         * sid-cpu.scm (-gen-attr-decls): New proc.
5573         (-gen-insn-attr-decls): New proc.
5574         (cgen-desc.h): New proc.
5575         (cgen-cpu.h): Put everything in @cpu@ namespace.
5576         (gen-parallel-exec-type): Change prefix of parexec struct from
5577         @cpu@ to @prefix@.
5578         (-gen-trace-record-type): Ditto for trace_record struct.
5579         (-gen-write-case): Update.
5580         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5581         @prefix@.  Update scache struct references.
5582         (-gen-sem-case): Update scache struct references.
5583         (-gen-sem-switch-fn): Update idesc struct reference.
5584         Update insn_type enum reference.
5585         (cgen-write.cxx): Update scache,argbuf references.
5586         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5587         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5588         from @cpu@ to @prefix@.
5589         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5590         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5591         from @CPU@ to @PREFIX@.
5592         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5593         from @CPU@ to @PREFIX@.
5594         (-gen-decode-insn-globals): Generate insn attributes.
5595         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5596         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5597         semantic fn typedef.
5598         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5599         Change prefix of scache struct from @cpu@ to @prefix@.
5600         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5601         Change prefix of idesc struct from @cpu@ to @prefix@.
5602         Change prefix of insn_type enum from @cpu@ to @prefix@.
5603         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5604         from @cpu@ to @prefix@.
5605         (-gen-scache-decls): Change prefix of scache struct from
5606         @cpu@ to @prefix@.  Update idesc struct name.
5607         Update decode,execute methods.
5608         (-gen-extract-case): Update to type name changes.
5609         (-gen-decode-fn): Ditto.
5610         (cgen-decode.h): Put everything in @cpu@ namespace (except
5611         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5612         (cgen-decode.cxx): Add using namespace @cpu@.
5613         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5614         model_mark_get/set from @cpu@ to @prefix@.
5615         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5616         @prefix@.
5617         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5618         of model_insn_before/after from @cpu@ to @prefix@.
5619         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5620         Update insn_word type name.
5621         (-gen-model-timing-table): Update INSN_TIMING struct name.
5622         (-gen-model-init-fn): Update MODEL_DATA struct name.
5623         (-gen-mach-defns): Update name of init_idesc_table fn.
5624         (cgen-model.cxx): Add using namespace @cpu@.
5625         * sid.scm (gen-cpu-class): Delete.
5626         (gen-attr-type): New proc.
5627         (gen-obj-attr-sid-defn): New proc.
5628         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5629         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5630         @CPU@ to @PREFIX@.
5631         (gen-cpu-insn-enum): Update name of insn enum.
5632         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5633         (bx-hs): Ditto.
5634         (swi): Rename @cpu@_swi to @prefix@_swi.
5635
5636         * decode.scm (-build-decode-table-entry): Remove heuristic for
5637         distinguishing insns, and use insn ifield-assertion specs.
5638
5639         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5640         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5641         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5642         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5643         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5644         all callers updated.
5645         (gen-attr-name): New proc
5646         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5647         (gen-obj-attr-defn): Delete num_nonbools count.
5648
5649         * iformat.scm (ifmt-analyze): Handle insn-condition.
5650         (ifmt-compute!): Ditto.
5651         * insn.scm (<insn>): Specify default value for condition,
5652         post-cond-trap,compiled-condition,compiled-semantics.
5653         (<insn>,make!): New arg condition.
5654         (<insn>): Add getters for condition,compiled-condition.
5655         (-insn-parse): New arg condition, all callers updated.
5656         (-insn-read): Recognize condition spec.
5657         (define-full-insn): New arg condition.
5658         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5659         * semantics.scm (semantic-compile): Change arg sem-code to
5660         sem-code-list.
5661         (semantic-attrs): Ditto.
5662         * sim.scm (sim-finish!): Update calls to define-full-insn.
5663         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5664         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5665         * sid.scm (sim-finish!): Update call to define-full-insn.
5666
5667 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5668
5669         * Makefile.am (sim-cpu): Allow specification of ISA.
5670         * Makefile.in: Rebuild.
5671
5672 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5673
5674         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5675
5676 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5677
5678         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5679
5680         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5681
5682         * attr.scm (atlist?): New proc.
5683         (-attr-eval): Rewrite.
5684         (attr-parse): New proc.
5685         (atlist-parse): Use it.
5686
5687         * decode.scm (exprtable-entry-make): New proc.
5688         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5689         (exprtable-make,exprtable-insns): New procs.
5690
5691         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5692         All uses updated.
5693         (hardware-builtin!): Make h-memory a vector.
5694
5695         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5696         All callers updated.
5697         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5698
5699         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5700         All uses updated.
5701         (-insn-parse): Set semantics to #f if not specified.
5702         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5703         if simulator.
5704         (-parse-insn-format): Recognize `=' iformat spec.
5705
5706         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5707         (isa-max-insn-bitsize): Ditto.
5708
5709         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5710         rtl-c-with-alist.
5711         (<ifield>,gen-extract): Ditto.
5712         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5713         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5714         (gen-define-ifmt-ifields): New proc.
5715         (gen-semantic-code): Rewrite.
5716         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5717         (-gen-decoder-switch): Handle expression tables.
5718         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5719         gen-define-fields.
5720         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5721         instead of gen-define-fields.
5722         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5723         callers updated.
5724         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5725         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5726         (-gen-ifld-extract-beyond): Ditto.
5727         (<multi-ifield>,gen-ifld-extract): Ditto.
5728         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5729         rtl evaluation code.
5730         (op:read): Build an <eval-state> to pass to gen-read.
5731         (op:write): Build an <eval-state> to pass to gen-write.
5732         (op:record-profile): Build an <eval-state> to pass to
5733         gen-record-profile.
5734         * sim-cpu.scm (gen-semantic-code): Rewrite.
5735         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5736         rtl-c-with-alist.
5737         (-gen-ifld-extract-beyond): Ditto.
5738         (<multi-ifield>,gen-ifld-extract): Ditto.
5739         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5740         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5741         rtl evaluation code.
5742         (op:read): Build an <eval-state> to pass to gen-read.
5743         (op:write): Build an <eval-state> to pass to gen-write.
5744         (op:record-profile): Build an <eval-state> to pass to
5745         gen-record-profile.
5746
5747         * operand.scm (<operand>): Give `selector' default value of #f.
5748         Give `num' default value of -1.  Give `cond?' default value of #f.
5749         (op:new-mode): Delete arg `set?', all uses updated.
5750
5751         * read.scm (reader-error): Handle #f return from port-filename.
5752         (-init-parse-cpu!): Call rtl-c-init!.
5753         (reader-install-builtin!): Call rtl-builtin!.
5754
5755         * rtl-c.scm: New file.
5756         * semantics.scm: New file.
5757         * read.scm: Load them.
5758         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5759         to semantics.scm.
5760         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5761         type,eval,num.
5762         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5763         (-rtx-num-text,-rtx-max-num): New globals.
5764         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5765         (-rtx-macro-lookup): New proc.
5766         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5767         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5768         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5769         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5770         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5771         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5772         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5773         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5774         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5775         (rtx-pretty-name): New proc.
5776         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5777         (rtx-traverse-*): Rewrite rtx traversing.
5778         (rtx-eval-*): Rewrite rtx evaluation.
5779         (rtx-compile): New proc.
5780         (rtx-simplify): New proc.
5781         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5782         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5783         (ifield,index-of): Rewrite.
5784         (name): Renamed from `operand:'.
5785         (operand,xop,local): New rtx's.
5786         (current-insn): Rewrite.
5787         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5788         (cgen-hob.h): Remove rule for.
5789         (cgen-hob.o): Depend on cgen-hob.c only.
5790         * Makefile.in: Rebuild.
5791
5792         * utils-cgen.scm (vmake): New proc.
5793         (<context>): New class.
5794         (context-make-prefix,context-error): New procs.
5795
5796 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5797
5798         * i960.cpu: Add some ??? comments.
5799         (xnor, ornot): New instructions.
5800         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5801
5802 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5803
5804         * cos.scm (-object-error): Print better error message.
5805
5806         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5807         (-pmacro-env-ref): Renamed from -env-ref.
5808
5809 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5810
5811         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5812         (h-pc): Delete.
5813         (hardware-builtin!): Delete h-pc builtin.
5814         * arm.cpu (h-pc): Define.
5815         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5816         * arm7.cpu (set-logical-cc-maybe): Delete.
5817         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5818         (data processing insns): Rewrite.
5819         * m32r.cpu (h-pc): Define.
5820         * fr30.cpu (h-pc): Define.
5821         * i960.cpu (h-pc): Define.
5822         * sparc.cpu (h-pc): Define.
5823
5824         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5825         (s-parallel): Replace do {...} while (0) with {...}.
5826         (s-sequence): Ditto.
5827
5828         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5829         consistent.
5830         (-gen-write-case,-gen-sem-case): Ditto.
5831         (-gen-sem-case): Only specify `written' if profiling or
5832         parallel-write-back.
5833         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5834         (-gen-sem-switch-fn): New proc.
5835         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5836         based on with-sem-switch option.
5837         * sid-decode.scm (-gen-decode-insn-globals): Only define
5838         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5839         addresses in idesc_table if !with-sem-switch.
5840         (-gen-sem-fn-decls): Rewrite.
5841         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5842         member based on with-sem-switch.  Only define
5843         `idesc_table_initialized_p' member if with-sem-switch.
5844         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5845         * sid.scm (-with-sem-switch?): New variable.
5846         (option-init!): Initialize it.
5847         (option-set!): Set it.
5848         (with-sem-switch?): New proc.
5849         (-op-gen-set-trace): Only emit `written' reference if profiling.
5850         (sim-finish!): Use h_pc_set to set pc.
5851
5852 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5853
5854         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5855         All callers updated.
5856         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5857
5858         * sid.scm (gen-argbuf-type): Delete.
5859         (-gen-argbuf-fields-union): Move to ...
5860         * sid-decode.scm: ... here.
5861
5862         * read.scm (-reader-process-expanded-1): New proc.
5863         (-reader-process-expanded): Call it to catch nested begin's.
5864         (reader-process): Move `begin' handling to -reader-process-expanded.
5865
5866         * insn.scm (-insn-read): Fix name of `format' spec.
5867
5868         * pmacros.scm (.pmacro): New builtin.
5869         (scan-symbol): If procedure macro, return macro rather than its symbol.
5870         (check-macro): Don't do lookup, instead check if (car expr) is
5871         macro object.
5872         (scan-list): Handle .pmacro.
5873         (scan): No longer re-examine text for another macro invocation.
5874         (-pmacro-build-lambda): New proc.
5875         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5876         another, fetch the other's value (rather than doing it during
5877         expansion).
5878
5879 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5880
5881         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5882         * Makefile.in: Rebuild.
5883
5884         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5885         (-fill-slot!): Simplify.
5886         (-build-slots): Simplify.
5887
5888         * dev.scm (load-sid): Don't load sid-arch.scm.
5889
5890         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5891         switch's.
5892         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5893         switch's.
5894
5895 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5896
5897         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5898         * decode.scm: ... here.  New file.
5899         * sid-decode.scm: Use decoder computation code in decode.scm.
5900         * read.scm: Load decode.scm.
5901
5902         * arm.cpu (arm710 model): Add u-exec function unit.
5903         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5904         Add get/set specs to redirect reg 15 to h-pc.
5905         (h-*): Indicate for both ARM and THUMB isas.
5906         (cbit,nbit,vbit,zbit): Ditto.
5907         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5908         (h-cpsr): Make virtual.  Add get/set specs.
5909         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5910         (h-spsr): New virtual reg.
5911         * arm7.cpu (shift-type): New explicitly defined keyword.
5912         (h-operand2-shifttype): Use it.
5913         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5914         All callers updated.  Don't set cbit.
5915         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5916         shift-type enum as case choices.  Set cbit.
5917         (and,orr,eor,add-imm): Uncomment out.
5918         (undefined): Temporarily comment out.
5919         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5920         (lda-pc,lda-sp): Ditto.
5921         (ldr-pc): Rename from ldr.
5922         (cbranch): Mark insns as being thumb insns.
5923
5924         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5925
5926         * cgen-sid.scm: Don't load sid-arch.scm.
5927         (sim-arguments): Delete unused entries.
5928         * sid-arch.scm: Delete.
5929
5930         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5931         (<insn>,ifld-assertions): New member.
5932         (<insn>,make!): New arg ifld-assertions, all callers updated.
5933         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5934         (insn:fields): Delete.
5935         (-insn-parse): New arg ifld-assertions.  All callers updated.
5936         (-insn-read,define-insn): New procs.
5937         (define-full-insn): New arg ifld-assertions.  All callers updated.
5938         (insn-init!): New comment define-insn.
5939
5940         * model.scm (-model-parse): Ensure at least one unit specified.
5941
5942         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5943         (<c-expr-temp>,get-name): New method.
5944         (-rtx-make-current-closure,s-closure): New proc.
5945         (hw:): Wrap rtx indices in a closure.
5946         (-gen-case-prefix): New proc.
5947         (s-case): Simplify.
5948         * rtx-funcs.scm (case:): Fix call to s-case.
5949         (closure): New rtx func.
5950
5951         * hardware.scm (<hardware-base>): New member isas-cache.
5952         (<hardware-base>,get-isas): New method.
5953         (hardware-builtin): Indicate for all isas.
5954         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5955         * mach.scm (current-arch-mach-name-list): Return list of names.
5956         (current-isa-mach-name-list): Ditto.
5957         (define-arch): Install builtin objects here.
5958         * read.scm (keep-atlist?): Only keep if both mach and isa are
5959         being kept.
5960         (keep-mach-atlist?): New proc.
5961         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5962         (reader-install-builtin!): Renamed from -install-builtin!.
5963         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5964         -gen-cpu-reg-access-defns.  Rewrite.
5965         (gen-reg-access-defn): Delete.
5966         (-gen-hardware-struct): New proc.
5967         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5968         (gen-semantic-fn,-gen-all-semantics): Delete.
5969         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5970         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5971         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5972         Call sem-analyze-insns!.
5973         (cgen-semantics.cxx): Add multiple-isa support.
5974         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5975         (-gen-scache-decls,-gen-decode-fn): Ditto.
5976         (cgen-decode.h): Call sem-analyze-insns!.
5977         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5978         * sid.scm (-with-multiple-isa?): New variable.
5979         (option-init!): Initialize it.
5980         (option-set!): Set it.
5981         (with-multiple-isa?): New proc.
5982         (gen-cpu-ref): New arg isas.  All callers updated.
5983         (gen-cpu-class): New proc.
5984         (*-get-macro,*-set-macro): Delete.
5985         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5986         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5987         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5988         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5989         (-sim-insns-analyzed): New global variable.
5990         (sim-init!): Reset it.
5991         (sim-analyze-insns!): New proc.
5992         (sim-analyze!): Don't do instruction analysis here.
5993         (sim-finish!): Specify isa of x-invalid insn.
5994         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5995
5996 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5997
5998         * thumb.cpu (cpu,mach,model): Delete.
5999         (dntf): New pmacro.  Use it for all field definitions.
6000         (dntop): New pmacro.  Use it for all operand definitions.
6001         (asr): Correct field list.
6002         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6003
6004         * utils-cgen.scm (define-getters): New macro to simplify
6005         writing class accessors.
6006         (define-setters): Ditto.
6007         (sanitize): Recognize isa elements.
6008
6009         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6010         state-parallel-exec?.
6011         * sid-model.scm (*): Ditto.
6012         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6013         state-decode-assist.
6014
6015         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6016         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6017         * sim-decode.scm (-gen-decode-switch): Ditto.
6018
6019         * sim-arch.scm (-regs-for-access-fns): Delete.
6020         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6021         (-gen-arch-reg-access-defns): Delete.
6022
6023         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6024         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6025         with state-parallel=exec?.
6026         (cgen-*): Call sim-analyze-insns! here.
6027         * sim-decode.scm (cgen-*): Ditto.
6028         * sim-model.scm (cgen-*): Ditto.
6029         * sim.scm (-sim-insns-analyzed): New global variable.
6030         (sim-init!): Reset it.
6031         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6032         already done the analysis.
6033
6034         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6035         MACH struct.
6036
6037         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6038         (arm arch): Update isa spec.
6039         (arm,thumb isas): Define.
6040         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6041         (arm7tdmi mach): Add isa spec.
6042         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6043         `const' on word number.
6044         * fr30.cpu (fr30 arch): Update isa spec.
6045         (fr30 isa): Define.
6046         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6047         moved to isa spec.
6048         * i960.cpu (i960 arch): Update isa spec.
6049         (i960 isa): Define.
6050         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6051         liw-insns,parallel-insns moved to isas spec.
6052         * m32r.cpu (m32r arch): Update isas spec.
6053         (m32r isa): Define.
6054         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6055         liw-insns,parallel-insns moved to isa spec.
6056         * sparc.cpu (sparc arch): Update isas spec.
6057         (sparc isa): Define.
6058         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6059         decode-assist moved to isa spec.
6060         * sparc64.cpu (sparc64 cpu): Ditto.
6061         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6062         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6063         (-gen-mach-table-defns): Output mach table.
6064         (-gen-hash-defines): Delete insn size macros, except for
6065         CGEN_MAX_INSN_SIZE.
6066         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6067         (cgen-desc.h): Define MAX_ISAS.
6068         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6069         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6070         (arch-* accessors): Renamed from arch:*.  All callers updated.
6071         (current-arch-isa-name-list): New proc.
6072         (-arch-parse-isas): Renamed from -arch-parse-isa.
6073         (def-isa-attr!): Rewrite.
6074         (<iframe>): New class.
6075         (<itype>): New class.
6076         (<isa>): Rewrite.
6077         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6078         (isa-integral-insn?,isa-parallel-exec?): New procs.
6079         (-isa-parse,-isa-read,define-isa): New proc.
6080         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6081         liw-insns moved to <isa>.
6082         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6083         (-cpu-parse,-cpu-read): Update.
6084         (state-*): Renamed from state:*.  All callers updated.
6085         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6086         not cpu.
6087         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6088         (state-decode-assist): New proc.
6089         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6090         (-adata-set-derived!): Rewrite.
6091         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6092         callers updated.
6093         (arch-init!): Add define-isa command.
6094         * read.scm (<reader>): Default keep-isa member to (all).
6095         (reader-* accessors): Renamed from reader:*.  All callers updated.
6096         (-keep-isa-set!): Call string->symbol on isa name list.
6097         (keep-isa-validate!): Rewrite.
6098         (current-isa): New proc.
6099         (keep-isa?): Recognize "all".
6100         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6101         Call -keep-isa-set!.
6102         (cmd-if): Recognize keep-isa?.
6103         (cpu-load): New arg keep-isa.  All callers updated.
6104         (-opt-spec-update): New proc.
6105         (common-arguments): First arg is string, not symbol.
6106         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6107
6108         * rtl.scm (rtx-get): Default mode of string arg is INT.
6109
6110         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6111
6112         * rtx-funcs.scm (join:): Pass cpu to handler.
6113
6114         * configure.in (guile_include_dir): Delete.
6115         * configure: Rebuild.
6116         * Makefile.in: Rebuild.
6117         * doc/Makefile.in: Rebuild.
6118
6119         * sid-cpu.scm (-extract-chunk-specs): New proc.
6120         (gen-define-fields): Use it.
6121         (-extract-chunk): New proc.
6122         (-gen-extract-beyond-var-list): Use it.
6123         (gen-extract-fields): Simplify.
6124
6125 1999-03-22  Ben Elliston  <bje@cygnus.com>
6126
6127         * arm7.cpu (ldri-p): New instruction.
6128         (swi): Do not vector through 0x8 yet--there is nothing there.
6129         (addi): Reinstate.
6130         (movi): Likewise.
6131         (all): Use (const x) in subreg expressions.
6132
6133 1999-03-19  Ben Elliston  <bje@cygnus.com>
6134
6135         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6136         (smlal): Likewise.
6137
6138 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6139
6140         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6141         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6142         * sim-cpu.scm (-extract-chunk-specs): New proc.
6143         (gen-define-fields): Use it.
6144         (-extract-chunk): New proc.
6145         (-gen-extract-beyond-var-list): Use it.
6146         (gen-extract-fields): Simplify.
6147
6148         Port to guile 1.3.1.
6149         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6150         (LIBIBERTY): New var.
6151         (HOB_OBJS): Add cgen-gh.o.
6152         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6153         * Makefile.in: Rebuild.
6154         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6155         * config.in: Rebuild.
6156         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6157         libncurses, libtermcap.
6158         Add checks for needed functions in guile 1.2 not in guile 1.3,
6159         and vice versa.  Add test for 3 argument scm_make_vector.
6160         * configure: Rebuild.
6161         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6162         definitions if guile doesn't have them.
6163         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6164         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6165         with gh_vector_set_x.
6166         (cgh_qsort): Replace gh_list_length with gh_length.
6167         * cgen-gh.h: Add decls for added functions.
6168         (cgh_qsort): Don't declare if IN_HOBBIT.
6169         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6170         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6171         scm_make_vector with gh_make_vector.
6172         * cos.scm: Use vector-length instead of length on vectors.
6173         * dev.scm (cload): Make varargs proc with keyword/value args.
6174         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6175         provide version that works with guile 1.2 or 1.3.
6176         Include private copy of scmhob.h.
6177         * scmhob.h: New file.  Keep our own copy for now.
6178
6179 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6180
6181         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6182         plain text.
6183         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6184         (-cx-temp-dump-stack): Pretty up output.
6185
6186         * arm.cpu: comment out thumb.cpu until isa support ready.
6187         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6188         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6189         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6190
6191         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6192
6193 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6194
6195         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6196         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6197
6198         * operand (op:new-mode): Improve error message.
6199
6200         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6201         * arm7.cpu: New file.
6202
6203 1999-03-12  Ben Elliston  <bje@cygnus.com>
6204
6205         * arm.cpu: Lots of minor fixes after desk checking.
6206
6207 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6208
6209         * thumb.cpu: snapshot of current work
6210
6211         * rtl.scm (rtx-get): Tweak error message.
6212
6213 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6214
6215         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6216         * Makefile.in: Rebuild.
6217
6218         * cos.c (cos_vector_copy): New function.
6219         (_object_copy): Use it.
6220
6221         * mode.scm (mode:eq?): Clean up.
6222         * rtl.scm (cx-new-mode): Copy attributes.
6223         (rtx-get): Don't make copy if <c-expr> with identical mode.
6224
6225         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6226         add new isas spec.
6227         (gr-names): h-gr register names moved here.
6228         (h-gr): Update.
6229         (cr-names): h-cr register names moved here.
6230         (h-cr): update.
6231         (dr-names): h-dr register names moved here.
6232         (h-dr): update.
6233         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6234         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6235         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6236         add new isas spec.
6237         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6238         add new isas spec.
6239         (gr-names): h-gr register names moved here.
6240         (h-gr): Update.
6241         (cr-names): h-cr register names moved here.
6242         (h-cr): update.
6243         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6244         (h-accums,h-psw): Ditto.
6245         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6246         add new isas spec.
6247         (gr-names): h-gr register names moved here.
6248         (h-gr-indices): Delete.
6249         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6250         (sparc64 h-gr): Ditto.
6251         (h-y): Add get/set specs.
6252         (fp regs): Rewrite.
6253         (fp operands): Rewrite.
6254         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6255         (h-tbr,h-cwp,h-wim): Ditto.
6256         * sparc64.cpu (h-fpsr): Add get/set specs.
6257         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6258         (fp-ld-op): New arg `dest', all callers updated.
6259         (*): Replace `make-di' with `join'.
6260
6261         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6262         present.
6263         (gen-semantic-code): Save/restore rtl generator state.
6264         (cgen-cpu.h): Call rtl-gen-init!.
6265         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6266         (-gen-ifld-extract-beyond): Ditto.
6267         (<multi-ifield>,gen-ifld-extract): Ditto.
6268         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6269         `gstate'.
6270         (-hw-gen-set-quiet-pc): Ditto.
6271         (<hw-pc>,gen-write): Ditto.
6272         (-hw-cxmake-get): Ditto.  Call getter function if present.
6273         (<hw-register>,cxmake-get-raw): New method.
6274         (<hw-register>,gen-set-quiet-raw): New method.
6275         (-hw-gen-set-quiet): New arg `gstate'.
6276         (hw-fun-access?): Delete.
6277         (gen-reg-access-defn): Output function contents.
6278         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6279         invocation.
6280         (-gen-hw-index): Ditto.
6281         (op:read): Update gen-read invocation.
6282         (op:write): Update gen-write invocation.
6283         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6284         operands.
6285         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6286         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6287         (<unit>,gen-profile-code): Update to sim.scm version.
6288
6289         * sim-arch.scm (-regs-for-access-fns): New proc.
6290         (-biggest-reg-mode): New proc.
6291         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6292         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6293         virtual regs separately.
6294         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6295         get/set specs.
6296         (gen-semantic-code): Save/restore rtl generator state.
6297         (cgen-cpu.h): Call rtl-gen-init!.
6298         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6299         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6300         renamed to mach-bfd-name.
6301         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6302         (-gen-ifld-extract-beyond): Ditto.
6303         (<multi-ifield>,gen-ifld-extract): Ditto.
6304         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6305         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6306         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6307         `gstate'.
6308         (hw-fun-access?): Delete.
6309         (-hw-gen-set-quiet-pc): New arg `gstate'.
6310         (<hw-register>,gen-get-macro): Rewrite.
6311         (<hw-register>,gen-set-macro): Rewrite.
6312         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6313         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6314         (<hw-register>,cxmake-get-raw): New method.
6315         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6316         (<hw-register>,gen-set-quiet-raw): New method.
6317         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6318         invocation.
6319         (-gen-hw-index): Ditto.
6320         (<hw-index>): New arg `gstate'.
6321         (-gen-hw-selector): Update call to rtx-c.
6322         (<pc>): New arg `gstate'.
6323         (op:read): Update gen-read invocation.
6324         (op:write): Update gen-write invocation.
6325         (<operand>,cxmake-get): Handle raw-reg.
6326         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6327         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6328         (<operand>,gen-set-quiet): Handle raw-reg.
6329         (<operand>,gen-set-trace): Handle raw-reg.
6330         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6331
6332         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6333         cgen_operand_type enum.
6334         (gen-operand-table): Add operand type enum.  Replace pointer to
6335         hardware element with its enum.  Null terminate table.
6336         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6337         Build operand table.
6338         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6339         * mach.scm (<arch-data>): New member `isas'.
6340         (adata-isas): New accessor.
6341         (<isa>): New class.
6342         (isa-default-insn-word-bitsize): New accessor.
6343         (isa-enum): New proc.
6344         (current-arch-default-insn-word-bitsize): Delete.
6345         (current-isa-list,current-isa-lookup): New procs.
6346         (-arch-parse-isa): New proc.
6347         (-arch-parse): Rewrite.
6348         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6349         (define-arch): Define ISA attribute.
6350         (def-isa-attr!,isa-supports?): New procs.
6351         (<mach>): New member `isas'.
6352         (mach-isas): New accessor.
6353         (-mach-parse): New arg `isas', all callers updated.
6354         (-mach-read): Recognize `isas'.
6355         (arch-finish!): Rewrite.
6356         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6357         @arch@_cgen_get_{int,vma}_operand.
6358         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6359         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6360         of pointer to table entry.
6361         * opcodes.scm (gen-switch): Handle multiply defined operands.
6362         * operand.scm (op-sort): New proc.
6363
6364         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6365         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6366         (hw-enum): Accept symbol argument.
6367         (hardware-builtin!): Delete attribute FUN-ACCESS.
6368         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6369
6370         * attr.scm (atlist-source-form): New proc.
6371         (attr-builtin!): New attr `PRIVATE'.
6372         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6373         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6374         if they have `PRIVATE' attribute.
6375         (gen-hw-table-defns): Output definitions of explicitly defined
6376         keyword tables.
6377         * hardware.scm (<keyword>): New member print-name.  Rename member
6378         `value' to `values', all uses updated.
6379         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6380         (keyword-parse): Rewrite.
6381         (-keyword-read): New proc.
6382         (define-keyword): New proc.
6383         (-hw-parse-keyword): New proc.
6384         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6385         `extern-keyword'.
6386         (-hw-parse-values): Ditto.
6387         (-hw-parse-get,-hw-parse-set): Rewrite.
6388         (hardware-init!): Add new comment define-keyword.
6389         * mach.scm (<arch>): New member `kw-list'.
6390         (arch:kw-list,arch_set-kw-list!): New accessors.
6391         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6392
6393         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6394         * mode.scm (mode-class-integral?): New proc.
6395         (mode-class-float?,mode-class-numeric?): New procs.
6396         (mode-integral?,mode-float?,mode-numeric?): New procs.
6397         (mode-compatible?): New proc.
6398         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6399         rtx-c-with-alist.
6400         (<ifield>,gen-extract): Ditto.
6401         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6402         (<gstate>): New class.
6403         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6404         (gstate-context,gstate-set-context!): New accessors.
6405         (gstate-macro?,gstate-set-macro?!): New accessors.
6406         (gstate-make,gstate-copy): New procs.
6407         (-rtl-current-gstate): New global.
6408         (current-gstate-simulator?): New proc.
6409         (current-gstate-context,current-gstate-macro?): New procs.
6410         (current-gstate,current-gstate-set!): New procs.
6411         (rtl-gen-init!): Rewrite.
6412         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6413         (tstate-make): New arg `gstate', all callers updated.
6414         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6415         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6416         (tstate-gstate,tstate-set-gstate!): New accessors.
6417         (tstate-copy): New proc.
6418         (tstate-new-cond?,tstate-new-set?): Rewrite.
6419         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6420         (rtx-traverse): New arg `gstate', all callers updated.
6421         (rtx-strdump): New proc.
6422         (-simplify-for-compilation): New arg `gstate', all callers updated.
6423         (semantic-in-out-operands): Ditto.
6424         (semantic-attrs): Ditto.
6425         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6426         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6427         (rtx-value): Rewrite.
6428         (<c-expr>,gen-name): New method.
6429         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6430         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6431         (cx-new-mode): New proc.
6432         (-rtx-c-with-tstate): New proc.
6433         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6434         callers updated.
6435         (-rtx-mode): Rewrite.
6436         (-rtx-mode-compatible?): New proc.
6437         (<c-expr-temp>): New member `value'.
6438         (cx-temp:value): New accessor.
6439         (<c-expr-temp>,make!): Override default method.
6440         (<c-expr-temp>,cxmake-get): Rewrite.
6441         (<c-expr-temp>,gen-set-quiet): Rewrite.
6442         (<c-expr-temp>,gen-set-trace): Rewrite.
6443         (gen-temp-defs): Use cx-temp:value.
6444         (record-temp!): New arg value, all callers updated.
6445         (cx-temp:cx:make): Delete.
6446         (-cx-temp-dump-stack): New proc.
6447         (rtx-get): New arg `gstate', all callers updated.  Do mode
6448         compatibility checks.  Ensure result has specified mode.
6449         (rtx-set-quiet): New arg `gstate', all callers updated.
6450         (rtx-set-trace): Ditto.
6451         (s-c-call): New arg `tstate', all callers updated.
6452         (s-c-raw-call): Ditto.
6453         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6454         (s-cmpop,s-if,e-if): Ditto.
6455         (s-subreg): New proc.
6456         (-par-new-temp!): New proc.
6457         (-par-next-temp!): Rewrite.
6458         (-par-replace-set-dests): Use -par-new-temp!.
6459         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6460         (s-sequence): Use -rtx-c-with-state.
6461         * rtx-funcs.scm (*): Update.
6462         (raw-reg:): New rtx function.
6463         (make-di): Delete.
6464         (join:,subreg:): New rtx functions.
6465
6466         * insn.scm (<insn>): New members pre-cond-trap, condition,
6467         post-cond-trap, compiled-condition.
6468
6469         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6470
6471         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6472
6473         * utils-cgen.scm (parse-symbol): New proc.
6474         (parse-string): New proc.
6475         (gen-get-macro,gen-set-macro): New arg `index-args'.
6476         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6477         Prepend \ to newlines.
6478
6479         * utils.scm (alist-remove-duplicates): Delete.
6480
6481         * sid.scm (sim-init!): Delete private debugging code.
6482
6483 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6484
6485         * cgen-sid.scm: New file for C++ simulator application.
6486         * sid-arch.scm: Ditto.
6487         * sid-cpu.scm: Ditto.
6488         * sid-decode.scm: Ditto.
6489         * sid-model.scm: Ditto.
6490         * sid.scm: Ditto.
6491         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6492
6493 1999-03-05  Ben Elliston  <bje@cygnus.com>
6494
6495         * arm.cpu: New file.
6496
6497 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6498
6499         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6500         * Makefile.in: Rebuild.
6501
6502         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6503         (-attr-parse): Validate default value.
6504
6505         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6506         (-CGEN-LANG-VERSION): Ditto.
6507         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6508         (<reader>): New member keep-isa plus accessors.
6509         (-keep-isa-set!,keep-isa-validate!): New procs.
6510         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6511         (common-arguments): New variable.
6512         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6513         (-debug-repl,continue): New procs.
6514         (-cgen,cgen): New procs.
6515         * cgen-gas.scm: Rewrite.
6516         * cgen-opc.scm: Rewrite.
6517         * cgen-sim.scm: Rewrite.
6518         * cgen-stest.scm: Rewrite.
6519
6520         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6521         (gas-test-finish!): Call opcodes-finish!.
6522         (gas-test-analyze!): Call opcodes-analyze!.
6523         (<hw-asm>): New method test-data.
6524         (<operand>,testdata): Rewrite.
6525         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6526         (sim-test-finish!): Call opcodes-finish!.
6527         (sim-test-analyze!): Call opcodes-analyze!.
6528         (<hw-asm>): New method test-data.
6529         (<operand>,testdata): Rewrite.
6530
6531 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6532
6533         * fixup.scm (reverse!): Define if missing.
6534         * *.scm: Use reverse! instead of list-reverse!.
6535
6536         * utils.scm (leading-id-char?): New proc.
6537         (id-char?): Rewrite.
6538         (chars-until-delimiter): New proc.
6539         * opc-itab.scm (extract-syntax-operands): Rewrite.
6540         (strip-mnemonic): Rewrite.
6541         (compute-syntax): Rewrite.
6542
6543         * pmacros.scm (-pmacro-substr): New proc.
6544         (pmacros-init!): Add builtin .substr.
6545
6546 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6547
6548         * thumb.cpu: New file.
6549
6550 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6551
6552         * Makefile.am (CGENCFLAGS): New variable.
6553         (WITH_HOBBIT): Use automake conditional.
6554         (CGEN_HOB_SRC): New variable.
6555         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6556         (*.o): Compile with CGENCFLAGS.
6557         (cgen-hob.c): Simplify.
6558         (cgen-nohob.c): New rule.
6559         (hobbit): Renamed from hob.x.
6560         (CLEANFILES): Add cgen-nohob.c.
6561         * Makefile.in: Rebuild.
6562         * doc/Makefile.in: Rebuild.
6563         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6564         (WITH_HOBBIT): Use AM_CONDITIONAL.
6565         * configure: Rebuild.
6566         * aclocal.m4: Rebuild.
6567
6568         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6569         with string-write-map.
6570
6571         * sim-cpu.scm (hw-need-storage?): New proc.
6572         (-gen-hardware-types): Use it.
6573         (gen-parallel-exec-elm): Call op-save-index?.
6574
6575         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6576
6577         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6578         UNSIGNED attribute.
6579         (-gen-ifld-extract-beyond): Ditto.
6580         (<integer>): Delete all references.
6581         (<sim-hardware>): Delete.
6582         (hw-profilable?): New proc.
6583         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6584         (<hw-register>): Rename method get-index-mode to save-index?.
6585         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6586         (<hw-register>,gen-sym-decl): Make virtual.
6587         (<hw-memory>,gen-sym-decl): Make virtual.
6588         (<hw-memory>): Rename method get-index-mode to save-index?.
6589         (<hw-address>,gen-sym-decl): Make virtual.
6590         (<operand>): New method save-index?.
6591         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6592
6593         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6594         prefix added.  All uses updated.
6595
6596         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6597         rather than pointer to table entry.
6598
6599         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6600         Remove all hw-asm,op-asm support.
6601         (-gen-parse-number,-gen-parse-address): New procs.
6602         (<keyword>,gen-parse): Redo function name computation.
6603         (<keyword>,gen-print): Ditto.
6604         (<operand>,gen-function-name): Rewrite.
6605         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6606         (opcodes-init!): Delete call to add-parser!.
6607
6608         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6609         Define enum using hardware semantic name.
6610         (-gen-hw-decl,-gen-hw-defn): New procs.
6611         (gen-hw-table-decls): Use -gen-hw-decl.
6612         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6613         CGEN_HW_ENTRY structs.
6614         (gen-operand-table): Output hw's enum, not pointer to table entry.
6615         (-gen-cpu-open): Build table of selected hardware elements.
6616
6617         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6618         (<hardware> support): Delete.
6619         (<hw-asm>): Delete, moved to hardware.scm.
6620         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6621         (<hw-asm>,gen-table-entry): New method.
6622         (<hw-asm>,parse!): Delete.
6623         (<keyword>,gen-table-entry): New method.
6624         (<keyword>,parse!): Delete.
6625         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6626         for gen-decl,gen-defn,gen-ref,gen-init.
6627         (desc-init!): Don't create parser for operand asm specs.
6628
6629         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6630         * ifield.scm (<ifield>): New member `mode'.
6631         (<ifield>,make!): New arg `mode'.
6632         (ifld-mode): Rewrite.
6633         (ifld-hw-type): Rewrite.
6634         (<ifield>,min-value): Rewrite.
6635         (<ifield>,max-value): Rewrite.
6636         (-ifield-parse): New arg `mode'.
6637         (-ifield-read): Update.
6638         (define-full-ifield): New arg `mode'.
6639         (define-full-multi-ifield): Ditto.
6640         (-multi-ifield-parse): Ditto.
6641         (-multi-ifield-read): Update.
6642         (define-full-multi-ifield): New arg `mode'.
6643         (ifield-builtin!): Update definition of f-nil.
6644         * simplify.inc (define-normal-ifield): Update call to
6645         define-full-ifield.
6646         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6647         (define-normal-hardware): Delete arg asm.  New args indices, values,
6648         handlers.  Update call to define-full-hardware.
6649         (define-simple-hardware,dsh): New pmacros.
6650         (define-normal-operand): Update call to define-full-operand.
6651         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6652         Specify INT/UINT mode instead.
6653         (h-gr,h-cr): Use "indices" instead of "asm".
6654         (h-dr,h-ps): Update keyword syntax.
6655         (h-r13,h-r14,h-r15): Ditto.
6656         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6657         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6658         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6659         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6660         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6661         Specify INT/UINT mode instead.
6662         (h-gr): Use "indices" instead of "asm".
6663         (h-cc): Update keyword syntax.
6664         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6665         Specify INT/UINT mode instead.
6666         (h-hi16,h-slo16,h-ulo16): Update.
6667         (h-gr,h-cr): Use "indices" instead of "asm".
6668         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6669         (h-accums): Update keyword syntax.
6670         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6671         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6672         Specify INT/UINT mode instead.
6673         (h-gr-indices): New pmacro.
6674         (h-gr32,h-gr64): Split up from h-gr.
6675         (h-a): Update type spec.  Use values instead of asm spec.
6676         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6677         (h-y,h-annul-p): Ditto.
6678         (h-asr): Update keyword spec.
6679         (h-lo10,h-lo13,h-hi22): Update.
6680         (get-freg-spec,set-freg-spec): New pmacros.
6681         (h-fr32,h-fr64): Split up from h-fr.
6682         (rdd): Comment out get/set specs.
6683         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6684         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6685         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6686         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6687         UNSIGNED.  Specify INT/UINT mode instead.
6688         (h-*): Use dsh instead of dnh where appropriate.
6689         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6690         (h-p,h-membarmask): Ditto.
6691         (membarmask): Use "handlers" instead of "asm".
6692
6693         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6694         values,handlers,getters,setters plus accessors.
6695         (hw-mode-ok?,hw-default-mode): New procs.
6696         (<hardware-base>): Rename method new-mode to mode-ok?
6697         (<hardware-base>): New method get-index-mode.
6698         (hw-index-mode): New proc.
6699         (pc?): Delete, moved to operand.scm.
6700         (address?): New proc.
6701         (<hardware>): Delete.
6702         (<hw-asm>): Definition moved here from desc.scm.
6703         (keyword-parse): New proc.
6704         (hardware-parsers): Delete.
6705         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6706         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6707         (-hw-parse-get,-hw-parse-set): New procs.
6708         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6709         indices,values,handlers,get,set.  Rewrite.
6710         (-hw-read-extra): Delete.
6711         (-hw-read): Update.
6712         (define-hardware): Don't add object if not selected.
6713         (define-full-hardware): Ditto.
6714         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6715         (<hw-register>): Member `type' moved to baseclass.  Delete member
6716         hw-asm.
6717         (<hw-register>,parse!): Rewrite.
6718         (<hw-register>): Delete methods get-rank,get-mode.
6719         (<hw-register>): Method new-mode renamed to mode-ok?
6720         (<hw-register>): New method get-index-mode.
6721         (<hw-pc>,parse!): Rewrite.
6722         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6723         (<hw-memory>,parse!): Rewrite.
6724         (<hw-memory>): Delete methods get-rank,get-mode.
6725         (<hw-memory>): Method new-mode renamed to mode-ok?
6726         (<hw-memory>): New method get-index-mode.
6727         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6728         hw-asm.
6729         (<hw-immediate>,parse!): Rewrite.
6730         (<hw-immediate>): Delete methods get-rank,get-mode.
6731         (<hw-immediate>): Method new-mode renamed to mode-ok?
6732         (<hw-address>): Delete member hw-asm.
6733         (<hw-address>,parse!): Rewrite.
6734         (<hw-address>): Delete methods get-rank,get-mode.
6735         (<hw-address>): Method new-mode renamed to mode-ok?
6736         (hw-profilable?): Delete.
6737         (hardware-init!): Delete hardware-parsers reference.
6738         Update argument specs of command define-full-hardware.
6739         (hardware-builtin!): Update definitions of hardware builtins.
6740         * operand.scm (<operand>): New members hw-name,mode-name.
6741         Delete member op-asm.  New member handlers.
6742         (<operand>,make!): Update.
6743         (op:hw-name,op:mode-name,op:handlers): New procs.
6744         (op:type): Rewrite.
6745         (op:mode): Rewrite.
6746         (<operand>): New method get-index-mode.
6747         (<pc>,make!): Update.
6748         (op:new-mode): Rewrite.
6749         (operand-parsers): Delete.
6750         (-operand-parse): Rewrite.  Return #f if insn not selected.
6751         (-op-read-extra): Delete.
6752         (-operand-read): Update.
6753         (define-operand,define-full-operand): Update.
6754         (operand-init!): Delete operand-parsers reference.
6755         Update syntax of define-full-operand command.
6756
6757         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6758         (define-full-insn): Update.
6759         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6760         (define-full-minsn): Update.
6761
6762         * mode.scm (<mode>): New member class.
6763         (mode:class): New proc.
6764         (mode?): Rewrite.
6765         (-mode-parse): New arg class.
6766         (define-full-mode): Update.
6767         (mode-find): Rewrite.
6768         (mode-make-int,mode-make-uint): New procs.
6769         (mode-init!): Update syntax of define-full-mode command.
6770         (mode-builtin!): Update definitions of builtin modes.
6771
6772         * model.scm (<profile>): Delete.
6773
6774         * read.scm (keep-atlist?): New proc.
6775         (keep-multiple?): New proc.
6776         (<parser-list>): Delete.
6777         (add-parser!,parse-spec!): Delete.
6778
6779         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6780         (def-rtx-syntax-node): Ditto.
6781         (-rtx-traverse-debug?): New variable.
6782         (tstate-make): New proc.
6783         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6784         (tstate-new-cond?,tstate-new-set?): New procs.
6785         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6786         tstate.  All callers updated.
6787         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6788         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6789         (-build-operand!): Replace arg cond? with tstate.
6790         (-build-reg-operand!,-build-mem-operand!): Ditto.
6791         (-build-index-of-operand!): Update making of <operand> object.
6792         (s-ifield): New arg tstate.  All callers updated.
6793         (hw:): New arg tstate.  All callers updated.  Replace call to
6794         current-hw-lookup with current-hw-sem-lookup-1.
6795         (s-index-of): New arg tstate.  All callers updated.
6796         (reg:,mem:): Ditto.
6797         (-rtx-use-sem-fn?): New proc.
6798         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6799         semantic cover fns.
6800         (s-convop): Only use semantic mode when using semantic cover fns.
6801         (s-cmpop): Call -rtx-use-sem-fn?.
6802         (s-cond,s-case): New arg tstate.  All callers updated.
6803         (s-parallel,s-sequence): Ditto.
6804
6805         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6806
6807         * types.scm (<scalar>): Rewrite implementation.
6808         (<integer>): Delete.
6809         (parse-type): Rewrite.
6810
6811         * utils-cgen.scm (parse-handlers): New proc.
6812
6813         * utils.scm (!=): New proc.
6814
6815 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6816
6817         * pmacros.scm (-pmacro-expand): Fix typo.
6818
6819 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6820
6821         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6822         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6823         * i960.cpu (build-hex2): New pmacro.
6824         (insn-opcode): Simplify.
6825         (insn-opcode2): Ditto.
6826
6827         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6828         * cgen-stest.scm (catch-with-backtrace): Ditto.
6829
6830 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6831
6832         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6833         All callers updated.
6834         (-pmacro-invoke): New proc.
6835         (-pmacro-sym,-pmacro-str): New procs.
6836         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6837         (pmacros-init!): Install builtins .iota, .map, .apply.
6838         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6839         (h-fr): Simplify register name spec.
6840         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6841         * utils.scm (num-args-ok?): New proc.
6842
6843 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6844
6845         * pmacros.scm (-pmacro-error): New proc.
6846         (-pmacro-expand): Use it.
6847         (-pmacro-splice): New proc.
6848         (pmacros-init!): Install new builtin .splice.
6849
6850         * sparc.cpu: Include sparc64.cpu when appropriate.
6851         (f-mmask,f-simm11): Moved to sparc64.cpu.
6852         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6853         (ANNUL attribute): Delete.
6854         (test-* pmacros): New arg cc, all callers updated.
6855         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6856         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6857         atomic-opc.
6858         (ldstub,swap): Moved to sparccom.cpu.
6859         * sparc64.cpu: Add more insns.
6860
6861 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6862
6863         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6864         CGEN_ATTR_VALUE.
6865         (cgen-sem-switch.c): Ditto.
6866         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6867         moved to cgen-engine.h.
6868         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6869         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6870         global.  Cache attributes and insn length in IDESC.
6871         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6872         @cpu@_opcode renamed to @cpu@_get_idata.
6873         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6874         done later underneath sim_resume.
6875         (@mach@_mach): Record @cpu@_prepare_run.
6876         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6877         updated.
6878         (-hw-gen-set-quiet-pc): Ditto.
6879         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6880         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6881         (<hw-addr>,cxmake-get): Ditto.
6882         (<hw-iaddr>,cxmake-get): Ditto.
6883         (<pc>,cxmake-get): Ditto.
6884         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6885         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6886         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6887         (<hw-pc>,gen-write): Use hw-selector-default.
6888         (<hw-register>,gen-write): Ditto.
6889         (<hw-memory>,gen-write): Ditto.
6890         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6891         (-gen-hw-selector): New proc.
6892
6893         * desc.scm: New file.
6894         * desc-cpu.scm: New file.
6895         * opcodes.scm: Split up into several smaller files.
6896         * opc-asmdis.scm: New file.
6897         * opc-ibld.scm: New file.
6898         * opc-itab.scm: New file.
6899         * opc-opinst.scm: New file.
6900         * Makefile.am (desc): New target.
6901         (opcodes): Update args to cgen-opc.scm.
6902         * Makefile.in: Rebuild.
6903         * aclocal.m4: Rebuild.
6904         * config.in: Rebuild.
6905         * configure.in: Update arg to AC_INIT.
6906         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6907         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6908         AC_PROG_INSTALL.
6909         * configure: Rebuild.
6910         * cgen-gas.scm: Update files to load.
6911         * cgen-opc.scm: Ditto.  Reorganize option letters.
6912         * cgen-sim.scm: Update files to load.
6913         * cgen-stest.scm: Ditto.
6914         * dev.scm (cload): New app "DESC".
6915         (load-opc): Update files to load.
6916         (load-gtest,load-sim,load-stest): Ditto.
6917
6918         * attr.scm (bool-attr?): New proc.
6919         (attr-list-enum-list): New proc.
6920         (-attr-sort): Rewrite.
6921         (attr-builtin!): Give ALIAS attribute a fixed index.
6922         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6923         calculate attribute enum list.
6924         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6925
6926         * insn.scm (-insn-parse): Renamed from parse-insn.
6927
6928         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6929         (-hw-read): Ditto.
6930
6931         * mode.scm (-mode-parse): Renamed from parse-mode.
6932
6933         * operand.scm (<operand>): New member `selector'.
6934         (<operand>,make!): Use default selector.
6935         (hw-selector-default): New variable.
6936         (hw-selector-default?): New proc.
6937
6938         * pmacros.scm (pmacros-init!): New proc.
6939         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6940         (-env-set!): Delete.
6941         (-pmacro-expand): New proc apply-macro.
6942         Use it in scan-list,scan.  Scan list first, then see if macro
6943         invocation.
6944         (define-pmacro): Rewrite.
6945         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6946
6947         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6948         selected if (current-mach) seen.
6949         (rtx?): Renamed from rtx-uneval?, all callers updated.
6950         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6951         updated.
6952         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6953         selector, all callers updated.
6954         (hw:): New arg selector, all callers updated.  Delete old comments
6955         and code.
6956         (reg:,mem:): Handle selectors
6957         * rtx-funcs.scm (reg:): Handle selectors.
6958
6959         * read.scm: Renamed from cpu.scm.
6960         (<command>): New class.
6961         (<reader>): New member commands.
6962         (reader-add-command!): New proc.
6963         (reader-lookup-command): New proc.
6964         (reader-error,-reader-process-expanded,reader-process): New procs.
6965         (reader-read-file!): New proc.
6966         (include): Call reader-read-file!.
6967         (cmd-if): New proc.
6968         (cpu-load): Call reader-read-file!.
6969         * utils.scm (num-args): New proc.
6970         * simplify.inc: New file.
6971         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6972         procs.  Move define-normal-foo procs (and abbreviated forms) to
6973         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6974         routines.
6975         * fr30.cpu: Include simplify.inc.
6976         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6977         * i960.cpu: Include simplify.inc.
6978         * m32r.cpu: Include simplify.inc.
6979         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6980         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6981         * sparc.cpu: Include simplify.inc.
6982         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6983         * utils-cgen.scm (parse-error): Moved to read.scm.
6984         (sanitize): Rewrite.
6985         (utils-init!): New proc.
6986
6987 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6988
6989         * sparc.cpu: New file.
6990         * sparc32.cpu: New file.
6991         * sparc64.cpu: New file.
6992         * sparccom.cpu: New file.
6993         * sparc.opc: New file.
6994
6995 1999-01-27  Frank Eigler  <fche@cygnus.com>
6996
6997         * utils.scm (gen-copyright): New proc.
6998
6999 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7000
7001         Parameterize rtl parsing, rather than having lots of little handlers.
7002         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7003         Delete member traverse.
7004         (rtx:set-traverse!): Delete.
7005         (-rtx-valid-types,-rtx-valid-matches): New variables.
7006         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7007         instead of expression.  All callers updated.
7008         (def-rtx-node): New args arg-types,arg-modes.
7009         (def-rtx-syntax-node): Ditto.
7010         (def-rtx-dual-mode): Ditto.
7011         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7012         All callers updated.
7013         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7014         All callers updated.
7015         (rtx-macro-expand): New proc.
7016         (-rtx-traverse-check-args): Delete.
7017         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7018         an rtx specific traverser.
7019         (-rtx-any-mode?,-rtx-symornum?): New procs.
7020         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7021         (-rtx-traverse-no-mode): Delete.
7022         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7023         (-rtx-traverse-operands): Rewrite.
7024         (-rtx-traverse-expr): Rewrite.
7025         (rtx-traverse): Don't expand macros here, leave for caller to do.
7026         (rtx-simplify): Delete.
7027         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7028         attributes.
7029         (rtx-true?,rtx-false?): Ditto.
7030         (-rtx-ref-type): Set dest is operand 1 now.
7031         (-simplify-for-compilation): New proc.
7032         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7033         Expand macros before calling rtx-traverse.  Sort operands by name
7034         to avoid unnecessary semantic formats.
7035         (semantic-attrs): New proc.
7036         (rtx-uneval?): Handle (<rtx-func> ...).
7037         (s-boolifop): Delete arg mode.  All callers updated.
7038         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7039         (eq-attr): New arg obj.
7040         (eq-attr:): Delete.
7041         * m32r.cpu (rach): Update calls to andif.
7042
7043         * minsn.scm (-minsn-parse-expansion): Renamed from
7044         parse-minsn-expansion.
7045         (-minsn-parse): Renamed from parse-minsn.
7046         (-minsn-read): Renamed from read-minsn.
7047         (def-minsn): Don't check APPLICATION here.
7048         (def-full-minsn): New proc.
7049         (define-macro-insn): Check APPLICATION here.  Expand macros.
7050         (define-normal-macro-insn): Ditto.
7051
7052         * utils.scm (word-value): New arg start-lsb?.
7053         (word-mask,word-extract): Ditto.
7054         (split-bits,powers-of-2): Use integer-expt instead of expt.
7055         (bit-set?): Handle 32 bit values (which are bignums).
7056         (cg-logand,cg-logxor): New functions.
7057         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7058         (<ifield>,field-value): Update call to word-value.
7059         (<ifield>,min-value): Use integer-expt instead of expt.
7060         (<ifield>,max-value): Ditto.
7061
7062         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7063
7064         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7065
7066         Compute raw instruction format in addition to semantic based format.
7067         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7068         (<iformat> accessors): Rename accessors to ifmt-*.
7069         (<sformat>): New class.
7070         (fmt-enum): Renamed from fmt:enum.
7071         (-ifmt-search-key): Rewrite.
7072         (-sfmt-search-key): New proc.
7073         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7074         Compute iformat and sformat search keys.
7075         (ifmt-build): Update.
7076         (sfmt-build): New proc.
7077         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7078         (ifmt-compute!): Compute instruction format <iformat> based on
7079         instruction fields alone.  Compute new semantic format <sformat>
7080         based on instruction fields and semantic information.
7081         (ifmt:lookup): Delete.
7082         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7083         (current-sfmt-list): New proc.
7084         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7085         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7086         (insn-length,insn-length-bytes): Update.
7087         (insn:mask-length,insn:mask): Update.
7088         (insn-lookup-op): Update.
7089         * gas-test.scm (gas-test-analyze!): Update.
7090         (gen-gas-test): Ditto.
7091         * sim-test.scm (sim-test-analyze!): Update.
7092         (gen-sim-test): Ditto.
7093         * opcodes.scm (gen-operand-instance-table): Update.
7094         (gen-operand-instance-ref): Ditto.
7095         (max-operand-instances): Use heuristic if semantics not parsed.
7096         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7097         (opcodes-analyze!): Only scan semantics of building operand instance
7098         tables.
7099         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7100         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7101         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7102         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7103         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7104         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7105         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7106
7107         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7108         New arg lsb0?  All callers updated.
7109         (decode-bits): New arg lsb0?.  All callers updated.
7110         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7111         of expt.
7112         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7113         (build-slots): Call integer-expt instead of expt.
7114         (build-decode-table-entry): Handle crossing word boundaries better.
7115         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7116         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7117
7118         * enum.scm (define-enum): Rewrite.
7119         (define-normal-enum): Ditto.
7120         (def-full-insn-enum): New proc.
7121         (define-normal-insn-enum): Rewrite.
7122
7123         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7124         valid C.
7125         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7126
7127         * dev.scm: Add sid support.
7128
7129         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7130         (CLEANFILES): Add tmp-*.
7131         * Makefile.in: Rebuild.
7132
7133         * doc/Makefile.am: New file.
7134         * doc/Makefile.in: New file.
7135         * doc/cgen.texi: New file.
7136         * Makefile.am (SUBDIRS): Define.
7137         * Makefile.in: Rebuild.
7138         * configure.in: Create doc/Makefile.
7139         * configure: Rebuild.
7140
7141 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7142
7143         * insn.scm (insn:syn): Delete.
7144
7145 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7146
7147         * fr30.cpu (model fr30-1): Add state variables load-regs,
7148         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7149         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7150         (model m32rx): Ditto.
7151         (addi): Simplify function unit usage spec.
7152         (ld-plus): Rewrite operand names in function unit usage spec.
7153         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7154         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7155         overridden.  Allow operand to appear in input and output spec.
7156         (<insn>,gen-profile-code): string-append -> string-list.
7157
7158         * ifield.scm (define-ifield): Call pmacro-expand.
7159         (define-full-ifield,define-normal-ifield): Ditto.
7160         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7161
7162         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7163         with-scache and without-scache cases.
7164
7165 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7166
7167         * fr30.cpu (fr30-1): Add state variable h-gr.
7168         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7169         (all insns): First pass at providing cycle counts.
7170         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7171         when initializing unit output operands, ditto for input operands.
7172
7173         * insn.scm (insn-length,insn-length-bytes): New procs.
7174         * mach.scm (-adata-set-derived!): Use them.
7175         * sim-cpu.scm (-gen-sem-case): Ditto.
7176
7177         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7178         (-gen-write-case): Ditto.
7179         (gen-semantic-fn): Ditto.  Split into two:
7180         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7181         in non-scache case.
7182         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7183         scache/no-scache appropriately.  All callers updated.
7184         (-gen-sem-case): PCADDR->IADDR.
7185         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7186
7187         * sim-decode.scm (*): Replace string-append,string-map with
7188         string-list,string-list-map where the result is sufficiently large.
7189         (-gen-decode-insn-table): Go back to simple version for non-scache
7190         case: just record IDESC in decoder tables and leave field extraction
7191         to the caller.
7192         (-gen-decode-switch): Ditto.
7193         (-gen-decode-fn): Ditto.
7194         (-gen-extract-decls): Only emit format enum if with-scache?.
7195         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7196         non-scache case.
7197         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7198         (-gen-insn-timing): Ditto.
7199         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7200         with-scache case.
7201
7202         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7203         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7204
7205 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7206
7207         * cpu.scm (keep-mach-validate!): New proc.
7208         (include): New proc.
7209
7210         * mach.scm (current-arch-mach-name-list): New proc.
7211         (-parse-arch-machs): Always return canonical form.
7212         (def-arch): Validate user specified machs to be kept.
7213         (def-mach-attr!): Simplify.
7214
7215         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7216         (option-init!): Initialize it.
7217         (option-set!): Set it.
7218         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7219         output operand instance tables.
7220         (cgen-opc.in): Only output operand instance tables if asked to.
7221
7222         * sim.scm (option-init!,option-set!): Clarify returned value.
7223
7224         * sim.scm (gen-mach-bfd-name): Move from here.
7225         * utils-cgen.scm: To here.
7226
7227 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7228
7229         * fr30.cpu (ilm): Fix comment field.
7230         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7231         compute it.
7232
7233         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7234         (rtx-true?, rtx-false?): New procs.
7235         * rtx-funcs.scm (annul): Rename vpc to pc.
7236         (-rtx-traverse-if): Improve determination of whether then/else parts
7237         are conditionally executed.
7238
7239         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7240         outer level.
7241         (gen-argbuf-type): Simplify generated definition (big sem_fields
7242         union moved outside).
7243
7244 1999-01-11  Ben Elliston  <bje@cygnus.com>
7245
7246         * doc/porting.texi: New file.
7247
7248         * doc/intro.texi: New file.
7249         (Layout): Use @example to insert preformatted ASCII text (such as
7250         diagrams). @code is inappropriate here.
7251
7252 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7253
7254         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7255
7256         * m32r.opc (print_hash): Cast dis_info.
7257
7258         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7259         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7260         get/set macros.
7261
7262 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7263
7264         * i960.cpu (f-br-disp): Remove RELOC attribute.
7265         (f-ctrl-disp): Ditto.
7266         (callx-disp): set-quiet -> set for (reg h-gr 2).
7267         (callx-indirect,callx-indirect-offset): Ditto.
7268
7269         * Makefile.am (gas-test): Fix dependencies.
7270         * Makefile.in: Rebuild.
7271         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7272         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7273         (gas-test-analyze!): Use syntax-break-out.
7274         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7275         (sim-test-analyze!): Use syntax-break-out.
7276         (cgen-build.sh): Use gen-file-name.
7277         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7278         * insn.scm (syntax-break-out): New proc.
7279         * utils.scm (gen-file-name): New proc.
7280
7281         * fixup.scm (nil,<?,<=?,>?): Delete.
7282
7283         * utils.scm (count-true): Rewrite.
7284
7285         * slib/sort.scm: Move sort.scm to slib directory.
7286         * cpu.scm: Update.
7287
7288         * iformat.scm (ifmt-compute!): Record empty format.
7289
7290         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7291         internal procs outside.  Handle expression register numbers.
7292         Handle index-of.
7293
7294         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7295
7296         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7297         every register.
7298         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7299         (gen-semantic-fn,-gen-sem-case): Ditto.
7300         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7301         (cgen-semantics.c): Ditto.
7302         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7303         (gen-ifmt-argvars-defns): New proc.
7304         (gen-ifmt-argvars-assigns): New proc.
7305         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7306         (-gen-decode-fn): Handle non-with-scache case.
7307         (cgen-decode.c): Define WANT_CPU to @cpu@.
7308         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7309         (cgen-model.c): Define WANT_CPU to @cpu@.
7310         * sim.scm (gen-ifld-extract-argvar): New proc.
7311         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7312         with FUN-ACCESS specified.
7313         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7314         (<hw-register>,gen-extract): New arg local?.
7315         (<hw-address>,gen-extract): Ditto.
7316         (-hw-cxmake-get): Handle non-with-scache case.
7317         (-hw-gen-set-quiet): Ditto.
7318         (<hw-address>,cxmake-get): Handle non-with-scache case.
7319         (gen-op-extract-argvar): New proc.
7320         (<operand>,gen-record-profile): Rewrite.
7321         (<operand>,gen-profile-code): Rewrite.
7322         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7323         (gen-argbuf-fields-union): New proc.
7324         (gen-argbuf-type): Use it.  Handle non-scache case.
7325
7326         * *.scm: class:foo procs renamed to class-foo.
7327         * attr.scm (<attribute>): New member `for'.
7328         (-attr-parse): New first value in list for default if
7329         none specified.
7330         (non-bool-attr-list,attr:add!): Delete.
7331         (def-attr): Use current-attr-add!.
7332         (atlist-attr-value-no-default): New proc.
7333         (attr-lookup-default): Handle boolean attributes.
7334         (gen-attr-enum): New proc.
7335         (-attr-remove-meta-attrs-alist): New proc.
7336         (attr-nub): New proc.
7337         (current-attr-list-for): New proc.
7338         (current-{ifld,hw,op,insn}-attr-list): New procs.
7339         (attr-builtin!): New proc.
7340         * cpu.scm (keep-obj?): Rewrite.
7341         (-init-parse-cpu!): Call arch-init!.
7342         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7343         (-finish-parse-cpu!): Call arch-finish!.
7344         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7345         (def-enum,def-full-enum): Use current-enum-add!.
7346         (gen-obj-list-enums): New proc.
7347         * hardware.scm (hw:add!,hw:lookup): Delete.
7348         (def-hardware,def-hardware-ext): Use current-hw-add!.
7349         (hw:std-attrs,hw:attr-list): Delete.
7350         (hardware-builtin!): Define builtin hardware attributes.
7351         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7352         (def-ifield,def-full-ifield): Use current-ifld-add!.
7353         (ifld:std-attrs,ifld:attr-list): Delete.
7354         (ifield-builtin!): New proc.
7355         * insn.scm (insn:add!,insn:lookup): Delete.
7356         (def-full-insn): Use current-insn-add!.
7357         (insn:std-attrs): Delete.
7358         (insn-builtin!): New proc.
7359         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7360         minsn-list.
7361         (<arch-data>): New member machs.
7362         (current-attr-list,current-enum-list): New procs.
7363         (current-op-list,current-minsn-list): New procs.
7364         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7365         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7366         Ditto.
7367         (-parse-arch-machs): New proc.
7368         (-arch-parse): New arg machs, all callers updated.
7369         (-arch-read): Handle machs spec.
7370         (def-arch): Define MACH attribute here.
7371         (mach-init!,mach-finish!): Not here.
7372         (cpu:add!,cpu:lookup): Delete.
7373         (def-cpu): Use current-cpu-add!.
7374         (<mach>): New member bfd-name.
7375         (-mach-parse): New arg bfd-name, all callers updated.
7376         (-mach-read): Handle bfd-name spec.
7377         (mach:add!,mach:lookup): Delete.
7378         (def-mach): Use current-mach-add!.
7379         (def-mach-attr!): New proc.
7380         (arch-init!): New proc.
7381         (arch-finish!): New proc.  Reverse all object lists here.
7382         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7383         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7384         (define-normal-macro-insn): Ignore minsn if mach not kept.
7385         * mode.scm (mode-builtin!): New proc.
7386         * model.scm (model:add!,model:lookup): Delete.
7387         (def-model): Use current-model-add!.
7388         * opcodes.scm (insn:attr-list): Delete.
7389         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7390         (gen-attr-table-defn): Emit value for default.
7391         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7392         (op:attr-list): Delete.
7393         (gen-operand-decls,gen-insn-decls): New proc.
7394         (compute-insn-attr-list): Delete.
7395         (cgen-opc.h): Reorganize and simplify.
7396         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7397         (def-operand,def-full-operand): Use current-op-add!.
7398         (op:std-attrs): Delete.
7399         (operand-enum): Delete.
7400         (operand-builtin!): Define builtin operand attrs.
7401         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7402         (gen-attr-enum-decl): Use gen-obj-list-enums.
7403         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7404         Rewrite.
7405         * fr30.cpu (define-arch): Add machs spec.
7406         (f-i4): SIGNED attribute -> !UNSIGNED.
7407         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7408         (HASH-PREFIX): Define operand attribute.
7409         (NOT-IN-DELAY-SLOT): Define insn attribute.
7410         * i960.cpu (define-arch): Add machs spec.
7411         * m32r.cpu (define-arch): Add machs spec.
7412         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7413         (HASH-PREFIX): Define operand attribute.
7414         (FILL-SLOT): Define insn attribute.
7415
7416 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7417
7418         * fr30.cpu (stilm): Correct mask for and operation.
7419
7420 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7421
7422         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7423         Replace START/EXIT with start/pass.
7424         (gen-sim-test): Delete ".text".
7425
7426 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7427
7428         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7429
7430 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7431
7432         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7433         (h-sbit): Make it FUN-ACCESS.
7434         (h-gr): Reorder so that general regs are always printed by number.
7435
7436 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7437
7438         * i960.cpu (flushreg): Use nop.
7439
7440 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7441
7442         * m32r.cpu (default-alignment): Specify.
7443         * mach.scm (<arch-data>): New member default-alignment.
7444         (adata:default-alignment): New proc.
7445         (current-arch-default-alignment): New proc.
7446         (-arch-parse): New arg default-alignment.
7447         (parse-alignment): New proc.
7448         (-arch-read): Handle default-alignment spec.
7449
7450         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7451
7452         * insn.scm (f-%): Delete.
7453         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7454         be readded if proved useful.
7455         (gen-extract-fields): Ditto.  Use gen-ifetch.
7456         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7457         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7458
7459 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7460
7461         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7462
7463 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7464
7465         * fr30.cpu: Remove stub macros.
7466         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7467         (div2): Don't use addc/subc.
7468
7469 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7470
7471         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7472         if opcodes.
7473
7474 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7475
7476         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7477
7478 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7479
7480         * cpu.scm (keep-all?): New proc.
7481         (assert-keep-all): Use it.
7482         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7483         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7484         Check for spelling errors.
7485
7486 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7487
7488         * rtl.scm (s-convop): Call -rtx-sem-mode.
7489
7490 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7491
7492         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7493         (-parse-hw-profile): Ditto.
7494         (<hw-register>, parse!): Return `void' result.
7495         (<hw-pc>, parse!): Ditto.
7496         (<hw-memory>, parse!): Ditto.
7497         (<hw-immediate>, parse!): Ditto.
7498         (<hw-address>, parse!): Ditto.
7499
7500         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7501         (-ifld-parse-encode-decode): New proc.
7502         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7503         (-multi-ifield-parse): Set encode/decode to #f.
7504         (ifld:decode-mode): New proc.
7505         * utils.scm (nub): Rewrite.
7506         * operand.scm (op-nub): Rewrite.
7507         * sim.scm (<ifield>, gen-type): Rewrite.
7508         (-gen-ifld-argbuf-defn): New proc.
7509         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7510         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7511         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7512         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7513         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7514         New method gen-trace-extract.
7515         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7516         from gen-argbuf-elm, return "" if not caching register address.
7517         Rewrite gen-extract.  New method gen-trace-extract.
7518         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7519         gen-extract, gen-trace-extract, cxmake-get.
7520         (<hw-iaddress>): New method cxmake-get.
7521         (op-needed-iflds): New proc.
7522         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7523         (-gen-op-argbuf-defn): New proc.
7524         (gen-op-extract): Renamed from op:extract.
7525         (gen-op-trace-extract): Renamed from op:trace-extract.
7526         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7527         and rewritten.
7528         (gen-argbuf-elm): Rewrite.
7529         * sim-decode.scm (-gen-record-args): Update.
7530
7531         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7532
7533         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7534         argument position.  Flag symbolic macros in function position as
7535         an error.
7536         (define-pmacro): Handle quoting in definition of symbolic macros.
7537         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7538
7539 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7540
7541         * fr30.opc (parse_register_list): Account for reverse masks
7542         for load and store.
7543         (print_register_list): Ditto.
7544         (parse_low_register_list_ld): New function.
7545         (parse_hi_register_list_ld): New function.
7546         (parse_low_register_list_st): New function.
7547         (parse_hi_register_list_st): New function.
7548         (print_hi_register_list_ld): New function.
7549         (print_hi_register_list_st): New function.
7550         (print_low_register_list_ld): New function.
7551         (print_low_register_list_st): New function.
7552         * fr30.cpu (ldr15dr): Implement workaround.
7553         (ldm0,ldm1,stm0,stm1): Implemented.
7554
7555 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7556
7557         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7558         * configure: Regenerate.
7559         * Makefile.am (WITH_HOBBIT): Update.
7560         (cgen-hob.c): Remove Makefile dependency.
7561         (cgen.o): Depend on cgen-gh.h, config.h.
7562         * Makefile.in: Regenerate.
7563         * aclocal.m4: Regenerate.
7564
7565 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7566
7567         * i960.cpu, i960.opc: New files.
7568
7569 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7570
7571         * fr30.opc (parse_register_number): New function.
7572         (parse_register_list): New function.
7573         (parse_low_register_list): Use parse_register_list.
7574         (parse_hi_register_list): Use parse_register_list.
7575         * fr30.cpu (sth): Fix assembler syntax. Implement more
7576         insns.
7577
7578 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7579
7580         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7581         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7582         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7583         (-op-gen-set-trace-parallel): Ditto.
7584         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7585
7586         * fr30.cpu (call,calld): Fix setting of pc.
7587         (f-op5): Fix start bit number.
7588
7589 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7590
7591         * fr30.cpu (st): Fix operand ordering. Implement more
7592         insns.
7593
7594 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7595
7596         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7597         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7598         (fmt-semantic-operands): Move to sim.scm.
7599         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7600         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7601         (<hw-index>): New method get-name.
7602         (op-profilable?): Moved to sim.scm.
7603         (op-nub): New proc.
7604         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7605         (op-profilable?): Moved here from operand.scm.
7606         (gen-extract-type): Delete.
7607         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7608         (-gen-argfld-ref): New proc.
7609         (-gen-ifld-argfld-name): New proc.
7610         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7611         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7612         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7613         (<hardware-base>): Delete method gen-extract-type.  New method
7614         gen-argbuf-elm.
7615         (<hw-register): Ditto.  Update method gen-extract.
7616         (<operand>, method gen-argbuf-elm): Rewrite.
7617         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7618         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7619         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7620
7621         * sim-decode.scm (-gen-record-args): Tweak.
7622
7623         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7624
7625 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7626
7627         * doc/porting: Fix typo: gas->sim.
7628         * fr30.opc (print_m4): New function.
7629         * fr30.cpu: Implemented many insns.
7630
7631 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7632
7633         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7634
7635         * fr30.cpu (f-rel9): Delete RELOC attribute.
7636         (f-rel12): Add PCREL-ADDR attribute.
7637         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7638         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7639         * fr30.opc (print_label9): Delete.
7640
7641         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7642         code for CTI indicators.
7643         * insn.scm (insn-cti?): Simplify.
7644         * utils-cgen.scm (atlist:cti?): New proc.
7645
7646 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7647
7648         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7649         (f-i20-4,f-i20-16,f-i20): New fields.
7650         (i20): New operand.
7651         (ldi8): Implement.
7652         (ldi20): New insn.
7653         (ldi32m): Delete.
7654         (jmpd): Implement.
7655         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7656         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7657         * mach.scm (arch-data): Ditto.
7658         (current-arch-default-insn-word-bitsize): Renamed from
7659         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7660         (-arch-read): Update.
7661
7662         * hardware.scm (hw:attr-list): Move here ...
7663         * opcodes.scm: ... from here.
7664
7665         * ifield.scm (fld:bitrange): Delete.
7666         (fld:word-offset,fld:word-length): New procs.
7667         (ifield?): Use class-instance.
7668         (<ifield>, method field-start): Rewrite.
7669         (ifld:enum): New proc.
7670         (<ifield>, methods field-mask,field-value): Rewrite.
7671         (-ifield-parse): Rewrite.
7672         (<multi-ifield> support): Rewrite.
7673         (ifld-beyond-base?): Rewrite.
7674         (ifld:std-attrs): New variable.
7675         (ifld:attr-list): New proc.
7676         * iformat.scm (-compute-insn-mask): Rewrite.
7677         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7678         Simplify.
7679         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7680         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7681         onto type.
7682         (<operand>): Ditto.  Forward onto index instead.
7683         (gen-ifld-decls,gen-ifld-defns): New procs.
7684         (ifld:insert,ifld:extract): New procs.
7685         (<ifield>): New methods gen-insert, gen-extract.
7686         (<multi-ifield>): Ditto.
7687         (<hw-index>): Forward gen-insert,gen-extract onto value.
7688         (<hw-asm>): Delete insert/extract support.
7689         (<hw-register,hw-memory,hw-immediate>): Ditto.
7690         (gen-hash-defines): Use string-list.
7691         Define CGEN_MAX_IFMT_OPERANDS.
7692         (gen-switch): Use string-list,string-list-map.
7693         (gen-fget-switch,gen-fset-switch): Use string-list.
7694         (gen-parse-switch,gen-insert-switch): Ditto.
7695         (gen-extract-switch,gen-print-switch): Ditto.
7696         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7697         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7698         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7699         (gen-ivalue-entry): New proc.
7700         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7701         computation.  Use 0 for operand ref table if ALIAS insn.
7702         (gen-minsn-table-entry): Use string-list.
7703         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7704         (gen-opcode-open): Record address of ifield table.
7705         (cgen-opc.h): Call gen-ifld-decls.
7706         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7707         * types.scm (<bitrange>): New members word-offset,word-length.
7708         Delete member total-length.  Delete methods start,mask,value.
7709         (bitrange:word-offset,bitrange:word-length): New procs.
7710         * sim-cpu.scm (gen-define-fields): Simplify.
7711         (gen-extract-fields): Simplify.
7712         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7713         (<ifield>): New methods gen-ifld-extract-decl.
7714         Delete method gen-ifld-extract-beyond.
7715         (<multi-ifield>): New methods gen-ifld-extract-decl.
7716         (<multi-ifield>, method gen-ifld-extract): Implement.
7717         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7718         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7719
7720         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7721         (-rtx-traverse-syntax-no-mode): New proc.
7722         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7723         (s-ifield): New proc.
7724         (s-shop): Don't prepend `unsigned' for unsigned modes.
7725         * rtx-funcs.scm (ifield): New rtx function.
7726         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7727         (delay): New rtx function.
7728         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7729
7730         * cos.scm (-elm-make-method-getter): Fix typo.
7731
7732         * utils.scm (backslash): Handle lists of strings.
7733
7734 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7735
7736         * fr30.cpu (f-rel9): Correct for pc+2.
7737         (label9): Use print_label9.
7738         * fr30.opc (print_label9): New function.
7739
7740 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7741
7742         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7743         * fr30.opc (parse_low_register_list): Renamed.
7744         (parse_hi_register_list): Renamed.
7745         (print_hi_register_list): Renamed.
7746         (print_low_register_list): Renamed.
7747
7748 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7749
7750         * fr30.cpu (f-rel9): Now a pc relative offset.
7751
7752 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7753
7754         * opcodes.scm (op-asm): Move to here, from operands.scm.
7755         (<op-asm>, method parse!): Validate arguments.
7756         (<operand>, method gen-function-name): Fix thinko.
7757         * operand.scm (<operand>, method make!): Don't set op-asm here.
7758         * utils.scm (list-elements-ok?): New proc.
7759
7760         * opcodes.scm: Clean up pass.
7761
7762 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7763
7764         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7765         the fr30_int function.
7766         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7767         (h-dr): Add FUN-ACCESS attribute.
7768
7769 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7770
7771         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7772         for C symbol for models array.
7773
7774 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7775
7776         * fr30.opc (parse_reglist_low): New function.
7777         (parse_reglist_hi): New function.
7778         (print_reglist_low): New function.
7779         (print_reglist_hi): New function.
7780         * fr30.cpu: Finish remaining insn stubs.
7781
7782 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7783
7784         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7785
7786         * fr30.cpu (ldi32m): Don't use for disassembly.
7787
7788 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7789
7790         * fr30.cpu (int): Implement it.
7791
7792 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7793
7794         * rtx-funcs.scm (nop): Fix C code.
7795
7796         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7797
7798         * fr30.cpu (f-i32): New ifield.
7799         (i32): New operand.
7800         (ldi32): New insn.
7801         (ldi32m): New macro insn.
7802         (inte): Provide simple version for now.
7803
7804         * sim-arch.scm: New file.
7805         * sim.scm: Move architecture support generation to sim-arch.scm.
7806         * cgen-sim.scm: Load sim-arch.scm.
7807         * dev.scm: Ditto.
7808
7809         * hardware.scm (pc?) New proc.
7810         (class <hardware-base>): Rewrite method 'pc?.
7811         (class <hardware>): Forward 'pc? to the hardware type.
7812         (class <hw-pc>): New method 'pc?.
7813
7814         Add support for variable length ISAs.
7815         * ifield.scm (ifld-beyond-base?): New proc.
7816         * m32r.cpu: Remove integral-insn? spec.
7817         * mach.scm (arch:derived,arch:set-derived!): New procs.
7818         (arch:app-data,arch:set-app-data!): New procs.
7819         (class <arch>): New members derived, app-data.
7820         (class <cpu>): Delete member integral-insn?.
7821         (cpu:integral-insn?): Delete.
7822         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7823         (-cpu-read): Delete integral-insn? support.
7824         (state:decode-assist): Delete.
7825         (state:int-insn?): Delete.
7826         (<derived-arch-data>): New class.
7827         (-adata-set-derived!): New proc.
7828         (mach-finish!): Call it.
7829         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7830         (gen-operand-instance): Add COND_REF support.
7831         (gen-operand-instance-table): Ditto.
7832         (gen-hash-defines): Update.
7833         (gen-extract-switch): Update type of `insn_value' arg.
7834         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7835         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7836         updated.
7837         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7838         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7839         beyond the base insn (for large insns).
7840         (-gen-extract-beyond-var-list): New proc.
7841         (gen-extract-fields): Handle large insns.
7842         (-gen-write-case): Update sem_arg computation.
7843         Update initial vpc computation.
7844         (gen-semantic-fn): Ditto.  Update type of `insn'.
7845         (-gen-sem-case): Update sem_arg computation.
7846         Update initial vpc computation.
7847         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7848         (-gen-extract-word): New proc.
7849         (<ifield>): New method gen-ifld-extract-beyond.
7850         (gen-ifld-extract-beyond): New proc.
7851         * types.scm (bitrange-overlap?): New proc.
7852
7853         * utils.scm (bits->bytes): New proc.
7854         (bytes->bits): New proc.
7855
7856         Move extraction support into decoder.
7857         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7858         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7859         support to sim-decode.scm.
7860         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7861         be array of IDESC,FMT entries.  Make the array const.
7862         (-gen-gcc-label-table): Make array const.
7863         (-gen-decode-switch): Branch to extraction code after insn has been
7864         identified.
7865         (-gen-decode-insn-globals): Delete extract handler from
7866         @cpu@_insn_sem.
7867         (gen-decode-fn): Add extraction support.
7868         (-gen-sem-fn-decls): Delete extraction fn decls.
7869         (-gen-idesc-decls): Update @cpu@_decode decl.
7870         (-gen-idesc-init-fn): Delete extraction support.
7871         (-gen-extract-decls): New proc.
7872
7873         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7874         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7875
7876         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7877         All callers updated.
7878         (table-entry:make): Record insn value as insn object, not name.
7879         All uses updated.
7880
7881         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7882         collision with C function.
7883         (path_dirname): Similarily.
7884         * hobbit.c,hobbit.h: Rebuild.
7885
7886 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7887
7888         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7889
7890 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7891
7892         * fr30.cpu: Implement more instruction stubs.
7893
7894 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7895
7896         * fr30.cpu: Implement more instruction stubs.
7897
7898 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7899
7900         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7901
7902         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7903
7904         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7905         (op:std-attrs): Ditto.
7906         * opcodes.scm (gen-operand-instance): Ditto.
7907         (gen-switch): Ditto.
7908         * m32r.cpu (condbit,accum): Update.
7909         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7910
7911 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7912
7913         * enum.scm (-enum-read): Fix typo.
7914
7915         * iformat.scm (-ifmt-search-key): Simplify a little.
7916
7917 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7918
7919         * doc/porting: semantics.c -> sem.c.
7920         * Makefile.in: Regenerate.
7921         * fr30.cpu (add): Change ADD to add. Add more registers and set
7922         status bits on 'add' instruction.
7923
7924 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7925
7926         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7927         of 0.
7928
7929 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7930
7931         * minsn.scm (minsn:enum): Update, call current-arch-name.
7932
7933         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7934
7935         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7936         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7937         (ARCH,CGEN,CGENFLAGS): New variables.
7938         (gas-test,sim-test): New rules.
7939         * Makefile.in: Rebuild.
7940         * configure.in (arch): Define.
7941         * configure: Rebuild.
7942
7943         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7944         * All .scm files: Ditto.
7945
7946         * dev.scm: Fix gas-test call to cpu-load.
7947         * gas-test.scm: Clean up pass to remove bit-rot.
7948         * sim-test.scm: Ditto.
7949
7950         * enum.scm (read-enum): Fix typo in `vals' handling.
7951
7952         * hardware.scm (-parse-hw-type): Fix typo.
7953         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7954         (def-hardware,define-normal-hardware): Ditto.
7955
7956         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7957         (display-var): Use it.
7958         * hobbit.c: Rebuild.
7959         * hobbit.h: Rebuild.
7960
7961         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7962         avoid hobbit problem.
7963         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7964         `parallel-insns-' to avoid hobbit problem.
7965
7966 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7967
7968         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7969         (parse_slo16,parse_ulo16): Ditto.
7970         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7971
7972 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7973
7974         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7975         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7976         * Makefile.in: Rebuild.
7977         * insn.scm (define-normal-insn): Expand pmacros.
7978         * mode.scm (<mode>): New member `host?'.  All uses updated.
7979         (mode:host?): New proc.
7980         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7981         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7982         (define-rtx-dual-mode): Ditto.
7983         (s-index-of): New proc.
7984         (s-unop): Use plain C for host mode operations.
7985         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7986         * rtx-funcs.scm (index-of): New rtx function.
7987         * sim.scm (<hw-index>): New method cxmake-get.
7988
7989 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7990
7991         * sim-cpu.scm (-gen-engine-decls): Delete.
7992
7993 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7994
7995         * doc/rtl (Example): Correct Typo.
7996         * doc/porting: Add 'make dep' step to opcodes port instructions.
7997         * fr30.opc: New file.
7998         * fr30.cpu: New file.
7999
8000 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8001
8002         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8003         * Makefile.am (GUILEINCDIR): New variable.
8004         (INCLUDES): Use it.
8005         * configure: Regenerate.
8006         * Makefile.in: Ditto.
8007         * aclocal.m4: Ditto.
8008
8009 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8010
8011         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8012         (cgen-semantics.c): Ditto.
8013         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8014         * sim-model.scm (cgen-model.c): Ditto.
8015         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8016         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8017
8018         * opcodes.scm (read-cpu.opc): Handle empty file.
8019
8020         * cos.scm (-elm-make-method-setter): Fix typo.
8021
8022         * cpu.scm (-init-parse-cpu!): Call types-init!.
8023         (-finish-parse-cpu!): Call types-finish!.
8024         * ifield.scm (<ifield>): Delete members start,length.
8025         New member bitrange.
8026         (<ifield>, methods field-start,field-length): Update.
8027         (fld:start): New arg insn-len.  All callers updated.
8028         (<ifield>, methods field-mask,field-value): Update.
8029         (-ifield-parse): Update.
8030         (ifield-init!): Update.
8031         * iformat.scm (compute-insn-length): Simplify.
8032         (compute-insn-mask): Update.
8033         * insn.scm (insn:value): Update.
8034         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8035         (current-arch-default-insn-bitsize): New proc.
8036         (current-arch-insn-lsb0?): New proc.
8037         (-arch-parse,-arch-read): Update.
8038         (<cpu>): New member file-transform.
8039         (-cpu-parse,-cpu-read): Update.
8040         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8041         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8042         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8043         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8044         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8045         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8046         * operand.scm (op:start): Update call to field-start method.
8047         * sim-decode.scm (opcode-slots): New arg lsb0?.
8048         (fill-slot!,build-slots): Ditto.
8049         (build-decode-table-entry,build-decode-table-guts): Ditto.
8050         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8051         (gen-decode-fn): Ditto.
8052         (cgen-decode.c): Update call to gen-decode-fn.
8053         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8054         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8055         (cgen-cpuall.h): Call -gen-cpuall-includes.
8056         * types.scm (<bitrange>): New class.
8057         (types-init!,types-finish!): New procs.
8058         * utils-cgen.scm (parse-number): New proc.
8059         (parse-boolean): New proc.
8060         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8061         (word-mask): Rewrite.
8062         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8063         (m32rxf): New field `file-transform'.
8064         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8065
8066         * hobbit.h: Fix include file name.
8067
8068 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8069
8070         * slib: New directory of slib files used by cgen/hobbit.
8071         * hobbit.scm: New file.
8072         * hobbit.c: New file.
8073         * hobbit.h: New file.
8074         * hobscmif.h: New file.
8075         * hob-main.c: New file.
8076         * hobslib.scm: New file.
8077         * hob.sh: New file.
8078         * Makefile.am: Add support for compiling hobbit, and using compiled
8079         version of hobbit to compile cgen.
8080         * Makefile.in: Regenerate.
8081         * configure.in: Support --with-hobbit.
8082         * configure: Regenerate.
8083         * acconfig.h (WITH_HOBBIT): Add.
8084         * config.in: Regenerate.
8085
8086         * rtl.scm: New file, was cdl-c.scm.
8087         Definition of rtx funcs moved to rtx-funcs.scm.
8088         (semantic-in-out-operands): Rewrite to compute object form of
8089         semantic code.
8090         * rtx-funcs.scm: New file.
8091
8092         * cgen-gh.c: #include "config.h".
8093         (gh_cadddr,gh_cddddr): New fns.
8094         (cgh_vector_to_list): New fn.
8095         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8096         (cgh_init): Prefix qsort procs with "cgh-".
8097         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8098         * cgen.c: #include "config.h".
8099
8100         * attr.scm (bitset-attr?): New proc.
8101         (<bitset-attribute>, method parse-value): Value syntax changed from
8102         (val1 val2 ...) to val1,val2,....
8103         (<bitset-attribute>): New method gen-value.
8104         (<integer-attribute>): New method gen-value.
8105         (<enum-attribute>): New method gen-value.
8106         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8107         (<reader>): New class.
8108         (CURRENT-ARCH,CURRENT-READER): New globals.
8109         (keep-mach?): Move here from mach.scm.
8110         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8111         (<arch>): New class.
8112         (<arch-data>): New class.
8113         (<cpu>): Make subclass of <ident>.
8114         (*ENDIAN* variables): Delete.
8115         (process-state-vars): Delete.
8116         (mach-finish!): Add `base' value to MACH attribute.
8117         * hardware.scm (<hardware>): Make subclass of <ident>.
8118         (hw:std-attrs): New global.
8119         (hw-profilable?): New proc.
8120         * ifield.scm (<ifield>): Make subclass of <ident>.
8121         (sort-ifield-list): Move here from iformat.scm.
8122         * iformat.scm (<iformat>): Renamed from <insn-format>.
8123         Make subclass of <ident>.
8124         (-ifmt-search-key): Include cti? in categorization of formats.
8125         (ifmt-analyze): Compile semantics (turn to object form).
8126         * insn.scm (<insn>): Make subclass of <ident>.
8127         New member compiled-semantics.
8128         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8129         * mode.scm (<mode>): Make subclass of <ident>.
8130         (UBI): Delete.
8131         * model.scm (<unit>): Make subclass of <ident>.
8132         New members inputs,outputs.
8133         (<model>): Make subclass of <ident>.  New member state.
8134         (-unit-parse): Parse inputs,outputs.
8135         (<iunit>): New class.
8136         (-insn-timing-parse-model): New proc.
8137         (parse-insn-timing): Function unit spec rewritten.
8138         * operand.scm (<operand>): Make subclass of <ident>.
8139         New members sem-name,num,cond?  New method gen-pretty-name.
8140         (hw-index-scalar): New global.
8141         (op-nub-hw): Move here from rtl.scm.
8142         (op:lookup-sem-name,op-profilable?): New procs.
8143         * pmacros.scm: Rewrite to pass through hobbit.
8144         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8145         * utils.scm (logit): Make a macro.
8146         (bit-set?): Rewrite.
8147         (high-part): Rewrite.
8148
8149         * m32r.cpu (define-arch): Move to top of file.
8150         (cpu family m32rbf): Renamed from m32rb.
8151         (model m32r/d): Function unit spec rewritten.
8152         (all insns): Ditto.  Replace UBI with BI.
8153
8154         * opcodes.scm (gen-attr-table-decls): Declare
8155         @arch@_cgen_hw_attr_table.
8156         (gen-attr-table-defns): Generate hw attribute table.
8157
8158         * sim-cpu.scm (-gen-engine-decls): New proc.
8159         (-gen-model-decls): New proc.
8160         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8161         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8162         (-gen-record-profile-args): Simplify.
8163         (-gen-parallel-sem-case): Delete.
8164         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8165         New local `written'.  Delete profiling code.
8166         (-gen-sem-case): Ditto.
8167         (-uncond-written-mask,-any-cond-written?): New procs.
8168         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8169         parallelly or serially, and write-back handlers for all parallel insns.
8170         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8171         support to initialization of struct insn_sem.
8172         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8173         (-gen-insn-sem-type): Add parallel write-back support to struct
8174         insn_sem.
8175         (-gen-idesc-init-fn): Add support for virtual insns.
8176         Add parallel write-back support.
8177         * sim-model.scm (gen-model-profile-fn): Delete
8178         (-gen-model-fn-decls): New proc.
8179         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8180         (-gen-model-init-fn): New proc.
8181         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8182         members in @mach@_init_cpu.
8183         (cgen-model.c): Generate model handlers for each insn.
8184         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8185         (<hw-pc>): New method gen-write.
8186         (<hw-register>, method gen-write): New arg `mode'.
8187         (<hw-register>): Delete method gen-record-profile!.
8188         New method gen-profile-index-type.
8189         (<hw-memory>, method gen-write): New arg `mode'.
8190         (<hw-address>, method gen-extract): Delete.
8191         (<hw-address>, method gen-write): New arg `mode'.
8192         (<hw-index>, method get-write-index): Rewrite.
8193         (<pc>, method cxmake-get-direct): Delete.
8194         (<pc>): New method cxmake-get.  Comment out methods
8195         gen-set-quiet,gen-set-trace.
8196         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8197         gen-profile-index-type,gen-profile-code.
8198         Delete method gen-pretty-name.  Rewrite method gen-write.
8199         Delete method cxmake-get-direct.
8200         (-op-gen-set-trace): Update `written'.
8201         (-op-gen-set-trace-parallel): Ditto.
8202         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8203         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8204         insns and their write-back handlers.
8205         (insn-op-lookup): New proc.
8206         (<unit>): New method gen-profile-code.
8207         (<iunit>): New method gen-profile-code.
8208         (gen-argbuf-elm): Add profiling elements.
8209         (gen-argbuf-type): Define cti insns separately in their own struct.
8210         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8211         insns.  Move semantic entries here from struct scache.
8212         Delete everything from struct scache except argbuf.
8213         (<insn>, method gen-profile-locals): Rewrite.
8214         (<insn>, method gen-profile-code): Rewrite.
8215         (sim-finish!): Create virtual pbb insns.
8216
8217 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8218
8219         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8220         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8221         (h-psw,h-bpsw,h-bbpsw): Define.
8222         (rte,trap): Handle bbpc,bbpsw.
8223         * opcodes.scm (max-operand-instances): Fix typo.
8224         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8225         hardware elements to be fun-access.
8226         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8227
8228 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8229
8230         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8231
8232 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8233
8234         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8235
8236 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8237
8238         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8239         architecture name.
8240         (mach m32r): Update.
8241
8242         * mach.scm (mach:supports?): New proc.
8243         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8244         gen-reg-access-{decls,defns}.
8245         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8246         (gen-mach-bfd-name): New proc.
8247         (gen-arch-reg-access-{decls,defns}): New procs.
8248         (cgen-arch.[ch]): Output register access cover fns.
8249
8250         * hardware.scm (hardware-builtin!): Set print handlers for
8251         h-addr,h-iaddr.
8252         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8253         `od'.
8254         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8255         (my_print_insn): Ditto.  Delete args buf, buflen.
8256         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8257         (-hw-asm-specs): Add `handlers' spec.
8258         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8259         `normal-hw-asm'.
8260         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8261         print.
8262         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8263         (<hw-asm>, parse!): New method.
8264         (gen-insn-table-entry): Print semantics.
8265         (gen-opcode-open): Renamed from gen-opcode-table.
8266
8267         * utils.scm (string-write): No longer a macro.
8268         (-string-write): Handle procedure args.
8269         * opcodes.scm: Update all calls to string-write.
8270         * sim-cpu.scm: Ditto.
8271         * sim-decode.scm: Ditto.
8272         * sim-model.scm: Ditto.
8273         * sim.scm: Ditto.
8274
8275 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8276
8277         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8278         (-gen-insn-builders,-gen-insn-builder): New procs.
8279
8280 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8281
8282         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8283         (gen-opcode-table): Properly terminate comment.
8284
8285 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8286
8287         * Version 0.6.0.
8288         Clean up pass over everything, so starting fresh.