OSDN Git Service

2495a0ab8983d7d25b7b7f524996e9cdad90eb62
[pf3gnuchains/sourceware.git] / cgen / ChangeLog
1 2010-02-10  Doug Evans  <dje@sebabeach.org>
2
3         * gen-all: Print options.
4
5 2010-01-28  Doug Evans  <dje@sebabeach.org>
6
7         * pmacros.scm (pmacros-init!): New arg rtl-version, all callers
8         updated.  Use %-prefix if rtl-version >= 0.9.
9         * read.scm (/supported-rtl-versions): Add (0 9).
10         (/rtl-version-valid?): New function.
11         (/cmd-define-rtl-version): If new rtl version, reinvoke pmacros-init!.
12         (/reader-expr): New function.
13         (reader-process): New function.
14         (/reader-process-with-loc!): Renamed from /reader-process!.
15         Don't pre-expand `if' commands.
16         (/cmd-if): Simplify.  Pmacro-expand test, then, else clauses here.
17         Handle rtl-version-equal?, rtl-version-at-least?.
18         * testsuite/Makefile.am (clean-test-files): Remove *.test.cpu*.
19         * testsuite/Makefile.in: Regenerate.
20         * testsuite/pmacros-1.test: Test both . and % as prefixes.
21         * testsuite/testsuite.cpu (/begin, /print, /dump): New pmacros.
22         (newline, print-match, print-expr, print-thunk): Use them.
23         (internal-verify): Update definition.
24         * doc/rtl.texi (define-rtl-version): Document rtl version 0.9.
25         (Top level conditionals): New node.
26
27         * read.scm (rtl-version-at-least?): Fix typo.
28
29 2010-01-27  Doug Evans  <dje@sebabeach.org>
30
31         * read.scm: Follow commenting convention.
32         * mach.scm: Follow commenting convention.
33
34         * pmacros.scm: Follow commenting convention.  Replace change to
35         $pmacro to %pmacro.  $pmacro is confusing with $ in assembler syntax.
36         (/pmacro-orig-prefix, /pmacro-prefix): New globals.
37
38 2010-01-25  Doug Evans  <dje@sebabeach.org>
39
40         * co-for-gen-all: Simplify a bit.
41
42 2010-01-24  Doug Evans  <dje@sebabeach.org>
43
44         * desc-cpu.scm (cgen-desc.h): Don't print virtual enums.
45         * sid-cpu.scm (cgen-desc.h): Ditto.
46         * enum.scm (enum-builtin!): New function.
47         * read.scm (reader-install-builtin!): Call it.
48         * rtl-c.scm (s-convop): Delete, replaced with ...
49         (s-int-convop, s-float-convop): ... new fns.
50         (ext, zext, trunc): Update.
51         (fext, ftrunc, float, ufloat, fix, ufix): Update.
52         * rtx-funcs.scm (fext, ftrunc, float, ufloat, fix, ufix): New parameter
53         `how'.
54         * cpu/mep-fmax.cpu (fcvtsw): Update.
55         * cpu/sh.cpu (h-fsd, h-fmov): Update.
56         * doc/rtl.texi (float-convop): Update.
57
58         * gen-all: Be more consistent with intrinsic generation.
59
60         * utils-cgen.scm (<location>): Define using new define-class.
61         (<ident>, <source-ident>, <context>): Ditto.
62
63         * cos.scm (/object-string): New function.
64         (/object-error): Use it.
65         (/object-count-true): New function
66         (object-copy-top): Delete.  All callers changed to call object-copy.
67         (/parse-member-list, /build-getter-defs, /build-setter-defs): New fns.
68         (define-class, define-interface, define-method): New macros.
69         (define-getters, define-setters, vmake): Moved here ...
70         * utils-cgen.scm: ... from here.
71
72         * cos.scm: Follow commenting convention.  Why did a single ; have to
73         get indented like it does? :-(
74         * utils-cgen.scm: Ditto.
75
76 2010-01-23  Doug Evans  <dje@sebabeach.org>
77
78         * gen-all: Move build-configuration related parameters to an
79         external file.  Add usage info.  Add "force" option.
80         Be smarter about what diffs to generate.
81
82         * doc/rtl.texi (Expressions): Add more docs on conversion functions.
83
84 2010-01-21  Doug Evans  <dje@sebabeach.org>
85
86         * doc/rtl.texi (Expressions): Fix docs on `subword'.
87
88 2010-01-20  Doug Evans  <dje@sebabeach.org>
89
90         * rtx-funcs.scm (nan,qnan,snan): New rtl functions.
91         * rtl-c.scm (nan,qnan,snan): New rtl functions.
92         * doc/rtl.texi (Expressions): Add docs for them.
93
94         * rtl-traverse.scm (/rtx-canon-anycexprmode): New function.
95         (/rtx-make-canon-table): Add entry for ANYCEXPRMODE.
96         (/rtx-canon-operands): Print expr-mode if /rtx-canon-debug?
97         Do final error check on mode assigned to expression.
98         (/rtx-make-traverser-table): Add entry for ANYCEXPRMODE.
99         * rtl-xform.scm (/rtx-trim-args): Handle ANYCEXPRMODE.
100         * rtl.scm (/rtx-valid-mode-types): Add ANYCEXPRMODE.
101         * rtx-funcs.scm (c-code, c-call, c-raw-call): Use ANYCEXPRMODE.
102         (if, cond, case): Use ANYEXPRMODE.
103
104 2010-01-19  Doug Evans  <dje@sebabeach.org>
105
106         * testsuite/pmacros-1.test: Add more .splice tests.
107
108         * read.scm (/cmd-include): Fix absolute path handling.
109
110 2010-01-05  Doug Evans  <dje@sebabeach.org>
111
112         * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
113         All uses updated.
114         (mode:non-mode-c-type): Delete.
115         (mode:c-type): Update.
116         * rtl-c.scm (s-shop): Fix casting of DI mode values.
117
118 2010-01-04  Doug Evans  <dje@sebabeach.org>
119
120         * gen-all (all_cgen_cpus): Add sh.
121
122 2010-01-02  Doug Evans  <dje@sebabeach.org>
123
124         * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
125
126 2009-12-17  Doug Evans  <dje@sebabeach.org>
127
128         * mep.opc: Apply patches from opcodes to compile with -Wshadow.
129         mep-asm.c now regenerates correctly again.
130         
131         * gen-all: Add support for building gcc/newlib.
132         Specify --prefix and install all built tools.
133
134 2009-12-16  Doug Evans  <dje@sebabeach.org>
135
136         * sim.scm (/op-gen-written-update): Disable operand number is too
137         large warning, for now.
138
139 2009-12-11  Nick Clifton  <nickc@redhat.com>
140
141         * cpu/fr30.opc: Fix shadowed variable warnings.
142
143 2009-12-10  Doug Evans  <dje@sebabeach.org>
144
145         * gen-all: Rewrite.  Build more ports.  Split out building of sid.
146
147 2009-11-23  Doug Evans  <dje@sebabeach.org>
148
149         * hardware.scm (hw-pc?): New function.
150         * ifield.scm (ifld-signed?): New function.
151         * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
152         * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
153         (insn-cti?): New function.
154         * rtl.scm (/hw): Create <pc> object for pcs.
155         * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
156         All callers updated.  Watch for sets to the pc.
157         (semantic-attrs): Watch for sets to the pc.
158         * sid.scm (<pc> cxmake-get): Handle raw-reg.
159         * sim.scm (<pc> cxmake-get): Handle raw-reg.
160         (<operand> cxmake-get): Add debugging printf.
161         * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
162         EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
163         (/gen-extract-word): Ditto.
164
165         * utils.scm (gen-c-hex-constant): New function.
166         * utils-sim.scm (/gen-decode-insn-entry): Call it.
167
168 2009-11-22  Doug Evans  <dje@sebabeach.org>
169
170         * insn.scm (/parse-insn-format): Watch for duplicate ifields.
171         * read.scm (parse-error-continuable): New function.
172         (define /continuable-error-found?): New variable.
173         (/init-reader!): Initialize it.
174         (/finish-reader!): New function.
175         (cpu-load): Call it.
176         * utils-cgen.scm (obj-list-nub): New function.
177
178         * mach.scm (<derived-arch-data>): New member large-insn-word?.
179         (/adata-set-derived!): Set it.
180         (adata-large-insn-word?): New function.
181         * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
182         here.
183         * sim-cpu.scm (cgen-cpu.h): #include it here.
184         (/gen-cpu-defines): Define CGEN_INSN_WORD.
185         (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
186         CGEN_INSN_INT.
187         * sim-decode.scm (/gen-idesc-decls): Ditto.
188         (/gen-extract-case, /gen-decode-fn): Ditto.
189         * sim-model.scm (/gen-model-insn-fn): Ditto.
190         * sim.scm (gen-argbuf-type): Ditto.
191
192         * rtl-c.scm (/use-gcc-stmt-expr?): New function.
193         (s-sequence): Call it.
194
195 2009-11-21  Doug Evans  <dje@sebabeach.org>
196
197         * rtl-c.scm (s-sequence): Use gcc's statement expressions for
198         non-VOID-mode expressions with multiple statements.
199
200         * sim.scm (/operand-number-elaboration-written?): New variable.
201         (/op-gen-written-update op): New function.
202         (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
203
204         * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
205
206         * operand.scm (op-nub): Delete.
207
208         * dev-utils.scm: New file.
209         * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
210         load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
211         * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
212         /loaded-file-record!, maybe-load): Delete.
213         Load cgen files directly instead of via maybe-load.
214
215 2009-11-14  Doug Evans  <dje@sebabeach.org>
216
217         * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
218         expressions used in a void context.
219
220         * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
221
222         * cpu/xc16x.cpu: Delete, use copy in ../cpu.
223         * cpu/xc16x.opc: Ditto.
224
225 2009-11-12  Doug Evans  <dje@sebabeach.org>
226
227         * rtl-c.scm (s-parallel): Use map-in-order instead of map.
228
229         * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
230         eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
231
232 2009-11-11  Doug Evans  <dje@sebabeach.org>
233
234         * html.scm (gen-insn-docs): Add logging message.
235
236 2009-11-05  Doug Evans  <dje@sebabeach.org>
237
238         * utils-cgen.scm (gen-set-macro2): New function.
239         * sim.scm (<hw-register> gen-get-macro): Call it.
240
241         * co-for-gen-all: New file.
242
243         * testsuite/name-comments-1.test: Update call to current-insn-lookup.
244
245         * utils.scm (reduce): Delete.
246
247         * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
248
249         * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
250         regarding PREFIX attribute handling.
251
252         * operand.scm (<hw-index>): Add enum to possible types, all uses
253         updated.
254         (hw-index-constant?, hw-index-constant-value): New functions.
255         (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
256         hw-index-enum-obj): New functions.
257         (/operand-parse): Handle enum indices.
258         * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
259         hw-index-constant-value.
260         * rtl.scm (rtx-constant-value): Fix handling of enums.
261         * rtx-funcs.scm (enum): Ditto.
262         * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
263         currently supported here.
264
265 2009-11-02  Doug Evans  <dje@sebabeach.org>
266
267         Specify isa(s) when doing ifield, operand, insn lookups.
268         ACU = all callers updated.
269         * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
270         * enum.scm (define-full-insn-enum): Pass isa-name-list to
271         current-ifld-lookup.
272         * html.scm (get-insn-properties): Pass isa-name-list to
273         current-op-lookup.
274         * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
275         * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
276         (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
277         (/parse-insn-format, syntax-break-out): Ditto.
278         * mach.scm (obj-filter-by-isa): New function.
279         (current-ifld-lookup): New optional arg maybe-isa-name-list.
280         (/ifld-already-defined?, /op-already-defined?): Simplify.
281         (current-op-lookup): New optional arg maybe-isa-name-list.
282         (current-insn-lookup): New arg isa-name-list, ACU.
283         (/insn-already-defined?, /minsn-already-defined?): Simplify.
284         (current-minsn-lookup): New arg isa-name-list, ACU.
285         * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
286         current-op-lookup.
287         * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
288         (gen-syntax-entry): Ditto.
289         * operand.scm (/operand-parse): Pass isa-name-list to
290         current-ifld-lookup.
291         (/derived-parse-encoding): New arg isa-name-list, ACU.
292         (/derived-parse-ifield-assertion): Ditto.
293         (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
294         (/anyof-parse-choice): Ditto.
295         (anyof-satisfies-assertions?): Pass context to rtx-solve.
296         (/anyof-merge-syntax): New arg container, ACU.
297         (operand-builtin!): Add pc to all isas.
298         * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
299         (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
300         (rtl-c-parsed, rtl-c++-parsed): Ditto.
301         (rtl-c): New arg isa-name-list, ACU.
302         (rtl-c-expr, rtl-c++): Ditto.
303         (closure): New arg isa-name-list, ACU.
304         * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
305         (/cstate-isas): New function.
306         (/rtx-canon-symbol-list): New function.
307         (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
308         updated.
309         (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
310         (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
311         (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
312         (rtx-canonicalize): New arg isa-name-list, ACU.
313         (rtx-canonicalize-stmt): Delete.
314         (tstate-make): New arg isas, ACU.
315         (tstate-isas, tstate--set-isas!): New functions.
316         (tstate-env-stack): Renamed from tstate-env, ACU.
317         (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
318         (tstate-make-closure): Renamed from tstate-new-env, new arg
319         isa-name-list, ACU.
320         (/rtx-traverse-env): Delete.
321         (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
322         SUMBOLLIST.
323         (/rtx-traverse): Include conditional flag in dump output.
324         Update isa,envstack for closures.  Pass isa list to current-op-lookup.
325         (<eval-state>): New member isas.  Rename env to env-stack.
326         (<eval-state> vmake!): Handle #:isas.  #:env renamed to #:env-stack.
327         (<eval-state>): New getter/setter for isas.  Rename env getter/setter
328         to env-stack.
329         (estate-make-for-eval): Provide #:isas.
330         (estate-make-closure): Renamed from estate-new-env.  New arg
331         isa-name-list, ACU.
332         * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
333         (/rtx-trim-args): ENV renamed to ENVSTACK.  Ad ITERATION, SYMBOLLIST.
334         (/rtx-trim-for-doc): Handle closures.
335         * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK.  Add ITERATION,
336         SYMBOLLIST.
337         (rtx-env-var-list): Delete.
338         (rtx-env-make): Handle already-compiled environments.
339         (rtx-var-alist-to-env): New function.
340         (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
341         (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
342         (rtx-operand-obj): New arg isa-name-list, ACU.
343         (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
344         functions.
345         * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
346         * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
347         (/frag-compute-desired-frags): Minor simplification.
348         (/frag-pick-best): Ditto.
349         * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
350         (/gen-sfrag-code): Update.
351         * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
352         * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
353         * utils.scm (non-null-intersection?): New function.
354
355         * gen-all (do_src): Manually run cgen-all for sid.
356
357 2009-11-01  Doug Evans  <dje@sebabeach.org>
358
359         * gen-all: New file.
360
361         * rtl-traverse.scm (/rtx-canon): Issue better error message for
362         invalid rtx function names.
363
364 2009-10-28  Doug Evans  <dje@sebabeach.org>
365
366         * cos.scm (object-assign!): New function.
367         * mode.scm (/mode-set-word-params!): Call it.
368
369 2009-10-25  Doug Evans  <dje@sebabeach.org>
370
371         Record bitset attributes internally as a list.
372         Record rtx attribute values internally as ((rtx-expr)).
373         * attr.scm (bitset-attr?): Delete, unused.
374         (<bitset-attribute> parse-value): Rewrite.
375         (/attr-parse): Rewrite bitset default value processing.
376         (/attr-read): Pick out values of scalar attributes to distinguish
377         them from bitset values which are a list.
378         Fix spelling errors for processing of default values.
379         Handle string attributes.
380         (bitset-attr->list): Delete, all callers updated.
381         (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
382         All callers updated.
383         (atlist-source-form): Rewrite.
384         * hardware.scm (<hardware-base> 'get-isas): Update recognition
385         of all isas.
386         (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
387         -> (ISA foo bar).
388         * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
389         values are now lists.
390         * mach.scm (def-isa-attr!): Update, bitset attribute values,
391         including the default, are now lists.
392         (all-isas-attr-value): Result is now a list.
393         * doc/rtl.texi: Clean up pass over attribute docs.
394
395         Change internal representation of rtx attribute values.
396         * attr.scm (/attr-val-is-rtx?): New function.
397         (attr-value): Call it.
398         (atlist-attr-value-no-default, attr-lookup-default): Ditto.
399         (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
400         Disallow rtx values for bitset attributes.
401         (/attr-read): Record rtx in default value as ((rtx-expr)).
402         (/attr-eval): Update.
403
404 2009-10-24  Doug Evans  <dje@sebabeach.org>
405
406         * gen-all-doc: Add sh.cpu.
407         * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
408         (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
409
410         * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
411         (/gen-sfrag-case): Ditto.
412         * sim-cpu.scm (/gen-sem-case): Ditto.
413
414         * doc/rtl.texi: Add note that different ifields, operands, insns,
415         and minsns may occur with the same name in different isas.
416         Add note on the canonical form of rtl expressions.
417
418 2009-10-23  Doug Evans  <dje@sebabeach.org>
419
420         * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
421         * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
422
423         * decode.scm: Tweak various comments.
424         (/opcode-slots): Add FIXME.
425         (/build-decode-table-guts): Add assert.
426         * utils-sim.scm (/gen-set-itype-and-extract): New function.
427         (/gen-bracketed-set-itype-and-extract): New function.
428         (/gen-decode-default-entry): Rewrite.
429         (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
430         (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
431         updated.  Don't unnecessarily emit check for whether all opcode bits
432         have been examined.
433         (/gen-decode-expr-set-itype): Delete.
434         (/gen-decode-expr-entry): Update.
435         (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
436         updated.  Keep track of decoder tables used thus far.
437         (/gen-decoder-switch): Ditto.
438         * utils.scm (word-bit-value): New function.
439
440 2009-10-14  Doug Evans  <dje@sebabeach.org>
441
442         * ifield.scm (<ifield>, value): Provide default initial value.
443         (ifield-encode-mode): Delete
444         (ifield-decode-mode): Delete duplicate definition.
445         (<derived-ifield>, 'make!): Initialize members encode, decode.
446         * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
447         ifld-encode-mode.
448         (<multi-ifield>, 'gen-insert): Ditto.
449         
450 2009-10-05  Dave Korn  <dave.korn.cygwin@googlemail.com>
451
452         * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
453         for @foo@_init_idesc_table.
454
455 2009-09-30  Doug Evans  <dje@sebabeach.org>
456
457         * doc/intro.texi: Mention SID.
458         * doc/sim.texi: Ditto.
459         * doc/porting.text (Doing a simulator port): Add some text.
460
461 2009-09-27  Doug Evans  <dje@sebabeach.org>
462
463         * cos.scm (/class-table): New global.
464         (/class-uid, /class-set-uid!): New functions.
465         (/class-parent-name): Renamed from /class-parents.
466         (/class-make!): Change parents arg to parent-name, all callers updated.
467         Assign uid to class.
468         (/class-lookup-uid): New function.
469         (/class-parent-classes): Rewrite.
470         (/class-mi?): Delete.
471         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
472         Delete.
473         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
474         (/class-compute-class-desc, class-desc-dump): Update.
475         (/object-make!): Update.
476         (/object-make-with-values!): Delete arg class-desc, all callers
477         updated.
478         (/object-copy): Delete arg top?, all callers updated.
479         (/object-specialize): Delete.
480         (/object-elements, /object-top-class): Delete.
481         (/object-class-name, /object-class-desc): Update.
482         (/object-class-uid): New function.
483         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
484         class-make, /class-subclass? /class-lookup-element,
485         Update.
486         (/elm-delta, elm-list): Delete.
487         (/elm-make-method-getter, elm-get, elm-xget): Update.
488         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
489         (elm-make-getter, elm-make-setter): Update.
490         (/method-lookup-next): Update.
491         (send): Don't specialize class passed to method.
492         (send-next): New arg class-name, all callers updated.
493         (/class-parent, /class-parent-via-path, object-parent): Delete.
494         (class-cons-parent!, class-append-parent!): Delete.
495         (object-reset!): Init /class-table.
496
497         * cos.scm (/object-debug-classes): Delete.
498         (/object-debug-elements, /object-debug-methods): Delete.
499
500         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
501         (method-proc): Delete.
502         (method-make-virtual!, method-make-virtual-forward!): Delete.
503         * ifield.scm (<ifield> field-start): Update.
504         (<ifield> field-length, pretty-print): Update.
505         (<multi-ifield> field-length, field-start, pretty-print): Update.
506         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
507         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
508         (<array> gen-sym-defn): Ditto.
509         (<hardware-base> gen-defn): Renamed from gen-defn.
510         (<hw-register> gen-type): Update.
511         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
512         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
513         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
514         (<hw-immediate> gen-type): Update.
515         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
516         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
517         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
518         (<array> gen-sym-defn): Ditto.
519         (<hardware-base> gen-defn): Renamed from gen-defn.
520         (<hw-register> gen-type): Update.
521         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
522         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
523         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
524         (<hw-immediate> gen-type): Update.
525         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
526
527 2009-09-25  Doug Evans  <dje@sebabeach.org>
528
529         * operand.scm (/anyof-merge-setter): Handle set-quiet.
530         * rtl.scm (rtx-single-set?): Handle set-quiet.
531
532         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
533         rtl-cover-fns?, macro?.  All callers updated.
534         (estate-make-for-normal-rtl-c): Delete, have all callers call
535         estate-make-for-rtl-c directly.
536         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
537         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
538
539         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
540         replaces /par-replace-set-dests.
541         (/par-replace-set-src-expr-fn): New function, replaces
542         /par-replace-set-srcs.
543         (s-parallel): Rewrite.
544
545         * rtl.scm (rtx-pretty-strdump): New function.
546         * rtl-traverse.scm (/rtx-canon-error): Use it.
547         (<eval-state>): New member outer-expr.
548         (estate-error): Include outer expression in error message if present.
549
550 2009-09-23  Doug Evans  <dje@sebabeach.org>
551
552         * xc16x.cpu (h-cr): New hardware.
553         (muls): Comment out parts that won't compile, add fixme.
554         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
555         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
556         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
557
558         Rewrite rtl processing to require it to be "canonicalized" first,
559         and write a full canonicalizer / expression checker.
560         Remove all appearances of DFLT in canonical rtl.
561         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
562         then rtx-simplify.
563         * iformat.scm (ifmt-analyze) Use canonical semantics.
564         * insn (<insn>): New member canonical-semantics.
565         * mach.scm (<arch>): New member multi-insns-instantiated?.
566         (/instantiate-multi-insns!): New function.
567         (/canonicalize-insns!): New function.
568         (arch-analyze-insns!): Canonicalize insn semantics before processing
569         them.
570         * mode.scm (/mode-set-word-params!): New function.
571         (mode-void?): New function.
572         (mode-compatible?): VOID is compatible with VOID.
573         (/mode-word-sizes-defined?): New global.
574         (mode-set-word-modes!): Use/set it.
575         (mode-ensure-word-sizes-defined): Update.
576         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
577         Redo WI/UWI/AI/IAI handling.
578         (op:new-mode): No longer accept DFLT.
579         (<derived-operand> constructor): Ensure all fields are initialized.
580         (<anyof-operand> constructor): Ditto.
581         (/derived-parse-ifield-assertion): Delete arg `args'.
582         All callers updated.
583         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
584         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
585         (rtl-c-expr, rtl-c++): Ditto.
586         (/rtl-c-get): Use mode of operand, not containing expression.
587         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
588         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
589         estate-for-insn? instead.
590         (s-unop): Use mode of expression, not first operand.
591         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
592         (s-sequence): Remove DFLT support.
593         (ifield): Use mode of expression, not UINT.
594         (pc): Comment out, unused.
595         (int-attr): New rtx kind.
596         (attr): Deprecate.
597         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
598         * rtl-traverse.scm (/rtx-canon-debug?): New global.
599         (/make-cstate): New function.
600         (/cstate-context, /cstate-outer-expr): New functions.
601         (/rtx-canon-error): New function.
602         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
603         /rtx-get-last-cond-case-rtx): New functions.
604         (/rtx-canon-*): New functions.
605         (/rtx-canner-table, /rtx-operand-canoners): New globals.
606         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
607         (/rtx-option, /rtx-option-list?): Rewrite.
608         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
609         Rewritten, all callers updated.
610         (/rtx-canon-expr, /rtx-canon): New functions.
611         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
612         (rtx-canonicalize-stmt): New function.
613         (tstate-make): Remove arg `set?'.  All callers updated.
614         (tstate-new-set?): Delete.
615         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
616         moved to /rtx-canon-*.
617         (/rtx-traverse-normal-operand): New function.
618         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
619         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
620         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
621         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
622         Ditto.
623         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
624         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
625         (/rtx-make-traverser-table): Update.
626         (/rtx-traverse-operands): Remove mode processing, now done during
627         canonicalization.
628         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
629         (/rtx-traverse): Ditto.
630         (rtx-init-traverser-tables!): New function.
631         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
632         (rtx-verify-no-dflt-modes): New function.
633         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
634         (rtx-simplify-insn): Use insn-canonical-semantics.
635         (rtx-canonicalize): Moved to rtl-traverse.scm.
636         (/compile-expr-fn, rtx-compile): Delete.
637         (/rtx-trim-rtx-list): New function.
638         (/rtx-trim-for-doc): Handle set, if.
639         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
640         (/rtx-valid-mode-types): Update.
641         (/rtx-valid-matches): Update.
642         (/rtx-find-matchexpr-index): New function.
643         (rtx-lookup): Require rtx-kind to be the rtx name.
644         (def-rtx-node): New arg result-mode, all callers updated.
645         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
646         (rtx-lazy-sem-mode): Delete.
647         (/rtx-closure-make): New arg `mode', all callers updated.
648         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
649         (rtx-operand-obj): Rewrite.
650         (rtx-make-xop): New functions.
651         (/hw): Renamed from `hw', all callers updated.
652         Use the correct mode instead of DFLT for the index.
653         (rtl-builtin!): Call rtx-init-traversal-tables!.
654         (rtl-finish!): Update.
655         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
656         Update mode arg-type.
657         (pc): Comment out.
658         (int-attr): New rtx kind.
659         (attr): Deprecate.
660         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
661         (/frag-cost-compute!): Ditto.
662         * semantics.scm (/build-operand!): Delete args op-name, op.
663         New arg op-expr.  All callers updated.
664         (/build-mem-operand!): Remove DFLT support.
665         (semantic-compile): Update process-expr!, mode arg deleted.
666         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
667         rtl-c++ calls.
668         (/gen-sem-case, /gen-sfrag-code): Ditto.
669         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
670         (/op-gen-set-trace): New function.  If not doing profiling, or using
671         the pbb engine, call /op-gen-set-quiet.
672         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
673         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
674         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
675         * utils.scm (find-first-index): New function.
676         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
677
678         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
679         to COMPARE.
680         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
681
682 2009-09-21  Doug Evans  <dje@sebabeach.org>
683
684         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
685         All callers updated.  Add FIXME.
686         (all rtx functions): Rename local estate to *estate*.  It's an
687         artificial argument added to the rtx, so make it stand out.
688
689         * openrisc.cpu (or32 isa): Fix setup-semantics.
690
691         * rtl.scm (rtx-class-*?): Delete, unused.
692         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
693
694         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
695         (init-reader!): Set /CGEN-RTL-VERSION to default.
696
697         * read.scm (cpu-load): Print load parameters.
698
699         * dev.scm (load-doc): Set verbose-level to 2.
700
701 2009-09-20  Doug Evans  <dje@sebabeach.org>
702
703         * rtl.scm (rtx-strdump): Use write instead of display.
704
705 2009-09-17  Doug Evans  <dje@sebabeach.org>
706
707         * utils-cgen.scm (obj-csv-names): New function.
708         * utils-sim.scm (/sfmt-contents): Use it in logging message.
709
710 2009-09-12  Doug Evans  <dje@sebabeach.org>
711
712         Clean up pass of mode handling.
713         Make use of mode name vs <mode> object more consistent and clear.
714         * hardware.scm (/keyword-read): Default mode to the mode name,
715         not the <mode> object.
716         (/hw-parse-indices): Parse mode name and pass mode object to
717         <hw-asm> constructor.
718         (/hw-parse-values): Ditto.
719         (<hw-register> parse!): Pass mode name to /hw-parse-indices
720         and /hw-parse-values.
721         (<hw-memory> parse!): Ditto.
722         (<hw-address> parse!): Ditto.
723         * mode.scm (/mode-table): New global, replaces mode-list.
724         Modes stored in hashtable instead of list.
725         (/mode-class-table): New global.
726         (mode-list-non-alias-values): Update.
727         (mode:eq?, mode-compatible?, mode:add!): Update.
728         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
729         (mode-maybe-lookup): New function.
730         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
731         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
732         (mode-find, mode-set-word-modes!): Update
733         (mode-ensure-word-sizes-defined): Update.
734         (/sort-mode-classes!): New function.
735         (mode-builtin!): Update.  Sort mode classes here.
736         (mode-finish!): Sort mode classes here too.
737         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
738         All callers updated.
739         (rtl-c-set-quiet): Allow mode to be name of object.
740         (rtl-c-set-trace): Ditto.
741         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
742         <mode> object.  All callers updated.
743         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
744         (rtx-lazy-sem-mode): Ditto.
745         (<rtx-temp> make!): Assert mode arg is a <mode> object.
746         (rtx-env-make): Allow var-list modes to be name or object.
747         * sem-frags.scm (/frag-expr-assq-locals): New function.
748         (/frag-compute-locals!): Call it.
749         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
750         All callers updated.
751         * semantics.scm (/build-mem-operand!): Handle mode aliases.
752
753         * sim-test.scm (*): Symbols no longer can be passed to string-append.
754
755 2009-09-10  Doug Evans  <dje@sebabeach.org>
756
757         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
758         Improve error message for missing or too many bits.
759         (/insn-parse): Don't verify iformat for virtual insns.
760         
761         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
762         non-multi-insns.
763         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
764         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
765         * sid.scm (pbb-engine-insns): Ditto.
766         * sim-decode.scm (cgen-decode.c): Ditto.
767
768 2009-09-09  Doug Evans  <dje@sebabeach.org>
769
770         * rtl-traverse.scm: Comment tweaks.
771         * rtl-xform.scm: Comment and reformatting tweaks.
772         * doc/rtl.texi: Add text to docs on ifield-assertions.
773
774         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
775         saving.
776
777         Add support for controlling warnings/errors.
778         Add tests for iformat description errors.
779         * dev.scm (cload): New option #:diag.
780         * read.scm (<reader>): New member verify-iformat?.
781         (/parse-diagnostic, parse-warning): New functions.
782         (parse-error): Guts moved to /parse-diagnostic.
783         (/set-diagnostic-options!): New function.
784         (cpu-load): New arg diagnostic-options, all callers updated.
785         Recognize -w diagnostic-option-list.
786         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
787         (ifld-simple-ifields, ifields-simple-ifields): New function.
788         * insn.scm (/parse-insn-format-iflds): New function.
789         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
790         New arg isa, all callers updated.  Do some basic validation of the
791         ifield list if requested.
792         * mach.scm (/sanity-check-insns): Improve error message text.
793         * doc/running.texi: Document -w option.
794         * doc/porting.texi: Document #:trace, #:diag options to cload.
795
796         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
797
798         * dev.scm (*): Change default verbosity level to 2.
799
800         * ifield.scm (<ifield> pretty-print): New method.
801         (ifld-pretty-print): New function.
802         (<multi-ifield> pretty-print): New method.
803
804         * ifield.scm (<ifield> field-start): Delete word-len arg.
805         All callers updated.
806         (ifld-start): Ditto.
807         (<multi-ifield> field-start): Ditto.
808         * operand.scm (<hw-index> field-start): Ditto.
809
810         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
811         total-bitsize.  All callers updated.
812         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
813         New member /insn-base-value.
814         (insn-base-value): New function.
815         * mach.scm (/sanity-check-insns): New function.
816         (arch-analyze-insns!): Call it.
817
818 2009-09-08  Doug Evans  <dje@sebabeach.org>
819
820         * iformat.scm (ifields-base-ifields): Simplify.
821         (compute-insn-length): Simplify, call ifields-base-ifields.
822         (compute-insn-base-mask): Ditto.
823         * ifield.scm (ifld-known-values): Ditto.
824         (ifld-base-ifields): Ditto.
825         * insn.scm (insn-value): Ditto.
826         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
827
828 2009-09-08  DJ Delorie  <dj@redhat.com>
829
830         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
831         preprocessor macro, not an enum.
832
833 2009-09-08  Doug Evans  <dje@sebabeach.org>
834
835         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
836         to string-append.
837         (*): Remove trailing ":" from error messages passed to estate-error.
838
839 2009-09-07  Doug Evans  <dje@sebabeach.org>
840
841         * types.scm (<struct>): Delete.
842
843         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
844         updated.
845         (/pmacro-loc-error): New function.
846
847         * mach.scm (/isa-parse-decode-assist): New function.
848         (/isa-parse): Call it.
849
850         * decode.scm (/get-subopcode-value): New function.
851         (/opcode-slots): Call it.
852         (/fill-slot!): Add logging message.
853
854         * cos.scm (/object-error): Convert symbols to strings before passing
855         to string-append.
856
857         * read.scm (rtl-version-equal?): New function.
858         (rtl-version-at-least?, rtl-version-older?): New functions.
859
860         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
861         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
862         rtl versions >= 0.9.
863         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
864
865 2009-09-03  Doug Evans  <dje@sebabeach.org>
866
867         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
868         is simple.
869
870 2009-09-01  DJ Delorie  <dj@redhat.com>
871
872         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
873         (parse_unsigned16_range): Likewise.
874         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
875         isa.
876
877 2009-09-01  Doug Evans  <dje@sebabeach.org>
878
879         Pmacro .equals -> .equal?
880         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
881         -pmacro-builtin-equals.  All callers updated.
882         (pmacros-init!): Rename .equals to .equal?.
883         * doc/pmacros.texi: Update.
884         * testsuite/pmacros-1.test: Update.
885
886         * doc/porting.texi: Work around texi2html bug where it doesn't
887         properly escape <> inside double-quotes inside @code.
888
889         * doc/porting.texi (Doing an opcodes port): Add step to specify
890         the .opc file.
891
892 2009-08-29  Doug Evans  <dje@sebabeach.org>
893
894         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
895         rtl version 0.7.
896         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
897
898 2009-08-27  Doug Evans  <dje@sebabeach.org>
899
900         Add do-count rtl function.
901         * rtl-c.scm (s-do-count): New function.
902         (do-count): New rtl handler.
903         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
904         (-rtx-make-traverser-table): Add ITERATION.
905         * rtl.scm (rtx-make-iteration-limit-var): New function.
906         (rtx-env-make-iteration-locals): New function.
907         * rtx-funcs.scm (do-count): New rtl function.
908         * cpu/play.cpu: Add do-count-test insn.
909         * doc/rtl.texi: Add docs on do-count.
910
911 2009-08-26  Doug Evans  <dje@sebabeach.org>
912
913         * read.scm (parse-error): Change error message output format
914         to match context-owner-error.
915         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
916         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
917         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
918         (operand): Call estate-error instead of context-error.
919         (local, delay): Ditto.
920         (ref, attr): Call estate-error instead of error.
921         * rtl-traverse.scm (tstate-error): New function.
922         (-rtx-traverse-error): Call tstate-error instead of context-error.
923         (-rtx-traverse-operands, -rtx-traverse): Ditto.
924         (estate-error): New function.
925         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
926         instead of error.
927         (e-if): Call estate-error instead of error.
928         * rtx-funcs.scm (error): Call estate-error instead of context-error.
929         (member): Ditto.
930         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
931         Rewrite to call context-owner-error.
932         (context-owner-error): New function.
933
934         * ifield.scm (<ifield> constructor): New arg `location',
935         all callers updated.
936         * insn.scm (<insn> constructor): Ditto.
937         (<multi-insn> constructor): Ditto.
938         * minsn.scm (<macro-insn> constructor): Ditto.
939         * operand.scm (<operand> constructor): Ditto.
940         * utils-cgen.scm (builtin-location): New function.
941         (<source-ident>): Fix default value of member `location'.
942         (source-ident?): New function.
943
944         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
945         (estate-push-env, estate-with-modifiers): Ditto.
946         (estate-deepen): New function.
947
948 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
949
950         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
951         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
952         routines.
953
954 2009-08-25  Doug Evans  <dje@sebabeach.org>
955
956         * doc/pmacros.texi (pmacro default argument values): Add text.
957
958 2009-08-23  Doug Evans  <dje@sebabeach.org>
959
960         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
961         Rename member prefix -> name-prefix.
962         (<keyword> getters): Update.
963         (-keyword-parse): Update.  Default enum-prefix to NAME-.
964         (-keyword-read): Update.  Don't compute default value for
965         enum-prefix here.
966         (define-keyword): Update.
967         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
968         * read.scm (cgen-rtl-version): New function.
969         (-supported-rtl-versions): Add (0 8).
970         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
971         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
972         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
973         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
974         Update, print-name -> enum-prefix, make uppercase.
975         Remove unnecessary name-prefix spec.
976         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
977         * cpu/ip2k.cpu (register-names): Ditto.
978         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
979         * cpu/sparc.cpu (gr-names): Ditto.
980         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
981         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
982         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
983         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
984         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
985         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
986         prefix -> name-prefix.
987         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
988         Update, print-name -> enum-prefix, make uppercase.
989         (drc-names, xf-names): Ditto.
990         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
991         * doc/rtl.texi (Keywords): New section.
992         (hardware indices): Update text.
993         (rtl versions): Add 0.8.
994
995         Add define-rtl-version.
996         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
997         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
998         (cgen-lang-fixlevel): Delete.
999         (-supported-rtl-versions): New variable.
1000         (-cmd-define-rtl-version): New function.
1001         (init-reader!): New command define-rtl-version.
1002         (-cgen): Add rtl version to --version output.
1003         * doc/rtl.texi: Document rtl version support.
1004         * cpu/play.cpu: Add define-rtl-version.
1005
1006 2009-08-22  Doug Evans  <dje@sebabeach.org>
1007
1008         * Makefile.am (OPTIONS): Define.
1009         (desc): Just generate <arch>-desc.[ch] files.
1010         * Makefile.in: Regenerate.
1011         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
1012         no .opc file.
1013         (cgen-desc.c): Similarly.
1014         * gen-all-desc: New file.
1015         * opcodes.scm (opc-file-provided?): New function.
1016
1017         * mach.scm (current-*-add!): Update calls to parse-error.
1018         * operand.scm (op:new-mode): Update call to parse-error.
1019         * utils-cgen.scm (make-obj-context): New function.
1020
1021         * NEWS: Copy over entries from 1.1 branch.
1022
1023 2009-08-20  Doug Evans  <dje@sebabeach.org>
1024
1025         * gas-test.scm (<keyword> test-data): Catch invalid requests,
1026         flag a warning and compensate.
1027         (<hw-address test-data): Tweak for readability.
1028         (<hw-iaddress test-data): Ditto.
1029         (cgen-build.sh): Convert symbols to strings before passing to
1030         string-append.
1031         (cgen-allinsn.exp): Ditto.
1032
1033         * doc/pmacros.texi (.splice): Add more text.
1034
1035 2009-08-19  Doug Evans  <dje@sebabeach.org>
1036
1037         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
1038         distinguish from 1.1.
1039         * configure: Regenerate.
1040         * read.scm (-CGEN-VERSION): Update.
1041         * doc/version.texi: Update.
1042
1043         New builtin .pmacro?.
1044         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
1045         (pmacros-init!): Add .pmacro?.
1046         * doc/pmacros.text: Document .pmacro?.
1047         * testsuite/pmacros-1.test: Test .pmacro?.
1048
1049         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
1050         of a pmacro begins before its arguments are evaluated, improves
1051         readability.
1052
1053         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
1054         * testsuite/pmacros-1.test: Ditto.  Add better tests.
1055
1056         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
1057         in assembler syntax.
1058         (Operands): Similarly.
1059
1060 2009-08-18  Doug Evans  <dje@sebabeach.org>
1061
1062         * ifield.scm (ifld-encode-mode): Add FIXME.
1063         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
1064         modes.
1065         (<ifield> gen-extract): Similarly.
1066
1067         * read.scm (parse-error): Handle #f for context-location.
1068         * utils-cgen.scm (unspecified-location): Fix building of
1069         single-location.
1070
1071         * doc/rtl.texi: Document how to write hex and boolean values.
1072
1073         * gas-test.scm (<hw-asm> test-data): Handle () values.
1074         (<keyword> test-data): Convert symbols to strings before passing
1075         to string-append.
1076         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
1077         result for scalars.
1078
1079         * operand.scm (hw-index-scalar): Set `name'.
1080         (hw-index-anyof, hw-index-derived): Ditto.
1081
1082 2009-08-17  Doug Evans  <dje@sebabeach.org>
1083
1084         * pmacros.scm (-pmacro-builtin-internal-test): New function.
1085         (pmacros-init!): Add .internal-test.
1086         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
1087         * testsuite/testsuite.cpu (internal-verify): New pmacro.
1088         * doc/pmacros.text: Document .internal-test.
1089
1090         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
1091         (parse-comment): Allow numbers.
1092         * doc/porting.texi: Document that names and comments may be lists.
1093
1094         * insn.scm (-insn-parse): Fix typo.
1095
1096         Rename .eval -> .exec.  Add new .eval.
1097         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
1098         (-pmacro-builtin-eval): New function.
1099         (pmacros-init!): Add .exec.
1100         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
1101         * testsuite/location-1.test: Update.
1102         * testsuite/pmacros-1.test: Add test for .eval.
1103
1104 2009-08-16  Doug Evans  <dje@sebabeach.org>
1105
1106         * doc/porting.texi: Remove support for Guile 1.4.
1107
1108         * read.scm (current-reader-location): Return unspecified location
1109         if reader hasn't been initialized yet.
1110
1111 2009-08-13  Doug Evans  <dje@sebabeach.org>
1112
1113         * dev.scm: Document tracing options.
1114
1115         * pmacros.scm (pmacro-dump): New function.
1116         (check-pmacro): Tweak debugging output.
1117         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1118         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1119
1120         Add .let* pmacro builtin.
1121         * pmacros.scm (-pmacro-builtin-let*): New function.
1122         (pmacros-init!): Add .let*.
1123         * doc/pmacros.texi: Document .let*.
1124         * testsuite/pmacros-1.test: Test .let*.
1125
1126 2009-08-12  Doug Evans  <dje@sebabeach.org>
1127
1128         Clean up cpu file parsing, pass context consistently instead of the
1129         old "errtxt" argument.
1130         NOTE: ACU == "All Callers Updated".
1131         * attr.scm (-parse-simple-attribute): Renamed from
1132         parse-simple-attribute, ACU.
1133         (-attr-parse): Change errtxt argument to context, ACU.
1134         (-attr-read): Ditto.
1135         (atlist-parse): Ditto.  Put context arg first.
1136         (attr-parse): Use parse-error instead of context-error.
1137         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1138         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1139         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1140         `context' arg is now a <context> object.  ACU.
1141         (-keyword-read): `context' arg is now a <context> object.  ACU.
1142         (-hw-parse-indices): Change errtxt argument to context, ACU.
1143         (-hw-parse-values, -hw-parse-handlers): Ditto.
1144         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1145         (-hw-validate-layout, -hw-create-getter-from-layout,
1146         -hw-create-setter-from-layout): Ditto.
1147         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1148         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1149         (<hw-address>:parse!): Ditto.
1150         * ifield.scm (-ifield-parse, ifield-read): Ditto.
1151         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1152         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1153         (-multi-ifield-parse, -multi-ifield-read): Ditto.
1154         * insn.scm (-insn-parse, -insn-read): Ditto.
1155         (parse-syntax): Ditto.  Put context arg first.
1156         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1157         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1158         (-parse-insn-format): Ditto.
1159         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1160         (-arch-parse-isas): Ditto.
1161         (-isa-read): Add context arg, ACU.
1162         (-cpu-parse, -cpu-read, -mach-read): Ditto.
1163         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1164         context, ACU.
1165         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1166         (minsn-make-alias): Ditto.
1167         * mode.scm (-mode-parse): Ditto.
1168         (parse-mode-name): Ditto.  Put context arg first.
1169         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1170         errtxt argument to context, ACU.
1171         (-unit-parse, -model-parse, -model-read): Ditto.
1172         * operand.scm (-operand-parse-getter): Use parse-error instead of
1173         context-error.
1174         (-operand-parse-setter): Ditto.
1175         (-operand-parse): Change errtxt argument to context, ACU.
1176         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1177         (-anyof-operand-parse, -anyof-operand-read): Ditto.
1178         * read.scm (reader-error): Delete.  Use parse-error instead.
1179         (parse-error): Change errtxt argument to context, ACU.  Split args
1180         argument into expr and maybe-help-text.
1181         (-reader-process-expanded-1!): Reorganize.
1182         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1183         * types.scm (parse-type): Ditto.
1184         * utils-cgen.scm (single-location->simple-string): New function.
1185         (<context>): Replace members file,lineno with location.
1186         (make-prefix-context): Renamed from context-make-prefix, ACU.
1187         (make-current-context): New function.
1188         (context-append, context-append-name): New functions.
1189         (context-make-reader): Delete.
1190         (parse-name): Change errtxt argument to context, ACU.
1191         Put context arg first.
1192         (parse-comment): Ditto.
1193         (parse-number): Change errtxt argument to context, ACU.
1194         (arg-list-validate-name, arg-list-check-no-args,
1195         arg-list-symbol-arg): Ditto.
1196
1197         * read.scm (-cmd-if): Don't assume test is a list.
1198
1199         * html.scm (get-insn-properties): Delete errtxt, unused.
1200
1201 2009-08-11  Doug Evans  <dje@sebabeach.org>
1202
1203         * doc/rtl.texi (hardware types): Add pc.
1204
1205 2009-08-07  Doug Evans  <dje@sebabeach.org>
1206
1207         Add -t option for tracing things like commands, pmacro expansion.
1208         * dev.scm (cload): New arg #:trace.
1209         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1210         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
1211         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1212         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1213         (-reader-process-expanded-1!): Trace commands if requested.
1214         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1215         (-set-trace-options!): New function.
1216         (-init-reader!): New function.
1217         (cpu-load): New arg trace-options, all callers updated.
1218         Call -init-reader! and -set-trace-options!.
1219         (cgen-usage): Improve output formatting.
1220         (common-arguments): New option -t.
1221         (-cgen): Process -t.
1222         * utils-cgen.scm (single-location->string): Renamed from
1223         pretty-print-single-location.  All callers updated.
1224         (location->string): Renamed from pretty-print-location.
1225         All callers updated.
1226         (source-properties-location->string): New function.
1227         * doc/running.texi: Document -t.
1228
1229 2009-08-06  Doug Evans  <dje@sebabeach.org>
1230
1231         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1232         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1233         * utils.scm: ... here.
1234
1235 2009-08-05  Doug Evans  <dje@sebabeach.org>
1236
1237         Track source location better, for better error messages.
1238         * pmacros.scm (-pmacro-eval): Delete, unused.
1239         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1240         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1241         (scan-list, scan): Ditto.
1242         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1243         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1244         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1245         (scan-list1): New function.
1246         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
1247         * read.scm (<reader>): New member `location'.
1248         (-reader-lookup-command): Renamed from reader-lookup-command,
1249         all callers updated.
1250         (reader-error): Rewrite to produce better source location info.
1251         (current-reader-location): New function.
1252         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1253         All callers updated.  Record source location of expression.
1254         (reader-process-expanded!): Renamed from reader-process-expanded.
1255         All callers updated.
1256         (-reader-process!): Renamed from reader-process.  New arg `loc'.
1257         All callers updated.  Record source location of define-pmacro.
1258         * utils-cgen.scm (<location>): New class.
1259         (single-location): New (pseudo) class.
1260         (pretty-print-single-location, pretty-print-location): New functions.
1261         (location-top, location-push-single, location-push): New functions.
1262         (unspecified-location, current-input-location): New functions.
1263         (location-property): New object property.
1264         (location-property-set!): New function.
1265         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
1266         All uses updated.
1267         * testsuite/location-1.test: New testcase.
1268         * testsuite/run-tests.sh: Fix fail count handling.
1269         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
1270         to expect cgen to fail.
1271
1272         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1273
1274         * read.scm (-cmd-include): Renamed from include.  All callers updated.
1275         (-cmd-if): Renamed from cmd-if.  All callers updated.
1276         Use reader-process-expanded! on then/else clauses instead of eval1.
1277
1278 2009-07-22  Doug Evans  <dje@sebabeach.org>
1279
1280         * modes.scm (TI,OI): New modes.
1281         * types.scm (parse-type): Improve error checking.  Don't hardwire
1282         mode names here.
1283         * utils.scm (non-negative-integer?): New function.
1284
1285         * pmacros.scm (-pmacro-builtin-find): New predicate.
1286         (pmacros-init!): Add .find.
1287         * doc/pmacros.tex: Document .find.
1288         * testsuite/pmacros-1.test: Test .find.
1289
1290 2009-07-20  Doug Evans  <dje@sebabeach.org>
1291
1292         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1293         commented out printfs.
1294         * rtl.scm (rtl-finish!): Whitespace tweaks.
1295         * model.scm (parse-insn-timing): Tweak logging message.
1296         * operand.scm: Comment and whitespace tweaks.
1297         (op:type): Tweak error message.
1298         (op-ifield): Tweak logging message.
1299         (-derived-operand-parse, anyof-merge-semantics): Ditto.
1300         * read.scm: Whitespace cleanup.
1301         * utils.scm: Whitespace cleanup.
1302
1303 2009-07-19  Doug Evans  <dje@sebabeach.org>
1304
1305         Fix binding of nested pmacro parameters.
1306         * pmacros.scm (-pmacro-env-make): New arg prev-env.
1307         All callers updated.
1308         (-pmacro-bulid-lambda): Ditto.
1309         * doc/pmacros.texi: Update.
1310         * testsuite/pmacros-1.test: Add testcase.
1311
1312         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1313         calculation.
1314         (-multi-ifield-make-default-extract): Ditto.
1315
1316         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1317         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1318         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1319         Define.
1320         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1321         * doc/rtl.texi: Update.
1322
1323         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1324
1325         Rename builtin boolean pmacros, for consistency with rtl.
1326         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1327         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1328         * doc/pmacros.texi: Update.
1329         * testsuite/pmacros-1.test: Update.
1330
1331 2009-07-17  Doug Evans  <dje@sebabeach.org>
1332
1333         Use hash tables to record ifields, operands, insns, macro-insns.
1334         * attr.scm (attr-builtin!): Tweak some comments.
1335         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1336         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1337         <ident>.
1338         (<multi-ifield>): New constructor.
1339         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1340         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1341         <ident>.
1342         (-sub-insn-make!): Add hack to avoid differences in generated code.
1343         (multi-insn-instantiate!): Add total number of multi-insns to
1344         logging message.
1345         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1346         minsn-list to foo-table.  New member next-ordinal.
1347         Update getters/setters.
1348         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1349         New functions.
1350         (-get-next-ordinal!, -get-lowest-ordinal): New function.
1351         (-make-ident-object-table, -ident-object-table->list,
1352         -ident-object-table-add!, -ident-object-table-lookup): New functions.
1353         (current-ifld-list, current-ifld-add! current-ifld-lookup,
1354         -ifld-already-defined?): Rewrite.
1355         (current-op-list, current-op-add! current-op-lookup,
1356         -op-already-defined?): Rewrite.
1357         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1358         (current-insn-list, current-insn-add! current-insn-lookup,
1359         -insn-already-defined?): Rewrite.
1360         (current-minsn-list, current-minsn-add! current-minsn-lookup,
1361         -minsn-already-defined?): Rewrite.
1362         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1363         (MAX-VIRTUAL-INSNS): Define.
1364         (arch-analyze-insns!): Add hack to avoid differences in generated code.
1365         Update use of arch-insn-list.
1366         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1367         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1368         minsn-list.
1369         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1370         <ident>.  New constructor.
1371         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1372         <ident>.
1373         * sid.scm (-virtual-insn-add!): New function.
1374         (-create-virtual-insns!): Call it.
1375         (-fill-sim-insn-list!): Rewrite.
1376         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1377         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1378         * utils-cgen.scm (<ordered-ident>): New class.
1379         (obj-ordinal, obj-set-ordinal!): New functions.
1380         (add-ident-methods!): Delete.
1381
1382         * model.scm (parse-insn-timing): Change logging message to level 3.
1383
1384 2009-07-16  Doug Evans  <dje@sebabeach.org>
1385
1386         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1387         add a link to define-normal-insn-enum.
1388
1389         * doc/porting.texi (Conventions): Add docs on writing integers.
1390
1391         * cpu/simplify.inc (*): One line doc strings don't need \n.
1392         (df): Invoke define-full-ifield instead of claiming it's an alias.
1393         (dno): Define.
1394         (dnop): Mark as deprecated.
1395
1396         * cpu/play.cpu: Add example of hardware `layout'.
1397         * doc/porting.tex: Add docs on simplify.inc.
1398         * doc/rtl.texi: Cleanup pass over "Simplification macros",
1399         and other things.
1400
1401         * ifield.scm: Whitespace/formatting cleanup.
1402
1403         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1404
1405         * read.scm (parse-error): Don't print single entry args as a list.
1406         (-reader-process-expanded-1): Convert symbol to string for
1407         string-append.
1408
1409         * insn.scm (multi-insn-instantiate!): Tweak logging message.
1410
1411 2009-07-15  Doug Evans  <dje@sebabeach.org>
1412
1413         * cpu/simplify.inc (dno): New pmacro.
1414         * doc/porting.texi: Add section on simplify.inc.
1415         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1416
1417 2009-07-15  Doug Evans  <devans@sourceware.org>
1418
1419         * gen-all-doc: Generate index.html.
1420
1421 2009-07-13  Doug Evans  <dje@sebabeach.org>
1422
1423         Extend pmacro language, add testsuite.
1424         * Makefile.am (SUBDIRS): Add testsuite.
1425         * Makefile.in: Regenerate.
1426         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1427         testsuite/test-utils.sh.
1428         * configure: Regenerate.
1429         * dev.scm (cload): Handle testsuite app.
1430         (load-testsuite): New function.
1431         * pmacros.scm: (-pmacro-debug?): New global.
1432         (-smacro-table): New global.
1433         (-smacro-lookup, -smacro-set!): New functions.
1434         (-pmacro-make): New argument `syntactic-form?', all callers updated.
1435         (-pmacro-syntactic-form?): New function.
1436         (-pmacro-expected-number, -pmacro-verify-number): New functions.
1437         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1438         (-pmacro-expected-non-negative-integer): New function.
1439         (-pmacro-verify-non-negative-integer): New function.
1440         (-pmacro-expand-expr-list): New function.
1441         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1442         (-pmacro-process-args): Renamed from -pmacro-invoke.
1443         (-pmacro-apply, -smacro-apply): New functions.
1444         (-pmacro-expand): Rewrite syntactic form processing.
1445         (-pmacro-build-lambda): Reformat.
1446         (define-pmacro): Watch for more errors in definition.
1447         (pmacro-debug): New function.
1448         (pmacro-trace): Set/reset -pmacro-debug?.
1449         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1450         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
1451         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1452         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1453         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1454         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1455         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1456         (pmacros-init!): Initialize -smacro-table.
1457         Rewrite pmacro initialization.
1458         * read.scm (reader-process-expanded): Renamed from
1459         -reader-process-expanded.  All callers updated.
1460         Recognize () as a no-op.
1461         (cpu-load): Tweak logging messages.
1462         * utils.scm (message): Add comment.
1463         * cpu/play.cpu: Add some instructions to play with .let.
1464         * doc/cgenint.texi: Move some debugging related docs to here from
1465         cgen.texi.
1466         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1467         * testsuite/Makefile.am: New file.
1468         * testsuite/Makefile.in: New file.
1469         * testsuite/test-utils.sh.in: New file.
1470         * testsuite/run-tests.sh: New file.
1471         * testsuite/testsuite.cpu: New file.
1472         * testsuite/pmacros-1.test: New file.
1473
1474         * decode.scm: Comment and formatting tweaks.
1475         (-build-decode-table-guts): Add more data to logging message.
1476
1477 2009-07-12  Doug Evans  <dje@sebabeach.org>
1478
1479         Delete files that now live in ../cpu.
1480         * cpu/iq10.cpu: Delete.
1481         * cpu/iq2000.cpu: Delete.
1482         * cpu/iq2000.opc: Delete.
1483         * cpu/iq2000m.cpu: Delete.
1484         * cpu/m32r.cpu: Delete.
1485         * cpu/m32r.opc: Delete.
1486
1487 2009-07-09  Doug Evans  <dje@sebabeach.org>
1488
1489         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1490         All callers updated.  Work around -ve shifts by referencing the
1491         entire value.
1492
1493         * utils.scm (message): Handle pairs.
1494
1495 2009-07-08  DJ Delorie  <dj@redhat.com>
1496
1497         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1498         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1499         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1500         written to.
1501
1502 2009-07-07  Doug Evans  <dje@sebabeach.org>
1503
1504         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1505         * cpu/play.opc: New file.
1506
1507         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1508         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1509         * doc/rtl.texi (Instructions): Update.
1510
1511         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1512         (opc-arguments, -OPC): Call set-opc-file-path!.
1513         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1514         (set-opc-file-path!): New function.
1515         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1516
1517         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1518         before passing to gen-c-args.
1519
1520 2009-07-06  DJ Delorie  <dj@redhat.com>
1521
1522         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1523         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1524         unspecified accesses to control registers.
1525
1526 2009-07-01  DJ Delorie  <dj@redhat.com>
1527
1528         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1529         unspecified accesses to control registers.
1530
1531         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1532         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1533
1534 2009-06-27  Doug Evans  <dje@sebabeach.org>
1535
1536         * gen-all-intrinsics: New file.
1537
1538 2009-06-24  Doug Evans  <dje@sebabeach.org>
1539
1540         * All *.scm files: Update copyright year.
1541         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1542
1543 2009-06-23  DJ Delorie  <dj@redhat.com>
1544
1545         * intrinsics.scm: Updates to support IVC2.
1546         (belongs-to-group?): Check IVC2 slots.
1547         (-slots-attribute): New.
1548         (targets::attributes): Add SLOTS.
1549         (target:add-well-known-intrinsics): Add CPMOV.
1550         (md-insn): Add CPTYPE and CRET?.
1551         (add-md-insn): Likewise.
1552         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1553         duplicate insns with different bit patterns.
1554         (write-cgen-insn?): Add cret? support.
1555         (intrinsics.h): Add vector types.
1556         (runtime-op): Add vector support.
1557         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1558
1559         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1560         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1561         (h-cr-ivc2): Default to typeless.
1562         (h-ccr-ivc2): Fix register width.
1563         (SLOTS): Fix values and default.
1564         (ivc2_*): Add control register names.
1565         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1566
1567         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1568         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1569
1570 2009-06-22  Doug Evans  <dje@sebabeach.org>
1571
1572         * semantics.scm (insn-build-known-values): Fix typo in comment.
1573
1574 2009-06-21  Doug Evans  <dje@sebabeach.org>
1575
1576         * rtl-xform.scm (rtx-simplify-insn): New function.
1577         * html.scm (gen-insn-docs): Call it.
1578         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1579         * iformat.scm (ifmt-analyze): Minor simplification.
1580
1581         * semantics.scm (semantic-compile): Change arg sem-code-list to
1582         sem-code.
1583         (semantic-attrs): Ditto.
1584         * iformat.scm (ifmt-analyze): Update.
1585         (ifmt-compute!): Update.
1586         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1587         rtl-xform.scm.
1588         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1589         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1590         * semantics.scm (rtx-simplify): Ditto.
1591         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1592         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1593         (-simplify-expr-fn): Move to rtl-xform.scm.
1594         (-solve-expr-fn, rtx-solve): Ditto.
1595         * rtl-xform.c: New file.
1596         * read.scm: Load it.
1597
1598         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1599         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1600         (-rtx-traverse, rtx-traverse): Ditto.
1601
1602 2009-06-20  Doug Evans  <dje@sebabeach.org>
1603
1604         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1605
1606         * configure.in: Update version to 1.1.
1607         * configure: Regenerate.
1608         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1609
1610 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1611             Doug Evans  <dje@sebabeach.org>
1612
1613         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1614         (cgen-desc.c): Ditto.
1615         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1616         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1617         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1618         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1619         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1620         (cgen-cpuall.h, cgen-ops.c): Ditto.
1621         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1622         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1623         (cgen-sem-switch.c): Ditto.
1624         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1625         * sim-model.c (cgen-model.c): Ditto.
1626
1627 2009-06-18  Doug Evans  <dje@sebabeach.org>
1628
1629         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1630
1631         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1632
1633         * dev.scm (cload): Change #:arch argument to take the path to the
1634         .cpu file instead of just the name of the architecture.
1635         * read.scm (arch-path): Remove trailing '/'.
1636         (cpu-load): Set `arch-path' to directory of .cpu file.
1637         (-cgen): Don't set `arch-path' here.
1638         (include): Update.
1639         * doc/porting.texi: Update.
1640
1641 2009-06-14  Doug Evans  <dje@sebabeach.org>
1642
1643         * gen-all-doc: Use files in ../cpu where possible.
1644
1645         * Makefile.am (ARCHFILE): Fix path.
1646         * Makefile.in: Regenerate.
1647         * html.scm: Use "pre" instead of "plaintext".
1648
1649         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1650         * doc/app.texi: Cleanup pass.
1651         * doc/cgen.texi: Cleanup pass.
1652         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1653         * doc/intro.texi: Cleanup pass.
1654         * doc/mdate-sh: New file.
1655         * doc/opcodes.texi: Cleanup pass.
1656         * doc/pmacros.texi: Cleanup pass.
1657         * doc/porting.texi: Cleanup pass.
1658         * doc/rtl.texi: Cleanup pass.
1659         * doc/running.texi: Cleanup pass.  Document more runtime options.
1660         * doc/stamp-vti: Update.
1661         * doc/version.texi: Update.
1662
1663         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1664         (GUILE): Fix definition.
1665         * Makefile.in: Regenerate with automake 1.9.6.
1666         * aclocal.m4: Regenerate with aclocal 1.9.6.
1667         * configure.in (AC_PREREQ): Set to 2.59.
1668         (GENINSRC_NEVER): Define.
1669         * configure: Regenerate with autoconf 2.59.
1670         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1671         (cgen.info,cgen.dvi): Delete.
1672         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1673         (noinst_TEXINFOS): Add cgenint.texi.
1674         (DOCFILES): Add missing files.
1675         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1676         * doc/Makefile.in: Regenerate with automake 1.9.6.
1677
1678         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1679
1680         * attr.scm: Removing trailing whitespace.
1681         * cgen-intrinsics.scm: Ditto.
1682         * cgen-sim.scm: Ditto.
1683         * cos.scm: Ditto.
1684         * enum.scm: Ditto.
1685         * guile.scm: Ditto.
1686         * sim.scm: Ditto.
1687
1688 2009-05-28  DJ Delorie  <dj@redhat.com>
1689
1690         * cpu/mep.opc (parse_signed16_range): New.
1691         (parse_unsigned16_range): New.
1692         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1693
1694 2009-05-26  DJ Delorie  <dj@redhat.com>
1695
1696         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1697         accumulator names.
1698         (f-ivc2-ccrn-c3hi): New.
1699         (f-ivc2-ccrn-c3lo): New.
1700         (f-ivc2-ccrn-c3): New.
1701         (ivc2c3ccrn): Use it.
1702
1703 2009-05-22  DJ Delorie  <dj@redhat.com>
1704
1705         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1706         (mep_config_map): Regenerate.
1707
1708         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1709         ivc2-specific names.
1710         (simm8p20): New.
1711         (cmovc): move to after field definitions, use ivc2-specific
1712         register names.
1713         (cpmovi_b_P0S_P1): New.
1714         
1715 2009-05-19  DJ Delorie  <dj@redhat.com>
1716
1717         * cpu/mep.opc: Regenerate configuration.
1718         (parse_cdisp10): Only check CPU flags, not COP flags.
1719         (check_configured_mach): Likewise.
1720
1721 2009-05-13  DJ Delorie  <dj@redhat.com>
1722
1723         * intrinsics.scm (insns.md): Add RTL predicates.
1724         (intrinsics.h): Remove old C intrinsics.
1725
1726 2009-04-29  DJ Delorie  <dj@redhat.com>
1727
1728         * mep-ivc2.cpu: New.
1729         * mep-core.cpu: Regenerated.  Add support for deferred register
1730         writes.
1731         (SLOT): Add IVC2 slot types.
1732         (sim-syscall): Rename to something more appropriate.
1733         * mep-ext-cop.cpu: Regenerate.
1734         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1735         (print_slot_insn): New.
1736         (mep_examine_ivc2_insns): New.
1737         (mep_print_insn_set_ivc2_mode): New.
1738         (mep_print_insn): Support IVC2 slotting.
1739         
1740 2009-04-20  DJ Delorie  <dj@redhat.com>
1741
1742         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1743         (guess-mode): Drop COP* syntax.
1744         (need-insn): Add "--syscall--" to the list.
1745         (enum-type): Drop COP* syntax.
1746         (intrinsics.h): Likewise.
1747         (intrinsic-protos.h): Change file header to allow it to be
1748         included.
1749
1750 2009-04-17  DJ Delorie  <dj@redhat.com>
1751
1752         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1753         (lhucpm1): Limit to C5 mach.
1754         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1755         * cpu/mep-core.cpu (extend-cdisp10): New.
1756         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1757         
1758 2009-04-08  DJ Delorie  <dj@redhat.com>
1759
1760         * cpu/mep-c5.cpu: New.
1761         * cpu/mep-core.cpu: Add C5 support.
1762         * cpu/mep.opc: Likewise.
1763
1764 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1765
1766         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1767         about calling memset with a zero length.
1768
1769 2009-02-03  DJ Delorie  <dj@redhat.com>
1770
1771         * cpu/mep-core.cpu: Update to new MeP configuration.
1772         * cpu/mep-ext-cop.cpu: Likewise.
1773         * cpu/mep.opc: Likewise.
1774
1775 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1776
1777         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1778
1779 2008-06-17  Dave Brolley  <brolley@redhat.com>
1780
1781         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1782         (h-gr): Likewise.
1783
1784 2007-11-13  Dave Brolley  <brolley@redhat.com>
1785
1786         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1787
1788 2007-11-05  Dave Brolley  <brolley@redhat.com>
1789
1790         * intrinsics.scm,cgen-intrinsics.scm: New application which
1791         generates code to support intrinsic functions for insns in the
1792         mep architecture in gcc.
1793
1794 2007-09-21  Dave Brolley  <brolley@redhat.com>
1795
1796         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1797         (rn3us): CDATA attribute now LONG.
1798         
1799 2007-08-21  Dave Brolley  <brolley@redhat.com>
1800
1801         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1802         than 32 bits.
1803
1804 2007-07-05  Nick Clifton  <nickc@redhat.com>
1805
1806         * utils.scm (copyright-fsf): Update copyright notice to refer to
1807         the GPL version 3.
1808
1809 2007-05-22  Nick Clifton  <nickc@redhat.com>
1810
1811         * doc/cgen.texi: Use @copying around the copyright notice.
1812         * doc/internals.texi: Likewise.
1813
1814 2007-02-05  Dave Brolley  <brolley@redhat.com>
1815
1816         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1817
1818 2007-02-05  Dave Brolley  <brolley@redhat.com>
1819
1820         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1821         in the generated code for @arch@_cgen_init_asm if it is defined.
1822
1823         * Contribute the following changes:
1824         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1825
1826         * attr.scm (<string-attribute>): New attribute class.
1827         (attr-kind): Handle <string-attribute>.
1828         (parse-simple-attribute): New function.
1829         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1830         (<bitset-attribute> 'parse-value): Likewise.
1831         (<boolean-attribute> 'parse-value): Likewise.
1832         (<enum-attribute> 'parse-value): Likewise.
1833         (<string-attribute> 'parse-value): New function.
1834         (-attr-parse): Handle <string-attribute>.
1835         (-attr-read): Likewise.
1836         (<string-attribute> 'gen-value-for-defn-raw): New function.
1837         (<string-attribute> 'gen-value-for-defn): New function.
1838
1839 2006-11-07  Dave Brolley  <brolley@redhat.com>
1840
1841         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1842         necessary.
1843
1844 2006-10-18  Dave Brolley  <brolley@redhat.com>
1845
1846         * Contribute the following changes:
1847
1848         2006-07-11  Dave Brolley  <brolley@redhat.com>
1849
1850         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1851         (movcol): New insn.
1852         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1853         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1854         hardware or memory mode which was used.
1855         * sid-cpu.scm (hw-need-write-stack?): New function.
1856         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1857         identify hardware which uses write stacks.
1858         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1859         Initialized to an empty list.
1860         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1861         hw-need-write-stack?.
1862         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1863         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1864         (used-in-delay-rtl?): New method of <hardware-base>.
1865         (hw-used-in-delay-rtl?): New function.
1866
1867         2006-06-20  Dave Brolley  <brolley@redhat.com>
1868
1869         * sid.scm (gen-attr-type): Removed.
1870         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1871         (SH2a-MACH): Add sh5.
1872         (sh2a-nofpu-models): Add units for sh5.
1873         (sh2a-fpu-models): Likewise.
1874
1875         2006-06-15  Dave Brolley  <brolley@redhat.com>
1876
1877         * cpu/sh-sim.cpu: New file.
1878         * cpu/sh-sid.cpu: New file.
1879         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1880         (All fields): Remap for (insn-lsb0? #f)
1881         (All insns): Add timing specs.
1882         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1883         'xattrs' and .splice it in.
1884         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1885         (h-frc,h-drc): Add PROFILE attribute.
1886         (h-fpccr): Removed.
1887         (h-vbr): New hardware.
1888         (All fields): Remap for (insn-lsb0? #f)
1889         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1890         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1891         (fpscr): Use h-fpscr.
1892         (fsdm,fsdn): Use h-fsd.
1893         (dshci): Add xtiming argument and splice it in.
1894         (dr,xd): pmacros removed.
1895         (All insns): Add timing specs, *-MACH attribibutes,
1896         SH4{A}-GROUP attributes.
1897         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1898         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1899         we're being processed for sim or sid.
1900         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1901         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1902         (define-isa compact): Add (isa-parallel-insns 2).
1903         (define-isa media): Add (isa-parallel-insns 2). Add
1904         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1905         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1906         sh4a, sh4al
1907         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1908         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1909         (SH4al-MACH, SH5-MACH): New pmacros.
1910         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1911         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1912         (sh5-media-fp-units, common-model, common-model-with-fp) 
1913         (sh3-model, sh3e-model): New pmacros.
1914         (define-model sh2): New model.
1915         (define-model sh2e): New model.
1916         (define-model sh3): New model.
1917         (define-model sh3e): New model.
1918         (define-model sh2a-nofpu): New model.
1919         (define-model sh2a-fpu): New model.
1920         (define-model sh4-nofpu): New model.
1921         (define-model sh4): New model.
1922         (define-model sh4a-nofpu): New model.
1923         (define-model sh4a): New model.
1924         (define-model sh4al): New model.
1925         (define-model sh5-media): New model.
1926         (define-model sh5): Add all units.
1927         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1928         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1929         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1930         (h-pc): Add PROFILE attribute.
1931         (h-fr): Likewise.
1932         (h-tr): Likewise.
1933         (h-gr,h-grc): Likewise.
1934         (h-cr): Set h-sr in setter.
1935         (h-frbit): Get/Set h-fpscr.
1936         (h-szbit,h-prbit): Likewise.
1937         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1938         Add getter and setter.
1939         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1940         Adjust getter and setter.
1941         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1942         Adjust getter and setter.
1943         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1944         (h-fsd,h-fmov): New hardware.
1945
1946 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1947
1948         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1949         doc/notes.texi, doc/porting.texi, doc/running.texi,
1950         doc/sim.texi: Fix some typos.
1951
1952 2006-07-14  Dave Brolley  <brolley@redhat.com>
1953
1954         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1955         hardware or memory mode which was used.
1956         * sid-cpu.scm (hw-need-write-stack?): New function.
1957         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1958         identify hardware which uses write stacks.
1959         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1960         Initialized to an empty list.
1961         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1962         hw-need-write-stack?.
1963         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1964         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1965         (used-in-delay-rtl?): New method of <hardware-base>.
1966         (hw-used-in-delay-rtl?): New function.
1967
1968 2006-06-20  Dave Brolley  <brolley@redhat.com>
1969
1970         * sid.scm (gen-attr-type): Removed.
1971
1972 2006-05-10  Dave Brolley  <brolley@redhat.com>
1973
1974         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1975         support for (if (application-is? <appname>) (...) (...)).
1976         (-cgen): Add trailing "/" to arch-path.
1977         * utils.scm (dirname): Removed. dirname is a primitive function.
1978
1979 2006-05-09  Dave Brolley  <brolley@redhat.com>
1980
1981         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1982         'entire_insn' not 'base_insn'.
1983         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1984         is null.
1985         * sim.scm (-gen-arch-model-decls): Likewise.
1986         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1987         abuf->written if profiling.
1988         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1989         object->string om the mode.
1990         (-hw-gen-write-stack-decl): Likewise.
1991         * read.scm (include): Use arch-path as file location.
1992         (arch-path): Define it with a default setting.
1993         (-cgen): Update arch-path when "-a" option is specified.
1994         * utils.scm (dirname): New function.
1995
1996 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1997
1998         * configure.in: Remove AC_ARG_PROGRAM.
1999         * configure: Regenerate with autoconf 2.59.
2000
2001 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
2002
2003         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
2004         SIMULATOR.
2005
2006 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
2007
2008         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
2009         or an error message otherwise.
2010         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
2011         Fix up comments to correctly describe the functions.
2012
2013 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
2014             Anil Paranjape   <anilp1@kpitcummins.com>
2015             Shilin Shakti    <shilins@kpitcummins.com>
2016
2017         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
2018         CPU description.
2019         * cpu/xc16x.opc: New file containing supporting XC16C routines.
2020
2021 2006-02-10  Nick Clifton  <nickc@redhat.com>
2022
2023         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
2024
2025 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
2026
2027         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
2028         for concatenation.
2029         (-hw-gen-write-stack-decl): Likewise.
2030
2031 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
2032
2033         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
2034         non-(adata-integral-insn? CURRENT-ARCH) case.
2035
2036 2005-10-28  Dave Brolley  <brolley@redhat.com>
2037
2038         Contribute the following changes:
2039         2005-09-19  Dave Brolley  <brolley@redhat.com>
2040
2041         * attr.scm (gen-value-for-defn-raw): New methods.
2042         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
2043         gen-value-for-defn-raw.
2044         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
2045
2046         2002-12-13  Dave Brolley  <brolley@redhat.com>
2047
2048         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
2049         (-gen-attr-accessors): New function.
2050         (gen-obj-attr-defn): Update terminating initializer.
2051         (gen-obj-attr-end-defn): New function.
2052         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
2053         * sid-cpu.scm (cgen-desc.h): Generate code to include
2054         "opcode/cgen-bitset.h"
2055         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
2056         name.
2057         * desc.scm ('gen-defn): Update terminating initializer.
2058         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
2059         terminatinig initializer.
2060         (gen-hw-decls): Ditto.
2061         (gen-operand-decls): Ditto.
2062         (gen-insn-decls): Ditto.
2063         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
2064         (gen-insn-table): Update terminating initializer.
2065         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
2066         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
2067         * attr.scm (charmask-bytes): New function.
2068         (bitset-attr->charmask): New function.
2069         (<bitset-attribute>): Handle isa-attributes specially. Also handle
2070         differences for SID-SIMULATOR.
2071         (<integer-attribute>): Handle differences for SID-SIMULATOR.
2072         (<enum-attribute>): Ditto.
2073
2074 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2075
2076         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
2077
2078 2005-10-24  DJ Delorie  <dj@redhat.com>
2079
2080         * operand.scm (-anyof-merge-syntax): Print a more useful error
2081         message.
2082
2083 2005-10-19  Nick Clifton  <nickc@redhat.com>
2084
2085         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
2086         patch.
2087
2088 2005-10-18  Andreas Schwab  <schwab@suse.de>
2089
2090         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
2091
2092 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2093
2094         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
2095         size.
2096
2097 2005-08-02  Dave Brolley  <brolley@redhat.com>
2098
2099         * rtl-c.scm (s-unop): Don't dereference
2100         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
2101         (s-binop, s-convop, s-cmpop): Likewise.
2102
2103 2005-07-29  Dave Brolley  <brolley@redhat.com>
2104
2105         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
2106         if with-profile or with-parallel-write.
2107         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
2108         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
2109         string-append.
2110
2111 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
2112
2113         * cpu/fr30.opc (print_register_list): Correct format strings.
2114         * cpu/ip2k.opc: Likewise.
2115
2116 2005-07-05  Nick Clifton  <nickc@redhat.com>
2117
2118         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2119         unsigned in order to avoid compile time warnings about sign
2120         conflicts.
2121
2122 2005-07-01  Nick Clifton  <nickc@redhat.com>
2123
2124         * desc-cpu.scm: Update to ISO C90 function declaration style.
2125         * opc-asmdis.scm: Likewise.
2126         * opc-ibld.scm: Likewise.
2127         * opc-itab.scm: Likewise.
2128         * cpu/fr30.opc: Likewise.
2129         * cpu/i960.opc: Likewise.
2130         * cpu/ip2k.opc: Likewise.
2131         * cpu/iq2000.opc: Likewise.
2132         * cpu/m32r.opc: Likewise.
2133         * cpu/openrisc.opc: Likewise.
2134         * cpu/sh.opc: Likewise.
2135         * cpu/sparc.opc: Likewise.
2136         * cpu/xstormy16.opc: Likewise.
2137
2138 2005-06-15  Dave Brolley  <brolley@redhat.com>
2139
2140         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2141         (cgen-cpu.h): Call it.
2142
2143         Contributed on behalf of Graydon Hoare
2144         2001-06-05  graydon hoare  <graydon@redhat.com>
2145
2146         * utils.scm (foldl): Define.
2147         (foldr): Define.
2148         (filter): Define.
2149         (union): Define.
2150         (intersection): Simplify.
2151         * sid.scm : Set APPLICATION to SID-SIMULATOR.
2152         (-op-gen-delayed-set-maybe-trace): Define.
2153         (<operand> 'gen-set-{quiet,trace}): Delegate to
2154         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2155         up and needs cleaning.
2156         (-with-parallel?): Hardwire with-parallel to #t.
2157         (<operand> 'cxmake-get): Replace with lookahead-aware code
2158         * sid-decode.scm: Remove per-insn writeback fns.
2159         (-gen-idesc-decls): Redefine sem_fn type.
2160         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2161         with write stack stuff.
2162         (cgen-write.cxx): Replace per-insn writebacks with single write
2163         stack writeback. Add write stack reset function.
2164         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2165         stack stuff.
2166         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2167         estate attribute set.
2168         (delay): Set #:delayed attribute to calculated delay, update
2169         maximum delay of cpu, check (delay ...) usage.
2170         * operand.scm (<operand>): Add delayed slot to <operand>.
2171         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2172         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2173         * doc/rtl.texi (Expressions): Add section on (delay ...).
2174
2175 2005-06-13  Jim Blandy  <jimb@redhat.com>
2176
2177         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2178         as well as strings.
2179
2180 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
2181
2182         * doc/porting.texi: Change all mention of md_apply_fix3 and
2183         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2184         respectively.
2185
2186 2005-05-18  Dave Brolley  <brolley@redhat.com>
2187
2188         * utils-sim.scm (-gen-decode-default-entry): New function.
2189         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2190         code to check that all opcodes bits match.
2191         (-gen-decoder-switch): Use -gen-decode-default-entry.
2192
2193 2005-05-16  Jim Blandy  <jimb@redhat.com>
2194
2195         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2196         fetched by one of our GETIMEM* methods.
2197         * utils-gen.scm (-extract-chunk-specs): Always fetch full
2198         base-insn-sized chunks.
2199
2200 2005-05-10  Nick Clifton  <nickc@redhat.com>
2201
2202         * Update the address and phone number of the FSF organization in
2203         the GPL notices in the following files:
2204         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2205         cpu/powerpc.cpu, slib/random.scm
2206
2207 2005-05-06  Jim Blandy  <jimb@redhat.com>
2208
2209         * pprint.scm, cos-pprint.scm: Add documentation.
2210
2211         * pprint.scm (pprint): Don't wipe out elide-table after each call.
2212
2213         * pprint.scm, cos-pprint.scm: New files.
2214
2215 2005-04-04  Nick Clifton  <nickc@redhat.com>
2216
2217         * opcodes.scm (-gen-parse-address): Initialise value to zero to
2218         avoid a compile time warning.
2219
2220 2005-03-18  Nick Clifton  <nickc@redhat.com>
2221
2222         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2223         "percent-operand" from "%operand" as the latter confuses xgettext
2224         into thinking that it is a C printf formating directive, which
2225         prevents proper translation.
2226
2227 2005-02-23  Nick Clifton  <nickc@redhat.com>
2228
2229         * opcodes.scm (gen-parse-number): Add a cast to the desired
2230         pointer signed'ness in order to prevent compile time warnings.
2231         * cpu/ip2k.opc: Fixed compile time warnings about differing
2232         signed'ness of pointers passed to functions.
2233         * cpu/iq2000.opc: Likewise.
2234         * cpu/m32r.opc: Likewise.
2235         * cpu/openrisc.opc: Likewise.
2236         * cpu/xstormy16.opc: Likewise.
2237
2238 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
2239
2240         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2241         (cgen-desc.h): ..to here, after opcode/cgen.h include.
2242
2243 2005-02-16  Dave Brolley  <brolley@redhat.com>
2244
2245         * utils.scm: Update copyright years.
2246         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2247         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2248         * operand.scm (-derived-operand-parse): Move logit message from level 1
2249         to level 2.
2250
2251 2005-02-15  Nick Clifton  <nickc@redhat.com>
2252
2253         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2254         prevent compile time warning messages.
2255         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2256         * utils-gen.scm (attr-int-gen-defn): Likewise.
2257         (attr-gen-defn): Likewise.
2258         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2259         (print_dollarhex16): Remove unused function.
2260
2261 2005-02-15  Jim Blandy  <jimb@redhat.com>
2262
2263         * guile.scm (cgen-call-with-debugging): Doc fix.
2264
2265         Make backtraces work more reliably.
2266         * guile.scm: Set up debugging parameters, and enable debugging and
2267         source positions while loading.
2268         (cgen-call-with-debugging, cgen-debugging-stack-start): New
2269         functions.
2270         * read.scm: Don't set debugging parameters here.
2271         (catch-with-backtrace): Function deleted.
2272         (-cgen): Simply note the presence or absence of the -b option.
2273         Pass the flag to cgen-call-with-debugging, so debugging is turned
2274         off here if the user didn't request it, for faster computation.
2275         (cgen): Call cgen-debugging-stack-start here, instead of
2276         catch-with-backtrace.
2277
2278         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2279         trailing -s.
2280         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2281         Don't write out the trailing -s here.
2282         * Makefile.in: Regenerated.
2283         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2284         fixup.scm here; let the caller decide which Scheme's customization
2285         file to preload.
2286         * dev.scm: Load guile.scm, not fixup.scm.
2287         * fixup.scm: Deleted; contents have all moved to guile.scm.
2288         * README: Doc fix.
2289
2290         * guile.scm (debug-write): New function.
2291
2292 2005-02-14  Jim Blandy  <jimb@redhat.com>
2293
2294         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2295         transformer procedure, not eval.  Transformer procedures take one
2296         argument.
2297
2298 2005-02-11  Nick Clifton  <nickc@redhat.com>
2299
2300         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2301         to 'bfd_vma *' in order avoid compile time warning message.
2302
2303 2005-02-09  Jim Blandy  <jimb@redhat.com>
2304
2305         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
2306         corresponding change in the sim/common directory.)
2307
2308 2005-02-07  Jim Blandy  <jimb@redhat.com>
2309
2310         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
2311         changes in the opcodes directory.)
2312
2313         * guile.scm: New file, containing Guile-specific definitions and
2314         adaptations.  This is loaded by the app-specific shell scripts.
2315         Initially identical to fixup.scm.
2316         * cgen-sid.scm: Don't load fixup.scm here.
2317
2318         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2319         latter is a macro.
2320
2321 2005-01-27  Jim Blandy  <jimb@redhat.com>
2322
2323         * utils.scm (string/symbol->append): Renamed from 'concat'.
2324         * opcodes.scm (gen-switch): Use new name.
2325         * insn.scm (-sub-insn-make!): Same.
2326         * rtl.scm (rtx-dump): Same.
2327         * semantics.scm (semantic-compile): Same.
2328
2329 2005-01-20  Jim Blandy  <jimb@redhat.com>
2330
2331         * opcodes.scm (gen-switch): Use concat instead of string-map.
2332
2333         * utils.scm (concat): New function.
2334         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2335         * rtl.scm (rtx-dump): Same.
2336         * semantics.scm (semantic-compile): Same.
2337
2338 2004-12-16  Jim Blandy  <jimb@redhat.com>
2339
2340         * utils-cgen.scm (parse-name): Don't assume that string-map can be
2341         applied to symbols.  Process everything as strings, and then
2342         convert to a symbol at the end.
2343
2344         * read.scm (debug-repl): Temporarily redirect input and output to
2345         /dev/tty while we debug, so we don't interfere with whatever CGEN
2346         is reading or writing.
2347         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2348         New functions.
2349
2350 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
2351
2352         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2353         will work with newer versions of guile.
2354
2355 2004-10-27  Nick Clifton  <nickc@redhat.com>
2356
2357         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2358         * cpu/iq2000.cpu: Likewise.
2359
2360 2004-07-21  DJ Delorie  <dj@redhat.com>
2361
2362         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2363
2364 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
2365
2366         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2367         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2368
2369 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2370
2371         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2372
2373 2004-03-22  Dave Brolley  <brolley@redhat.com>
2374
2375         * utils.scm (copyright-fsf): Update copyright years.
2376         (copyright-red-hat): Ditto.
2377         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2378         code.
2379         (-op-gen-set-trace-parallel): Ditto.
2380
2381 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
2382
2383         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2384         disassembling codes for 0x*2 addresses.
2385
2386 2004-01-29  Dave Brolley  <brolley@redhat.com>
2387
2388         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2389         zeroes in the extra bit positions and generate 'opcode-mask' with ones
2390         in the extra bit positions.
2391
2392 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2393
2394         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2395
2396 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
2397
2398         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2399         "short" being 16 bit.
2400         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
2401         internationalize error message.
2402         (parse_lo16): Likewise.  Remove useless code.
2403
2404 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2405
2406         * cpu/m32r.cpu : Add new model m32r2.
2407         Add new instructions.
2408         Replace occurrances of 'Mitsubishi' with 'Renesas'.
2409         Changed PIPE attr of push from O to OS.
2410         Care for Little-endian of M32R.
2411         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2412         Care for Little-endian of M32R.
2413         (parse_slo16): signed extension for value.
2414
2415 2003-10-26  Dave Brolley  <brolley@redhat.com>
2416
2417         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2418         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2419         (-gen-extract-fn): Call -gen-record-profile-args.
2420
2421 2003-10-21  Dave Brolley  <brolley@redhat.com>
2422
2423         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2424         a static const int.
2425         * decode.scm (-opcode-slots): Correct typo in logit call.
2426
2427 2003-10-09  Jim Blandy  <jimb@redhat.com>
2428
2429         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2430         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
2431
2432         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2433
2434 2003-10-06  Dave Brolley  <brolley@redhat.com>
2435
2436         * gen-all-doc: Add fr550.
2437
2438 2003-09-11  Doug Evans  <dje@sebabeach.org>
2439
2440         * Makefile.am (ARCHFILE): New var.
2441         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2442         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2443         * Makefile.in: Regenerate.
2444
2445 2003-09-08  Dave Brolley  <brolley@redhat.com>
2446
2447         On behalf of Doug Evans <dje@sebabeach.org>
2448         Pass in paths to input files, instead of assuming they live in
2449         $srcdir/cpu.  Plus misc. option processing cleanup.
2450         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2451         Add pre-process pass to all options.
2452         * cgen-gas.scm (gas-arguments): Ditto.
2453         * cgen-sid.scm (sim-arguments): Ditto.
2454         * cgen-sim.scm (sim-arguments): Ditto.
2455         * cgen-stest.scm (stest-arguments): Ditto.
2456         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2457         (-opc-file-path): New global.
2458         (opc-file-path): New fn.
2459         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2460         All callers updated.
2461         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2462         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2463         Replace srcdir arg with opc-file.  All callers updated.
2464         * read.scm (-opt-spec-update): Delete.
2465         (opt-get-first-pass,opt-get-second-pass): New fns.
2466         (-cgen): Process application-specific arguments in two passes.
2467
2468 2003-08-29  Dave Brolley  <brolley@redhat.com>
2469
2470         * cpu/frv.cpu: Removed.
2471         * cpu/frv.opc: Removed.
2472
2473 2003-08-21  Nick Clifton  <nickc@redhat.com>
2474
2475         * cpu/frv.cpu (mbtoh): Replace input parameter to
2476         u-media-dual-expand and u-media-dual-btoh with output parameter.
2477         (cmbtoh): Add profiling hack.
2478
2479 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2480
2481         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2482
2483 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2484
2485         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2486         the elements for the END record of CGEN_OPINST, silencing warnings.
2487
2488 2003-07-15  Doug Evans  <dje@sebabeach.org>
2489
2490         Add guile 1.6.4 support.
2491         - empty list must be quoted
2492         - string functions have stricter type checking
2493         - eval now takes a second argument
2494         - symbol-bound? is deprecated
2495         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2496         (bitset-attr->list): Ensure arg to string-cut is a string.
2497         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2498         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2499         * cos.scm (-class-list): Must quote empty list.
2500         (-class-parent-classes,-class-compute-class-desc): Ditto.
2501         (class-make,make,object-reset!): Ditto.
2502         (method-make-make!): Call eval1 instead of eval.
2503         (method-make-forward!,method-make-virtual-forward!): Ditto.
2504         * decode.scm (subdtable-add): Use stringsym-append instead of
2505         string-append.
2506         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2507         (-build-decode-table-entry): Fetch string name of insn.
2508         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2509         (-gen-mach-table-defns): Ditto for mach.
2510         (gen-ifld-defns): Ditto for ifld.
2511         (gen-hw-table-defns): Ditto for hw.
2512         (gen-operand-table): Ditto for op.
2513         (gen-insn-table-entry): Ditto for insn.
2514         * desc.scm (gen-attr-table-defn): Ditto for attr.
2515         (<keyword>,gen-defn): Don't pass symbols to string-append.
2516         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2517         symbol-append.
2518         (enum-vals-upcase): Use symbol-upcase to build result.
2519         (-enum-parse): Use stringsym-append to build errtxt.
2520         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2521         (eval1): New function.
2522         (symbol-bound?): Provide own version if >= guile 1.6.
2523         * hardware.scm (define-keyword): Use string-append instead of
2524         symbol-append.
2525         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2526         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2527         before using.
2528         (gen-list-entry): Handle either symbol or string `name' arg.
2529         (gen-obj-doc-header): Fetch string name of `o' arg.
2530         (define-cpu-intro): Ditto for cpu.
2531         (gen-mach-intro): Ditto for mach.
2532         (gen-model-intro): Ditto for model.
2533         (gen-isa-intro): Ditto for isa.
2534         (gen-machine-doc-1): Ditto for isa.
2535         (gen-reg-doc-1): Convert mach to string first.
2536         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2537         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2538         to string first.
2539         (gen-insn-categories): Fetch string name of mach.  Convert
2540         enum-val-name to string first.
2541         (gen-insn-docs): Fetch string name of mach.
2542         * ifield.scm (ifld-ilk): Result is a string.
2543         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2544         Fetch string name of ifld.
2545         (-sfmt-search-key): Similarily for ifld and op.
2546         * insn.scm (syntax-make): Fetch string name of syntax element.
2547         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2548         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2549         * mode.scm (mode:c-type): Result is a string.
2550         (mode:enum): Fetch string name of mode.
2551         (-mode-parse): Use stringsym-append to build errtxt.
2552         * model.scm (model:enum): Fetch string name of model.
2553         (-model-parse): Use stringsym-append to build errtxt.
2554         (parse-insn-timing): Must quote empty list.
2555         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2556         (-gen-minsn-opcode-entry): Ditto.
2557         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2558         convert to string.
2559         (read-cpu.opc): Convert current-arch-name to a string before using.
2560         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2561         (<derived-operand>): Must quote empty list.
2562         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2563         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2564         of ifld.
2565         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2566         (-pmacro-sym): Must convert symbols to strings before passing to
2567         string-append.
2568         (-pmacro-str): Ditto.
2569         (pmacros-init!): Use eval1 instead of eval.
2570         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2571         (keep-isa-atlist?): Ditto.
2572         (cmd-if): Use eval1 instead of eval.
2573         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2574         (-rtl-c-get): Fetch string name of src.
2575         (s-unop): Ditto for mode.
2576         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2577         (-gen-par-temp-defns,subword): Ditto.
2578         (join): Use stringsym-append instead of string-append.
2579         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2580         (rtx-traverse-debug): Fetch string name of rtx-obj.
2581         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2582         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2583         (rtx-pretty-name): Result is a string.
2584         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2585         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2586         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2587         before using.
2588         (-gen-sfrag-case): Fetch string name of user.
2589         * sid-model.scm (unit:enum): Fetch string name of unit.
2590         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2591         (<hw-memory>,gen-set-quiet): Ditto.
2592         (gen-mode-defs): Ditto.
2593         (sim-finish!): Convert current-arch-name to a string before using.
2594         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2595         (-gen-no-scache-semantic-fn): Ditto.
2596         (cgen-defs.h): Fetch string name of isa.
2597         (cgen-read.c): Convert current-arch-name to a string before using.
2598         (cgen-write.c): Ditto.
2599         * sim-model.scm (unit:enum): Fetch string name of unit.
2600         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2601         (-gen-model-timing-table): Fetch string name of model.
2602         (-gen-mach-model-table): Ditto.
2603         (-gen-mach-defns): Fetch string name of mach.
2604         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2605         (<hw-memory>,cxmake-get): Fetch string name of mode.
2606         (<hw-memory>,gen-set-quiet): Ditto.
2607         (gen-mode-defs): Ditto.
2608         (sim-finish!): Must quote empty list.
2609         * utils-cgen.scm (<ident>): Must quote empty list.
2610         (obj:str-name): New fn.
2611         (parse-comment): Result is a string.
2612         (parse-symbol): Result is a symbol.
2613         (parse-string): Result is a string.
2614         (keyword-list?): Convert arg to string before calling string-ref.
2615         (keyword-list->arg-list): Ditto.
2616         (gen-attr-name): Convert attr-name to string first.
2617         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2618         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2619         (gen-define-ifmt-ifields): Ditto for fld.
2620         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2621         map-over-string.
2622         (gen-file-name): Ditto.
2623         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2624         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2625         (reduce): Call eval1 instead of eval.
2626         * cpu/m32r.cpu (addi): Don't use `#.'.
2627
2628         * gen-all-sim: Fix some typos.
2629
2630 2003-07-08  Doug Evans  <dje@sebabeach.org>
2631
2632         * gen-all-doc: Ensure run from cgen src dir.
2633         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2634         * gen-all-sid: Similarily, in ./tmp-sid.
2635         * gen-all-sim: Similarily, in ./tmp-sim.
2636
2637 2003-06-20  Doug Evans  <dje@sebabeach.org>
2638
2639         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2640
2641 2003-06-19  Doug Evans  <dje@sebabeach.org>
2642
2643         * mach.scm (-ifld-already-defined?): New proc.
2644         (current-ifld-add!): Use it.
2645         (-op-already-defined?): New proc.
2646         (current-op-add!): Use it.
2647         (-insn-already-defined?): New proc.
2648         (current-insn-add!): Use it.
2649         (-minsn-already-defined?): New proc.
2650         (current-minsn-add!): Use it.
2651         (obj-isa-list): New proc.
2652         (isa-supports?): Use it.
2653
2654 2003-06-10  Doug Evans  <dje@sebabeach.org>
2655
2656         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2657         * cpu/m32r.cpu (all insns): Ditto.
2658
2659         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2660         "unspecified".
2661
2662         * gen-all-doc: Split arm and frv docs up a bit.
2663
2664         * cpu/arm.cpu: Add IDOC attribute.
2665         * cpu/frv.cpu: Ditto.
2666         * cpu/i960.cpu: Ditto.
2667         * cpu/openrisc.cpu: Ditto.
2668         * cpu/xstormy16.cpu: Ditto.
2669         * cpu/m32r.cpu: Ditto.
2670         (all insns): Explicitly specify IDOC attribute.
2671
2672         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2673         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2674         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2675         * Makefile.in: Regenerate.
2676         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2677         (-attr-read): Defer computing default value until we know the type.
2678         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2679         (<attr-list>:attr-present?): New method.
2680         (atlist-attr-present?,obj-attr-present?): New fns.
2681         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2682         (attr-builtin!): New insn attr IDOC.
2683         * cgen-doc.scm (doc-arguments): New args -I,-N.
2684         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2685         Support comment as fourth element of enum value.
2686         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2687         * html.scm (gen-html-header): New arg kind, all callers updated.
2688         (gen-table-of-contents): New arg insn-file, all callers updated.
2689         (gen-list-entry,gen-doc-header): New fn.
2690         (get-operands): Delete.
2691         (gen-iformat-table): Rewrite.
2692         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2693         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2694         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2695         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2696         (get-insns-for-category,gen-categories-insn-lists): New fns.
2697         (gen-insn-docs): Simplify each insn's semantics first.
2698         Print insn tables sorted by IDOC categories.
2699         (*insn-html-file-name*): New global.
2700         (cgen-insn.html): New fn.
2701         (cgen-all): Update.
2702         * insn.scm (<insn>): Create a setter for the `tmp' member.
2703         * semantics.scm (insn-build-known-values): Renamed from
2704         -build-known-values.  All callers updated.
2705
2706         * rtl.scm: Move traveral/evaluation support to ...
2707         * rtl-traverse.scm: New file.
2708         * read.scm: Maybe-load rtl-traverse.scm.
2709
2710         * rtl.scm (-rtx-valid-types): Add SETRTX.
2711
2712         * rtx-funcs.scm (nop,parallel): Fix mode.
2713
2714         * utils.scm (eqv-lookup-index): New fn.
2715         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2716
2717         * dev.scm (load-doc): Set APPLICATION.
2718
2719 2003-06-10  Dave Brolley  <brolley@redhat.com>
2720
2721         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2722         * sid-decode.scm: Generate #include of config.h into
2723         @prefix@-decode.cxx.
2724         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2725
2726 2003-06-07  Doug Evans  <dje@sebabeach.org>
2727
2728         * gen-all-sid: New file.
2729         * gen-all-opcodes: New file.
2730
2731 2003-06-05  Nick Clifton  <nickc@redhat.com>
2732
2733         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2734         version of the FRinti operand.
2735         (FRintjeven): Likewise for FRintj.
2736         (FRintkeven): Likewise for FRintk.
2737         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2738         media-quad-arith-sat-semantics, media-quad-arith-sat,
2739         conditional-media-quad-arith-sat, mdunpackh,
2740         media-quad-multiply-semantics, media-quad-multiply,
2741         conditional-media-quad-multiply, media-quad-complex-i,
2742         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2743         conditional-media-quad-multiply-acc, munpackh,
2744         media-quad-multiply-cross-acc-semantics, mdpackh,
2745         media-quad-multiply-cross-acc, mbtoh-semantics,
2746         media-quad-cross-multiply-cross-acc-semantics,
2747         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2748         media-quad-cross-multiply-acc-semantics, cmbtoh,
2749         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2750         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2751         cmhtob): Use new operands.
2752         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2753         (parse_even_register): New function.
2754
2755 2003-06-04  Doug Evans  <dje@sebabeach.org>
2756
2757         Better handling of 64 bit and mixed 32/64 bit architectures.
2758         * hardware.scm (hw-update-word-modes!): New fn.
2759         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2760         hw-update-word-modes!.
2761         (state-word-bitsize): Replace FIXME with requested check.
2762         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2763         * mode.scm (mode-find): Ignore INT,UINT.
2764         (-mode-word-sizes-kind): New global.
2765         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2766         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2767         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2768         of mode-list to ...
2769         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2770         unusable, correct values set later.
2771         (mode-finish!): Remove cruft.
2772         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2773         * opcodes.scm (opcodes-init!): Ditto.
2774         * rtx-funcs.scm (annul): Fix mode of pc.
2775         * cpu/ia64.cpu: Remove cruft that sets word modes.
2776         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2777
2778 2003-06-03  Nick Clifton  <nickc@redhat.com>
2779
2780         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2781         immediate value not unsigned.
2782
2783 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2784
2785         * cpu/sh.cpu: Amend comments to refer to SuperH.
2786         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2787         * cpu/sh64-media.cpu: Likewise.
2788         (Saturation): Update manual reference.
2789
2790 2003-05-15  Doug Evans  <dje@sebabeach.org>
2791
2792         * Makefile.am (srcroot): New var.
2793         (html): New rule.
2794         * Makefile.in: Regenerate.
2795         * cgen-doc.scm: New file.
2796         * html.scm: New file.
2797         * gen-all-doc: New file.
2798         * dev.scm (cload): Handle DOC application.
2799         (load-doc): New fn.
2800         * machs.scm (machs-for-cpu): New fn.
2801         * model.scm (models-for-cpu): New fn.
2802         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2803         All uses updated.
2804         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2805         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2806
2807         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2808         (-gen-decode-bits): Instead put in better fix here.
2809
2810         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2811
2812 2003-05-01  DJ Delorie  <dj@redhat.com>
2813
2814         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2815         word accesses.
2816         (set-alignfix-mem): Likewise.
2817
2818 2003-04-16  Dave Brolley  <brolley@redhat.com>
2819
2820         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2821         * utils.scm (copyright-fsf): Update generate copyright years.
2822         (copyright-cygnus): Ditto.
2823         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2824         operands.
2825         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2826         here.
2827         (<operand>'gen-profile-code): New parameter 'when'.
2828         (<iunit>'gen-profile-code): Ditto.
2829         (<insn>'gen-profile-code): Ditto.
2830         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2831         'insn_reference' for the 'after' function.
2832         * model.scm (unit:enum): Moved to sim-model.scm.
2833         * sim-model.scm (unit:enum): Moved from model.scm.
2834         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2835         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2836         * sid-model.scm (unit:enum): New version for sid.
2837         (gen-model-class-name): New function.
2838         (gen-model-unit-fn-decl): New function.
2839         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2840         (gen-model-unit-fn-name): New parameter 'when'.
2841         (-gen-model-insn-fn-name): Ditto.
2842         (-gen-model-insn-qualified-fn-name): New function.
2843         (-gen-model-insn-fn-decl): New function.
2844         (-gen-model-insn-fn-decls): New function.
2845         (-gen-model-insn-fn): New parameter 'when'. Call
2846         -gen-model-insn-qualified-fn-name.
2847         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2848         functions for modelling insn before and after execution.
2849         (-gen-model-class-decls): New function.
2850         (" (gen-model-class-name model) "): New function.
2851         (gen-model-classes): New function.
2852         (-gen-insn-timing): Generate functions for modelling insn before and after
2853         execution.
2854         (-gen-insn-unit-timing): Generate class-qualified names.
2855         (-gen-model-timing-table): Ditto.
2856         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2857         not needed (yet) by sid.
2858         (cgen-model.h): New function.
2859
2860 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2861
2862         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2863         * cpu/sh64-compact.cpu: Likewise.
2864         * cpu/sh64-media.cpu: Likewise.
2865
2866 2003-03-21  DJ Delorie  <dj@redhat.com>
2867
2868         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2869         which indicates if the sign flag is set from bit 15 or 7.
2870         Adjust all callers.
2871         (set-psw): New argument ws, propogate it.
2872         (set-psw-nowrite): Likewise.
2873         (set-mem-psw): Likewise.
2874         (set-psw-carry): Likewise.  Use temporaries to prevent
2875         prematurely overwriting needed inputs.
2876         (set-psw-rrotate17): Fix logic.
2877         (shrgrgr): Preserve carry for zero-bit shifts.
2878         (shrgrimm): Likewise.
2879         (shlgrgr): Likewise.
2880         (shlgrimm): Likewise.
2881         (asrgrgr): Likewise.
2882         (asrgrimm): Likewise.
2883         (reset): New.
2884
2885 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2886
2887         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2888
2889 2002-03-05  DJ Delorie  <dj@redhat.com>
2890
2891         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2892         prematurely overwriting needed inputs.
2893         (set-psw-sub): Likewise.
2894
2895 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2896
2897         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2898
2899 2003-02-18  DJ Delorie  <dj@redhat.com>
2900
2901         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2902         (movlmemimm): Just mask the address.
2903         (movhmemimm): Likewise.
2904         (movlmemgr): Likewise.
2905         (movhmemgr): Likewise.
2906         (set-psw): Always set the psw last.
2907         (set-psw-carry): Likewise.
2908         (set-psw-add): Likewise.
2909         (set-psw-sub): Likewise.
2910
2911         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2912         of 16 patterns from the set-psw-rotate17 function.
2913         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2914         movgriipostincgr, movgriipredecgr): Set psw correctly.
2915         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2916         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2917         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2918
2919 2003-02-11  Dave Brolley  <brolley@redhat.com>
2920
2921         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2922         @arch@_cgen-ifld_table.
2923         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2924         @arch@_cgen-ifld_table.
2925
2926 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2927
2928         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2929
2930 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2931
2932         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2933         empty ISAs.
2934
2935 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2936
2937         * utils-gen.scm (attr-int-gen-defn): Define.
2938
2939 2002-12-21  Doug Evans  <dje@sebabeach.org>
2940
2941         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2942         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2943
2944         * dev.scm (cload): Update location of .cpu files.
2945
2946 2002-12-19  Doug Evans  <dje@sebabeach.org>
2947
2948         * utils-sim.scm (gen-profile-sym): New fn.
2949         (<operand>,sbuf-profile-sym): New method.
2950         (<operand>,sbuf-profile-elm): Use it.
2951         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2952         of hardcoding symbol name.
2953         (<operand>,gen-profile-code): Ditto.
2954         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2955         symbol name.
2956
2957         * mode.scm (mode-sem-mode): New fn.
2958         * operand.scm (op:new-mode): Update. mode-name.
2959         (op-natural-mode?) New fn.
2960         * rtl.scm (hw): Set hw-name,mode-name.
2961
2962         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2963         Instead do:
2964         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2965         as size of IDESC-TABLE-VAR.
2966         (@prefix@_init_idesc_table): Ditto.
2967         * sim-model.scm (-gen-mach-defns): Ditto.
2968         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2969
2970         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2971
2972         * insn.scm (-parse-insn-format-symbol): Improve error message.
2973         (-parse-insn-format): Ditto.
2974
2975         * gen-all-sim: New script.
2976
2977 2002-12-16  DJ Delorie  <dj@delorie.com>
2978
2979         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2980
2981 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2982
2983         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2984         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2985         (parse_immediate16): Handle immediate16 values, which now include
2986         @hi(label) and @lo(label)
2987
2988 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2989
2990         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2991         Add braces and cast for union field.
2992         (gen-multi-ifield-nodes): Add braces and cast for union field.
2993         (cgen_operand_table): Similarly fix sentinel.
2994         (cgen_cpu_close): Constify "insns".  Formatting.
2995         (cgen-desc.c): Include xregex.h.
2996         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2997         Prototype.
2998         <opc.c>: Include safe-ctype.h.
2999         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
3000         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
3001         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
3002         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
3003         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
3004         (parse_addr16): Correct type of "value".  Formatting.
3005         (parse_addr16_p): Likewise.
3006         (parse_addr16_cjp): Likewise.
3007         (parse_lit8): Likewise.
3008         (parse_bit3): Formatting.
3009         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
3010         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
3011         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
3012         print_decimal.
3013         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
3014         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
3015         (print_dollarhex8): Likewise.
3016         (print_dollarhex16): Likewise.
3017         (print_dollarhex_addr16h): Likewise.
3018         (print_dollarhex_addr16l): Likewise.
3019         (print_dollarhex_p): Likewise.
3020         (print_dollarhex_cj): Likewise.
3021         (print_decimal): Likewise.
3022         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
3023
3024 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
3025
3026         * doc/rtl.texi (Model variants): Mention current limitations for
3027         unit inputs and outputs.
3028         (Hardware elements) <attribute PROFILE>: Be slightly more
3029         verbose.
3030         (Instructions) <timing>: input/output overrides have a direction
3031         operand.
3032
3033 2002-11-25  DJ Delorie  <dj@redhat.com>
3034
3035         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
3036
3037 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
3038
3039         * cpu/iq10.cpu: New file.
3040         * cpu/iq2000.cpu: Likewise.
3041         * cpu/iq2000.opc: Likewise.
3042         * cpu/iq2000m.cpu: Likewise.
3043
3044 2002-11-19  DJ Delorie  <dj@redhat.com>
3045
3046         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
3047
3048 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
3049
3050         * dev.scm: Call getenv with a string, not a symbol.
3051
3052 2002-10-08  Doug Evans  <dje@transmeta.com>
3053             Hans-Peter Nilsson  <hp@axis.com>
3054
3055         * types.scm (bitrange-overlap?): Handle lsb0?.
3056
3057 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
3058
3059         From Robert Cragie <rcc@jennic.com>:
3060         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
3061
3062 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
3063             Ben Elliston  <bje@redhat.com>
3064             John Healy  <jhealy@redhat.com>
3065             Jeff Johnston  <jjohnstn@redhat.com>
3066             Alan Lehotsky  <alehotsky@redhat.com>
3067             Ubicom Inc. <SupportDesk@ubicom.com>
3068
3069         * cpu/ip2k.cpu: New file.
3070         * cpu/ip2k.opc: Likewise.
3071
3072 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
3073
3074         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
3075
3076 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
3077
3078         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
3079         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
3080         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
3081         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
3082         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
3083         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
3084         (-sthi-byte): If there is a single byte to store, store it at
3085         proper address.
3086         (sthil, sthiq): Fix big-endian behaviour.
3087         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
3088         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
3089         (saturate): Use Dimode to check if saturation operation is required.
3090         (usaturate): Likewise.
3091         (mpermw): Fix mask.
3092         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
3093         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
3094         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
3095         (msadubq): Fix subword index in second operand of first subtraction.
3096
3097 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
3098
3099         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
3100         code.
3101
3102 2002-06-18  Dave Brolley  <brolley@redhat.com>
3103
3104         * cpu/frv.cpu: New cpu description.
3105         * cpu/frv.opc: New cpu support code.
3106
3107 2002-05-21  Dave Brolley  <brolley@redhat.com>
3108
3109         * decode.scm (-opcode-slots): Don't consider bits beyond the
3110         length of the insn.
3111
3112 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
3113
3114         * cpu/powerpc.cpu: New file.
3115
3116 2002-05-01  Graydon Hoare  <graydon@redhat.com>
3117
3118         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3119
3120 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
3121
3122         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3123         results are expanded recursively.
3124
3125 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
3126
3127         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3128         call scan-symbol on it, to enable recursive macro-expansion.
3129
3130 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
3131
3132         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3133         for multiple-isa configurations.
3134         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3135
3136 2002-02-04  Ben Elliston  <bje@redhat.com>
3137
3138         * cpu/sh.cpu, cpu/sh.opc: New files.
3139         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3140
3141 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
3142
3143         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3144         (Enumerated constants): Mention that an ifield must not specify a
3145         multi-ifield.
3146         (Instruction operands): Ditto for index.
3147         (Expressions) <parallel>: Remove misplaced mention of local
3148         variables.
3149         <if>: Mention that mode must be specified and non-VOID when the
3150         result is used.
3151
3152 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
3153
3154         * doc/porting.texi: When referring to *.opc, mention they are in
3155         the cpu subdir.  Call top-level directory toplevel, not devo.
3156         Close string in define-normal-insn example.
3157
3158         * doc/pmacros.texi: Fix .substr typo to .substring.
3159         Mention that .sym expansions are not further expanded.
3160
3161 2002-01-22  Graydon Hoare  <graydon@redhat.com>
3162
3163         * desc-cpu.scm (ifld-number-cache): Add.
3164         (ifld-number): Add.
3165         (gen-maybe-multi-ifld-of-op): Add.
3166         (gen-maybe-multi-ifld): Add.
3167         (gen-multi-ifield-nodes): Add.
3168         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3169
3170 2002-01-10  matthew green  <mrg@redhat.com>
3171
3172         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3173         (gr-Rb-names): ... to this.
3174         (h-Rb): New hardware piece.
3175         (h-Rbj): Use gr-Rb-names.
3176         (Rb): Use h-Rb.
3177         (holdx): New instruction.
3178
3179 2002-01-07  Ben Elliston  <bje@redhat.com>
3180
3181         * utils.scm (package-cygnus-simulators): Rename from this ..
3182         (package-red-hat-simulators): .. to this.
3183         * opcodes.scm (option-set!): Use package-red-hat-simulators.
3184         * sid-cpu.scm (cgen-desc.h): Likewise.
3185         (cgen-cpu.h): Likewise.
3186         (cgen-defs.h): Likewise.
3187         (cgen-write.cxx): Likewise.
3188         (cgen-semantics.cxx): Likewise.
3189         (cgen-sem-switch.cxx): Likewise.
3190         * sid-decode.scm (cgen-decode.h): Likewise.
3191         (cgen-decode.cxx): Likewise.
3192         * sid-model.scm (cgen-model.cxx): Likewise.
3193         * sid.scm (option-set!): Likewise.
3194         * sim.scm (option-set!): Likewise.
3195
3196 2002-01-07  Ben Elliston  <bje@redhat.com>
3197
3198         * utils.scm (copyright-fsf): Add 2002.
3199         (copyright-cygnus): Rename to copyright-red-hat.
3200         (copyright-red-hat): Add 2002.
3201         (CURRENT-COPYRIGHT): Update comment.
3202         * opcodes.scm (option-set!): Update callers.
3203         * sid-model.scm (cgen-model.cxx): Likewise.
3204         * sid-cpu.scm: Likewise.
3205         * sid-decode.scm: Likewise.
3206         * sid.scm (option-set!): Handle "redhat" as an option for
3207         "copyright"; use copyright-red-hat.
3208         * sim.scm (option-set!): Likewise.
3209
3210 2002-01-03  Dave Brolley  <brolley@redhat.com>
3211
3212         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3213         number of insns in the list.  Update the population count function to
3214         identify and prioritize 3 catgories of useful bits.
3215         (-population-top-few): Don't consider bits with a population count of
3216         zero.
3217         (-build-decode-table-entry): Don't call
3218         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
3219         identical insns at the next tree level.
3220         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3221         this function is no longer used.
3222         (filter-non-specialized-ambiguous-insns): New function.
3223         (filter-identical-ambiguous-insns): New function.
3224         (find-identical-insn): New function.
3225         (filter-harmlessly-ambiguous-insns): Removed.
3226
3227 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
3228             matthew green  <mrg@redhat.com>
3229             Frank Ch. Eigler  <fche@redhat.com>
3230             Nick Clifton  <nickc@cambridge.redhat.com>
3231
3232         * cpu/xstormy16.cpu: New file.
3233         * cpu/xstormy16.opc: New file.
3234
3235 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
3236
3237         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3238
3239 2001-11-14  Dave Brolley  <brolley@redhat.com>
3240
3241         * utils-gen.scm (-gen-extract-word): Correct computation of the length
3242         of the field being extracted.
3243
3244 2001-10-29  Johan Rydberg  <johan@rydberg.com>
3245
3246         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3247         (cos ...) and (sin ..) rtx.
3248
3249 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
3250
3251         * desc-cpu.scm: Do not include ctype.h in generated desc
3252         files.  They will inherit safe-ctype.h instead.
3253
3254 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
3255
3256         * desc-cpu.scm: Add missing function prototypes (for generated
3257         C files).  Fix compile time warning messages about unused
3258         parameters (for generated C files).
3259         * opc-asmdis.scm: The same.
3260         * opc-ibld.c: The same.
3261         * opc-itab.scm: The same.
3262         * cpu/fr30.opc: The same.
3263         * cpu/m32r.opc: The same.
3264         * cpu/openrisc.opc: The same.
3265
3266 2001-09-17  graydon hoare  <graydon@redhat.com>
3267
3268         * insn.scm (syntax-break-out): Correct logic in handling escaped
3269         syntax characters.
3270
3271 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
3272
3273         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3274         call @arch@_cgen_build_insn_regex now that regex support is in
3275         libiberty.
3276
3277 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
3278
3279         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3280         (mask-superset?): Look for strict supersets to allow rejection of
3281         duplicate insns.
3282
3283 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3284
3285         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3286         (cgen-desc.h): Call it.
3287         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3288         decode-size.
3289         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3290         entire_insn for extraction, if it's shorter than base-insn-bitsize.
3291
3292 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
3293
3294         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3295         mach->cpu insn-chunk-bitsize.
3296         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3297         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3298         * mach.scm (<cpu>): New field insn-chunk-bitsize.
3299         (-cpu-parse, -cpu-read): Parse/initialize it.
3300         * doc/rtl.texi (define-cpu): Document it.
3301
3302 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
3303
3304         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3305
3306 2001-07-06  Ben Elliston  <bje@redhat.com>
3307
3308         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3309
3310 2001-07-05  Ben Elliston  <bje@redhat.com>
3311
3312         * README: Update.
3313
3314         * read.scm (include): Include files from srcdir/cpu.
3315         (-cgen): Likewise for loading .cpu files.
3316         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3317         * *.cpu: Move all cpu descriptions into cpu subdirectory.
3318         * *.opc: Likewise.
3319         * simplify.inc: Likewise.
3320
3321 2001-07-04  Ben Elliston  <bje@redhat.com>
3322
3323         * read.scm (include): Log "Including file" message at level 1,
3324         rather than outputting it with (display).
3325         (cpu-load): Log "Loading cpu description" and "Processing cpu
3326         description" messages at levels 1 and 2, respectively, rather than
3327         using (display).
3328
3329 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
3330
3331         * desc.scm (<keyword> 'gen-defn): Add extra zero into
3332         CGEN_KEYWORD_ENTRY initializers.
3333
3334         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3335         (<operand> 'test-data): Involve both the index and the hardware
3336         in testcase generation.
3337         (<hw-indx> 'test-data): Generate test data from the underlying
3338         object.
3339         (<ifield> 'test-data): Generate test data by computing bit
3340         patterns for the field, then decoding them.
3341         (<hw-address> 'test-data): Allow for new calling convention.
3342         (<hw-iaddress> 'test-data): Likewise.
3343         (<keyword> 'test-data): Convert index values into keywords.
3344         (<hw-asm> 'test-data): Convert index values into integer strings.
3345
3346         * gas-test.scm (cgen-build.sh): Escape '.' as well.
3347
3348 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
3349
3350         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3351         is required for multi-mode hw types (memory).
3352
3353 2001-05-11  Ben Elliston  <bje@redhat.com>
3354
3355         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3356         when generating allinsn.d from objdump output. Without it, the
3357         testsuite will treat $ as the regular expression for end of line.
3358
3359 2001-05-09  Ben Elliston  <bje@redhat.com>
3360
3361         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3362         with `cgen_cpu_open'; documentation had become out of date.
3363         * doc/rtl.texi (Instruction operands): Likewise.
3364
3365 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
3366
3367         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3368         various-base-length instruction sets.
3369
3370 2001-04-02  Ben Elliston  <bje@redhat.com>
3371
3372         * sid-cpu.scm (-last-insn): New function.
3373         (-gen-sem-switch-engine): Loop through idesc while less than or
3374         equal to the last instruction enum, not less than the MAX enum.
3375         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3376         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3377         table's size to be the last instruction enum plus one, not
3378         @PREFIX@_INSN_MAX.
3379         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3380         instruction onto the instruction list.
3381
3382         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3383         using the size of the table and its elements.
3384         (-gen-decode-insn-globals): Define the idesc table's size to be
3385         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3386         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3387         last instruction enum plus one, not @CPU@_INSN_MAX.
3388
3389 2001-03-28  Ben Elliston  <bje@redhat.com>
3390
3391         * doc/version.texi (UPDATED, EDITION): Update.
3392         * doc/stamp-vti: Likewise.
3393
3394 2001-03-26  Ben Elliston  <bje@redhat.com>
3395
3396         * doc/credits.texi (Credits): Update.
3397
3398         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3399         specified prefix and, if necessary, escape `$' in gas-build.sh to
3400         prevent unwanted shell variable expansion.
3401
3402 2001-03-24  Ben Elliston  <bje@redhat.com>
3403
3404         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3405         (<keyword>,test-data): Likewise.
3406         (<hw-address>,test-data): Likewise.
3407         (<hw-iaddress>,test-data): Likewise.
3408         (-collate-test-set): New function.
3409         (build-test-set): Use it.
3410         (gen-gas-test): Generate five test cases per instruction.
3411         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3412
3413         * read.scm: Load "slib/random" if random is not defined.
3414         * slib/random.scm: New file.
3415
3416         * utils.scm: Remove comments about the Hobbit compiler.
3417         (copyright-cygnus): Add 2001.
3418         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3419         (package-gnu-simulators): Tidy.
3420
3421 2001-03-23  Ben Elliston  <bje@redhat.com>
3422
3423         * cgen-gas.scm: Inline documentation improvements.
3424
3425 2001-03-21  Ben Elliston  <bje@redhat.com>
3426
3427         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3428         given in a syntax string is undefined.
3429
3430         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3431         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3432
3433 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
3434
3435         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3436         for arg_type CGEN_CPU_OPEN_BFDMACH.
3437
3438 2001-03-20  Ben Elliston  <bje@redhat.com>
3439
3440         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3441         instruction onto the instruction list. Define MAX_INSNS to be the
3442         value of the last instruction enum plus one.
3443
3444 2001-03-14  Nick Clifton  <nickc@redhat.com>
3445
3446         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
3447
3448 2001-03-05  Dave Brolley  <brolley@redhat.com>
3449
3450         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3451         if the number of ifields is greater than zero.
3452
3453 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3454
3455         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3456         Emit LIKELY/UNLIKELY branch probability hints.
3457         * sid-decode.cpu (-gen-record-args): Ditto.
3458
3459 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3460
3461         * desc-cpu.scm (-gen-hash-defines): Rename
3462         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3463
3464 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3465
3466         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3467         writeback tracking.
3468         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3469         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3470         if unnecessary.
3471         * sid.scm (<operand> gen-write): Use unsigned long long expression
3472         for writeback.
3473         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3474         (<unit> gen-profile-code): Ditto.
3475
3476 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3477
3478         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3479         (regno ...) rtx.
3480
3481 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3482
3483         * operand.scm (<operand> pretty-sem-name): New field.
3484         (<operand> make): Initialize it from hw-name.
3485         (op:set-pretty-sem-name!): New function.
3486         (<operand> gen-pretty-name): Default to fetching new field.
3487         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3488         sem-name setting from -rtx-hw-name.
3489
3490 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3491
3492         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3493         its subsequent gen-pretty-name.
3494
3495         * read.scm: Increase thread working stack limit and backtrace
3496         depth limits.
3497
3498 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3499
3500         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3501
3502 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3503
3504         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3505         current insn plus 4.
3506         (h-delay-insn): New hardware register.
3507         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3508         (l-jalr): Likewise.
3509         (l-bal): Likewise.
3510
3511         * openrisc.opc (parse_hi16): Sign extend value.
3512         (parse_lo16): Likewise.
3513
3514 2001-01-06  Ben Elliston  <bje@redhat.com>
3515
3516         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3517         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3518         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3519         (-gen-semantic-fn-table): Likewise.
3520         (-gen-scache-semantic-fn): Likewise.
3521         (-gen-no-scache-semantic-fn): Likewise.
3522         (cgen-read.c): Likewise.
3523         (cgen-sem-switch.c): Likewise.
3524         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3525         is a filename prefix.
3526         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3527         (-gen-decode-insn-globals): Likewise.
3528         (-gen-idesc-decls): Likewise.
3529         (cgen-decode.h): Likewise.
3530         (cgen-decode.c): Likewise.
3531         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3532         (gen-cpu-insn-enum): Likewise.
3533         (sim-finish!): Likewise.
3534
3535 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3536
3537         * openrisc.cpu: New file.
3538         * openrisc.opc: Likewise.
3539
3540 2000-12-12  Ben Elliston  <bje@redhat.com>
3541
3542         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3543
3544 2000-12-07  Ben Elliston  <bje@redhat.com>
3545
3546         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3547         "insn" when there are zero ifields to extract.
3548
3549 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3550
3551         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3552         used by simple/non-scache simulators.
3553         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3554         regardless of with-scache?.
3555         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3556
3557 2000-12-03  Ben Elliston  <bje@redhat.com>
3558
3559         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3560         (cgen-desc.c): Likewise.
3561
3562 2000-12-01  Greg McGary  <greg@mcgary.org>
3563
3564         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3565
3566 2000-12-01  Ben Elliston  <bje@redhat.com>
3567
3568         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3569         definitions if run without with-multipla-isa?.
3570         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3571         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3572
3573 2000-11-24  Ben Elliston  <bje@redhat.com>
3574
3575         * sim-cpu.scm (-gen-hardware-struct): New function.
3576         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3577         hardware elements wich have share one or more ISAs with the ISAs
3578         being kept.
3579
3580         * sim.scm (-with-multiple-isa?): New symbol.
3581         (with-multiple-isa?): New function.
3582         (option-init!): Initialise -with-multiple-isa?.
3583         (option-set!): Handle with-multiple-isa option.
3584
3585 2000-11-21  Ben Elliston  <bje@redhat.com>
3586
3587         * utils.scm (copyright-fsf): Add the year 2000.
3588
3589 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3590
3591         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3592         unneeded "\n\n" from F() macro definition.
3593
3594 2000-11-15  Greg McGary  <greg@mcgary.org>
3595
3596         * utils-cgen.scm (gen-define-with-symcat): New function.
3597         * desc-cpu.scm (gen-ifld-defns): Use it.
3598         (gen-hw-table-defns): Use it.
3599         (-gen-hash-defines): Use it.
3600         (gen-operand-table): Use it.
3601         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3602         * opc-itab.scm (-gen-ifmt-table): Use it.
3603         (-gen-insn-opcode-table): Use it.
3604         (-gen-macro-insn-table): Use it.
3605         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3606         * sim-cpu.scm (cgen-semantics.c): Use it.
3607         (cgen-sem-switch.c): Use it.
3608
3609 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3610
3611         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3612         request to emit calls to insn extractors as functions rather than
3613         branches to inline blocks.
3614         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3615         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3616
3617         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3618         to extractor clauses.
3619
3620 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3621
3622         * decode.scm (-distinguishing-bit-population): Significantly
3623         improve popularity heuristic.  Renamed from
3624         (-mask-bit-population): Gone.
3625         (-population-above-threshold): Sort new bit numbers in order of
3626         popularity.
3627         (-population-top-few): Allow up to three more bits to be selected
3628         than requested.  Correct selection order to prefer better bits.
3629         Correct bug in fewer-than-requested case.  Keep threshold as
3630         floating-point.
3631         (decode-best-get-bits): Pass also the insn-values.
3632
3633         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3634         future optimization.
3635
3636         * utils.scm (message): Format nested lists better.
3637
3638 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3639
3640         * dev.scm: Add srcdir to %load-path.
3641
3642         * rtx-funcs.scm (subword): Mode of argument can be different
3643         than mode of result, so don't use OP0 to specify argument's mode.
3644
3645 2000-11-02  Ben Elliston  <bje@redhat.com>
3646
3647         * doc/porting.texi (Building a GAS test suite): Document my change
3648         to gas-build.sh.
3649
3650 2000-11-01  Ben Elliston  <bje@redhat.com>
3651
3652         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3653
3654 2000-10-31  Ben Elliston  <bje@redhat.com>
3655
3656         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3657         with no command line arguments if the gas build directory can be
3658         determined.
3659
3660 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3661
3662         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3663         op-ifld -> op-ifield.
3664
3665 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3666
3667         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3668
3669 2000-10-13  matthew green  <mrg@cygnus.com>
3670
3671         * utils-cgen.scm (get-ifetch): Move from here ...
3672         * sim.scm (get-ifetch): ... to here.
3673         * sid.scm (get-ifetch): Copy and port to c++.
3674
3675 2000-10-06  Dave Brolley  <brolley@redhat.com>
3676
3677         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3678         ifld-start + ifld-word-offset.
3679         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3680         the field is beyond the base number of bits.
3681         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3682         (gen-extract-ifields): Ditto.
3683         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3684         characters in the regular expression.
3685
3686 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3687
3688         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3689         preprocessor constant.
3690
3691 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3692
3693         * slib/logical.scm: New file from slib.  Provides robust bitwise
3694         logical operations for large integers.
3695         * read.scm: maybe-load it.
3696
3697 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3698
3699         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3700         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3701         single-isa predicate, but support keep-isa filtering.
3702
3703 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3704
3705         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3706         statement-expression and comma-expression contexts.
3707         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3708
3709 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3710
3711         * decode.scm (-population-top-few): Signal error gracefully if
3712         decoding is about to become ambiguous.
3713
3714 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3715
3716         * doc/rtl.texi (decode-assist): Describe this field as optional.
3717
3718 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3719
3720         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3721         with decode proc.
3722
3723 2000-09-05  Dave Brolley  <brolley@redhat.com>
3724
3725         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3726         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3727
3728 2000-08-29  Dave Brolley  <brolley@redhat.com>
3729
3730         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3731         adata-integral-insn is true for this architecture.
3732
3733 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3734
3735         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3736         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3737         * rtl-c.scm (-c-rtl-get): Improve an error message.
3738         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3739
3740 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3741
3742         * Makefile.in (DIST_COMMON): Regenerated.
3743         * ifield.scm (<derived-ifield> needed-iflds): New method.
3744         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3745         sfmts built from <derived-ifield>s.
3746         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3747         type symbol 'derived-ifield, not an unparseable string.
3748         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3749         (-sfmt-contents): Add tracing.
3750
3751         From Doug Evans <dje@transmeta.com>:
3752         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3753         C code.
3754
3755 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3756
3757         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3758         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3759         (-rtl-c-get): Rename from rtl-c-get.
3760         (rtl-c-get): New fn for getter logging.
3761
3762 2000-07-28  Ben Elliston  <bje@redhat.com>
3763
3764         * NEWS: Update.
3765
3766 2000-07-25  Ben Elliston  <bje@redhat.com>
3767
3768         * doc/credits.texi (Credits): Add Frank Eigler.
3769
3770 2000-07-24  Dave Brolley  <brolley@redhat.com>
3771
3772         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3773         fully.
3774         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3775         (<keyword>): Initialize all elements fully.
3776         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3777         fully.
3778         (-gen-mach-table-defns): Ditto.
3779         (-gen-ifld-defns): Ditto.
3780         (-gen-operand-table): Ditto.
3781         (-gen-insn-table): Ditto.
3782         (-gen-cpu-open): Nothing to do for the mach table.
3783
3784 2000-07-13  Ben Elliston  <bje@redhat.com>
3785
3786         * doc/version.texi (UPDATED): Update.
3787
3788 2000-07-05  Ben Elliston  <bje@redhat.com>
3789
3790         * configure.in (AC_PATH_PROG): Remove.
3791         * configure: Regenerate.
3792         * Makefile.am (GUILE): Locate guile dynamically.
3793         * Makefile.in: Regenerate.
3794         * doc/Makefile.in: Likewise.
3795
3796 2000-07-03  Ben Elliston  <bje@redhat.com>
3797
3798         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3799         * opc-itab.scm (cgen-opc.c): Likewise.
3800
3801 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3802
3803         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3804         guile 1.4 compatibility.
3805         (rtx-env-dump): Comment out buggy display calls.
3806
3807 2000-06-15  matthew green  <mrg@redhat.com>
3808
3809         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3810
3811 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3812
3813         * Makefile.in: Regenerated.
3814
3815         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3816         (gen-ifld-defns): Ditto.
3817         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3818         * rtl.c (rtl-finish!): Ditto.
3819         * opc-itab.scm (-gen-ifield-decls): Ditto.
3820         * opcodes.scm (gen-switch): Exclude derived operands.
3821         * operand.scm (op-iflds-used): Expand derived operands.
3822         (hw-index-derived): New dummy function to create dummy object.
3823         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3824         constructor.  Set object's hw-name and index fields.
3825         (-anyof-merge-subchoices): Set instance object's index also.
3826         (-anyof-name): New helper function.
3827         (anyof-merge-semantics): Correct replacement of operand names in
3828         anyof instance.
3829         (op-ifield): Tolerate derived-operands and their funny indices better.
3830         * ifield.scm (ifld-known-values): Expand derived ifields.
3831         (non-multi-ifields, non-derived-ifields): New utility functions.
3832         (ifld-decode-mode): Tolerate objects with unbound decode field.
3833         * iformat.scm (compute-insn-length): Expand derived ifields.
3834         (compute-insn-base-mask): Ditto.
3835         * insn.scm (insn-base-ifields): Remove.
3836         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3837         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3838         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3839         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3840         (-frag-test-data): Ditto.
3841         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3842         (-gen-sem-switch-engine); Ditto.
3843         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3844         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3845         (-gen-record-args): Tolerate unbound op-ifield.
3846         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3847         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3848         Exclude multi-insns.
3849         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3850         * utils-sim.scm (op-extract?): Handle derived operands.
3851
3852         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3853         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3854         * hardware.scm (hardware-for-mode): New function.
3855
3856         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3857         cleaning up decode tables.
3858         (mask-superset?): Little helper function for above.
3859         * decode.scm (-build-decode-table-entry): Call it.
3860         (-opcode-slots): Add some more tracing.
3861         * arm.cpu: Disable decode-splits construct due to implementation
3862         conflict with `filter-harmlessly-ambiguous-insns'
3863
3864         * decode.scm (-population-top-few): New function for better decode
3865         bit generation.  Includes minor helper functions.
3866         (decode-get-best-bits): Call it instead.
3867         (OLDdecode-get-best-bits): Renamed previous version of above.
3868
3869
3870 2000-06-13  Ben Elliston  <bje@redhat.com>
3871
3872         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3873         for the Guile library directory.
3874         * configure: Regenerate.
3875         * Makefile.in, doc/Makefile.in: Regenerate.
3876
3877         * Makefile.in, doc/Makefile.in: Regenerate.
3878         * configure.in: Remove unnecessary tests. Move to version 1.0.
3879         * acconfig.h, config.in: Remove.
3880         * configure, aclocal.m4: Regenerate.
3881         * doc/stamp-vti, doc/version.texi: Likewise.
3882         * AUTHORS: New file.
3883
3884 2000-06-07 Ben Elliston  <bje@redhat.com>
3885
3886         * fixup.scm (symbol-bound?): Reduce debugging output.
3887
3888 2000-06-02  matthew green  <mrg@redhat.com>
3889
3890         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3891         a given instruction, replacing derived fields with their subfields.
3892         (insn-value): Use `insn-base-ifields' to find all constant values.
3893         (multi-insn-instantiate!): Comment some debug messages.
3894
3895 2000-06-01  Ben Elliston  <bje@redhat.com>
3896
3897         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3898         symbol names used in a (c-call ..) rtx.
3899
3900         * sim-test.scm (build-test-set): Return (()) for an instruction
3901         with no operands, so it too is included in the generated test set.
3902
3903 2000-05-31  Ben Elliston  <bje@redhat.com>
3904
3905         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3906         (sim-test): Likewise.
3907         * Makefile.in: Regenerate.
3908
3909 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3910
3911         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3912         stack traceback, in an order that resembles gdb's `bt'.
3913
3914 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3915
3916         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3917         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3918         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3919         multi insns.
3920         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3921         virtual functions.
3922         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3923         * iformat.scm (ifmt-expanded-ifields): Gone.
3924         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3925         work.
3926         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3927         ifmt entries.
3928
3929         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3930         code.
3931
3932 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3933
3934         * sid.scm (with-any-profile?): New function clone.
3935
3936 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3937
3938         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3939
3940 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3941
3942         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3943         (-multi-ifield-read): Parse them.
3944         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3945         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3946         (multi-ifield gen-extract): Add decode hook.
3947         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3948
3949         * insn.scm (syntax-break-out): More correctly handle \-escaped
3950         syntax characters.
3951         (syntax-make-elements): Ditto.
3952         * opc-itab.scm (compute-syntax): Ditto.
3953
3954 2000-05-17  Ben Elliston  <bje@redhat.com>
3955
3956         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3957
3958 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3959
3960         * gas-test.scm (build-test-set): Return (()) for an instruction
3961         with no operands, so it too is included in the generated test set.
3962
3963 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3964
3965         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3966         IFMT_OPERANDS and SYNTAX_BYTES.
3967
3968 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3969
3970         * sim.scm (with-any-profile?): New function.
3971         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3972         to decide whether or not to include profiling counters.
3973
3974 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3975
3976         Fuller derived-operand support for opcodes.
3977         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3978         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3979         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3980         (gen-operand-table): Omit derived- and anyof- operands from table.
3981         (gen-insn-table): Omit multi-insns from table.
3982         * iformat.scm (ifmt-expanded-fields): New function to expand
3983         subfields of derived-ifields.
3984         (ifmt-compute!): Ignore remaining multi-insns.
3985         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3986         multi-insns.
3987         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3988         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3989         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3990         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3991         (gen-switch): Omit anyof-operands.
3992         * operand.scm (-anyof-syntax): New function.
3993         (-anyof-merge-syntax): Call it.
3994         * utils.scm (collect): New idiomatic function.
3995
3996 2000-05-10  Ben Elliston  <bje@redhat.com>
3997
3998         * m68k.cpu: New file (work in progress).
3999
4000 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
4001
4002         * Makefile.am (all-local): New target.  Create stamp-cgen.
4003         * Makefile.in: Regenerated.
4004         * doc/Makefile.in: Regenerated.
4005
4006 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
4007
4008         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
4009         (-operand-parse-setter): Ditto.
4010         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
4011         for CACHE-ADDR operands.
4012         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
4013         trace entries.  Widen byte-wide values for printing.
4014         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
4015         Widen byte-wide values for printing.  Hexify memory addresses.
4016
4017 2000-04-23  matthew green  <mrg@redhat.com>
4018
4019         * m32r.cpu: Fix a typo.
4020
4021 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
4022
4023         * ia64.cpu (define-model): Change merced to Itanium.
4024         (f-qp): Change quilifying to qualifying.
4025         (movbr_ph, movbr_pvec): Delete.
4026         (I-I21): Delete uses of movbr_ph and movbr_pvec.
4027
4028 2000-04-07  Ben Elliston  <bje@redhat.com>
4029
4030         * doc/porting.texi (Building a simulator test suite): Clarify
4031         where generated test cases are placed.
4032
4033 2000-04-07  Ben Elliston  <bje@redhat.com>
4034
4035         * Makefile.am (gas-test): Remove dependency on `cgen'.
4036         (sim-test): Ditto.
4037         * Makefile.in: Regenerate.
4038
4039 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
4040
4041         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
4042         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
4043         type reconfiguration.
4044         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
4045         with-profile?.
4046
4047 2000-03-30  Ben Elliston  <bje@redhat.com>
4048
4049         * doc/rtl.texi (Enumerated constants): Add concept index entries.
4050
4051 2000-03-24  Ben Elliston  <bje@redhat.com>
4052
4053         * Makefile.am (stamp-cgen): Reinstate target.
4054         * Makefile.in: Regenerate.
4055
4056 2000-03-22  Ben Elliston  <bje@redhat.com>
4057
4058         * slib/ppfile.scm: Remove; unused.
4059         * slib/defmacex.scm: Likewise.
4060
4061 2000-03-21  Ben Elliston  <bje@redhat.com>
4062
4063         * doc/internals.texi (Source file overview): Document.
4064
4065         * Makefile.am (GUILEDIR): Remove.
4066         (CGEN): Ditto. Callers use $(GUILE) instead.
4067         (GUILEFLAGS): Ditto.
4068         (CGENFILES): Ditto.
4069         (APPDESCFILES): Ditto.
4070         (OPCODESFILES): Ditto.
4071         (SIMFILES): Ditto.
4072         (pkgdata_SCRIPTS): Ditto.
4073         (stamp-cgen): Remove target.
4074         * Makefile.in: Regenerate.
4075
4076         * configure.in: Remove header and library tests.
4077         * configure: Regenerate.
4078         * config.in: Likewise.
4079
4080 2000-03-20  Ben Elliston  <bje@redhat.com>
4081
4082         * read.scm: Cease loading "hob-sup.scm".
4083         * utils.scm: Inherit the fastcall family of procedures (for now).
4084         * hob-sup.scm: Remove.
4085
4086 2000-03-20  Ben Elliston  <bje@redhat.com>
4087
4088         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
4089         * configure: Regenerate.
4090         * gdbinit.in: Remove.
4091
4092 2000-03-17  Ben Elliston  <bje@redhat.com>
4093
4094         * Makefile.am (CGEN): Use guile, not cgen.
4095         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
4096         (bin_PROGRAMS, cgen_SOURCES): Likewise.
4097         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
4098         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
4099         (HOB_OBJS): Likewise.
4100         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
4101         (CGENOBJS): Likewise.
4102         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
4103         (hobbit, hobbit.o, hobbit.c): Remove targets.
4104         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
4105         (CLEANFILES): Update.
4106         * acconfig.h (WITH_HOBBIT): Remove.
4107         * configure.in: Do not test for 3 arg scm_make_vector. Remove
4108         option --with-cgen-hobbit.
4109         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
4110         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
4111         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
4112         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
4113         * Makefile.in: Regenerate.
4114         * config.in: Likewise.
4115         * aclocal.m4: Likewise.
4116         * configure: Likewise.
4117         * README (Hobbit support): Remove.
4118         * doc/internals.texi (Conventions): Do not mention Hobbit.
4119         * doc/porting.texi (Supported Guile versions): Likewise.
4120
4121 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
4122
4123         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4124         callback convention to new sid sidutil::basic_cpu code.
4125         (-gen-sfrag-engine-fn): Ditto.
4126         * sid.scm (-create-virtual-insns!): Ditto.
4127         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4128         mode.
4129         (cxmake-skip): Implement properly for pbb mode.
4130
4131 2000-03-03  Ben Elliston  <bje@redhat.com>
4132
4133         * doc/internals.texi: New file.
4134
4135 2000-02-29  Ben Elliston  <bje@redhat.com>
4136
4137         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4138         * doc/porting.texi: Formatting tweaks.
4139
4140 2000-02-25  Nick Clifton  <nickc@cygnus.com>
4141
4142         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4143         field.
4144
4145 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
4146
4147         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4148         mode.
4149
4150 2000-02-23  Andrew Haley  <aph@cygnus.com>
4151
4152         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4153         instruction.
4154
4155 2000-02-24  Ben Elliston  <bje@redhat.com>
4156
4157         * doc/rtl.texi (Derived operands): Add some cindex entries.
4158
4159 2000-02-23  Ben Elliston  <bje@redhat.com>
4160
4161         * ia32.cpu (dndo): Move general purpose macro from here ..
4162         * simplify.inc (dndo): .. to here.
4163
4164 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
4165
4166         * arm.cpu (h-tbit): Add c-call setter function.
4167         (h-mbits): Ditto.
4168
4169 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
4170
4171         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4172         (-frag-cost-compute!): Ditto.
4173         * utils.scm (copyright-cygnus): Add Y2K.
4174         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4175
4176 2000-01-25  Nick Clifton  <nickc@cygnus.com>
4177
4178         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4179         flags field of the CGEN_CPU_TABLE structure.
4180
4181 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
4182
4183         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4184         All references updated.
4185
4186 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
4187
4188         * ia32.cpu: Rewrite addressing mode support.
4189
4190         * ifield.scm (<ifield>): New member `follows'.
4191         (ifld-known-values): New proc.
4192         (<ifield>): New method set-word-offset!.
4193         (ifld-set-word-offset!): New proc.
4194         (ifld-new-word-offset): New proc.
4195         (<ifield>): New method next-word.
4196         (<multi-ifield>): New method next-word.
4197         (ifld-next-word): New proc.
4198         (ifld-precedes?): New proc.
4199         (-ifield-parse): New args word-offset,word-length,follows.
4200         All callers updated.  Handle CISC-style vs RISC-style ifields.
4201         (-ifield-read): Recognize word-offset,word-length,follows specs.
4202         (-ifld-parse-follows): New proc.
4203         (-multi-ifield-make-default-insert): New proc.
4204         (-multi-ifield-make-default-extract): New proc.
4205         (-multi-ifield-parse): Provide default values for insert,extract
4206         handlers if not specified.
4207         (<derived-ifield>): New class.
4208         (derived-ifield?): New predicate.
4209         (ifld-derived-operand?): New predicate.
4210         (f-anyof): New global.
4211         (ifld-anyof?,ifld-anyof-operand?): New predicates.
4212         (f-derived,ifld-derived?): Delete.
4213         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
4214         * insn.scm (-sub-insn-ifields): New proc.
4215         (-sub-insn-make!): New proc.
4216         (multi-insn-instantiate!): Provide initial implementation.
4217         (-insn-parse): If insn contains "anyof" operands, create a
4218         <multi-insn> object instead of a plain <insn>.
4219         (-parse-insn-format-symbol): Rewrite derived operand handling.
4220         Add anyof operand handling.
4221         (-parse-insn-format-ifield-spec): Rewrite.
4222         (-parse-insn-format-operand-spec): Delete.
4223         (-parse-insn-format-list): Delete support for `(operand value)'.
4224         (anyof-operand-format?): Replaces derived-operand-format?.
4225         * operand.scm (-operand-parse-getter): Improve error messages.
4226         (-operand-parse-setter): Ditto.
4227         (<derived-operand>): New members args,syntax,base-ifield,encoding,
4228         ifield-assertion.
4229         (<anyof-operand>): Change baseclass from <derived-operand> to
4230         <operand>.  Delete member values.  New members base-ifield,choices.
4231         (anyof-operand?): New predicate.
4232         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4233         (-derived-operand-parse): Rewrite.
4234         (-derived-operand-read): Rewrite.
4235         (-anyof-parse-choice): New proc.
4236         (-anyof-operand-parse): Rewrite.
4237         (-anyof-operand-read,define-anyof-operand): New procs.
4238         (<anyof-value>): Rewrite.
4239         (-anyof-initial-known): New proc.
4240         (anyof-satisfies-assertions?): New proc.
4241         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4242         (-anyof-merge-getter,-anyof-merge-setter): New procs.
4243         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4244         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4245         (-anyof-value-from-derived): New proc.
4246         (-anyof-all-choices-1,anyof-all-choices): New procs.
4247         (operand-init!): Create define-anyof-operand reader command.
4248
4249         * insn (syntax-break-out): Take syntax as argument instead of insn.
4250         All callers updated.
4251         (syntax-make): Move here, from ???.
4252
4253         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4254         bitrange-foo. All uses updated.
4255         (bitrange-next-word): New proc.
4256
4257         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4258
4259         * rtl.scm (rtx-canonicalize): Provide initial implementation.
4260         (rtx-make-const,rtx-make-enum): New procs.
4261         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
4262         (rtx-mem-addr,rtx-mem-sel): New procs.
4263         (rtx-change-address): New proc.
4264         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4265         (rtx-make-set,rtx-single-set?): New procs.
4266         (rtx-combine): New proc.
4267
4268         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
4269         (rtx-traverse-with-locals): Ditto.
4270         (-rtx-traverse,-rtx-traverse-*): Ditto.
4271
4272         * rtl.scm (define-subr): New proc.
4273         (rtl-init!): Create reader command `define-subr'.
4274
4275         * cos.c (_object_mi_p): Ensure argument is an object.
4276         (indent): New function.
4277         (_object_print_elms): Add pretty-printing support.
4278         (_object_print): Ditto.
4279
4280         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4281         (*floats-s->c-fun-table*): Ditto.
4282         * hobbit.c,hobbit.h: Rebuild.
4283         * hob-sup.c (fastcall7): New proc.
4284         * hob-sup.h (fastcall7): Declare.
4285         * hob-sup.scm (fastcall7): New macro.
4286
4287         * mach.scm (<arch>): New member subr-list.
4288         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4289         (arch-finish!): Reverse recorded subr list.
4290
4291         * read.scm (debug-env): New global.
4292         (debug-var-names,debug-var,debug-repl-env): New procs.
4293         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
4294         (debug-quit): Renamed from `continue'.
4295
4296         * simplify.inc (dsmf): New pmacro.
4297
4298         * utils.scm (plus-scan): New proc.
4299         (split-bits): Rewrite.
4300         (split-value): New proc.
4301
4302 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
4303
4304         * doc/Makefile.am (DOCFILES): Add notes.texi.
4305         * doc/Makefile.in: Rebuild.
4306
4307 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
4308
4309         * ifield.scm (ifld-derived?): New proc.
4310         (f-derived): New global.
4311         (ifield-builtin!): Create ifield f-derived.
4312         (<multi-insn>): New class.
4313         (multi-insn?): New predicate.
4314         (multi-insn-instantiate!): New proc.
4315         (-insn-parse): Create <multi-insn> objects for insns with derived
4316         ifields.
4317         (-parse-insn-format-symbol): Handle derived ifields.
4318         (-parse-insn-format-ifield-spec): New proc.
4319         (-parse-insn-format-operand-spec): New proc.
4320         (-parse-insn-format-list): Simplify.
4321         (-parse-insn-format): No longer allow (ifield-object value) spec.
4322         (derived-operand-format?): New proc.
4323         (insn-alias?): New proc.
4324         (non-alias-insns): Rewrite.
4325         (insn-real?): Renamed from real-insn?, all callers updated.
4326         (virutal-insns): Rewrite.
4327         (multi-insns): New proc.
4328         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4329         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4330         Return #f if operand doesn't have an index or if index is not an
4331         ifield.
4332         (hw-index-anyof): New proc.
4333         (-operand-parse): Allow integer indices.
4334         (<derived-operand>): New class.
4335         (derived-operand?): New predicate.
4336         (<anyof-operand>): New class.
4337         (<anyof-value>): New class.
4338         (-anyof-parse-value,-anyof-operand-parse): New procs.
4339         (-derived-operand-parse,-derived-operand-read): New procs.
4340         (define-derived-operand,define-full-derived-operand): New procs.
4341         (operand-init!): New reader command define-derived-operand.
4342
4343         * utils.scm (list-take): Handle negative amount.
4344         (element?): Rewrite.
4345
4346 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
4347
4348         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4349
4350 1999-10-04  Richard Henderson  <rth@cygnus.com>
4351
4352         * ia64.cpu: Checkpoint.
4353
4354 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
4355
4356         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4357
4358         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
4359         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
4360
4361 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
4362
4363         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4364         PC returned by sim_engine_invalid_insn.
4365
4366 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
4367
4368         * ia32.cpu: New file.
4369
4370 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
4371
4372         * utils.scm (bit-set?): Fix off by one error.
4373
4374         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4375
4376         * rtl.scm (hw): Check for valid hardware element before trying to
4377         get its mode.
4378
4379         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
4380         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4381         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4382         * thumb.cpu (*): arm_compute_operand2_foo renamed to
4383         compute_operand2_foo.
4384
4385         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4386         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4387         Call delayed_branch/branch methods instead of assigning to `vpc'.
4388         (<hw-pc>,cxmake-skip): Call skip method.
4389         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4390         (<pc>,cxmake-skip): Ditto.
4391         (-create-virtual-insns!): Ditto.
4392         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4393         (op:write): Ditto.
4394         (op:record-profile): Specify #:output-language "c++".
4395         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4396         @arch@_insn_attr.
4397         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4398         Define enums here.
4399         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4400         (gen-semantic-code): Ditto.
4401         (-gen-sem-case,-gen-sfrag-code): Ditto.
4402         (-gen-hardware-types): Delete class @cpu@_cpu_base.
4403         (cgen-cpu.h): File is now #included by main cpu class, rather than
4404         subclassing.
4405         (cgen-defs.h): New proc.
4406         (-gen-scache-semantic-fn): Change result type to sem_status.
4407         New local `status'.  Call done_cti_insn/done_insn method at end.
4408         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4409         cgen-ops.h.
4410         (cgen-sem-switch.cxx): Ditto.
4411         * sid-decode.scm (-gen-idesc-decls): Update return type of
4412         @prefix@_sem_fn.
4413         (cgen-decode.h): Add using namespace @arch@.
4414         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4415
4416         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4417         (estate-output-language-c?,estate-output-language-c++?): New procs.
4418         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4419         (estate-make-for-normal-rtl-c++): New proc.
4420         (rtl-c++-parsed,rtl-c++): New proc.
4421         (s-c-call): Invoke cpu class method if c++.
4422         (join): Use s-c-raw-call.
4423
4424         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4425         (nop): Rewrite.
4426
4427         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4428         * rtl.scm (<eval-state>): New member `modifiers'.
4429         (<eval-state>,vmake!): Handle #:modifiers.
4430         (estate-with-modifiers): New proc.
4431
4432         * rtl.scm (rtx-side-effects?): New proc.
4433         (rtx-canonical-bool): Don't change expr if it has side effects.
4434         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4435         better.
4436
4437 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
4438
4439         * sim.scm (gen-scache-type): Fix typo in last patch.
4440
4441 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
4442
4443         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4444
4445 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
4446
4447         * sid.scm (<hw-pc>,cxmake-skip): New method.
4448         (<pc>,cxmake-skip): New method.
4449
4450         * decode.scm (decode-build-table): Delete args startbit,index-list.
4451         All callers updated.
4452         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4453         All callers updated.
4454         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4455         to decode-get-best-bits.
4456         * sid-decode.scm (-gen-decode-fn): Ditto.
4457
4458         * hardware.scm (hw-bits): New proc.
4459         (-hw-parse): New arg layout.  All callers updated.
4460         (define-full-hardware): New arg layout.  All callers updated.
4461         (-hw-validate-layout): New proc.
4462         (-hw-create-[gs]etter-from-layout): New procs.
4463         (<hw-register>,parse!): Handle layout spec.
4464         * types.scm (type-bits): New proc.
4465
4466         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4467         UNARY, BINARY, TRINARY rtxs.
4468
4469         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4470         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4471         Support '- as "unused spot" indicator.
4472
4473 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4474
4475         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4476
4477 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4478
4479         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4480
4481         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4482         construction.
4483         (tstate-make): New arg `depth'.  All callers updated.
4484         (tstate-depth,tstate-set-depth!): New procs.
4485         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4486         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4487         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4488
4489 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4490
4491         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4492         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4493         * utils-sim.scm: Decoder generator support moved here.
4494         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4495         (-gen-decoder-switch): Sort entries for more fall-throughs.
4496
4497         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4498         * Makefile.in: Rebuild.
4499         * sim-test.scm (build-sim-testcase): Add logging message.
4500         * dev.scm (cload): Recognize SIM-TEST application.
4501         (load-stest): Set APPLICATION to SIM-TEST.
4502
4503         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4504
4505         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4506         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4507         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4508
4509         * insn.scm (syntax-break-out): Handle ${foo}.
4510
4511 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4512
4513         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4514         (bin_PROGRAMS): Define.
4515         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4516         (cgen-hob.c): Prepend $(srcdir)/ here.
4517         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4518         (libcpu_a_SOURCES): Delete.
4519         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4520         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4521         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4522         Add AC_CHECK_LIB(guile,main).
4523         * Makefile.in: Rebuild.
4524         * doc/Makefile.in: Rebuild.
4525         * aclocal.m4: Rebuild.
4526         * config.in: Rebuild.
4527         * configure: Rebuild.
4528
4529 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4530
4531         Rename rtx functions from name: to name, accept optional leading
4532         modifier and mode.
4533         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4534         * attr.scm (-attr-eval): Update.
4535         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4536         (<hw-register>,mode-ok?): Disallow VOID.
4537         (<hw-immediate>,mode-ok?): Disallow VOID.
4538         (<hw-address>,mode-ok?): Disallow VOID.
4539         * mode.scm (mode-name?): New proc.
4540         (VOID): Renamed from VM.
4541         (DFLT): Renamed from DM.
4542         (mode-builtin!): Update.
4543         * opcodes.scm (<ifield>,gen-insert): Update.
4544         (<ifield>,gen-extract): Update.
4545         (<multi-ifield>,gen-insert,gen-extract): Update.
4546         * operand.scm (op:mode): Update.
4547         (<pc>,make!): Update.
4548         (op:new-mode): Update.
4549         (-operand-read): Update.
4550         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4551         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4552         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4553         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4554         (rtx-make): Call -rtx-munge-mode&options.
4555         (rtx accessors): Rewrite.
4556         (rtx-pretty-name): Update.
4557         (-rtx-traverse-*): Update.
4558         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4559         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4560         (-rtx-make-traverse-table): Update.
4561         (-rtx-traverse-operands): Update.
4562         (-rtx-option?,-rtx-option-list?): New procs.
4563         (-rtx-munge-mode&options): New proc.
4564         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4565         (-rtx-traverse): Update.
4566         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4567         (rtx-compile-time-constant?): Update.
4568         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4569         (rtx-value): Update.
4570         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4571         * rtx-funcs.scm (*): Update.
4572         * rtl-c.scm (rtl-c-get): Update.
4573         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4574         (s-c-call,s-c-raw-call): Update.
4575         (s-boolifop,s-convop,s-if,s-cond): Update.
4576         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4577         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4578         (s-parallel,s-sequence): Update.
4579         (rtl-c-build-table): Update.
4580         * sem-frags.scm (-frag-hash-compute!): Update.
4581         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4582         for temporary bug compatibility with previous version.
4583         (-frag-expr-locals,-frag-expr-stmts): Update.
4584         (-frag-compute-desired-frags,-frag-pick-best): Update.
4585         * semantics.scm (-simplify-expr-fn): Update.
4586         (rtx-simplify): Update.
4587         (-rtx-ref-type): Update.  Account for modifiers.
4588         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4589         (-build-ifield-operand!): Update.
4590         (-build-known-values): Update.
4591         (semantic-compile): Update.
4592         (-gen-reg-access-defns): Update.
4593         (gen-semantic-code,-gen-sem-case): Update.
4594         (-gen-sfrag-code,-gen-sfrag-case): Update.
4595         * sim-cpu (gen-semantic-code): Update.
4596         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4597         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4598         (-hw-cxmake-get): Update.
4599         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4600         (<hw-index>,cxmake-get): Update.
4601         (<operand>,gen-type,gen-read,cxmake-get): Update.
4602         (<operand>,gen-set-quiet,gen-set-trace): Update.
4603         (<pc>,cxmake-get): Update.
4604         (sim-finish!): Update.
4605         * utils-gen.scm (-gen-ifld-extract-base): Update.
4606         (-gen-ifld-extract-beyond): Update.
4607         (gen-multi-ifld-extract): Update.
4608         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4609         * sid.scm (<hw-pc>,gen-write): Update.
4610         (-gen-decode-insn-globals): Update.
4611         (-hw-cxmake-get): Update.
4612         (<hw-register>,cxmake-get-raw): Update.
4613         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4614         (<hw-index>,cxmake-get): Update.
4615         (<operand>,gen-type,gen-read,cxmake-get): Update.
4616         (<operand>,gen-set-quiet,gen-set-trace): Update.
4617         (<pc>,cxmake-get): Update.
4618         (-create-virtual-insns!): Update.
4619         (-decode-split-build-assertion): Update.
4620         * *.cpu: Update.
4621         * simplify.inc: Update.
4622
4623 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4624
4625         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4626         Prefix queue function name with sim_ instead of @cpu@_.
4627
4628         * sim.scm (-with-parallel-only?): New global.
4629         (option-init!): Initialize it.
4630         (option-set!): Set it.
4631         (with-parallel-only?): New proc.
4632         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4633         and writeback markers if with-parallel-only.
4634         (-gen-idesc-init-fn): Update.
4635         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4636         with-generic-write.
4637
4638 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4639
4640         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4641         with the invalid insn handler.
4642
4643         * utils.scm (list-maybe-ref): New proc.
4644
4645         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4646         define-arch.
4647         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4648
4649         * i960.cpu (test*-*): Delete `expr' arg.
4650         (test-op,branch-op): Update.
4651
4652 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4653
4654         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4655         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4656         updated.
4657         (gen-reg-access-defn): Ditto.
4658         (-gen-hw-addr): Rewrite.
4659         (-op-gen-queued-write): Rewrite.
4660         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4661         (-gen-scache-semantic-fn): Handle with-generic-write.
4662         (-gen-no-scache-semantic-fn): Ditto.
4663
4664 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4665
4666         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4667
4668         * sim.scm (-with-generic-write?): New global.
4669         (option-init!): Initialize it.
4670         (option-set!): Set it.
4671         (with-generic-write?): New proc.
4672         (-gen-hw-addr): New proc.
4673         (-op-gen-queued-write): New proc.
4674         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4675
4676         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4677         turned off.
4678         (-gen-sem-switch): Preserve existing with-parallel? value.
4679         (-gen-sem-parallel-switch): Ditto.
4680         (-gen-write-case): Add /indent support.
4681         (cgen-write.c): Rewrite.
4682
4683         * utils.scm (-current-print-state): New global.
4684         (make-print-state): New proc.
4685         (pstate-indent,pstate-set-indent!): New procs.
4686         (pstate-cmd?,pstate-cmd-do): New procs.
4687         (/indent): New global.
4688         (/indent-set,/indent-add): New procs.
4689         (string-write): Set -current-print-state.
4690         (-string-write): New arg pstate, all callers updated.
4691         Handle print-state commands.
4692         (-string-list-flatten): New proc.
4693         (string-list->string): Use it.
4694
4695         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4696         (-gen-sem-fn-table-entry): New proc.
4697         (-gen-semantic-fn-table): New proc.
4698         (-gen-scache-semantic-fn): Make fn static.
4699         (-gen-no-scache-semantic-fn): Ditto.
4700         (cgen-semantics.c): Define macro SEM_FN_NAME.
4701         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4702         FAST,FULL.  Update @cpu@_insn_sem contents.
4703         (-gen-semf-fn-name): Delete.
4704         (-gen-sem-fn-decls): Delete.
4705         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4706         @cpu@_semf_init_idesc_table.
4707         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4708         handlers here.
4709         (cgen-decode.h): Print sfmt enum.
4710         * sid-decode.scm (-gen-semf-fn-name): Delete.
4711         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4712
4713         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4714         (ifmt-compute!): Ditto.
4715         * sim-decode.scm (-gen-decoder-switch): Ditto.
4716         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4717         (-gen-decoder-switch): Ditto.
4718
4719         * insn.scm (insn-virtual?): New proc.
4720
4721         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4722         convert to string.
4723         * mach.scm (<arch>): attr-list is now a pair of lists.
4724         (current-attr-list): Rewrite.
4725         (current-attr-add!,current-attr-lookup): Rewrite.
4726         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4727
4728 1999-08-06  Richard Henderson  <rth@cygnus.com>
4729
4730         * ia64.cpu: Initial checkpoint.
4731
4732 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4733
4734         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4735         (pmacros-init!): Update .apply help string.
4736
4737 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4738
4739         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4740         (<hw-pc>,cxmake-skip): New method.
4741         (<pc>,cxmake-skip): New method.
4742         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4743         (gen-argbuf-type): New member `skip_count'.
4744         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4745         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4746
4747         * utils-sim.scm: New file.
4748         * dev.scm (load-sim): Load it.
4749         (load-sid): Load it.
4750         * cgen-sid.scm: Load it.
4751         * cgen-sim.scm: Load it.
4752         * iformat.scm (<sformat>): New member sbuf, not initialized by
4753         default make.
4754         * rtx-funcs.scm (skip): Rewrite.
4755         * rtl-c.scm (skip): Rewrite.
4756         * m32r.cpu (sc,snc): Update `skip' usage.
4757         * mode.scm (mode-real-mode): New proc.
4758         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4759         Distinguish fragments by the <sformat-abuf> they use.
4760         * sim.scm (gen-profile-index-type): Delete.
4761         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4762         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4763         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4764         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4765         (-gen-argbuf-elm): Rewrite.
4766         (-gen-argbuf-hw-elm): Delete.
4767         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4768         of each sfmt.
4769         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4770         (sim-init!): Initialize them.
4771         (sim-analyze-insns!): Set them.
4772         (current-sbuf-list): New proc.
4773         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4774         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4775         * sim-model.scm (-gen-model-insn-fn): Ditto.
4776         * sim-decode.scm (-gen-extract-decls): Delete.
4777         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4778         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4779         sim.scm.
4780         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4781         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4782         (-gen-op-extract,-gen-op-trace-extract): New procs.
4783         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4784         gen-sfmt-argvars-foo and rewrite.
4785         (-gen-record-args): Rewrite.
4786         (-gen-extract-case): Tweak.
4787         * sid.scm (gen-profile-index-type): Delete.
4788         (ifield argbuf support): Move to utils-sim.scm.
4789         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4790         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4791         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4792         (-sim-sformat-argbuf-list): New global.
4793         (sim-init!): Initialize it.
4794         (sim-analyze-insns!): Set it.
4795         (current-sbuf-list): New proc.
4796         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4797         (-gen-argbuf-hw-elm): Delete.
4798         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4799         of each sfmt.
4800         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4801         (-gen-extract-decls): Delete.
4802         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4803         sid.scm.
4804         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4805         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4806         (-gen-op-extract,-gen-op-trace-extract): New procs.
4807         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4808         gen-sfmt-argvars-foo and rewrite.
4809         (-gen-record-args): Rewrite.
4810         (-gen-extract-case): Tweak.
4811
4812         * cgen-gh.c (gh_putc,gh_puts): New functions.
4813         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4814         * cos.c (_object_print_elms,_object_print): Use them.
4815         * hob-sup.c (fastcall_print): Use them.
4816         * configure.in: Check for scm_gen_puts, scm_puts.
4817         * config.in: Rebuild.
4818         * configure: Rebuild.
4819         * aclocal.m4: Rebuild.
4820         * Makefile.in: Rebuild.
4821
4822         * dev.scm (load-opc): Use load instead of maybe-load.
4823         (load-gtest,load-sim,load-stest): Ditto.
4824         (load-sid): Ditto.
4825
4826 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4827
4828         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4829         up to avoid g++ 'goto crosses initialization' warning.
4830         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4831         (-gen-sfrag-case): Update use of NEXT_FRAG.
4832
4833 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4834
4835         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4836
4837         * read.scm: Load sem-frags.scm.
4838         * sem-frags.scm (*): Lots rewritten.
4839         * sid.scm (-with-sem-frags?): New global
4840         (with-sem-frags?): New proc.
4841         (option-init!): Initialize -with-sem-frags?.
4842         (option-set!): Recognize with-sem-frags.
4843         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4844         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4845         if asked to.
4846         (-gen-sfrag-engine-decls): New proc.
4847         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4848         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4849         (-gen-sfrag-engine): New proc.
4850         (-gen-sem-case): Emit setup-semantics if specified.
4851         (-gen-sem-switch-engine): Update init/use of computed goto label.
4852         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4853         from local vars.
4854         (-gen-idesc-decls): Replace sem_address with cgoto.
4855         (-gen-scache-decls): Rewrite definition of `execute' member.
4856         * arm.cpu (arm isa): Enable decode-splits.
4857         * arm7.cpu (multiply insns): Rename result to mul-result.
4858
4859         Rename decode-specialize to decode-split.
4860         * decode.scm (*): Update.
4861         * insn.scm (*): Update.
4862         * mach.scm (*): Update.
4863         * sid.scm (*): Update.
4864
4865 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4866
4867         Record objects as a smob.
4868         * cos.c (scm_tc16_object): New static global.
4869         (cos_init): Initialize it.
4870         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4871         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4872         (_object_tag): Delete.
4873         (_object_make_smob): New function.
4874         (_object_make_x,_object_make_with_values_x): Rewrite.
4875         (_object_elements,_object_class_desc): Rewrite.
4876         (_object_copy,object_p): Rewrite.
4877         (_object_specialize): Rewrite.
4878         (_object_print_elms,_object_print): New functions.
4879         (object_smob): New static global.
4880         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4881
4882         * cos.c (_make_x_symbol): New static global.
4883         (object_make): Use it.
4884         (cos_init): Initialize it.
4885
4886 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4887
4888         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4889         instead to determine whether to use FLD macro.
4890         (<rtl-c-eval-state>): New member ifield-var?.
4891         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4892         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4893         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4894
4895         * rtl.scm (rtx-sequence-assq-locals): New proc.
4896
4897         * cos.scm (-object-error): Don't crash on non-objects.
4898
4899         * Makefile.am (CLEANFILES): Add hobbit.
4900         * Makefile.in: Rebuild.
4901
4902         * rtl-c.scm (s-c-call): Delete unnecessary code.
4903
4904 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4905
4906         * rtl-c.scm (ifield): Always reference value via `FLD'.
4907
4908         * cos.c (elm_bound_p): Return problem SCM boolean values.
4909
4910         * utils-cgen.scm (display-argv): New proc.
4911         * cgen-opc.scm (cgen): Call it.
4912         * cgen-sim.scm (cgen): Ditto.
4913         * cgen-gas.scm (cgen): Ditto.
4914         * cgen-stest.scm (cgen): Ditto.
4915         * cgen-sid.scm (cgen): Ditto.
4916
4917 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4918
4919         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4920         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4921         (-gen-extract-switch): Initialize result to 1.
4922         * opcodes.scm (gen-ifield-default-type): New proc.
4923         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4924         updated.
4925         (<hw-index>,gen-insert): Handle non-ifield indices.
4926         (<hw-index>,gen-extract): Ditto.
4927         (<hw-asm>,gen-parse): Ditto.
4928         (<hw-asm>,gen-print): Ditto.
4929         (<keyword>,gen-parse): Ditto.
4930         (<keyword>,gen-print): Ditto.
4931         (<operand>,gen-fget): Ditto.
4932         (<operand>,gen-fset): Ditto.
4933
4934         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4935         (-gen-hw-index): Ditto.
4936         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4937         (-gen-hw-index): Ditto.
4938
4939         * sem-frags.scm: New file.
4940
4941         * attr.scm (attr-parse): Add better checking of input.
4942
4943         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4944         All uses updated.
4945         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4946
4947         * ifield.scm (ifld-nil?): New proc.
4948
4949         * operand.scm (<operand>): New members getter,setter.
4950         (<operand>,make!): New args getter,setter.  All uses updated.
4951         (op:getter,op:setter): New procs.
4952         (<hw-index>,field-start): Return 0 for non-ifield indices.
4953         (<hw-index>,field-length): Return 0 for non-ifield indices.
4954         (-operand-parse-getter,-operand-parse-setter): New procs.
4955         (-operand-parse): New args getter,setter.  All callers updated.
4956         Always use hw-index-scalar for scalar operands.
4957         (-operand-read): Handle getter,setter.
4958         (define-full-operand): New args getter,setter.  All uses updated.
4959         * semantics.scm (-build-ifield-operand!): Update.
4960         (-build-index-of-operand!): Update.
4961         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4962         * simplify.inc (define-normal-operand): Update.
4963
4964         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4965         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4966         (s-binop,s-cmpop,s-convop): Ditto.
4967         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4968         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4969         (fcc-tests): New insn-enum.
4970         (fcc-value): Rename from fcc-type.
4971         * sparcfpu.cpu: New file.  All fp support moved here.
4972
4973         * rtl.scm (<rtx-func>): New member class.
4974         (rtx-class-*?): New procs.
4975         (def-rtx-node): New arg class.  All callers updated.
4976         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4977         * rtx-funcs.scm (*): Specify class.
4978
4979         * utils-cgen.scm (context-make-reader): New proc.
4980
4981         * utils.scm (assert-fail-msg): New variable.
4982         (assert): Use it.
4983         (list-drop,list-tail-drop): New procs.
4984
4985 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4986
4987         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4988         CGEN_MIN_INSN_SIZE deleted on March 22.
4989
4990         * ifield.scm (<ifield>,needed-iflds): New method.
4991         (<multi-ifield>,needed-iflds): New method.
4992         (ifld-needed-iflds): New proc.
4993         (multi-ifield?): New proc.
4994         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4995         (-sfmt-search-key): Include insn length in key.
4996         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4997         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4998         (-ifmt-lookup-ifmt!): Compute key here.
4999         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
5000         All callers updated.
5001         (ifmt-build): Delete arg desc.  New args search-key,iflds.
5002         All callers updated.
5003         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
5004         in-ops,out-ops,sorted-used-iflds.  All callers updated.
5005         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
5006         to ifmt-build.
5007         * operand.scm (op-iflds-used): New proc.
5008         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
5009         and sim-cpu.scm.
5010         And from sid.scm,sid-cpu.scm as well.
5011         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
5012         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
5013         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
5014         (gen-extracted-ifld-value): Ditto.
5015         (-extract-chunk-specs): Ditto.
5016         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
5017         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
5018         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
5019         (-extract-insert-subfields): New function.
5020         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
5021         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
5022         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
5023         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
5024         gen-extract-foo.
5025         (-gen-no-scache-semantic-fn): Ditto.
5026         (-gen-sem-case): Ditto.
5027         (-gen-read-case): Update calls to gen-define-ifields,
5028         gen-extract-ifields.
5029         * sim-decode.scm (-gen-record-args): Update.
5030         (-gen-sfmt-argvars-assigns): Update.
5031         (-gen-extract-case): Update.
5032         * sim-model.scm (-gen-model-insn-fn): Replace calls to
5033         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
5034         gen-extract-foo.
5035         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
5036         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
5037         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
5038         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
5039         gen-define-ifields, gen-extract-ifields.
5040         (-gen-record-args): Update.
5041         (gen-sfmt-argvars-assigns): Update.
5042         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
5043         with gen-define-ifields.  Ditto for gen-extract-foo.
5044         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
5045         procs rather than method calls.
5046
5047 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
5048
5049         * sid.scm (-create-virtual-insns!): New local `context', pass it
5050         to insn-read.
5051
5052         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
5053         (operand name) not (operand object), (local name) not (local object).
5054         (rtx-traverse-with-locals): New proc.
5055         (-compile-expr-fn): New proc.
5056         (rtx-compile): Rewrite.
5057         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
5058         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
5059         (rtl-c-set-trace): Ditto.
5060         (operand define-fn): Recognize operand name argument.
5061         (local define-fn): Recognize sequence temp name argument.
5062         * rtx-funcs.scm (operand): Argument is operand name, not object,
5063         so call current-op-lookup.
5064         (local): Similarily, so call rtx-temp-lookup.
5065
5066         * rtl.scm (rtx-field?): Use rtx-name instead of car.
5067         (rtx-operand?): Ditto.
5068         (rtx-pretty-name): Ditto.
5069         (rtx-local-obj): Flag symbol argument as an error.
5070         (rtx-local-name): New proc.
5071         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
5072
5073         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
5074
5075         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
5076         updated.
5077
5078         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
5079         (and: QI rd #xff).
5080
5081         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
5082         (*floats-s->c-fun-table*): Ditto.
5083         * hobbit.c,hobbit.h: Rebuild.
5084         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
5085         * semantics.scm (rtx-simplify): Use /fastcall-make.
5086
5087         * iformat.scm (-sfmt-search-key): Don't include memory modes.
5088
5089         * insn.scm (<insn>): Delete members condition, compiled-condition.
5090         (<insn>,make!): Update
5091         (<insn> getters,setters): Update.
5092         (-insn-parse,insn-read,define-full-insn): Update.
5093         * minsn.scm (minsn-make-alias): Update.
5094         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
5095         (ifmt-compute!): Ditto.
5096         * sim.scm (sim-finish!): Update.
5097         * simplify.inc: (define-normal-insn): Update.
5098         * sid-cpu.scm (gen-semantic-code): Update.
5099
5100         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
5101         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
5102         (ifmt-compute!): Ditto.
5103
5104 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
5105
5106         * minsn.scm (minsn-compute-iflds): Print better error message for
5107         missing ifields.
5108
5109 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
5110
5111         * rtl.scm (tstate->estate): Don't copy over expr-fn.
5112
5113         * Makefile.am (HOBFLAGS): New variable.
5114         (cgen-hob.c): Use it.
5115         (hobbit.c): Use it.
5116         (libcpu_a_SOURCES): Add hob-sup.c.
5117         (hob-sup.o): New rule.
5118         * Makefile.in: Rebuild.
5119         * cgen.c: #include hob-sup.h.
5120         (cgen_init_c): Call hobbit_init_support.
5121         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5122         (*special-scm->c-functions*): Add them.
5123         (display-c-expression): Handle *c-symbol*.
5124         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5125         (*floats-s->c-fun-table*): Ditto.
5126         (normalize): Recognize /fastcall-make.
5127         (normalize-fastcall-make): New proc.
5128         * hobbit.c,hobbit.h: Rebuild.
5129         * hob-sup.scm: New file.
5130         * hob-sup.c: New file.
5131         * hob-sup.h: New file.
5132         * read.scm: Load hob-sup.scm.
5133         * rtl.scm (-rtx-name-list): New variable.
5134         (rtx-name-list): New proc.
5135         (rtx-lookup): Try symbol first.
5136         (def-rtx-node): Add name to -rtx-name-list.
5137         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5138         (-rtx-traverse-anymode): New proc.
5139         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5140         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5141         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5142         (-rtx-traverse-{symornum,object}): New procs.
5143         (-rtx-make-traverse-table): Rewrite.
5144         (-rtx-traverse-operands): Rewrite arg-types handling.
5145         Handle #f result of traverser.
5146         (-rtx-traverse): Renamed from -rtx-traverse-normal.
5147         Move debug handling here.
5148         (-rtx-traverse-debug): Delete.
5149         (rtl-finish!): Change -rtx-traverse-table into list of handlers
5150         for each rtx.
5151         * semantics.scm (semantic-compile:process-expr!): Fix call to
5152         -rtx-traverse.
5153         * utils.scm (map1-improper): New proc.
5154
5155 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
5156
5157         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5158         (h-mbits): Ditto.
5159         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5160         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5161         (<operand>,cxmake-get): Tweak.
5162         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
5163
5164 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
5165
5166         * thumb.cpu (dnti): Delete timing spec.
5167         (all insn): Update.
5168
5169         * arm.cpu (arm isa): New fields condition, setup-semantics.
5170         (thumb isa): New field setup-semantics.
5171         (h-gr): Add attribute CACHE-ADDR.
5172         * arm7.cpu (dnai): Delete condition.
5173         (eval-cond): Delete.
5174
5175         * mach.scm (<isa>): New member setup-semantics.
5176         (-isa-parse-setup-semantics): New proc.
5177         (-isa-parse): New arg setup-semantics.
5178         (-isa-read): Recognize setup-semantics.
5179
5180         * sid-cpu.scm (gen-extract-fields): Split into two:
5181         gen-extract-ifields, gen-extract-ifmt-ifields.
5182         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
5183         tracing begin/end messages (done by caller now).
5184         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
5185         tracing begin/end messages (done by x-before,x-after virtual insns).
5186         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
5187         end so don't have to look it up again next time.
5188         * sid-decode.scm (-decode-expr-ifield-values): New proc.
5189         (-decode-expr-ifield-tracking-key): New proc.
5190         (-decode-expr-ifield-tracking): New proc.
5191         (-decode-expr-ifield-values-used): New proc.
5192         (-decode-expr-ifield-mark-used!): New proc.
5193         (-gen-decode-expr-set-itype): New proc.
5194         (-gen-decode-expr-entry): Rewrite.
5195         (-gen-decode-table-entry): New proc.
5196         (-gen-decoder-switch): Use it.
5197         (-gen-virtual-insn-finder): New proc.
5198         (-gen-argbuf-elm): Move here from sid.scm.
5199         (-gen-argbuf-hw-elm): Ditto.
5200         (-gen-argbuf-fields-union): Add entries for chain,before insns.
5201         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5202         conditional-execution isas.
5203         (-gen-decode-fn): Record conditional-exec ifield.
5204         * sid.scm (-current-pbb-engine?): New global.
5205         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5206         (<ifield>,gen-ifld-extract): New arg `indent'.
5207         (<multi-ifield>,gen-ifld-extract): Ditto.
5208         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
5209         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5210         (-gen-arch-model-decls): Only scan real insns.
5211         (scache-engine-insns,pbb-engine-insns): New procs.
5212         (-create-virtual-insns!): New proc.
5213         (sim-finish!): Call it.
5214         (-decode-specialize-insn?): New proc.
5215         (-decode-specialize-build-assertion): New proc.
5216         (-decode-specialize-insn-1): New proc.
5217         (-decode-specialize-insn): New proc.
5218         (-fill-sim-insn-list!): New proc.
5219         (sim-analyze!): Create copies of insns to be specialized.
5220         * utils-cgen.scm (obj-set-name!): New proc.
5221
5222         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5223         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5224         semantic-attrs.
5225         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
5226         sformats.
5227         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5228         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5229         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5230         (attr): Rewrite test for insn owner.
5231         (member): New rtx function.
5232         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5233         as separate function.
5234         (rtx-ifield?,rtx-ifield-name): New procs.
5235         (rtx-operand-obj): Rewrite.
5236         (rtx-operand-name): New proc.
5237         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5238         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5239         (tstate-make): New args owner, known.  All callers updated.
5240         (tstate-known-lookup): New proc.
5241         (rtx-traverse): New arg owner.  All callers updated.
5242         (rtx-make-bool): New proc.
5243         (rtl-find-ifields): Rewrite.
5244         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5245         * semantics.scm: ... here.
5246         (rtx-const-equal,rtx-const-list-equal): New procs.
5247         (-build-known-values): New proc.
5248         (semantic-compile): New arg `insn'.  Call rtx-simplify.
5249         (semantic-attrs): Ditto.
5250         * rtx-funcs.scm (member,number-list): New rtx functions.
5251
5252         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5253         Rewrite.  Delete arg `all-attrs'. All callers updated.
5254         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
5255         updated.
5256         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5257
5258         * decode.scm (subdtable-add): Handle `expr' entries.
5259         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
5260         (exprtable-entry-*): Update.
5261         (exprtable-entry-iflds): New proc.
5262         (exprentry-cost): New proc.
5263         (exprtable-sort,-gen-exprtable-name): New procs.
5264         (exprtable-make): New arg `name'.  All callers updated.  use vector.
5265         (exprtable-*): Update.
5266         (-build-decode-table-entry): Don't issue collision warning if all are
5267         specialized insns.  Sort exprtable entries before building table.
5268
5269         * read.scm (-reader-process-expanded-1): Move pretty printing of
5270         input to logging level 4.
5271
5272         * utils.scm (string-list->string): New proc.
5273
5274         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5275         semantics.
5276         (insn-read): Delete leading '-' in name.  All callers updated.
5277         (real-insn?): New proc.
5278         (real-insns): Rewrite.
5279         (insn-has-ifield?): New proc.
5280         (insn-builtin!): Create insn attribute SPECIALIZED.
5281
5282         * mach.scm (<arch>): Delete member app-data.
5283         (current-raw-insn-list): New proc.
5284         (insn-list-car,insn-list-splice!): New procs.
5285         (<decode-specialize>): New class.
5286         (-isa-parse-decode-specialize): New proc.
5287         (-isa-parse-decode-specializes): New proc.
5288         (<isa>): New members `condition', `decode-specializes'.
5289         (-isa-parse-condition): New proc.
5290         (-isa-parse): New args condition, decode-specializes.
5291         (-isa-read): Recognize condition, decode-specializes.
5292         (-isa-add-decode-specialize!): New proc.
5293         (modify-isa): New proc.
5294         (isa-conditional-exec?,state-conditional-exec?): New procs.
5295         (arch-init!): New reader command `modify-isa'.
5296
5297         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5298         (mode-signed,mode-unsigned?): New procs.
5299
5300 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
5301
5302         * types.scm (<array>): New method get-shape.
5303         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5304         onto type.
5305         (hw-shape,hw-num-elms): New procs.
5306         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5307         if there's more than 255 registers.
5308         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5309
5310         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5311         with get/set specs.
5312
5313 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
5314
5315         * cgen-sid.scm (sim-arguments): Add -X.
5316         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5317         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5318         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
5319         Simplify by supporting pbb engine only.
5320         (-gen-sem-switch-init): New proc.
5321         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5322         (cgen-sem-switch.cxx): New proc.
5323         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5324         with with-pbb?.  Support dual scache/pbb engines.
5325         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5326         Support dual scache/pbb engines.
5327         (cgen-decode.h): Generate semantic fn decls if with-scache?.
5328         * sid.scm (*) with-pbb? replaces with-sem-switch?.
5329         (sim-finish!): Create pbb support virtual insns if with-pbb?.
5330
5331 1999-05-10  Ben Elliston  <bje@cygnus.com>
5332
5333         * arm7.cpu: Remove coprocessor related fields, operands and insn
5334         definitions for now. Take the undefined instruction trap instead.
5335         (ldmda-wb): New instruction.
5336         (ldmib-wb): Likewise.
5337         (ldmdb-wb): Likewise.
5338         (stmdb-wb): Likewise.
5339         (stmib-wb): Likewise.
5340         (stmda-wb): Likewise.
5341
5342 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
5343
5344         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5345         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5346
5347         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5348         hobbit can't handle optional third arg.
5349
5350 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
5351
5352         * arm.cpu (h-tbit): Delete set spec.
5353         (h-mbits): Don't call arm_mbits_set in set spec.
5354         * arm.sim: New file.
5355         * hardware.scm (modify-hardware): New proc.
5356         (hardware-init!): Add modify-hardware command.
5357         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5358         (-hw-gen-set-quiet): Ditto.
5359         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
5360         hardware attribute.  Load $arch.sim file if present.
5361         * utils-cgen.scm (keyword-list?): New proc.
5362         (keyword-list->arg-list,arg-list-validate-name): New procs.
5363         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5364
5365         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5366
5367         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5368         @cpu@_cpu_cgen.
5369
5370         * attr.scm (obj-prepend-atlist!): New proc.
5371
5372         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5373
5374         * sid.scm (<operand>,profilable?): Use op:type.
5375         * sim.scm (<operand>,profilable?): Use op:type.
5376
5377 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
5378
5379         * utils.scm (find-index,find): Be more stack friendly.
5380
5381         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5382         (bic-imm): Ditto.
5383
5384 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
5385
5386         * arm.cpu (h-gr-usr): New hardware element.
5387         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5388         (arm-mode): New keyword.
5389         (h-mbits): Add set spec.
5390         (h-spsr): Implement get/set specs.
5391
5392         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5393         (-reader-process-expanded-1): Pretty print logging output.
5394
5395         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5396         (cgen-cpu.h): Print enums before hardware elements.
5397         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5398         * sid-decode.scm (cgen-decode.cxx): Ditto.
5399         * sid-model.scm (cgen-model.cxx): Ditto.
5400
5401         * utils-cgen.scm (context-error): Accept variable number of
5402         trailing args.
5403
5404         * rtx-funcs.scm (error:): New rtx function.
5405         * rtl-c.scm (s-case-vm): New proc.
5406         (-gen-non-vm-case-get,s-case-non-vm): New procs.
5407         (s-case): Simplify, handle non-VM result.
5408         (error:): New rtx function.
5409
5410 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
5411
5412         * arm.cpu (h-pc): Add set spec to zero bottom bits.
5413         (test-hi,test-ls): Fix cbit handling.
5414         (shift-type,h-operand2-shifttype): Move here ...
5415         * arm7.cpu: ... from here.
5416         (set-cond,set-cond-maybe,dnix): Delete, unused.
5417         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5418         * arm.cpu: ... to here.
5419         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5420         (alu-cmn): Use set-add-flags.
5421         (alu-tst): Use set-zn-flags.
5422         (alu-cmp): Use set-sub-flags.
5423         (lsl,lsr,asr): Set condition codes.
5424         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5425         (alu-op): Split into three: alu-logical-op,alu-arith-op,
5426         alu-shift-op.
5427         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5428         All callers updated.
5429         (sub-sp): Rename from add-sp-neg.
5430         (f-lbwl-offset): Delete.
5431         (f-lbwl-hi,f-lbwl-lo): New ifields.
5432         (lbwl-hi,lbwl-lo): Update.
5433         (bl-hi): Add 4 to pc.
5434         (push-reg,pop-reg): Simplify.
5435         (push,push-lr): Push registers in correct order.
5436         (pop,pop-pc): Pop registers in correct order.
5437         (save-reg-inc,load-reg-inc): Simplify.
5438         (ldmia): Save registers in correct order.
5439
5440 1999-04-30  Ben Elliston  <bje@cygnus.com>
5441
5442         * arm7.cpu (f-op-hdt): Remove; unused.
5443         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5444         (f-ror-imm8): New multi-ifield.
5445         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5446         callers updated.
5447         (f-uimm12): New field.
5448         (ror-imm8): New operand.
5449         (uimm12): Likewise.
5450         (hdt-offset8): Reinstate operand.
5451         (offset4-hi,offset4-lo): Remove.
5452         (set-cond): Remove macro; unused.
5453         (set-cond-maybe): Likewise.
5454         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5455         (store-word/byte): Likewise.
5456         (load-halfword): Use hdt-offset8 multifield operand instead of two
5457         4-bit operands that are explicitly combined by semantic code.
5458         (do-halfword-store): Bug fix. Set address when not preindexing.
5459         (store-halfword): Also use hdt-offset8 operand.
5460         (arith-op): Avoid clobbering source registers when one of them is
5461         the destination register.
5462         (arith-imm-op): Likewise.
5463         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5464         (teq-imm): Likewise.
5465         (ldm-p): Rename to ldmdb.
5466         (stm-pw): Rename to stmdb-wb.
5467         (multi-action): New macro; test reg-list bits and execute a
5468         semantic fn if the bit is set.
5469         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5470         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5471         (all insns): Use dnai entries for simplicity rather than dni.
5472         (*): Use short-form of (const ..).
5473
5474 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5475
5476         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5477         member eval to evaluator.
5478         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5479         (tstate-make): Delete arg op-fn.  All callers updated.
5480         (tstate-op-fn,tstate-set-op-fn!): Delete.
5481         (rtx-traverse): Delete op-fn arg.  All callers updated.
5482         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5483         split out of -simplify-for-compilation.
5484
5485         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5486         (cgen_DEPENDENCIES): Add stamp-cgen.
5487         (stamp-cgen): New rule.
5488         * Makefile.in: Rebuild.
5489
5490         * rtl-c.scm (enum:): Define emitter for.
5491         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5492         enums as well.
5493         (rtx-constant-value,rtx-enum-value): New procs.
5494         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5495         (rtx-compile-time-constant?): Return #t for enums.
5496         (rtx-true?,rtx-false?): Handle enums.
5497         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5498         building result by hand.
5499         (rtx-simplify-eq-attr-insn): Ditto.
5500         * rtx-funcs.scm (enum:,enum): New rtx functions.
5501
5502         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5503         aliases-analyzed?.
5504         (arch-analyze-insns!): New proc.
5505         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5506         of calling ifmt-compute! directly.
5507         * sid.scm (-sim-insns-analyzed?): Delete.
5508         (sim-analyze!): Call arch-analyze-insns! instead of calling
5509         ifmt-compute! directly.
5510         * sim.scm (-sim-insns-analyzed?): Delete.
5511         (sim-analyze!): Call arch-analyze-insns! instead of calling
5512         ifmt-compute! directly.
5513
5514         * utils.scm (string-take-with-filler): New proc.
5515         (string-take): Use it.
5516
5517         * pgmr-tools.scm: New file.
5518         * read.scm: Load it.
5519         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5520
5521         * insn.scm (insn-base-mask): Renamed from insn:mask.
5522         All callers updated.
5523         (insn-base-mask-length): Renamed from insn:mask-length.
5524         All callers updated.
5525         (insn-foo): Renamed from insn:foo.  All callers updated.
5526         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5527         * iformat.scm (compute-insn-base-mask-length): Renamed from
5528         compute-insn-mask-length.  All callers updated.
5529         (compute-insn-base-mask): Renamed from compute-insn-mask.
5530         All callers updated.
5531
5532         * enum.scm (-enum-parse-prefix): New proc.
5533         (<enum>,make!): Don't parse enum values here.
5534         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5535         (define-full-insn-enum): Ditto.
5536         (enum-vals-upcase): New proc.
5537         * hardware.scm (define-keyword): Make enum prefix uppercase.
5538         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5539
5540         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5541         (<ifield>,field-extract): New method.
5542         (<multi-ifield>,field-extract): New method.
5543         (ifld-extract): New proc.
5544         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5545         (ifld-extract-fn-name): Renamed from ifld-extract.
5546
5547         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5548         All callers updated.
5549
5550         * ifield.scm (ifld-lsb0?): New proc.
5551         (sort-ifield-list): New arg up?.  All callers updated.
5552         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5553         rather than global state.
5554
5555 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5556
5557         * insn.scm (pretty-print-insn-format): New proc.
5558
5559         * Makefile.in: Rebuild.
5560         * aclocal.m4: Rebuild
5561         * configure: Rebuild.
5562
5563 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5564
5565         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5566         * configure: Rebuild.
5567         * aclocal.m4: Rebuild.
5568         * Makefile.in: Rebuild.
5569         * doc/Makefile.in: Rebuild.
5570         * doc/version.texi: Rebuild.
5571
5572 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5573
5574         * utils.scm (bits->bools): New proc.
5575
5576 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5577
5578         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5579         subfield's gen-ifld-extract-decl method.
5580
5581 1999-04-23  Ben Elliston  <bje@cygnus.com>
5582
5583         * arm7.cpu (ldrsh-pu): Remove.
5584         (do-halfword-load): New pmacro.
5585         (load-halfword): Likewise.
5586         (do-halfword-store): Likewise.
5587         (store-halfword): Likewise.
5588         (strh-*): New instructions.
5589         (ldrsb-*): Likewise.
5590         (ldrh-*): Likewise.
5591         (ldrsh-*): Likewise.
5592
5593 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5594
5595         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5596         fields.
5597
5598         * arm7.cpu (do-word/byte-store): Fix typo.
5599
5600 1999-04-22  Ben Elliston  <bje@cygnus.com>
5601
5602         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5603         register is the program counter (R15).
5604
5605         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5606         (str-*): Implement using store-word-byte. Remove older versions.
5607         (bic): Use the `inv' rtx for obtaining bitwise complements.
5608         (bic-imm): Likewise.
5609         (mvn): Likewise.
5610         (mvn-imm): Likewise.
5611         (store-indev-reg): Remove crufty pmacro.
5612         (load-indiv-reg): Likewise.
5613         (ldm-p): Reverse the order of register processing for decrement.
5614         (stm-p): Likewise.
5615         (stbi): Remove; handled by the str-* insns.
5616
5617 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5618
5619         * thumb.cpu (cmp): Fix carry bit computation.
5620         (alu-cmp): Ditto.
5621
5622 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5623
5624         * arm.cpu (h-tbit): Specify set spec.
5625         (h-cpsr): Ditto.
5626         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5627         (set-sub-flags): Interpret "carry bit" as a borrow.
5628         (all sub/cmp insns): Carry bit is actually a borrow bit.
5629         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5630         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5631         .pmacro instead.
5632         (hireg-add,hireg-cmp,hireg-move): Ditto.
5633
5634         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5635         (-CGEN-LANG-VERSION): Ditto.
5636
5637 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5638
5639         * pmacros.scm (-pmacro-make): New arg `default-values',
5640         all callers updated.
5641         (-pmacro-default-values): New proc.
5642         (-pmacro-process-keyworded-args): New proc.
5643         (-pmacro-process-args): New proc.
5644         (-pmacro-invoke): Process arguments before expanding macro.
5645         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5646         (define-pmacro): Handle default values specified in arg list.
5647         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5648         (rtx-boolif-op-arg[01]): New procs.
5649         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5650         (rtx-simplify): Handle not,orif,andif.
5651         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5652         * utils.scm (alist-copy): New proc.
5653         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5654         (ldr*): Rewrite.
5655         (swi): Explicitly set pc.
5656
5657         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5658
5659 1999-04-17  Ben Elliston  <bje@cygnus.com>
5660
5661         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5662         correctly adjusts the program counter now.
5663
5664         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5665         (f-signed?): Rename from `f-hdt-signed?'.
5666         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5667         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5668         (f-hdt-offset8): Use new field names.
5669         (ldr): Use `imm12' field, not `offset12', since we do our own
5670         address arithmetic.
5671         (str, str-*): Likewise.
5672         (ldu-*): Remove most; better not implemented than broken.
5673         (ldrh*): Likewise.
5674         (ldrsh-pu): New insn.
5675         (stri): Likewise.
5676         (stri-p): Likewise.
5677         (stbi): Likewise.
5678         (ldm-p): Likewise; replace (load-indiv-reg) version.
5679
5680 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5681
5682         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5683         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5684         (*): Explicitly specify mode in c-call.
5685         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5686         (arith-op): Ditto.
5687         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5688         (arith-imm-op): New pmacro.
5689         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5690         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5691
5692 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5693
5694         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5695
5696         * rtl.scm (rtl-find-ifields): Implement.
5697
5698         * utils-gen.scm: New file.
5699         * read.scm: Load it.
5700         * desc.scm: Move generic attribute code to utils-gen.scm.
5701         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5702         * Makefile.in: Rebuild.
5703
5704         * arm7.cpu (R15-OFFSET): New attribute.
5705         (dnai): New pmacro.
5706         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5707         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5708         for reg-shift version.
5709         (arith-op): Ditto.
5710         (data processing insns): Reorganize.  Use dnai.
5711
5712         * attr.scm (attr-kind): New proc.
5713         (attr-list-enum-list): Rewrite.
5714         (-attr-sort): Split result into two lists, bools and non-bools.
5715         (current-attr-list-for): Update.
5716
5717         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5718         * sid-cpu.scm (-gen-attr-decls): New proc.
5719         (-gen-insn-attr-decls): New proc.
5720         (cgen-desc.h): New proc.
5721         (cgen-cpu.h): Put everything in @cpu@ namespace.
5722         (gen-parallel-exec-type): Change prefix of parexec struct from
5723         @cpu@ to @prefix@.
5724         (-gen-trace-record-type): Ditto for trace_record struct.
5725         (-gen-write-case): Update.
5726         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5727         @prefix@.  Update scache struct references.
5728         (-gen-sem-case): Update scache struct references.
5729         (-gen-sem-switch-fn): Update idesc struct reference.
5730         Update insn_type enum reference.
5731         (cgen-write.cxx): Update scache,argbuf references.
5732         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5733         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5734         from @cpu@ to @prefix@.
5735         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5736         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5737         from @CPU@ to @PREFIX@.
5738         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5739         from @CPU@ to @PREFIX@.
5740         (-gen-decode-insn-globals): Generate insn attributes.
5741         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5742         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5743         semantic fn typedef.
5744         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5745         Change prefix of scache struct from @cpu@ to @prefix@.
5746         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5747         Change prefix of idesc struct from @cpu@ to @prefix@.
5748         Change prefix of insn_type enum from @cpu@ to @prefix@.
5749         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5750         from @cpu@ to @prefix@.
5751         (-gen-scache-decls): Change prefix of scache struct from
5752         @cpu@ to @prefix@.  Update idesc struct name.
5753         Update decode,execute methods.
5754         (-gen-extract-case): Update to type name changes.
5755         (-gen-decode-fn): Ditto.
5756         (cgen-decode.h): Put everything in @cpu@ namespace (except
5757         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5758         (cgen-decode.cxx): Add using namespace @cpu@.
5759         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5760         model_mark_get/set from @cpu@ to @prefix@.
5761         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5762         @prefix@.
5763         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5764         of model_insn_before/after from @cpu@ to @prefix@.
5765         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5766         Update insn_word type name.
5767         (-gen-model-timing-table): Update INSN_TIMING struct name.
5768         (-gen-model-init-fn): Update MODEL_DATA struct name.
5769         (-gen-mach-defns): Update name of init_idesc_table fn.
5770         (cgen-model.cxx): Add using namespace @cpu@.
5771         * sid.scm (gen-cpu-class): Delete.
5772         (gen-attr-type): New proc.
5773         (gen-obj-attr-sid-defn): New proc.
5774         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5775         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5776         @CPU@ to @PREFIX@.
5777         (gen-cpu-insn-enum): Update name of insn enum.
5778         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5779         (bx-hs): Ditto.
5780         (swi): Rename @cpu@_swi to @prefix@_swi.
5781
5782         * decode.scm (-build-decode-table-entry): Remove heuristic for
5783         distinguishing insns, and use insn ifield-assertion specs.
5784
5785         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5786         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5787         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5788         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5789         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5790         all callers updated.
5791         (gen-attr-name): New proc
5792         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5793         (gen-obj-attr-defn): Delete num_nonbools count.
5794
5795         * iformat.scm (ifmt-analyze): Handle insn-condition.
5796         (ifmt-compute!): Ditto.
5797         * insn.scm (<insn>): Specify default value for condition,
5798         post-cond-trap,compiled-condition,compiled-semantics.
5799         (<insn>,make!): New arg condition.
5800         (<insn>): Add getters for condition,compiled-condition.
5801         (-insn-parse): New arg condition, all callers updated.
5802         (-insn-read): Recognize condition spec.
5803         (define-full-insn): New arg condition.
5804         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5805         * semantics.scm (semantic-compile): Change arg sem-code to
5806         sem-code-list.
5807         (semantic-attrs): Ditto.
5808         * sim.scm (sim-finish!): Update calls to define-full-insn.
5809         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5810         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5811         * sid.scm (sim-finish!): Update call to define-full-insn.
5812
5813 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5814
5815         * Makefile.am (sim-cpu): Allow specification of ISA.
5816         * Makefile.in: Rebuild.
5817
5818 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5819
5820         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5821
5822 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5823
5824         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5825
5826         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5827
5828         * attr.scm (atlist?): New proc.
5829         (-attr-eval): Rewrite.
5830         (attr-parse): New proc.
5831         (atlist-parse): Use it.
5832
5833         * decode.scm (exprtable-entry-make): New proc.
5834         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5835         (exprtable-make,exprtable-insns): New procs.
5836
5837         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5838         All uses updated.
5839         (hardware-builtin!): Make h-memory a vector.
5840
5841         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5842         All callers updated.
5843         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5844
5845         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5846         All uses updated.
5847         (-insn-parse): Set semantics to #f if not specified.
5848         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5849         if simulator.
5850         (-parse-insn-format): Recognize `=' iformat spec.
5851
5852         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5853         (isa-max-insn-bitsize): Ditto.
5854
5855         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5856         rtl-c-with-alist.
5857         (<ifield>,gen-extract): Ditto.
5858         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5859         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5860         (gen-define-ifmt-ifields): New proc.
5861         (gen-semantic-code): Rewrite.
5862         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5863         (-gen-decoder-switch): Handle expression tables.
5864         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5865         gen-define-fields.
5866         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5867         instead of gen-define-fields.
5868         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5869         callers updated.
5870         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5871         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5872         (-gen-ifld-extract-beyond): Ditto.
5873         (<multi-ifield>,gen-ifld-extract): Ditto.
5874         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5875         rtl evaluation code.
5876         (op:read): Build an <eval-state> to pass to gen-read.
5877         (op:write): Build an <eval-state> to pass to gen-write.
5878         (op:record-profile): Build an <eval-state> to pass to
5879         gen-record-profile.
5880         * sim-cpu.scm (gen-semantic-code): Rewrite.
5881         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5882         rtl-c-with-alist.
5883         (-gen-ifld-extract-beyond): Ditto.
5884         (<multi-ifield>,gen-ifld-extract): Ditto.
5885         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5886         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5887         rtl evaluation code.
5888         (op:read): Build an <eval-state> to pass to gen-read.
5889         (op:write): Build an <eval-state> to pass to gen-write.
5890         (op:record-profile): Build an <eval-state> to pass to
5891         gen-record-profile.
5892
5893         * operand.scm (<operand>): Give `selector' default value of #f.
5894         Give `num' default value of -1.  Give `cond?' default value of #f.
5895         (op:new-mode): Delete arg `set?', all uses updated.
5896
5897         * read.scm (reader-error): Handle #f return from port-filename.
5898         (-init-parse-cpu!): Call rtl-c-init!.
5899         (reader-install-builtin!): Call rtl-builtin!.
5900
5901         * rtl-c.scm: New file.
5902         * semantics.scm: New file.
5903         * read.scm: Load them.
5904         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5905         to semantics.scm.
5906         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5907         type,eval,num.
5908         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5909         (-rtx-num-text,-rtx-max-num): New globals.
5910         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5911         (-rtx-macro-lookup): New proc.
5912         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5913         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5914         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5915         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5916         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5917         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5918         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5919         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5920         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5921         (rtx-pretty-name): New proc.
5922         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5923         (rtx-traverse-*): Rewrite rtx traversing.
5924         (rtx-eval-*): Rewrite rtx evaluation.
5925         (rtx-compile): New proc.
5926         (rtx-simplify): New proc.
5927         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5928         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5929         (ifield,index-of): Rewrite.
5930         (name): Renamed from `operand:'.
5931         (operand,xop,local): New rtx's.
5932         (current-insn): Rewrite.
5933         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5934         (cgen-hob.h): Remove rule for.
5935         (cgen-hob.o): Depend on cgen-hob.c only.
5936         * Makefile.in: Rebuild.
5937
5938         * utils-cgen.scm (vmake): New proc.
5939         (<context>): New class.
5940         (context-make-prefix,context-error): New procs.
5941
5942 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5943
5944         * i960.cpu: Add some ??? comments.
5945         (xnor, ornot): New instructions.
5946         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5947
5948 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5949
5950         * cos.scm (-object-error): Print better error message.
5951
5952         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5953         (-pmacro-env-ref): Renamed from -env-ref.
5954
5955 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5956
5957         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5958         (h-pc): Delete.
5959         (hardware-builtin!): Delete h-pc builtin.
5960         * arm.cpu (h-pc): Define.
5961         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5962         * arm7.cpu (set-logical-cc-maybe): Delete.
5963         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5964         (data processing insns): Rewrite.
5965         * m32r.cpu (h-pc): Define.
5966         * fr30.cpu (h-pc): Define.
5967         * i960.cpu (h-pc): Define.
5968         * sparc.cpu (h-pc): Define.
5969
5970         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5971         (s-parallel): Replace do {...} while (0) with {...}.
5972         (s-sequence): Ditto.
5973
5974         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5975         consistent.
5976         (-gen-write-case,-gen-sem-case): Ditto.
5977         (-gen-sem-case): Only specify `written' if profiling or
5978         parallel-write-back.
5979         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5980         (-gen-sem-switch-fn): New proc.
5981         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5982         based on with-sem-switch option.
5983         * sid-decode.scm (-gen-decode-insn-globals): Only define
5984         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5985         addresses in idesc_table if !with-sem-switch.
5986         (-gen-sem-fn-decls): Rewrite.
5987         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5988         member based on with-sem-switch.  Only define
5989         `idesc_table_initialized_p' member if with-sem-switch.
5990         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5991         * sid.scm (-with-sem-switch?): New variable.
5992         (option-init!): Initialize it.
5993         (option-set!): Set it.
5994         (with-sem-switch?): New proc.
5995         (-op-gen-set-trace): Only emit `written' reference if profiling.
5996         (sim-finish!): Use h_pc_set to set pc.
5997
5998 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5999
6000         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
6001         All callers updated.
6002         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
6003
6004         * sid.scm (gen-argbuf-type): Delete.
6005         (-gen-argbuf-fields-union): Move to ...
6006         * sid-decode.scm: ... here.
6007
6008         * read.scm (-reader-process-expanded-1): New proc.
6009         (-reader-process-expanded): Call it to catch nested begin's.
6010         (reader-process): Move `begin' handling to -reader-process-expanded.
6011
6012         * insn.scm (-insn-read): Fix name of `format' spec.
6013
6014         * pmacros.scm (.pmacro): New builtin.
6015         (scan-symbol): If procedure macro, return macro rather than its symbol.
6016         (check-macro): Don't do lookup, instead check if (car expr) is
6017         macro object.
6018         (scan-list): Handle .pmacro.
6019         (scan): No longer re-examine text for another macro invocation.
6020         (-pmacro-build-lambda): New proc.
6021         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
6022         another, fetch the other's value (rather than doing it during
6023         expansion).
6024
6025 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
6026
6027         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
6028         * Makefile.in: Rebuild.
6029
6030         * decode.scm (decode-get-best-bits): Use memq instead of element?.
6031         (-fill-slot!): Simplify.
6032         (-build-slots): Simplify.
6033
6034         * dev.scm (load-sid): Don't load sid-arch.scm.
6035
6036         * sid-decode.scm: Replace computed goto decoder/extractor with plain
6037         switch's.
6038         * sim-decode.scm: Replace computed goto decoder/extractor with plain
6039         switch's.
6040
6041 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
6042
6043         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
6044         * decode.scm: ... here.  New file.
6045         * sid-decode.scm: Use decoder computation code in decode.scm.
6046         * read.scm: Load decode.scm.
6047
6048         * arm.cpu (arm710 model): Add u-exec function unit.
6049         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
6050         Add get/set specs to redirect reg 15 to h-pc.
6051         (h-*): Indicate for both ARM and THUMB isas.
6052         (cbit,nbit,vbit,zbit): Ditto.
6053         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
6054         (h-cpsr): Make virtual.  Add get/set specs.
6055         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
6056         (h-spsr): New virtual reg.
6057         * arm7.cpu (shift-type): New explicitly defined keyword.
6058         (h-operand2-shifttype): Use it.
6059         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
6060         All callers updated.  Don't set cbit.
6061         (logical-op): Add rm to ifield list.  Change case to case:.  Use
6062         shift-type enum as case choices.  Set cbit.
6063         (and,orr,eor,add-imm): Uncomment out.
6064         (undefined): Temporarily comment out.
6065         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
6066         (lda-pc,lda-sp): Ditto.
6067         (ldr-pc): Rename from ldr.
6068         (cbranch): Mark insns as being thumb insns.
6069
6070         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
6071
6072         * cgen-sid.scm: Don't load sid-arch.scm.
6073         (sim-arguments): Delete unused entries.
6074         * sid-arch.scm: Delete.
6075
6076         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
6077         (<insn>,ifld-assertions): New member.
6078         (<insn>,make!): New arg ifld-assertions, all callers updated.
6079         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
6080         (insn:fields): Delete.
6081         (-insn-parse): New arg ifld-assertions.  All callers updated.
6082         (-insn-read,define-insn): New procs.
6083         (define-full-insn): New arg ifld-assertions.  All callers updated.
6084         (insn-init!): New comment define-insn.
6085
6086         * model.scm (-model-parse): Ensure at least one unit specified.
6087
6088         * rtl.scm (-rtx-traverse-operands): Recognize environments.
6089         (<c-expr-temp>,get-name): New method.
6090         (-rtx-make-current-closure,s-closure): New proc.
6091         (hw:): Wrap rtx indices in a closure.
6092         (-gen-case-prefix): New proc.
6093         (s-case): Simplify.
6094         * rtx-funcs.scm (case:): Fix call to s-case.
6095         (closure): New rtx func.
6096
6097         * hardware.scm (<hardware-base>): New member isas-cache.
6098         (<hardware-base>,get-isas): New method.
6099         (hardware-builtin): Indicate for all isas.
6100         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
6101         * mach.scm (current-arch-mach-name-list): Return list of names.
6102         (current-isa-mach-name-list): Ditto.
6103         (define-arch): Install builtin objects here.
6104         * read.scm (keep-atlist?): Only keep if both mach and isa are
6105         being kept.
6106         (keep-mach-atlist?): New proc.
6107         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
6108         (reader-install-builtin!): Renamed from -install-builtin!.
6109         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
6110         -gen-cpu-reg-access-defns.  Rewrite.
6111         (gen-reg-access-defn): Delete.
6112         (-gen-hardware-struct): New proc.
6113         (-gen-hardware-types): Simplify.  Add multiple-isa support.
6114         (gen-semantic-fn,-gen-all-semantics): Delete.
6115         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
6116         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6117         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6118         Call sem-analyze-insns!.
6119         (cgen-semantics.cxx): Add multiple-isa support.
6120         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6121         (-gen-scache-decls,-gen-decode-fn): Ditto.
6122         (cgen-decode.h): Call sem-analyze-insns!.
6123         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6124         * sid.scm (-with-multiple-isa?): New variable.
6125         (option-init!): Initialize it.
6126         (option-set!): Set it.
6127         (with-multiple-isa?): New proc.
6128         (gen-cpu-ref): New arg isas.  All callers updated.
6129         (gen-cpu-class): New proc.
6130         (*-get-macro,*-set-macro): Delete.
6131         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6132         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6133         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6134         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6135         (-sim-insns-analyzed): New global variable.
6136         (sim-init!): Reset it.
6137         (sim-analyze-insns!): New proc.
6138         (sim-analyze!): Don't do instruction analysis here.
6139         (sim-finish!): Specify isa of x-invalid insn.
6140         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6141
6142 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
6143
6144         * thumb.cpu (cpu,mach,model): Delete.
6145         (dntf): New pmacro.  Use it for all field definitions.
6146         (dntop): New pmacro.  Use it for all operand definitions.
6147         (asr): Correct field list.
6148         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6149
6150         * utils-cgen.scm (define-getters): New macro to simplify
6151         writing class accessors.
6152         (define-setters): Ditto.
6153         (sanitize): Recognize isa elements.
6154
6155         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6156         state-parallel-exec?.
6157         * sid-model.scm (*): Ditto.
6158         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
6159         state-decode-assist.
6160
6161         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6162         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6163         * sim-decode.scm (-gen-decode-switch): Ditto.
6164
6165         * sim-arch.scm (-regs-for-access-fns): Delete.
6166         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6167         (-gen-arch-reg-access-defns): Delete.
6168
6169         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6170         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6171         with state-parallel=exec?.
6172         (cgen-*): Call sim-analyze-insns! here.
6173         * sim-decode.scm (cgen-*): Ditto.
6174         * sim-model.scm (cgen-*): Ditto.
6175         * sim.scm (-sim-insns-analyzed): New global variable.
6176         (sim-init!): Reset it.
6177         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
6178         already done the analysis.
6179
6180         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6181         MACH struct.
6182
6183         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6184         (arm arch): Update isa spec.
6185         (arm,thumb isas): Define.
6186         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6187         (arm7tdmi mach): Add isa spec.
6188         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
6189         `const' on word number.
6190         * fr30.cpu (fr30 arch): Update isa spec.
6191         (fr30 isa): Define.
6192         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6193         moved to isa spec.
6194         * i960.cpu (i960 arch): Update isa spec.
6195         (i960 isa): Define.
6196         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6197         liw-insns,parallel-insns moved to isas spec.
6198         * m32r.cpu (m32r arch): Update isas spec.
6199         (m32r isa): Define.
6200         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6201         liw-insns,parallel-insns moved to isa spec.
6202         * sparc.cpu (sparc arch): Update isas spec.
6203         (sparc isa): Define.
6204         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6205         decode-assist moved to isa spec.
6206         * sparc64.cpu (sparc64 cpu): Ditto.
6207         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6208         * desc-cpu.scm (-gen-isa-table-defns): New proc.
6209         (-gen-mach-table-defns): Output mach table.
6210         (-gen-hash-defines): Delete insn size macros, except for
6211         CGEN_MAX_INSN_SIZE.
6212         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
6213         (cgen-desc.h): Define MAX_ISAS.
6214         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
6215         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
6216         (arch-* accessors): Renamed from arch:*.  All callers updated.
6217         (current-arch-isa-name-list): New proc.
6218         (-arch-parse-isas): Renamed from -arch-parse-isa.
6219         (def-isa-attr!): Rewrite.
6220         (<iframe>): New class.
6221         (<itype>): New class.
6222         (<isa>): Rewrite.
6223         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6224         (isa-integral-insn?,isa-parallel-exec?): New procs.
6225         (-isa-parse,-isa-read,define-isa): New proc.
6226         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6227         liw-insns moved to <isa>.
6228         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
6229         (-cpu-parse,-cpu-read): Update.
6230         (state-*): Renamed from state:*.  All callers updated.
6231         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6232         not cpu.
6233         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6234         (state-decode-assist): New proc.
6235         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6236         (-adata-set-derived!): Rewrite.
6237         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
6238         callers updated.
6239         (arch-init!): Add define-isa command.
6240         * read.scm (<reader>): Default keep-isa member to (all).
6241         (reader-* accessors): Renamed from reader:*.  All callers updated.
6242         (-keep-isa-set!): Call string->symbol on isa name list.
6243         (keep-isa-validate!): Rewrite.
6244         (current-isa): New proc.
6245         (keep-isa?): Recognize "all".
6246         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
6247         Call -keep-isa-set!.
6248         (cmd-if): Recognize keep-isa?.
6249         (cpu-load): New arg keep-isa.  All callers updated.
6250         (-opt-spec-update): New proc.
6251         (common-arguments): First arg is string, not symbol.
6252         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
6253
6254         * rtl.scm (rtx-get): Default mode of string arg is INT.
6255
6256         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
6257
6258         * rtx-funcs.scm (join:): Pass cpu to handler.
6259
6260         * configure.in (guile_include_dir): Delete.
6261         * configure: Rebuild.
6262         * Makefile.in: Rebuild.
6263         * doc/Makefile.in: Rebuild.
6264
6265         * sid-cpu.scm (-extract-chunk-specs): New proc.
6266         (gen-define-fields): Use it.
6267         (-extract-chunk): New proc.
6268         (-gen-extract-beyond-var-list): Use it.
6269         (gen-extract-fields): Simplify.
6270
6271 1999-03-22  Ben Elliston  <bje@cygnus.com>
6272
6273         * arm7.cpu (ldri-p): New instruction.
6274         (swi): Do not vector through 0x8 yet--there is nothing there.
6275         (addi): Reinstate.
6276         (movi): Likewise.
6277         (all): Use (const x) in subreg expressions.
6278
6279 1999-03-19  Ben Elliston  <bje@cygnus.com>
6280
6281         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6282         (smlal): Likewise.
6283
6284 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
6285
6286         * fr30.cpu (define-arch): Specify "forced" default-alignment.
6287         * mach.scm (-parse-alignment): Recognize "forced" alignment.
6288         * sim-cpu.scm (-extract-chunk-specs): New proc.
6289         (gen-define-fields): Use it.
6290         (-extract-chunk): New proc.
6291         (-gen-extract-beyond-var-list): Use it.
6292         (gen-extract-fields): Simplify.
6293
6294         Port to guile 1.3.1.
6295         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6296         (LIBIBERTY): New var.
6297         (HOB_OBJS): Add cgen-gh.o.
6298         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6299         * Makefile.in: Rebuild.
6300         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6301         * config.in: Rebuild.
6302         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6303         libncurses, libtermcap.
6304         Add checks for needed functions in guile 1.2 not in guile 1.3,
6305         and vice versa.  Add test for 3 argument scm_make_vector.
6306         * configure: Rebuild.
6307         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6308         definitions if guile doesn't have them.
6309         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6310         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
6311         with gh_vector_set_x.
6312         (cgh_qsort): Replace gh_list_length with gh_length.
6313         * cgen-gh.h: Add decls for added functions.
6314         (cgh_qsort): Don't declare if IN_HOBBIT.
6315         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
6316         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6317         scm_make_vector with gh_make_vector.
6318         * cos.scm: Use vector-length instead of length on vectors.
6319         * dev.scm (cload): Make varargs proc with keyword/value args.
6320         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
6321         provide version that works with guile 1.2 or 1.3.
6322         Include private copy of scmhob.h.
6323         * scmhob.h: New file.  Keep our own copy for now.
6324
6325 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
6326
6327         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6328         plain text.
6329         (-rtx-traverse-operands): Dump cx temp stack if debugging.
6330         (-cx-temp-dump-stack): Pretty up output.
6331
6332         * arm.cpu: comment out thumb.cpu until isa support ready.
6333         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6334         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6335         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6336
6337         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6338
6339 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6340
6341         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6342         (<hw-address>,mode-ok?): unsigned/signed are compatible.
6343
6344         * operand (op:new-mode): Improve error message.
6345
6346         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
6347         * arm7.cpu: New file.
6348
6349 1999-03-12  Ben Elliston  <bje@cygnus.com>
6350
6351         * arm.cpu: Lots of minor fixes after desk checking.
6352
6353 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6354
6355         * thumb.cpu: snapshot of current work
6356
6357         * rtl.scm (rtx-get): Tweak error message.
6358
6359 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
6360
6361         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6362         * Makefile.in: Rebuild.
6363
6364         * cos.c (cos_vector_copy): New function.
6365         (_object_copy): Use it.
6366
6367         * mode.scm (mode:eq?): Clean up.
6368         * rtl.scm (cx-new-mode): Copy attributes.
6369         (rtx-get): Don't make copy if <c-expr> with identical mode.
6370
6371         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6372         add new isas spec.
6373         (gr-names): h-gr register names moved here.
6374         (h-gr): Update.
6375         (cr-names): h-cr register names moved here.
6376         (h-cr): update.
6377         (dr-names): h-dr register names moved here.
6378         (h-dr): update.
6379         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6380         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6381         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6382         add new isas spec.
6383         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6384         add new isas spec.
6385         (gr-names): h-gr register names moved here.
6386         (h-gr): Update.
6387         (cr-names): h-cr register names moved here.
6388         (h-cr): update.
6389         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6390         (h-accums,h-psw): Ditto.
6391         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6392         add new isas spec.
6393         (gr-names): h-gr register names moved here.
6394         (h-gr-indices): Delete.
6395         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
6396         (sparc64 h-gr): Ditto.
6397         (h-y): Add get/set specs.
6398         (fp regs): Rewrite.
6399         (fp operands): Rewrite.
6400         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6401         (h-tbr,h-cwp,h-wim): Ditto.
6402         * sparc64.cpu (h-fpsr): Add get/set specs.
6403         * sparccom.cpu (ldd-reg+reg): Load value all at once.
6404         (fp-ld-op): New arg `dest', all callers updated.
6405         (*): Replace `make-di' with `join'.
6406
6407         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6408         present.
6409         (gen-semantic-code): Save/restore rtl generator state.
6410         (cgen-cpu.h): Call rtl-gen-init!.
6411         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6412         (-gen-ifld-extract-beyond): Ditto.
6413         (<multi-ifield>,gen-ifld-extract): Ditto.
6414         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6415         `gstate'.
6416         (-hw-gen-set-quiet-pc): Ditto.
6417         (<hw-pc>,gen-write): Ditto.
6418         (-hw-cxmake-get): Ditto.  Call getter function if present.
6419         (<hw-register>,cxmake-get-raw): New method.
6420         (<hw-register>,gen-set-quiet-raw): New method.
6421         (-hw-gen-set-quiet): New arg `gstate'.
6422         (hw-fun-access?): Delete.
6423         (gen-reg-access-defn): Output function contents.
6424         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6425         invocation.
6426         (-gen-hw-index): Ditto.
6427         (op:read): Update gen-read invocation.
6428         (op:write): Update gen-write invocation.
6429         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6430         operands.
6431         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6432         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6433         (<unit>,gen-profile-code): Update to sim.scm version.
6434
6435         * sim-arch.scm (-regs-for-access-fns): New proc.
6436         (-biggest-reg-mode): New proc.
6437         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6438         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6439         virtual regs separately.
6440         (-gen-cpu-reg-access-defns): Replace fun-access? with new
6441         get/set specs.
6442         (gen-semantic-code): Save/restore rtl generator state.
6443         (cgen-cpu.h): Call rtl-gen-init!.
6444         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
6445         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
6446         renamed to mach-bfd-name.
6447         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6448         (-gen-ifld-extract-beyond): Ditto.
6449         (<multi-ifield>,gen-ifld-extract): Ditto.
6450         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6451         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6452         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6453         `gstate'.
6454         (hw-fun-access?): Delete.
6455         (-hw-gen-set-quiet-pc): New arg `gstate'.
6456         (<hw-register>,gen-get-macro): Rewrite.
6457         (<hw-register>,gen-set-macro): Rewrite.
6458         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6459         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6460         (<hw-register>,cxmake-get-raw): New method.
6461         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6462         (<hw-register>,gen-set-quiet-raw): New method.
6463         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6464         invocation.
6465         (-gen-hw-index): Ditto.
6466         (<hw-index>): New arg `gstate'.
6467         (-gen-hw-selector): Update call to rtx-c.
6468         (<pc>): New arg `gstate'.
6469         (op:read): Update gen-read invocation.
6470         (op:write): Update gen-write invocation.
6471         (<operand>,cxmake-get): Handle raw-reg.
6472         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6473         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6474         (<operand>,gen-set-quiet): Handle raw-reg.
6475         (<operand>,gen-set-trace): Handle raw-reg.
6476         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6477
6478         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6479         cgen_operand_type enum.
6480         (gen-operand-table): Add operand type enum.  Replace pointer to
6481         hardware element with its enum.  Null terminate table.
6482         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6483         Build operand table.
6484         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6485         * mach.scm (<arch-data>): New member `isas'.
6486         (adata-isas): New accessor.
6487         (<isa>): New class.
6488         (isa-default-insn-word-bitsize): New accessor.
6489         (isa-enum): New proc.
6490         (current-arch-default-insn-word-bitsize): Delete.
6491         (current-isa-list,current-isa-lookup): New procs.
6492         (-arch-parse-isa): New proc.
6493         (-arch-parse): Rewrite.
6494         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6495         (define-arch): Define ISA attribute.
6496         (def-isa-attr!,isa-supports?): New procs.
6497         (<mach>): New member `isas'.
6498         (mach-isas): New accessor.
6499         (-mach-parse): New arg `isas', all callers updated.
6500         (-mach-read): Recognize `isas'.
6501         (arch-finish!): Rewrite.
6502         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6503         @arch@_cgen_get_{int,vma}_operand.
6504         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6505         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6506         of pointer to table entry.
6507         * opcodes.scm (gen-switch): Handle multiply defined operands.
6508         * operand.scm (op-sort): New proc.
6509
6510         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6511         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6512         (hw-enum): Accept symbol argument.
6513         (hardware-builtin!): Delete attribute FUN-ACCESS.
6514         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6515
6516         * attr.scm (atlist-source-form): New proc.
6517         (attr-builtin!): New attr `PRIVATE'.
6518         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6519         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6520         if they have `PRIVATE' attribute.
6521         (gen-hw-table-defns): Output definitions of explicitly defined
6522         keyword tables.
6523         * hardware.scm (<keyword>): New member print-name.  Rename member
6524         `value' to `values', all uses updated.
6525         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6526         (keyword-parse): Rewrite.
6527         (-keyword-read): New proc.
6528         (define-keyword): New proc.
6529         (-hw-parse-keyword): New proc.
6530         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6531         `extern-keyword'.
6532         (-hw-parse-values): Ditto.
6533         (-hw-parse-get,-hw-parse-set): Rewrite.
6534         (hardware-init!): Add new comment define-keyword.
6535         * mach.scm (<arch>): New member `kw-list'.
6536         (arch:kw-list,arch_set-kw-list!): New accessors.
6537         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6538
6539         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6540         * mode.scm (mode-class-integral?): New proc.
6541         (mode-class-float?,mode-class-numeric?): New procs.
6542         (mode-integral?,mode-float?,mode-numeric?): New procs.
6543         (mode-compatible?): New proc.
6544         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6545         rtx-c-with-alist.
6546         (<ifield>,gen-extract): Ditto.
6547         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6548         (<gstate>): New class.
6549         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6550         (gstate-context,gstate-set-context!): New accessors.
6551         (gstate-macro?,gstate-set-macro?!): New accessors.
6552         (gstate-make,gstate-copy): New procs.
6553         (-rtl-current-gstate): New global.
6554         (current-gstate-simulator?): New proc.
6555         (current-gstate-context,current-gstate-macro?): New procs.
6556         (current-gstate,current-gstate-set!): New procs.
6557         (rtl-gen-init!): Rewrite.
6558         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6559         (tstate-make): New arg `gstate', all callers updated.
6560         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6561         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6562         (tstate-gstate,tstate-set-gstate!): New accessors.
6563         (tstate-copy): New proc.
6564         (tstate-new-cond?,tstate-new-set?): Rewrite.
6565         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6566         (rtx-traverse): New arg `gstate', all callers updated.
6567         (rtx-strdump): New proc.
6568         (-simplify-for-compilation): New arg `gstate', all callers updated.
6569         (semantic-in-out-operands): Ditto.
6570         (semantic-attrs): Ditto.
6571         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6572         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6573         (rtx-value): Rewrite.
6574         (<c-expr>,gen-name): New method.
6575         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6576         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6577         (cx-new-mode): New proc.
6578         (-rtx-c-with-tstate): New proc.
6579         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6580         callers updated.
6581         (-rtx-mode): Rewrite.
6582         (-rtx-mode-compatible?): New proc.
6583         (<c-expr-temp>): New member `value'.
6584         (cx-temp:value): New accessor.
6585         (<c-expr-temp>,make!): Override default method.
6586         (<c-expr-temp>,cxmake-get): Rewrite.
6587         (<c-expr-temp>,gen-set-quiet): Rewrite.
6588         (<c-expr-temp>,gen-set-trace): Rewrite.
6589         (gen-temp-defs): Use cx-temp:value.
6590         (record-temp!): New arg value, all callers updated.
6591         (cx-temp:cx:make): Delete.
6592         (-cx-temp-dump-stack): New proc.
6593         (rtx-get): New arg `gstate', all callers updated.  Do mode
6594         compatibility checks.  Ensure result has specified mode.
6595         (rtx-set-quiet): New arg `gstate', all callers updated.
6596         (rtx-set-trace): Ditto.
6597         (s-c-call): New arg `tstate', all callers updated.
6598         (s-c-raw-call): Ditto.
6599         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6600         (s-cmpop,s-if,e-if): Ditto.
6601         (s-subreg): New proc.
6602         (-par-new-temp!): New proc.
6603         (-par-next-temp!): Rewrite.
6604         (-par-replace-set-dests): Use -par-new-temp!.
6605         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6606         (s-sequence): Use -rtx-c-with-state.
6607         * rtx-funcs.scm (*): Update.
6608         (raw-reg:): New rtx function.
6609         (make-di): Delete.
6610         (join:,subreg:): New rtx functions.
6611
6612         * insn.scm (<insn>): New members pre-cond-trap, condition,
6613         post-cond-trap, compiled-condition.
6614
6615         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6616
6617         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6618
6619         * utils-cgen.scm (parse-symbol): New proc.
6620         (parse-string): New proc.
6621         (gen-get-macro,gen-set-macro): New arg `index-args'.
6622         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6623         Prepend \ to newlines.
6624
6625         * utils.scm (alist-remove-duplicates): Delete.
6626
6627         * sid.scm (sim-init!): Delete private debugging code.
6628
6629 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6630
6631         * cgen-sid.scm: New file for C++ simulator application.
6632         * sid-arch.scm: Ditto.
6633         * sid-cpu.scm: Ditto.
6634         * sid-decode.scm: Ditto.
6635         * sid-model.scm: Ditto.
6636         * sid.scm: Ditto.
6637         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6638
6639 1999-03-05  Ben Elliston  <bje@cygnus.com>
6640
6641         * arm.cpu: New file.
6642
6643 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6644
6645         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6646         * Makefile.in: Rebuild.
6647
6648         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6649         (-attr-parse): Validate default value.
6650
6651         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6652         (-CGEN-LANG-VERSION): Ditto.
6653         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6654         (<reader>): New member keep-isa plus accessors.
6655         (-keep-isa-set!,keep-isa-validate!): New procs.
6656         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6657         (common-arguments): New variable.
6658         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6659         (-debug-repl,continue): New procs.
6660         (-cgen,cgen): New procs.
6661         * cgen-gas.scm: Rewrite.
6662         * cgen-opc.scm: Rewrite.
6663         * cgen-sim.scm: Rewrite.
6664         * cgen-stest.scm: Rewrite.
6665
6666         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6667         (gas-test-finish!): Call opcodes-finish!.
6668         (gas-test-analyze!): Call opcodes-analyze!.
6669         (<hw-asm>): New method test-data.
6670         (<operand>,testdata): Rewrite.
6671         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6672         (sim-test-finish!): Call opcodes-finish!.
6673         (sim-test-analyze!): Call opcodes-analyze!.
6674         (<hw-asm>): New method test-data.
6675         (<operand>,testdata): Rewrite.
6676
6677 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6678
6679         * fixup.scm (reverse!): Define if missing.
6680         * *.scm: Use reverse! instead of list-reverse!.
6681
6682         * utils.scm (leading-id-char?): New proc.
6683         (id-char?): Rewrite.
6684         (chars-until-delimiter): New proc.
6685         * opc-itab.scm (extract-syntax-operands): Rewrite.
6686         (strip-mnemonic): Rewrite.
6687         (compute-syntax): Rewrite.
6688
6689         * pmacros.scm (-pmacro-substr): New proc.
6690         (pmacros-init!): Add builtin .substr.
6691
6692 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6693
6694         * thumb.cpu: New file.
6695
6696 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6697
6698         * Makefile.am (CGENCFLAGS): New variable.
6699         (WITH_HOBBIT): Use automake conditional.
6700         (CGEN_HOB_SRC): New variable.
6701         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6702         (*.o): Compile with CGENCFLAGS.
6703         (cgen-hob.c): Simplify.
6704         (cgen-nohob.c): New rule.
6705         (hobbit): Renamed from hob.x.
6706         (CLEANFILES): Add cgen-nohob.c.
6707         * Makefile.in: Rebuild.
6708         * doc/Makefile.in: Rebuild.
6709         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6710         (WITH_HOBBIT): Use AM_CONDITIONAL.
6711         * configure: Rebuild.
6712         * aclocal.m4: Rebuild.
6713
6714         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6715         with string-write-map.
6716
6717         * sim-cpu.scm (hw-need-storage?): New proc.
6718         (-gen-hardware-types): Use it.
6719         (gen-parallel-exec-elm): Call op-save-index?.
6720
6721         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6722
6723         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6724         UNSIGNED attribute.
6725         (-gen-ifld-extract-beyond): Ditto.
6726         (<integer>): Delete all references.
6727         (<sim-hardware>): Delete.
6728         (hw-profilable?): New proc.
6729         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6730         (<hw-register>): Rename method get-index-mode to save-index?.
6731         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6732         (<hw-register>,gen-sym-decl): Make virtual.
6733         (<hw-memory>,gen-sym-decl): Make virtual.
6734         (<hw-memory>): Rename method get-index-mode to save-index?.
6735         (<hw-address>,gen-sym-decl): Make virtual.
6736         (<operand>): New method save-index?.
6737         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6738
6739         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6740         prefix added.  All uses updated.
6741
6742         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6743         rather than pointer to table entry.
6744
6745         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6746         Remove all hw-asm,op-asm support.
6747         (-gen-parse-number,-gen-parse-address): New procs.
6748         (<keyword>,gen-parse): Redo function name computation.
6749         (<keyword>,gen-print): Ditto.
6750         (<operand>,gen-function-name): Rewrite.
6751         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6752         (opcodes-init!): Delete call to add-parser!.
6753
6754         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6755         Define enum using hardware semantic name.
6756         (-gen-hw-decl,-gen-hw-defn): New procs.
6757         (gen-hw-table-decls): Use -gen-hw-decl.
6758         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6759         CGEN_HW_ENTRY structs.
6760         (gen-operand-table): Output hw's enum, not pointer to table entry.
6761         (-gen-cpu-open): Build table of selected hardware elements.
6762
6763         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6764         (<hardware> support): Delete.
6765         (<hw-asm>): Delete, moved to hardware.scm.
6766         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6767         (<hw-asm>,gen-table-entry): New method.
6768         (<hw-asm>,parse!): Delete.
6769         (<keyword>,gen-table-entry): New method.
6770         (<keyword>,parse!): Delete.
6771         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6772         for gen-decl,gen-defn,gen-ref,gen-init.
6773         (desc-init!): Don't create parser for operand asm specs.
6774
6775         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6776         * ifield.scm (<ifield>): New member `mode'.
6777         (<ifield>,make!): New arg `mode'.
6778         (ifld-mode): Rewrite.
6779         (ifld-hw-type): Rewrite.
6780         (<ifield>,min-value): Rewrite.
6781         (<ifield>,max-value): Rewrite.
6782         (-ifield-parse): New arg `mode'.
6783         (-ifield-read): Update.
6784         (define-full-ifield): New arg `mode'.
6785         (define-full-multi-ifield): Ditto.
6786         (-multi-ifield-parse): Ditto.
6787         (-multi-ifield-read): Update.
6788         (define-full-multi-ifield): New arg `mode'.
6789         (ifield-builtin!): Update definition of f-nil.
6790         * simplify.inc (define-normal-ifield): Update call to
6791         define-full-ifield.
6792         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6793         (define-normal-hardware): Delete arg asm.  New args indices, values,
6794         handlers.  Update call to define-full-hardware.
6795         (define-simple-hardware,dsh): New pmacros.
6796         (define-normal-operand): Update call to define-full-operand.
6797         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6798         Specify INT/UINT mode instead.
6799         (h-gr,h-cr): Use "indices" instead of "asm".
6800         (h-dr,h-ps): Update keyword syntax.
6801         (h-r13,h-r14,h-r15): Ditto.
6802         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6803         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6804         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6805         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6806         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6807         Specify INT/UINT mode instead.
6808         (h-gr): Use "indices" instead of "asm".
6809         (h-cc): Update keyword syntax.
6810         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6811         Specify INT/UINT mode instead.
6812         (h-hi16,h-slo16,h-ulo16): Update.
6813         (h-gr,h-cr): Use "indices" instead of "asm".
6814         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6815         (h-accums): Update keyword syntax.
6816         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6817         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6818         Specify INT/UINT mode instead.
6819         (h-gr-indices): New pmacro.
6820         (h-gr32,h-gr64): Split up from h-gr.
6821         (h-a): Update type spec.  Use values instead of asm spec.
6822         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6823         (h-y,h-annul-p): Ditto.
6824         (h-asr): Update keyword spec.
6825         (h-lo10,h-lo13,h-hi22): Update.
6826         (get-freg-spec,set-freg-spec): New pmacros.
6827         (h-fr32,h-fr64): Split up from h-fr.
6828         (rdd): Comment out get/set specs.
6829         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6830         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6831         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6832         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6833         UNSIGNED.  Specify INT/UINT mode instead.
6834         (h-*): Use dsh instead of dnh where appropriate.
6835         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6836         (h-p,h-membarmask): Ditto.
6837         (membarmask): Use "handlers" instead of "asm".
6838
6839         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6840         values,handlers,getters,setters plus accessors.
6841         (hw-mode-ok?,hw-default-mode): New procs.
6842         (<hardware-base>): Rename method new-mode to mode-ok?
6843         (<hardware-base>): New method get-index-mode.
6844         (hw-index-mode): New proc.
6845         (pc?): Delete, moved to operand.scm.
6846         (address?): New proc.
6847         (<hardware>): Delete.
6848         (<hw-asm>): Definition moved here from desc.scm.
6849         (keyword-parse): New proc.
6850         (hardware-parsers): Delete.
6851         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6852         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6853         (-hw-parse-get,-hw-parse-set): New procs.
6854         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6855         indices,values,handlers,get,set.  Rewrite.
6856         (-hw-read-extra): Delete.
6857         (-hw-read): Update.
6858         (define-hardware): Don't add object if not selected.
6859         (define-full-hardware): Ditto.
6860         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6861         (<hw-register>): Member `type' moved to baseclass.  Delete member
6862         hw-asm.
6863         (<hw-register>,parse!): Rewrite.
6864         (<hw-register>): Delete methods get-rank,get-mode.
6865         (<hw-register>): Method new-mode renamed to mode-ok?
6866         (<hw-register>): New method get-index-mode.
6867         (<hw-pc>,parse!): Rewrite.
6868         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6869         (<hw-memory>,parse!): Rewrite.
6870         (<hw-memory>): Delete methods get-rank,get-mode.
6871         (<hw-memory>): Method new-mode renamed to mode-ok?
6872         (<hw-memory>): New method get-index-mode.
6873         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6874         hw-asm.
6875         (<hw-immediate>,parse!): Rewrite.
6876         (<hw-immediate>): Delete methods get-rank,get-mode.
6877         (<hw-immediate>): Method new-mode renamed to mode-ok?
6878         (<hw-address>): Delete member hw-asm.
6879         (<hw-address>,parse!): Rewrite.
6880         (<hw-address>): Delete methods get-rank,get-mode.
6881         (<hw-address>): Method new-mode renamed to mode-ok?
6882         (hw-profilable?): Delete.
6883         (hardware-init!): Delete hardware-parsers reference.
6884         Update argument specs of command define-full-hardware.
6885         (hardware-builtin!): Update definitions of hardware builtins.
6886         * operand.scm (<operand>): New members hw-name,mode-name.
6887         Delete member op-asm.  New member handlers.
6888         (<operand>,make!): Update.
6889         (op:hw-name,op:mode-name,op:handlers): New procs.
6890         (op:type): Rewrite.
6891         (op:mode): Rewrite.
6892         (<operand>): New method get-index-mode.
6893         (<pc>,make!): Update.
6894         (op:new-mode): Rewrite.
6895         (operand-parsers): Delete.
6896         (-operand-parse): Rewrite.  Return #f if insn not selected.
6897         (-op-read-extra): Delete.
6898         (-operand-read): Update.
6899         (define-operand,define-full-operand): Update.
6900         (operand-init!): Delete operand-parsers reference.
6901         Update syntax of define-full-operand command.
6902
6903         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6904         (define-full-insn): Update.
6905         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6906         (define-full-minsn): Update.
6907
6908         * mode.scm (<mode>): New member class.
6909         (mode:class): New proc.
6910         (mode?): Rewrite.
6911         (-mode-parse): New arg class.
6912         (define-full-mode): Update.
6913         (mode-find): Rewrite.
6914         (mode-make-int,mode-make-uint): New procs.
6915         (mode-init!): Update syntax of define-full-mode command.
6916         (mode-builtin!): Update definitions of builtin modes.
6917
6918         * model.scm (<profile>): Delete.
6919
6920         * read.scm (keep-atlist?): New proc.
6921         (keep-multiple?): New proc.
6922         (<parser-list>): Delete.
6923         (add-parser!,parse-spec!): Delete.
6924
6925         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6926         (def-rtx-syntax-node): Ditto.
6927         (-rtx-traverse-debug?): New variable.
6928         (tstate-make): New proc.
6929         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6930         (tstate-new-cond?,tstate-new-set?): New procs.
6931         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6932         tstate.  All callers updated.
6933         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6934         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6935         (-build-operand!): Replace arg cond? with tstate.
6936         (-build-reg-operand!,-build-mem-operand!): Ditto.
6937         (-build-index-of-operand!): Update making of <operand> object.
6938         (s-ifield): New arg tstate.  All callers updated.
6939         (hw:): New arg tstate.  All callers updated.  Replace call to
6940         current-hw-lookup with current-hw-sem-lookup-1.
6941         (s-index-of): New arg tstate.  All callers updated.
6942         (reg:,mem:): Ditto.
6943         (-rtx-use-sem-fn?): New proc.
6944         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6945         semantic cover fns.
6946         (s-convop): Only use semantic mode when using semantic cover fns.
6947         (s-cmpop): Call -rtx-use-sem-fn?.
6948         (s-cond,s-case): New arg tstate.  All callers updated.
6949         (s-parallel,s-sequence): Ditto.
6950
6951         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6952
6953         * types.scm (<scalar>): Rewrite implementation.
6954         (<integer>): Delete.
6955         (parse-type): Rewrite.
6956
6957         * utils-cgen.scm (parse-handlers): New proc.
6958
6959         * utils.scm (!=): New proc.
6960
6961 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6962
6963         * pmacros.scm (-pmacro-expand): Fix typo.
6964
6965 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6966
6967         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6968         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6969         * i960.cpu (build-hex2): New pmacro.
6970         (insn-opcode): Simplify.
6971         (insn-opcode2): Ditto.
6972
6973         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6974         * cgen-stest.scm (catch-with-backtrace): Ditto.
6975
6976 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6977
6978         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6979         All callers updated.
6980         (-pmacro-invoke): New proc.
6981         (-pmacro-sym,-pmacro-str): New procs.
6982         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6983         (pmacros-init!): Install builtins .iota, .map, .apply.
6984         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6985         (h-fr): Simplify register name spec.
6986         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6987         * utils.scm (num-args-ok?): New proc.
6988
6989 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6990
6991         * pmacros.scm (-pmacro-error): New proc.
6992         (-pmacro-expand): Use it.
6993         (-pmacro-splice): New proc.
6994         (pmacros-init!): Install new builtin .splice.
6995
6996         * sparc.cpu: Include sparc64.cpu when appropriate.
6997         (f-mmask,f-simm11): Moved to sparc64.cpu.
6998         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6999         (ANNUL attribute): Delete.
7000         (test-* pmacros): New arg cc, all callers updated.
7001         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
7002         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
7003         atomic-opc.
7004         (ldstub,swap): Moved to sparccom.cpu.
7005         * sparc64.cpu: Add more insns.
7006
7007 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
7008
7009         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
7010         CGEN_ATTR_VALUE.
7011         (cgen-sem-switch.c): Ditto.
7012         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
7013         moved to cgen-engine.h.
7014         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
7015         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
7016         global.  Cache attributes and insn length in IDESC.
7017         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
7018         @cpu@_opcode renamed to @cpu@_get_idata.
7019         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
7020         done later underneath sim_resume.
7021         (@mach@_mach): Record @cpu@_prepare_run.
7022         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
7023         updated.
7024         (-hw-gen-set-quiet-pc): Ditto.
7025         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
7026         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
7027         (<hw-addr>,cxmake-get): Ditto.
7028         (<hw-iaddr>,cxmake-get): Ditto.
7029         (<pc>,cxmake-get): Ditto.
7030         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
7031         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
7032         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
7033         (<hw-pc>,gen-write): Use hw-selector-default.
7034         (<hw-register>,gen-write): Ditto.
7035         (<hw-memory>,gen-write): Ditto.
7036         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
7037         (-gen-hw-selector): New proc.
7038
7039         * desc.scm: New file.
7040         * desc-cpu.scm: New file.
7041         * opcodes.scm: Split up into several smaller files.
7042         * opc-asmdis.scm: New file.
7043         * opc-ibld.scm: New file.
7044         * opc-itab.scm: New file.
7045         * opc-opinst.scm: New file.
7046         * Makefile.am (desc): New target.
7047         (opcodes): Update args to cgen-opc.scm.
7048         * Makefile.in: Rebuild.
7049         * aclocal.m4: Rebuild.
7050         * config.in: Rebuild.
7051         * configure.in: Update arg to AC_INIT.
7052         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
7053         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
7054         AC_PROG_INSTALL.
7055         * configure: Rebuild.
7056         * cgen-gas.scm: Update files to load.
7057         * cgen-opc.scm: Ditto.  Reorganize option letters.
7058         * cgen-sim.scm: Update files to load.
7059         * cgen-stest.scm: Ditto.
7060         * dev.scm (cload): New app "DESC".
7061         (load-opc): Update files to load.
7062         (load-gtest,load-sim,load-stest): Ditto.
7063
7064         * attr.scm (bool-attr?): New proc.
7065         (attr-list-enum-list): New proc.
7066         (-attr-sort): Rewrite.
7067         (attr-builtin!): Give ALIAS attribute a fixed index.
7068         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
7069         calculate attribute enum list.
7070         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
7071
7072         * insn.scm (-insn-parse): Renamed from parse-insn.
7073
7074         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
7075         (-hw-read): Ditto.
7076
7077         * mode.scm (-mode-parse): Renamed from parse-mode.
7078
7079         * operand.scm (<operand>): New member `selector'.
7080         (<operand>,make!): Use default selector.
7081         (hw-selector-default): New variable.
7082         (hw-selector-default?): New proc.
7083
7084         * pmacros.scm (pmacros-init!): New proc.
7085         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
7086         (-env-set!): Delete.
7087         (-pmacro-expand): New proc apply-macro.
7088         Use it in scan-list,scan.  Scan list first, then see if macro
7089         invocation.
7090         (define-pmacro): Rewrite.
7091         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
7092
7093         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
7094         selected if (current-mach) seen.
7095         (rtx?): Renamed from rtx-uneval?, all callers updated.
7096         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
7097         updated.
7098         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
7099         selector, all callers updated.
7100         (hw:): New arg selector, all callers updated.  Delete old comments
7101         and code.
7102         (reg:,mem:): Handle selectors
7103         * rtx-funcs.scm (reg:): Handle selectors.
7104
7105         * read.scm: Renamed from cpu.scm.
7106         (<command>): New class.
7107         (<reader>): New member commands.
7108         (reader-add-command!): New proc.
7109         (reader-lookup-command): New proc.
7110         (reader-error,-reader-process-expanded,reader-process): New procs.
7111         (reader-read-file!): New proc.
7112         (include): Call reader-read-file!.
7113         (cmd-if): New proc.
7114         (cpu-load): Call reader-read-file!.
7115         * utils.scm (num-args): New proc.
7116         * simplify.inc: New file.
7117         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
7118         procs.  Move define-normal-foo procs (and abbreviated forms) to
7119         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
7120         routines.
7121         * fr30.cpu: Include simplify.inc.
7122         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7123         * i960.cpu: Include simplify.inc.
7124         * m32r.cpu: Include simplify.inc.
7125         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7126         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7127         * sparc.cpu: Include simplify.inc.
7128         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7129         * utils-cgen.scm (parse-error): Moved to read.scm.
7130         (sanitize): Rewrite.
7131         (utils-init!): New proc.
7132
7133 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
7134
7135         * sparc.cpu: New file.
7136         * sparc32.cpu: New file.
7137         * sparc64.cpu: New file.
7138         * sparccom.cpu: New file.
7139         * sparc.opc: New file.
7140
7141 1999-01-27  Frank Eigler  <fche@cygnus.com>
7142
7143         * utils.scm (gen-copyright): New proc.
7144
7145 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
7146
7147         Parameterize rtl parsing, rather than having lots of little handlers.
7148         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7149         Delete member traverse.
7150         (rtx:set-traverse!): Delete.
7151         (-rtx-valid-types,-rtx-valid-matches): New variables.
7152         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7153         instead of expression.  All callers updated.
7154         (def-rtx-node): New args arg-types,arg-modes.
7155         (def-rtx-syntax-node): Ditto.
7156         (def-rtx-dual-mode): Ditto.
7157         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7158         All callers updated.
7159         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7160         All callers updated.
7161         (rtx-macro-expand): New proc.
7162         (-rtx-traverse-check-args): Delete.
7163         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7164         an rtx specific traverser.
7165         (-rtx-any-mode?,-rtx-symornum?): New procs.
7166         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7167         (-rtx-traverse-no-mode): Delete.
7168         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7169         (-rtx-traverse-operands): Rewrite.
7170         (-rtx-traverse-expr): Rewrite.
7171         (rtx-traverse): Don't expand macros here, leave for caller to do.
7172         (rtx-simplify): Delete.
7173         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
7174         attributes.
7175         (rtx-true?,rtx-false?): Ditto.
7176         (-rtx-ref-type): Set dest is operand 1 now.
7177         (-simplify-for-compilation): New proc.
7178         (semantic-in-out-operands): Recognize regno as an alias for index-of.
7179         Expand macros before calling rtx-traverse.  Sort operands by name
7180         to avoid unnecessary semantic formats.
7181         (semantic-attrs): New proc.
7182         (rtx-uneval?): Handle (<rtx-func> ...).
7183         (s-boolifop): Delete arg mode.  All callers updated.
7184         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7185         (eq-attr): New arg obj.
7186         (eq-attr:): Delete.
7187         * m32r.cpu (rach): Update calls to andif.
7188
7189         * minsn.scm (-minsn-parse-expansion): Renamed from
7190         parse-minsn-expansion.
7191         (-minsn-parse): Renamed from parse-minsn.
7192         (-minsn-read): Renamed from read-minsn.
7193         (def-minsn): Don't check APPLICATION here.
7194         (def-full-minsn): New proc.
7195         (define-macro-insn): Check APPLICATION here.  Expand macros.
7196         (define-normal-macro-insn): Ditto.
7197
7198         * utils.scm (word-value): New arg start-lsb?.
7199         (word-mask,word-extract): Ditto.
7200         (split-bits,powers-of-2): Use integer-expt instead of expt.
7201         (bit-set?): Handle 32 bit values (which are bignums).
7202         (cg-logand,cg-logxor): New functions.
7203         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7204         (<ifield>,field-value): Update call to word-value.
7205         (<ifield>,min-value): Use integer-expt instead of expt.
7206         (<ifield>,max-value): Ditto.
7207
7208         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7209
7210         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7211
7212         Compute raw instruction format in addition to semantic based format.
7213         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7214         (<iformat> accessors): Rename accessors to ifmt-*.
7215         (<sformat>): New class.
7216         (fmt-enum): Renamed from fmt:enum.
7217         (-ifmt-search-key): Rewrite.
7218         (-sfmt-search-key): New proc.
7219         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7220         Compute iformat and sformat search keys.
7221         (ifmt-build): Update.
7222         (sfmt-build): New proc.
7223         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7224         (ifmt-compute!): Compute instruction format <iformat> based on
7225         instruction fields alone.  Compute new semantic format <sformat>
7226         based on instruction fields and semantic information.
7227         (ifmt:lookup): Delete.
7228         * mach.scm (<arch>): New member sfmt-list, plus accessors.
7229         (current-sfmt-list): New proc.
7230         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7231         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
7232         (insn-length,insn-length-bytes): Update.
7233         (insn:mask-length,insn:mask): Update.
7234         (insn-lookup-op): Update.
7235         * gas-test.scm (gas-test-analyze!): Update.
7236         (gen-gas-test): Ditto.
7237         * sim-test.scm (sim-test-analyze!): Update.
7238         (gen-sim-test): Ditto.
7239         * opcodes.scm (gen-operand-instance-table): Update.
7240         (gen-operand-instance-ref): Ditto.
7241         (max-operand-instances): Use heuristic if semantics not parsed.
7242         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7243         (opcodes-analyze!): Only scan semantics of building operand instance
7244         tables.
7245         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7246         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7247         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7248         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7249         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7250         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7251         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7252
7253         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7254         New arg lsb0?  All callers updated.
7255         (decode-bits): New arg lsb0?.  All callers updated.
7256         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
7257         of expt.
7258         (-gen-decode-bits): New arg lsb0?.  All callers updated.
7259         (build-slots): Call integer-expt instead of expt.
7260         (build-decode-table-entry): Handle crossing word boundaries better.
7261         (-gen-decode-switch): New arg lsb0?.  All callers updated.
7262         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7263
7264         * enum.scm (define-enum): Rewrite.
7265         (define-normal-enum): Ditto.
7266         (def-full-insn-enum): New proc.
7267         (define-normal-insn-enum): Rewrite.
7268
7269         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7270         valid C.
7271         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7272
7273         * dev.scm: Add sid support.
7274
7275         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7276         (CLEANFILES): Add tmp-*.
7277         * Makefile.in: Rebuild.
7278
7279         * doc/Makefile.am: New file.
7280         * doc/Makefile.in: New file.
7281         * doc/cgen.texi: New file.
7282         * Makefile.am (SUBDIRS): Define.
7283         * Makefile.in: Rebuild.
7284         * configure.in: Create doc/Makefile.
7285         * configure: Rebuild.
7286
7287 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
7288
7289         * insn.scm (insn:syn): Delete.
7290
7291 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
7292
7293         * fr30.cpu (model fr30-1): Add state variables load-regs,
7294         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
7295         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7296         (model m32rx): Ditto.
7297         (addi): Simplify function unit usage spec.
7298         (ld-plus): Rewrite operand names in function unit usage spec.
7299         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7300         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7301         overridden.  Allow operand to appear in input and output spec.
7302         (<insn>,gen-profile-code): string-append -> string-list.
7303
7304         * ifield.scm (define-ifield): Call pmacro-expand.
7305         (define-full-ifield,define-normal-ifield): Ditto.
7306         (define-multi-ifield,define-normal-multi-ifield): Ditto.
7307
7308         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7309         with-scache and without-scache cases.
7310
7311 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
7312
7313         * fr30.cpu (fr30-1): Add state variable h-gr.
7314         Add units u-cti, u-load, u-store, u-ldm, u-stm.
7315         (all insns): First pass at providing cycle counts.
7316         * sim.scm (<unit>,gen-profile-code): Only check for output operands
7317         when initializing unit output operands, ditto for input operands.
7318
7319         * insn.scm (insn-length,insn-length-bytes): New procs.
7320         * mach.scm (-adata-set-derived!): Use them.
7321         * sim-cpu.scm (-gen-sem-case): Ditto.
7322
7323         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7324         (-gen-write-case): Ditto.
7325         (gen-semantic-fn): Ditto.  Split into two:
7326         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
7327         in non-scache case.
7328         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
7329         scache/no-scache appropriately.  All callers updated.
7330         (-gen-sem-case): PCADDR->IADDR.
7331         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7332
7333         * sim-decode.scm (*): Replace string-append,string-map with
7334         string-list,string-list-map where the result is sufficiently large.
7335         (-gen-decode-insn-table): Go back to simple version for non-scache
7336         case: just record IDESC in decoder tables and leave field extraction
7337         to the caller.
7338         (-gen-decode-switch): Ditto.
7339         (-gen-decode-fn): Ditto.
7340         (-gen-extract-decls): Only emit format enum if with-scache?.
7341         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7342         non-scache case.
7343         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7344         (-gen-insn-timing): Ditto.
7345         * sim.scm (gen-argbuf-type): Only output sem_fields union in
7346         with-scache case.
7347
7348         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7349         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7350
7351 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
7352
7353         * cpu.scm (keep-mach-validate!): New proc.
7354         (include): New proc.
7355
7356         * mach.scm (current-arch-mach-name-list): New proc.
7357         (-parse-arch-machs): Always return canonical form.
7358         (def-arch): Validate user specified machs to be kept.
7359         (def-mach-attr!): Simplify.
7360
7361         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7362         (option-init!): Initialize it.
7363         (option-set!): Set it.
7364         (gen-insn-table-entry): Emit 0 for operand instance ref if not
7365         output operand instance tables.
7366         (cgen-opc.in): Only output operand instance tables if asked to.
7367
7368         * sim.scm (option-init!,option-set!): Clarify returned value.
7369
7370         * sim.scm (gen-mach-bfd-name): Move from here.
7371         * utils-cgen.scm: To here.
7372
7373 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
7374
7375         * fr30.cpu (ilm): Fix comment field.
7376         (cond-branch): Remove explicit setting of COND-CTI, let cgen
7377         compute it.
7378
7379         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7380         (rtx-true?, rtx-false?): New procs.
7381         * rtx-funcs.scm (annul): Rename vpc to pc.
7382         (-rtx-traverse-if): Improve determination of whether then/else parts
7383         are conditionally executed.
7384
7385         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7386         outer level.
7387         (gen-argbuf-type): Simplify generated definition (big sem_fields
7388         union moved outside).
7389
7390 1999-01-11  Ben Elliston  <bje@cygnus.com>
7391
7392         * doc/porting.texi: New file.
7393
7394         * doc/intro.texi: New file.
7395         (Layout): Use @example to insert preformatted ASCII text (such as
7396         diagrams). @code is inappropriate here.
7397
7398 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
7399
7400         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7401
7402         * m32r.opc (print_hash): Cast dis_info.
7403
7404         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7405         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7406         get/set macros.
7407
7408 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
7409
7410         * i960.cpu (f-br-disp): Remove RELOC attribute.
7411         (f-ctrl-disp): Ditto.
7412         (callx-disp): set-quiet -> set for (reg h-gr 2).
7413         (callx-indirect,callx-indirect-offset): Ditto.
7414
7415         * Makefile.am (gas-test): Fix dependencies.
7416         * Makefile.in: Rebuild.
7417         * cgen-gas.asm: File creation args are -<uppercase-letter>.
7418         * gas-test.scm (break-out-syntax,make-file-name): Delete.
7419         (gas-test-analyze!): Use syntax-break-out.
7420         * sim-test.scm (break-out-syntax,make-file-name): Delete.
7421         (sim-test-analyze!): Use syntax-break-out.
7422         (cgen-build.sh): Use gen-file-name.
7423         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7424         * insn.scm (syntax-break-out): New proc.
7425         * utils.scm (gen-file-name): New proc.
7426
7427         * fixup.scm (nil,<?,<=?,>?): Delete.
7428
7429         * utils.scm (count-true): Rewrite.
7430
7431         * slib/sort.scm: Move sort.scm to slib directory.
7432         * cpu.scm: Update.
7433
7434         * iformat.scm (ifmt-compute!): Record empty format.
7435
7436         * rtl.scm (semantic-in-out-operands): Simplify by moving several
7437         internal procs outside.  Handle expression register numbers.
7438         Handle index-of.
7439
7440         * rtx-funcs.scm (annul): Rename new_pc to vpc.
7441
7442         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7443         every register.
7444         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7445         (gen-semantic-fn,-gen-sem-case): Ditto.
7446         (cgen-cpu.c): Define WANT_CPU to @cpu@.
7447         (cgen-semantics.c): Ditto.
7448         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7449         (gen-ifmt-argvars-defns): New proc.
7450         (gen-ifmt-argvars-assigns): New proc.
7451         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7452         (-gen-decode-fn): Handle non-with-scache case.
7453         (cgen-decode.c): Define WANT_CPU to @cpu@.
7454         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7455         (cgen-model.c): Define WANT_CPU to @cpu@.
7456         * sim.scm (gen-ifld-extract-argvar): New proc.
7457         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7458         with FUN-ACCESS specified.
7459         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7460         (<hw-register>,gen-extract): New arg local?.
7461         (<hw-address>,gen-extract): Ditto.
7462         (-hw-cxmake-get): Handle non-with-scache case.
7463         (-hw-gen-set-quiet): Ditto.
7464         (<hw-address>,cxmake-get): Handle non-with-scache case.
7465         (gen-op-extract-argvar): New proc.
7466         (<operand>,gen-record-profile): Rewrite.
7467         (<operand>,gen-profile-code): Rewrite.
7468         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7469         (gen-argbuf-fields-union): New proc.
7470         (gen-argbuf-type): Use it.  Handle non-scache case.
7471
7472         * *.scm: class:foo procs renamed to class-foo.
7473         * attr.scm (<attribute>): New member `for'.
7474         (-attr-parse): New first value in list for default if
7475         none specified.
7476         (non-bool-attr-list,attr:add!): Delete.
7477         (def-attr): Use current-attr-add!.
7478         (atlist-attr-value-no-default): New proc.
7479         (attr-lookup-default): Handle boolean attributes.
7480         (gen-attr-enum): New proc.
7481         (-attr-remove-meta-attrs-alist): New proc.
7482         (attr-nub): New proc.
7483         (current-attr-list-for): New proc.
7484         (current-{ifld,hw,op,insn}-attr-list): New procs.
7485         (attr-builtin!): New proc.
7486         * cpu.scm (keep-obj?): Rewrite.
7487         (-init-parse-cpu!): Call arch-init!.
7488         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7489         (-finish-parse-cpu!): Call arch-finish!.
7490         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7491         (def-enum,def-full-enum): Use current-enum-add!.
7492         (gen-obj-list-enums): New proc.
7493         * hardware.scm (hw:add!,hw:lookup): Delete.
7494         (def-hardware,def-hardware-ext): Use current-hw-add!.
7495         (hw:std-attrs,hw:attr-list): Delete.
7496         (hardware-builtin!): Define builtin hardware attributes.
7497         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7498         (def-ifield,def-full-ifield): Use current-ifld-add!.
7499         (ifld:std-attrs,ifld:attr-list): Delete.
7500         (ifield-builtin!): New proc.
7501         * insn.scm (insn:add!,insn:lookup): Delete.
7502         (def-full-insn): Use current-insn-add!.
7503         (insn:std-attrs): Delete.
7504         (insn-builtin!): New proc.
7505         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7506         minsn-list.
7507         (<arch-data>): New member machs.
7508         (current-attr-list,current-enum-list): New procs.
7509         (current-op-list,current-minsn-list): New procs.
7510         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7511         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7512         Ditto.
7513         (-parse-arch-machs): New proc.
7514         (-arch-parse): New arg machs, all callers updated.
7515         (-arch-read): Handle machs spec.
7516         (def-arch): Define MACH attribute here.
7517         (mach-init!,mach-finish!): Not here.
7518         (cpu:add!,cpu:lookup): Delete.
7519         (def-cpu): Use current-cpu-add!.
7520         (<mach>): New member bfd-name.
7521         (-mach-parse): New arg bfd-name, all callers updated.
7522         (-mach-read): Handle bfd-name spec.
7523         (mach:add!,mach:lookup): Delete.
7524         (def-mach): Use current-mach-add!.
7525         (def-mach-attr!): New proc.
7526         (arch-init!): New proc.
7527         (arch-finish!): New proc.  Reverse all object lists here.
7528         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7529         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7530         (define-normal-macro-insn): Ignore minsn if mach not kept.
7531         * mode.scm (mode-builtin!): New proc.
7532         * model.scm (model:add!,model:lookup): Delete.
7533         (def-model): Use current-model-add!.
7534         * opcodes.scm (insn:attr-list): Delete.
7535         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7536         (gen-attr-table-defn): Emit value for default.
7537         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7538         (op:attr-list): Delete.
7539         (gen-operand-decls,gen-insn-decls): New proc.
7540         (compute-insn-attr-list): Delete.
7541         (cgen-opc.h): Reorganize and simplify.
7542         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7543         (def-operand,def-full-operand): Use current-op-add!.
7544         (op:std-attrs): Delete.
7545         (operand-enum): Delete.
7546         (operand-builtin!): Define builtin operand attrs.
7547         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7548         (gen-attr-enum-decl): Use gen-obj-list-enums.
7549         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7550         Rewrite.
7551         * fr30.cpu (define-arch): Add machs spec.
7552         (f-i4): SIGNED attribute -> !UNSIGNED.
7553         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7554         (HASH-PREFIX): Define operand attribute.
7555         (NOT-IN-DELAY-SLOT): Define insn attribute.
7556         * i960.cpu (define-arch): Add machs spec.
7557         * m32r.cpu (define-arch): Add machs spec.
7558         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7559         (HASH-PREFIX): Define operand attribute.
7560         (FILL-SLOT): Define insn attribute.
7561
7562 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7563
7564         * fr30.cpu (stilm): Correct mask for and operation.
7565
7566 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7567
7568         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7569         Replace START/EXIT with start/pass.
7570         (gen-sim-test): Delete ".text".
7571
7572 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7573
7574         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7575
7576 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7577
7578         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7579         (h-sbit): Make it FUN-ACCESS.
7580         (h-gr): Reorder so that general regs are always printed by number.
7581
7582 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7583
7584         * i960.cpu (flushreg): Use nop.
7585
7586 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7587
7588         * m32r.cpu (default-alignment): Specify.
7589         * mach.scm (<arch-data>): New member default-alignment.
7590         (adata:default-alignment): New proc.
7591         (current-arch-default-alignment): New proc.
7592         (-arch-parse): New arg default-alignment.
7593         (parse-alignment): New proc.
7594         (-arch-read): Handle default-alignment spec.
7595
7596         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7597
7598         * insn.scm (f-%): Delete.
7599         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7600         be readded if proved useful.
7601         (gen-extract-fields): Ditto.  Use gen-ifetch.
7602         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7603         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7604
7605 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7606
7607         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7608
7609 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7610
7611         * fr30.cpu: Remove stub macros.
7612         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7613         (div2): Don't use addc/subc.
7614
7615 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7616
7617         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7618         if opcodes.
7619
7620 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7621
7622         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7623
7624 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7625
7626         * cpu.scm (keep-all?): New proc.
7627         (assert-keep-all): Use it.
7628         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7629         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7630         Check for spelling errors.
7631
7632 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7633
7634         * rtl.scm (s-convop): Call -rtx-sem-mode.
7635
7636 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7637
7638         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7639         (-parse-hw-profile): Ditto.
7640         (<hw-register>, parse!): Return `void' result.
7641         (<hw-pc>, parse!): Ditto.
7642         (<hw-memory>, parse!): Ditto.
7643         (<hw-immediate>, parse!): Ditto.
7644         (<hw-address>, parse!): Ditto.
7645
7646         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7647         (-ifld-parse-encode-decode): New proc.
7648         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7649         (-multi-ifield-parse): Set encode/decode to #f.
7650         (ifld:decode-mode): New proc.
7651         * utils.scm (nub): Rewrite.
7652         * operand.scm (op-nub): Rewrite.
7653         * sim.scm (<ifield>, gen-type): Rewrite.
7654         (-gen-ifld-argbuf-defn): New proc.
7655         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7656         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7657         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7658         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7659         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7660         New method gen-trace-extract.
7661         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7662         from gen-argbuf-elm, return "" if not caching register address.
7663         Rewrite gen-extract.  New method gen-trace-extract.
7664         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7665         gen-extract, gen-trace-extract, cxmake-get.
7666         (<hw-iaddress>): New method cxmake-get.
7667         (op-needed-iflds): New proc.
7668         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7669         (-gen-op-argbuf-defn): New proc.
7670         (gen-op-extract): Renamed from op:extract.
7671         (gen-op-trace-extract): Renamed from op:trace-extract.
7672         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7673         and rewritten.
7674         (gen-argbuf-elm): Rewrite.
7675         * sim-decode.scm (-gen-record-args): Update.
7676
7677         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7678
7679         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7680         argument position.  Flag symbolic macros in function position as
7681         an error.
7682         (define-pmacro): Handle quoting in definition of symbolic macros.
7683         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7684
7685 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7686
7687         * fr30.opc (parse_register_list): Account for reverse masks
7688         for load and store.
7689         (print_register_list): Ditto.
7690         (parse_low_register_list_ld): New function.
7691         (parse_hi_register_list_ld): New function.
7692         (parse_low_register_list_st): New function.
7693         (parse_hi_register_list_st): New function.
7694         (print_hi_register_list_ld): New function.
7695         (print_hi_register_list_st): New function.
7696         (print_low_register_list_ld): New function.
7697         (print_low_register_list_st): New function.
7698         * fr30.cpu (ldr15dr): Implement workaround.
7699         (ldm0,ldm1,stm0,stm1): Implemented.
7700
7701 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7702
7703         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7704         * configure: Regenerate.
7705         * Makefile.am (WITH_HOBBIT): Update.
7706         (cgen-hob.c): Remove Makefile dependency.
7707         (cgen.o): Depend on cgen-gh.h, config.h.
7708         * Makefile.in: Regenerate.
7709         * aclocal.m4: Regenerate.
7710
7711 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7712
7713         * i960.cpu, i960.opc: New files.
7714
7715 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7716
7717         * fr30.opc (parse_register_number): New function.
7718         (parse_register_list): New function.
7719         (parse_low_register_list): Use parse_register_list.
7720         (parse_hi_register_list): Use parse_register_list.
7721         * fr30.cpu (sth): Fix assembler syntax. Implement more
7722         insns.
7723
7724 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7725
7726         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7727         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7728         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7729         (-op-gen-set-trace-parallel): Ditto.
7730         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7731
7732         * fr30.cpu (call,calld): Fix setting of pc.
7733         (f-op5): Fix start bit number.
7734
7735 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7736
7737         * fr30.cpu (st): Fix operand ordering. Implement more
7738         insns.
7739
7740 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7741
7742         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7743         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7744         (fmt-semantic-operands): Move to sim.scm.
7745         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7746         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7747         (<hw-index>): New method get-name.
7748         (op-profilable?): Moved to sim.scm.
7749         (op-nub): New proc.
7750         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7751         (op-profilable?): Moved here from operand.scm.
7752         (gen-extract-type): Delete.
7753         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7754         (-gen-argfld-ref): New proc.
7755         (-gen-ifld-argfld-name): New proc.
7756         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7757         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7758         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7759         (<hardware-base>): Delete method gen-extract-type.  New method
7760         gen-argbuf-elm.
7761         (<hw-register): Ditto.  Update method gen-extract.
7762         (<operand>, method gen-argbuf-elm): Rewrite.
7763         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7764         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7765         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7766
7767         * sim-decode.scm (-gen-record-args): Tweak.
7768
7769         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7770
7771 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7772
7773         * doc/porting: Fix typo: gas->sim.
7774         * fr30.opc (print_m4): New function.
7775         * fr30.cpu: Implemented many insns.
7776
7777 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7778
7779         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7780
7781         * fr30.cpu (f-rel9): Delete RELOC attribute.
7782         (f-rel12): Add PCREL-ADDR attribute.
7783         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7784         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7785         * fr30.opc (print_label9): Delete.
7786
7787         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7788         code for CTI indicators.
7789         * insn.scm (insn-cti?): Simplify.
7790         * utils-cgen.scm (atlist:cti?): New proc.
7791
7792 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7793
7794         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7795         (f-i20-4,f-i20-16,f-i20): New fields.
7796         (i20): New operand.
7797         (ldi8): Implement.
7798         (ldi20): New insn.
7799         (ldi32m): Delete.
7800         (jmpd): Implement.
7801         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7802         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7803         * mach.scm (arch-data): Ditto.
7804         (current-arch-default-insn-word-bitsize): Renamed from
7805         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7806         (-arch-read): Update.
7807
7808         * hardware.scm (hw:attr-list): Move here ...
7809         * opcodes.scm: ... from here.
7810
7811         * ifield.scm (fld:bitrange): Delete.
7812         (fld:word-offset,fld:word-length): New procs.
7813         (ifield?): Use class-instance.
7814         (<ifield>, method field-start): Rewrite.
7815         (ifld:enum): New proc.
7816         (<ifield>, methods field-mask,field-value): Rewrite.
7817         (-ifield-parse): Rewrite.
7818         (<multi-ifield> support): Rewrite.
7819         (ifld-beyond-base?): Rewrite.
7820         (ifld:std-attrs): New variable.
7821         (ifld:attr-list): New proc.
7822         * iformat.scm (-compute-insn-mask): Rewrite.
7823         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7824         Simplify.
7825         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7826         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7827         onto type.
7828         (<operand>): Ditto.  Forward onto index instead.
7829         (gen-ifld-decls,gen-ifld-defns): New procs.
7830         (ifld:insert,ifld:extract): New procs.
7831         (<ifield>): New methods gen-insert, gen-extract.
7832         (<multi-ifield>): Ditto.
7833         (<hw-index>): Forward gen-insert,gen-extract onto value.
7834         (<hw-asm>): Delete insert/extract support.
7835         (<hw-register,hw-memory,hw-immediate>): Ditto.
7836         (gen-hash-defines): Use string-list.
7837         Define CGEN_MAX_IFMT_OPERANDS.
7838         (gen-switch): Use string-list,string-list-map.
7839         (gen-fget-switch,gen-fset-switch): Use string-list.
7840         (gen-parse-switch,gen-insert-switch): Ditto.
7841         (gen-extract-switch,gen-print-switch): Ditto.
7842         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7843         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7844         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7845         (gen-ivalue-entry): New proc.
7846         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7847         computation.  Use 0 for operand ref table if ALIAS insn.
7848         (gen-minsn-table-entry): Use string-list.
7849         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7850         (gen-opcode-open): Record address of ifield table.
7851         (cgen-opc.h): Call gen-ifld-decls.
7852         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7853         * types.scm (<bitrange>): New members word-offset,word-length.
7854         Delete member total-length.  Delete methods start,mask,value.
7855         (bitrange:word-offset,bitrange:word-length): New procs.
7856         * sim-cpu.scm (gen-define-fields): Simplify.
7857         (gen-extract-fields): Simplify.
7858         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7859         (<ifield>): New methods gen-ifld-extract-decl.
7860         Delete method gen-ifld-extract-beyond.
7861         (<multi-ifield>): New methods gen-ifld-extract-decl.
7862         (<multi-ifield>, method gen-ifld-extract): Implement.
7863         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7864         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7865
7866         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7867         (-rtx-traverse-syntax-no-mode): New proc.
7868         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7869         (s-ifield): New proc.
7870         (s-shop): Don't prepend `unsigned' for unsigned modes.
7871         * rtx-funcs.scm (ifield): New rtx function.
7872         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7873         (delay): New rtx function.
7874         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7875
7876         * cos.scm (-elm-make-method-getter): Fix typo.
7877
7878         * utils.scm (backslash): Handle lists of strings.
7879
7880 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7881
7882         * fr30.cpu (f-rel9): Correct for pc+2.
7883         (label9): Use print_label9.
7884         * fr30.opc (print_label9): New function.
7885
7886 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7887
7888         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7889         * fr30.opc (parse_low_register_list): Renamed.
7890         (parse_hi_register_list): Renamed.
7891         (print_hi_register_list): Renamed.
7892         (print_low_register_list): Renamed.
7893
7894 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7895
7896         * fr30.cpu (f-rel9): Now a pc relative offset.
7897
7898 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7899
7900         * opcodes.scm (op-asm): Move to here, from operands.scm.
7901         (<op-asm>, method parse!): Validate arguments.
7902         (<operand>, method gen-function-name): Fix thinko.
7903         * operand.scm (<operand>, method make!): Don't set op-asm here.
7904         * utils.scm (list-elements-ok?): New proc.
7905
7906         * opcodes.scm: Clean up pass.
7907
7908 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7909
7910         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7911         the fr30_int function.
7912         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7913         (h-dr): Add FUN-ACCESS attribute.
7914
7915 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7916
7917         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7918         for C symbol for models array.
7919
7920 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7921
7922         * fr30.opc (parse_reglist_low): New function.
7923         (parse_reglist_hi): New function.
7924         (print_reglist_low): New function.
7925         (print_reglist_hi): New function.
7926         * fr30.cpu: Finish remaining insn stubs.
7927
7928 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7929
7930         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7931
7932         * fr30.cpu (ldi32m): Don't use for disassembly.
7933
7934 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7935
7936         * fr30.cpu (int): Implement it.
7937
7938 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7939
7940         * rtx-funcs.scm (nop): Fix C code.
7941
7942         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7943
7944         * fr30.cpu (f-i32): New ifield.
7945         (i32): New operand.
7946         (ldi32): New insn.
7947         (ldi32m): New macro insn.
7948         (inte): Provide simple version for now.
7949
7950         * sim-arch.scm: New file.
7951         * sim.scm: Move architecture support generation to sim-arch.scm.
7952         * cgen-sim.scm: Load sim-arch.scm.
7953         * dev.scm: Ditto.
7954
7955         * hardware.scm (pc?) New proc.
7956         (class <hardware-base>): Rewrite method 'pc?.
7957         (class <hardware>): Forward 'pc? to the hardware type.
7958         (class <hw-pc>): New method 'pc?.
7959
7960         Add support for variable length ISAs.
7961         * ifield.scm (ifld-beyond-base?): New proc.
7962         * m32r.cpu: Remove integral-insn? spec.
7963         * mach.scm (arch:derived,arch:set-derived!): New procs.
7964         (arch:app-data,arch:set-app-data!): New procs.
7965         (class <arch>): New members derived, app-data.
7966         (class <cpu>): Delete member integral-insn?.
7967         (cpu:integral-insn?): Delete.
7968         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7969         (-cpu-read): Delete integral-insn? support.
7970         (state:decode-assist): Delete.
7971         (state:int-insn?): Delete.
7972         (<derived-arch-data>): New class.
7973         (-adata-set-derived!): New proc.
7974         (mach-finish!): Call it.
7975         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7976         (gen-operand-instance): Add COND_REF support.
7977         (gen-operand-instance-table): Ditto.
7978         (gen-hash-defines): Update.
7979         (gen-extract-switch): Update type of `insn_value' arg.
7980         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7981         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7982         updated.
7983         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7984         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7985         beyond the base insn (for large insns).
7986         (-gen-extract-beyond-var-list): New proc.
7987         (gen-extract-fields): Handle large insns.
7988         (-gen-write-case): Update sem_arg computation.
7989         Update initial vpc computation.
7990         (gen-semantic-fn): Ditto.  Update type of `insn'.
7991         (-gen-sem-case): Update sem_arg computation.
7992         Update initial vpc computation.
7993         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7994         (-gen-extract-word): New proc.
7995         (<ifield>): New method gen-ifld-extract-beyond.
7996         (gen-ifld-extract-beyond): New proc.
7997         * types.scm (bitrange-overlap?): New proc.
7998
7999         * utils.scm (bits->bytes): New proc.
8000         (bytes->bits): New proc.
8001
8002         Move extraction support into decoder.
8003         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
8004         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
8005         support to sim-decode.scm.
8006         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
8007         be array of IDESC,FMT entries.  Make the array const.
8008         (-gen-gcc-label-table): Make array const.
8009         (-gen-decode-switch): Branch to extraction code after insn has been
8010         identified.
8011         (-gen-decode-insn-globals): Delete extract handler from
8012         @cpu@_insn_sem.
8013         (gen-decode-fn): Add extraction support.
8014         (-gen-sem-fn-decls): Delete extraction fn decls.
8015         (-gen-idesc-decls): Update @cpu@_decode decl.
8016         (-gen-idesc-init-fn): Delete extraction support.
8017         (-gen-extract-decls): New proc.
8018
8019         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
8020         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
8021
8022         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
8023         All callers updated.
8024         (table-entry:make): Record insn value as insn object, not name.
8025         All uses updated.
8026
8027         * hobbit.scm (path_basename): Renamed from `basename' to avoid
8028         collision with C function.
8029         (path_dirname): Similarily.
8030         * hobbit.c,hobbit.h: Rebuild.
8031
8032 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
8033
8034         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
8035
8036 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
8037
8038         * fr30.cpu: Implement more instruction stubs.
8039
8040 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
8041
8042         * fr30.cpu: Implement more instruction stubs.
8043
8044 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8045
8046         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
8047
8048         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
8049
8050         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
8051         (op:std-attrs): Ditto.
8052         * opcodes.scm (gen-operand-instance): Ditto.
8053         (gen-switch): Ditto.
8054         * m32r.cpu (condbit,accum): Update.
8055         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
8056
8057 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
8058
8059         * enum.scm (-enum-read): Fix typo.
8060
8061         * iformat.scm (-ifmt-search-key): Simplify a little.
8062
8063 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
8064
8065         * doc/porting: semantics.c -> sem.c.
8066         * Makefile.in: Regenerate.
8067         * fr30.cpu (add): Change ADD to add. Add more registers and set
8068         status bits on 'add' instruction.
8069
8070 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
8071
8072         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
8073         of 0.
8074
8075 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
8076
8077         * minsn.scm (minsn:enum): Update, call current-arch-name.
8078
8079         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
8080
8081         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
8082         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
8083         (ARCH,CGEN,CGENFLAGS): New variables.
8084         (gas-test,sim-test): New rules.
8085         * Makefile.in: Rebuild.
8086         * configure.in (arch): Define.
8087         * configure: Rebuild.
8088
8089         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
8090         * All .scm files: Ditto.
8091
8092         * dev.scm: Fix gas-test call to cpu-load.
8093         * gas-test.scm: Clean up pass to remove bit-rot.
8094         * sim-test.scm: Ditto.
8095
8096         * enum.scm (read-enum): Fix typo in `vals' handling.
8097
8098         * hardware.scm (-parse-hw-type): Fix typo.
8099         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
8100         (def-hardware,define-normal-hardware): Ditto.
8101
8102         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
8103         (display-var): Use it.
8104         * hobbit.c: Rebuild.
8105         * hobbit.h: Rebuild.
8106
8107         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
8108         avoid hobbit problem.
8109         * mach.scm (-cpu-read): Rename local `parallel-insns' to
8110         `parallel-insns-' to avoid hobbit problem.
8111
8112 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
8113
8114         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
8115         (parse_slo16,parse_ulo16): Ditto.
8116         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8117
8118 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
8119
8120         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8121         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8122         * Makefile.in: Rebuild.
8123         * insn.scm (define-normal-insn): Expand pmacros.
8124         * mode.scm (<mode>): New member `host?'.  All uses updated.
8125         (mode:host?): New proc.
8126         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8127         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8128         (define-rtx-dual-mode): Ditto.
8129         (s-index-of): New proc.
8130         (s-unop): Use plain C for host mode operations.
8131         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8132         * rtx-funcs.scm (index-of): New rtx function.
8133         * sim.scm (<hw-index>): New method cxmake-get.
8134
8135 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
8136
8137         * sim-cpu.scm (-gen-engine-decls): Delete.
8138
8139 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
8140
8141         * doc/rtl (Example): Correct Typo.
8142         * doc/porting: Add 'make dep' step to opcodes port instructions.
8143         * fr30.opc: New file.
8144         * fr30.cpu: New file.
8145
8146 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
8147
8148         * configure.in: Handle guile $exec_prefix = $prefix/foo.
8149         * Makefile.am (GUILEINCDIR): New variable.
8150         (INCLUDES): Use it.
8151         * configure: Regenerate.
8152         * Makefile.in: Ditto.
8153         * aclocal.m4: Ditto.
8154
8155 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
8156
8157         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8158         (cgen-semantics.c): Ditto.
8159         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8160         * sim-model.scm (cgen-model.c): Ditto.
8161         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8162         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8163
8164         * opcodes.scm (read-cpu.opc): Handle empty file.
8165
8166         * cos.scm (-elm-make-method-setter): Fix typo.
8167
8168         * cpu.scm (-init-parse-cpu!): Call types-init!.
8169         (-finish-parse-cpu!): Call types-finish!.
8170         * ifield.scm (<ifield>): Delete members start,length.
8171         New member bitrange.
8172         (<ifield>, methods field-start,field-length): Update.
8173         (fld:start): New arg insn-len.  All callers updated.
8174         (<ifield>, methods field-mask,field-value): Update.
8175         (-ifield-parse): Update.
8176         (ifield-init!): Update.
8177         * iformat.scm (compute-insn-length): Simplify.
8178         (compute-insn-mask): Update.
8179         * insn.scm (insn:value): Update.
8180         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8181         (current-arch-default-insn-bitsize): New proc.
8182         (current-arch-insn-lsb0?): New proc.
8183         (-arch-parse,-arch-read): Update.
8184         (<cpu>): New member file-transform.
8185         (-cpu-parse,-cpu-read): Update.
8186         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8187         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8188         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8189         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8190         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8191         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8192         * operand.scm (op:start): Update call to field-start method.
8193         * sim-decode.scm (opcode-slots): New arg lsb0?.
8194         (fill-slot!,build-slots): Ditto.
8195         (build-decode-table-entry,build-decode-table-guts): Ditto.
8196         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8197         (gen-decode-fn): Ditto.
8198         (cgen-decode.c): Update call to gen-decode-fn.
8199         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8200         (-gen-cpu-header,-gen-cpuall-includes): New procs.
8201         (cgen-cpuall.h): Call -gen-cpuall-includes.
8202         * types.scm (<bitrange>): New class.
8203         (types-init!,types-finish!): New procs.
8204         * utils-cgen.scm (parse-number): New proc.
8205         (parse-boolean): New proc.
8206         * utils.scm (word-value): Renamed from shift-bits, rewrite.
8207         (word-mask): Rewrite.
8208         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8209         (m32rxf): New field `file-transform'.
8210         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8211
8212         * hobbit.h: Fix include file name.
8213
8214 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
8215
8216         * slib: New directory of slib files used by cgen/hobbit.
8217         * hobbit.scm: New file.
8218         * hobbit.c: New file.
8219         * hobbit.h: New file.
8220         * hobscmif.h: New file.
8221         * hob-main.c: New file.
8222         * hobslib.scm: New file.
8223         * hob.sh: New file.
8224         * Makefile.am: Add support for compiling hobbit, and using compiled
8225         version of hobbit to compile cgen.
8226         * Makefile.in: Regenerate.
8227         * configure.in: Support --with-hobbit.
8228         * configure: Regenerate.
8229         * acconfig.h (WITH_HOBBIT): Add.
8230         * config.in: Regenerate.
8231
8232         * rtl.scm: New file, was cdl-c.scm.
8233         Definition of rtx funcs moved to rtx-funcs.scm.
8234         (semantic-in-out-operands): Rewrite to compute object form of
8235         semantic code.
8236         * rtx-funcs.scm: New file.
8237
8238         * cgen-gh.c: #include "config.h".
8239         (gh_cadddr,gh_cddddr): New fns.
8240         (cgh_vector_to_list): New fn.
8241         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8242         (cgh_init): Prefix qsort procs with "cgh-".
8243         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8244         * cgen.c: #include "config.h".
8245
8246         * attr.scm (bitset-attr?): New proc.
8247         (<bitset-attribute>, method parse-value): Value syntax changed from
8248         (val1 val2 ...) to val1,val2,....
8249         (<bitset-attribute>): New method gen-value.
8250         (<integer-attribute>): New method gen-value.
8251         (<enum-attribute>): New method gen-value.
8252         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8253         (<reader>): New class.
8254         (CURRENT-ARCH,CURRENT-READER): New globals.
8255         (keep-mach?): Move here from mach.scm.
8256         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8257         (<arch>): New class.
8258         (<arch-data>): New class.
8259         (<cpu>): Make subclass of <ident>.
8260         (*ENDIAN* variables): Delete.
8261         (process-state-vars): Delete.
8262         (mach-finish!): Add `base' value to MACH attribute.
8263         * hardware.scm (<hardware>): Make subclass of <ident>.
8264         (hw:std-attrs): New global.
8265         (hw-profilable?): New proc.
8266         * ifield.scm (<ifield>): Make subclass of <ident>.
8267         (sort-ifield-list): Move here from iformat.scm.
8268         * iformat.scm (<iformat>): Renamed from <insn-format>.
8269         Make subclass of <ident>.
8270         (-ifmt-search-key): Include cti? in categorization of formats.
8271         (ifmt-analyze): Compile semantics (turn to object form).
8272         * insn.scm (<insn>): Make subclass of <ident>.
8273         New member compiled-semantics.
8274         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8275         * mode.scm (<mode>): Make subclass of <ident>.
8276         (UBI): Delete.
8277         * model.scm (<unit>): Make subclass of <ident>.
8278         New members inputs,outputs.
8279         (<model>): Make subclass of <ident>.  New member state.
8280         (-unit-parse): Parse inputs,outputs.
8281         (<iunit>): New class.
8282         (-insn-timing-parse-model): New proc.
8283         (parse-insn-timing): Function unit spec rewritten.
8284         * operand.scm (<operand>): Make subclass of <ident>.
8285         New members sem-name,num,cond?  New method gen-pretty-name.
8286         (hw-index-scalar): New global.
8287         (op-nub-hw): Move here from rtl.scm.
8288         (op:lookup-sem-name,op-profilable?): New procs.
8289         * pmacros.scm: Rewrite to pass through hobbit.
8290         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8291         * utils.scm (logit): Make a macro.
8292         (bit-set?): Rewrite.
8293         (high-part): Rewrite.
8294
8295         * m32r.cpu (define-arch): Move to top of file.
8296         (cpu family m32rbf): Renamed from m32rb.
8297         (model m32r/d): Function unit spec rewritten.
8298         (all insns): Ditto.  Replace UBI with BI.
8299
8300         * opcodes.scm (gen-attr-table-decls): Declare
8301         @arch@_cgen_hw_attr_table.
8302         (gen-attr-table-defns): Generate hw attribute table.
8303
8304         * sim-cpu.scm (-gen-engine-decls): New proc.
8305         (-gen-model-decls): New proc.
8306         (gen-parallel-exec-type): Add new member `written' to struct parexec.
8307         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8308         (-gen-record-profile-args): Simplify.
8309         (-gen-parallel-sem-case): Delete.
8310         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8311         New local `written'.  Delete profiling code.
8312         (-gen-sem-case): Ditto.
8313         (-uncond-written-mask,-any-cond-written?): New procs.
8314         (cgen-sem-switch.c): Include duplicates of insns that can be executed
8315         parallelly or serially, and write-back handlers for all parallel insns.
8316         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8317         support to initialization of struct insn_sem.
8318         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8319         (-gen-insn-sem-type): Add parallel write-back support to struct
8320         insn_sem.
8321         (-gen-idesc-init-fn): Add support for virtual insns.
8322         Add parallel write-back support.
8323         * sim-model.scm (gen-model-profile-fn): Delete
8324         (-gen-model-fn-decls): New proc.
8325         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8326         (-gen-model-init-fn): New proc.
8327         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8328         members in @mach@_init_cpu.
8329         (cgen-model.c): Generate model handlers for each insn.
8330         * sim.scm (gen-define-field-macro): Cti insns handled differently.
8331         (<hw-pc>): New method gen-write.
8332         (<hw-register>, method gen-write): New arg `mode'.
8333         (<hw-register>): Delete method gen-record-profile!.
8334         New method gen-profile-index-type.
8335         (<hw-memory>, method gen-write): New arg `mode'.
8336         (<hw-address>, method gen-extract): Delete.
8337         (<hw-address>, method gen-write): New arg `mode'.
8338         (<hw-index>, method get-write-index): Rewrite.
8339         (<pc>, method cxmake-get-direct): Delete.
8340         (<pc>): New method cxmake-get.  Comment out methods
8341         gen-set-quiet,gen-set-trace.
8342         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8343         gen-profile-index-type,gen-profile-code.
8344         Delete method gen-pretty-name.  Rewrite method gen-write.
8345         Delete method cxmake-get-direct.
8346         (-op-gen-set-trace): Update `written'.
8347         (-op-gen-set-trace-parallel): Ditto.
8348         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8349         (gen-cpu-insn-enum-decl): Add extra entries for parallel
8350         insns and their write-back handlers.
8351         (insn-op-lookup): New proc.
8352         (<unit>): New method gen-profile-code.
8353         (<iunit>): New method gen-profile-code.
8354         (gen-argbuf-elm): Add profiling elements.
8355         (gen-argbuf-type): Define cti insns separately in their own struct.
8356         Add member `addr_cache' to this struct.  Add entries for pbb virtual
8357         insns.  Move semantic entries here from struct scache.
8358         Delete everything from struct scache except argbuf.
8359         (<insn>, method gen-profile-locals): Rewrite.
8360         (<insn>, method gen-profile-code): Rewrite.
8361         (sim-finish!): Create virtual pbb insns.
8362
8363 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8364
8365         * m32r.cpu (h-cr): Add bbpc,bbpsw.
8366         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8367         (h-psw,h-bpsw,h-bbpsw): Define.
8368         (rte,trap): Handle bbpc,bbpsw.
8369         * opcodes.scm (max-operand-instances): Fix typo.
8370         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8371         hardware elements to be fun-access.
8372         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8373
8374 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
8375
8376         * m32r.cpu (trap): Pass `pc' to m32r_trap.
8377
8378 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
8379
8380         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8381
8382 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
8383
8384         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8385         architecture name.
8386         (mach m32r): Update.
8387
8388         * mach.scm (mach:supports?): New proc.
8389         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8390         gen-reg-access-{decls,defns}.
8391         * sim.scm (gen-reg-access-{decl,defn}): New procs.
8392         (gen-mach-bfd-name): New proc.
8393         (gen-arch-reg-access-{decls,defns}): New procs.
8394         (cgen-arch.[ch]): Output register access cover fns.
8395
8396         * hardware.scm (hardware-builtin!): Set print handlers for
8397         h-addr,h-iaddr.
8398         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8399         `od'.
8400         (CGEN_PRINT_NORMAL,print_hash): Ditto.
8401         (my_print_insn): Ditto.  Delete args buf, buflen.
8402         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8403         (-hw-asm-specs): Add `handlers' spec.
8404         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
8405         `normal-hw-asm'.
8406         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
8407         print.
8408         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8409         (<hw-asm>, parse!): New method.
8410         (gen-insn-table-entry): Print semantics.
8411         (gen-opcode-open): Renamed from gen-opcode-table.
8412
8413         * utils.scm (string-write): No longer a macro.
8414         (-string-write): Handle procedure args.
8415         * opcodes.scm: Update all calls to string-write.
8416         * sim-cpu.scm: Ditto.
8417         * sim-decode.scm: Ditto.
8418         * sim-model.scm: Ditto.
8419         * sim.scm: Ditto.
8420
8421 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
8422
8423         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8424         (-gen-insn-builders,-gen-insn-builder): New procs.
8425
8426 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
8427
8428         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8429         (gen-opcode-table): Properly terminate comment.
8430
8431 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
8432
8433         * Version 0.6.0.
8434         Clean up pass over everything, so starting fresh.