OSDN Git Service

[cgen]
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2009-09-01  DJ Delorie  <dj@redhat.com>
2
3         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
4         (parse_unsigned16_range): Likewise.
5         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
6         isa.
7
8 2009-09-01  Doug Evans  <dje@sebabeach.org>
9
10         Pmacro .equals -> .equal?
11         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
12         -pmacro-builtin-equals.  All callers updated.
13         (pmacros-init!): Rename .equals to .equal?.
14         * doc/pmacros.texi: Update.
15         * testsuite/pmacros-1.test: Update.
16
17         * doc/porting.texi: Work around texi2html bug where it doesn't
18         properly escape <> inside double-quotes inside @code.
19
20         * doc/porting.texi (Doing an opcodes port): Add step to specify
21         the .opc file.
22
23 2009-08-29  Doug Evans  <dje@sebabeach.org>
24
25         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
26         rtl version 0.7.
27         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
28
29 2009-08-27  Doug Evans  <dje@sebabeach.org>
30
31         Add do-count rtl function.
32         * rtl-c.scm (s-do-count): New function.
33         (do-count): New rtl handler.
34         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
35         (-rtx-make-traverser-table): Add ITERATION.
36         * rtl.scm (rtx-make-iteration-limit-var): New function.
37         (rtx-env-make-iteration-locals): New function.
38         * rtx-funcs.scm (do-count): New rtl function.
39         * cpu/play.cpu: Add do-count-test insn.
40         * doc/rtl.texi: Add docs on do-count.
41
42 2009-08-26  Doug Evans  <dje@sebabeach.org>
43
44         * read.scm (parse-error): Change error message output format
45         to match context-owner-error.
46         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
47         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
48         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
49         (operand): Call estate-error instead of context-error.
50         (local, delay): Ditto.
51         (ref, attr): Call estate-error instead of error.
52         * rtl-traverse.scm (tstate-error): New function.
53         (-rtx-traverse-error): Call tstate-error instead of context-error.
54         (-rtx-traverse-operands, -rtx-traverse): Ditto.
55         (estate-error): New function.
56         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
57         instead of error.
58         (e-if): Call estate-error instead of error.
59         * rtx-funcs.scm (error): Call estate-error instead of context-error.
60         (member): Ditto.
61         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
62         Rewrite to call context-owner-error.
63         (context-owner-error): New function.
64
65         * ifield.scm (<ifield> constructor): New arg `location',
66         all callers updated.
67         * insn.scm (<insn> constructor): Ditto.
68         (<multi-insn> constructor): Ditto.
69         * minsn.scm (<macro-insn> constructor): Ditto.
70         * operand.scm (<operand> constructor): Ditto.
71         * utils-cgen.scm (builtin-location): New function.
72         (<source-ident>): Fix default value of member `location'.
73         (source-ident?): New function.
74
75         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
76         (estate-push-env, estate-with-modifiers): Ditto.
77         (estate-deepen): New function.
78
79 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
80
81         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
82         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
83         routines.
84
85 2009-08-25  Doug Evans  <dje@sebabeach.org>
86
87         * doc/pmacros.texi (pmacro default argument values): Add text.
88
89 2009-08-23  Doug Evans  <dje@sebabeach.org>
90
91         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
92         Rename member prefix -> name-prefix.
93         (<keyword> getters): Update.
94         (-keyword-parse): Update.  Default enum-prefix to NAME-.
95         (-keyword-read): Update.  Don't compute default value for
96         enum-prefix here.
97         (define-keyword): Update.
98         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
99         * read.scm (cgen-rtl-version): New function.
100         (-supported-rtl-versions): Add (0 8).
101         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
102         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
103         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
104         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
105         Update, print-name -> enum-prefix, make uppercase.
106         Remove unnecessary name-prefix spec.
107         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
108         * cpu/ip2k.cpu (register-names): Ditto.
109         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
110         * cpu/sparc.cpu (gr-names): Ditto.
111         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
112         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
113         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
114         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
115         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
116         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
117         prefix -> name-prefix.
118         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
119         Update, print-name -> enum-prefix, make uppercase.
120         (drc-names, xf-names): Ditto.
121         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
122         * doc/rtl.texi (Keywords): New section.
123         (hardware indices): Update text.
124         (rtl versions): Add 0.8.
125
126         Add define-rtl-version.
127         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
128         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
129         (cgen-lang-fixlevel): Delete.
130         (-supported-rtl-versions): New variable.
131         (-cmd-define-rtl-version): New function.
132         (init-reader!): New command define-rtl-version.
133         (-cgen): Add rtl version to --version output.
134         * doc/rtl.texi: Document rtl version support.
135         * cpu/play.cpu: Add define-rtl-version.
136
137 2009-08-22  Doug Evans  <dje@sebabeach.org>
138
139         * Makefile.am (OPTIONS): Define.
140         (desc): Just generate <arch>-desc.[ch] files.
141         * Makefile.in: Regenerate.
142         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
143         no .opc file.
144         (cgen-desc.c): Similarly.
145         * gen-all-desc: New file.
146         * opcodes.scm (opc-file-provided?): New function.
147
148         * mach.scm (current-*-add!): Update calls to parse-error.
149         * operand.scm (op:new-mode): Update call to parse-error.
150         * utils-cgen.scm (make-obj-context): New function.
151
152         * NEWS: Copy over entries from 1.1 branch.
153
154 2009-08-20  Doug Evans  <dje@sebabeach.org>
155
156         * gas-test.scm (<keyword> test-data): Catch invalid requests,
157         flag a warning and compensate.
158         (<hw-address test-data): Tweak for readability.
159         (<hw-iaddress test-data): Ditto.
160         (cgen-build.sh): Convert symbols to strings before passing to
161         string-append.
162         (cgen-allinsn.exp): Ditto.
163
164         * doc/pmacros.texi (.splice): Add more text.
165
166 2009-08-19  Doug Evans  <dje@sebabeach.org>
167
168         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
169         distinguish from 1.1.
170         * configure: Regenerate.
171         * read.scm (-CGEN-VERSION): Update.
172         * doc/version.texi: Update.
173
174         New builtin .pmacro?.
175         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
176         (pmacros-init!): Add .pmacro?.
177         * doc/pmacros.text: Document .pmacro?.
178         * testsuite/pmacros-1.test: Test .pmacro?.
179
180         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
181         of a pmacro begins before its arguments are evaluated, improves
182         readability.
183
184         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
185         * testsuite/pmacros-1.test: Ditto.  Add better tests.
186
187         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
188         in assembler syntax.
189         (Operands): Similarly.
190
191 2009-08-18  Doug Evans  <dje@sebabeach.org>
192
193         * ifield.scm (ifld-encode-mode): Add FIXME.
194         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
195         modes.
196         (<ifield> gen-extract): Similarly.
197
198         * read.scm (parse-error): Handle #f for context-location.
199         * utils-cgen.scm (unspecified-location): Fix building of
200         single-location.
201
202         * doc/rtl.texi: Document how to write hex and boolean values.
203
204         * gas-test.scm (<hw-asm> test-data): Handle () values.
205         (<keyword> test-data): Convert symbols to strings before passing
206         to string-append.
207         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
208         result for scalars.
209
210         * operand.scm (hw-index-scalar): Set `name'.
211         (hw-index-anyof, hw-index-derived): Ditto.
212
213 2009-08-17  Doug Evans  <dje@sebabeach.org>
214
215         * pmacros.scm (-pmacro-builtin-internal-test): New function.
216         (pmacros-init!): Add .internal-test.
217         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
218         * testsuite/testsuite.cpu (internal-verify): New pmacro.
219         * doc/pmacros.text: Document .internal-test.
220
221         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
222         (parse-comment): Allow numbers.
223         * doc/porting.texi: Document that names and comments may be lists.
224
225         * insn.scm (-insn-parse): Fix typo.
226
227         Rename .eval -> .exec.  Add new .eval.
228         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
229         (-pmacro-builtin-eval): New function.
230         (pmacros-init!): Add .exec.
231         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
232         * testsuite/location-1.test: Update.
233         * testsuite/pmacros-1.test: Add test for .eval.
234
235 2009-08-16  Doug Evans  <dje@sebabeach.org>
236
237         * doc/porting.texi: Remove support for Guile 1.4.
238
239         * read.scm (current-reader-location): Return unspecified location
240         if reader hasn't been initialized yet.
241
242 2009-08-13  Doug Evans  <dje@sebabeach.org>
243
244         * dev.scm: Document tracing options.
245
246         * pmacros.scm (pmacro-dump): New function.
247         (check-pmacro): Tweak debugging output.
248         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
249         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
250
251         Add .let* pmacro builtin.
252         * pmacros.scm (-pmacro-builtin-let*): New function.
253         (pmacros-init!): Add .let*.
254         * doc/pmacros.texi: Document .let*.
255         * testsuite/pmacros-1.test: Test .let*.
256
257 2009-08-12  Doug Evans  <dje@sebabeach.org>
258
259         Clean up cpu file parsing, pass context consistently instead of the
260         old "errtxt" argument.
261         NOTE: ACU == "All Callers Updated".
262         * attr.scm (-parse-simple-attribute): Renamed from
263         parse-simple-attribute, ACU.
264         (-attr-parse): Change errtxt argument to context, ACU.
265         (-attr-read): Ditto.
266         (atlist-parse): Ditto.  Put context arg first.
267         (attr-parse): Use parse-error instead of context-error.
268         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
269         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
270         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
271         `context' arg is now a <context> object.  ACU.
272         (-keyword-read): `context' arg is now a <context> object.  ACU.
273         (-hw-parse-indices): Change errtxt argument to context, ACU.
274         (-hw-parse-values, -hw-parse-handlers): Ditto.
275         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
276         (-hw-validate-layout, -hw-create-getter-from-layout,
277         -hw-create-setter-from-layout): Ditto.
278         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
279         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
280         (<hw-address>:parse!): Ditto.
281         * ifield.scm (-ifield-parse, ifield-read): Ditto.
282         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
283         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
284         (-multi-ifield-parse, -multi-ifield-read): Ditto.
285         * insn.scm (-insn-parse, -insn-read): Ditto.
286         (parse-syntax): Ditto.  Put context arg first.
287         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
288         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
289         (-parse-insn-format): Ditto.
290         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
291         (-arch-parse-isas): Ditto.
292         (-isa-read): Add context arg, ACU.
293         (-cpu-parse, -cpu-read, -mach-read): Ditto.
294         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
295         context, ACU.
296         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
297         (minsn-make-alias): Ditto.
298         * mode.scm (-mode-parse): Ditto.
299         (parse-mode-name): Ditto.  Put context arg first.
300         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
301         errtxt argument to context, ACU.
302         (-unit-parse, -model-parse, -model-read): Ditto.
303         * operand.scm (-operand-parse-getter): Use parse-error instead of
304         context-error.
305         (-operand-parse-setter): Ditto.
306         (-operand-parse): Change errtxt argument to context, ACU.
307         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
308         (-anyof-operand-parse, -anyof-operand-read): Ditto.
309         * read.scm (reader-error): Delete.  Use parse-error instead.
310         (parse-error): Change errtxt argument to context, ACU.  Split args
311         argument into expr and maybe-help-text.
312         (-reader-process-expanded-1!): Reorganize.
313         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
314         * types.scm (parse-type): Ditto.
315         * utils-cgen.scm (single-location->simple-string): New function.
316         (<context>): Replace members file,lineno with location.
317         (make-prefix-context): Renamed from context-make-prefix, ACU.
318         (make-current-context): New function.
319         (context-append, context-append-name): New functions.
320         (context-make-reader): Delete.
321         (parse-name): Change errtxt argument to context, ACU.
322         Put context arg first.
323         (parse-comment): Ditto.
324         (parse-number): Change errtxt argument to context, ACU.
325         (arg-list-validate-name, arg-list-check-no-args,
326         arg-list-symbol-arg): Ditto.
327
328         * read.scm (-cmd-if): Don't assume test is a list.
329
330         * html.scm (get-insn-properties): Delete errtxt, unused.
331
332 2009-08-11  Doug Evans  <dje@sebabeach.org>
333
334         * doc/rtl.texi (hardware types): Add pc.
335
336 2009-08-07  Doug Evans  <dje@sebabeach.org>
337
338         Add -t option for tracing things like commands, pmacro expansion.
339         * dev.scm (cload): New arg #:trace.
340         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
341         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
342         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
343         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
344         (-reader-process-expanded-1!): Trace commands if requested.
345         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
346         (-set-trace-options!): New function.
347         (-init-reader!): New function.
348         (cpu-load): New arg trace-options, all callers updated.
349         Call -init-reader! and -set-trace-options!.
350         (cgen-usage): Improve output formatting.
351         (common-arguments): New option -t.
352         (-cgen): Process -t.
353         * utils-cgen.scm (single-location->string): Renamed from
354         pretty-print-single-location.  All callers updated.
355         (location->string): Renamed from pretty-print-location.
356         All callers updated.
357         (source-properties-location->string): New function.
358         * doc/running.texi: Document -t.
359
360 2009-08-06  Doug Evans  <dje@sebabeach.org>
361
362         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
363         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
364         * utils.scm: ... here.
365
366 2009-08-05  Doug Evans  <dje@sebabeach.org>
367
368         Track source location better, for better error messages.
369         * pmacros.scm (-pmacro-eval): Delete, unused.
370         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
371         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
372         (scan-list, scan): Ditto.
373         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
374         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
375         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
376         (scan-list1): New function.
377         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
378         * read.scm (<reader>): New member `location'.
379         (-reader-lookup-command): Renamed from reader-lookup-command,
380         all callers updated.
381         (reader-error): Rewrite to produce better source location info.
382         (current-reader-location): New function.
383         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
384         All callers updated.  Record source location of expression.
385         (reader-process-expanded!): Renamed from reader-process-expanded.
386         All callers updated.
387         (-reader-process!): Renamed from reader-process.  New arg `loc'.
388         All callers updated.  Record source location of define-pmacro.
389         * utils-cgen.scm (<location>): New class.
390         (single-location): New (pseudo) class.
391         (pretty-print-single-location, pretty-print-location): New functions.
392         (location-top, location-push-single, location-push): New functions.
393         (unspecified-location, current-input-location): New functions.
394         (location-property): New object property.
395         (location-property-set!): New function.
396         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
397         All uses updated.
398         * testsuite/location-1.test: New testcase.
399         * testsuite/run-tests.sh: Fix fail count handling.
400         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
401         to expect cgen to fail.
402
403         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
404
405         * read.scm (-cmd-include): Renamed from include.  All callers updated.
406         (-cmd-if): Renamed from cmd-if.  All callers updated.
407         Use reader-process-expanded! on then/else clauses instead of eval1.
408
409 2009-07-22  Doug Evans  <dje@sebabeach.org>
410
411         * modes.scm (TI,OI): New modes.
412         * types.scm (parse-type): Improve error checking.  Don't hardwire
413         mode names here.
414         * utils.scm (non-negative-integer?): New function.
415
416         * pmacros.scm (-pmacro-builtin-find): New predicate.
417         (pmacros-init!): Add .find.
418         * doc/pmacros.tex: Document .find.
419         * testsuite/pmacros-1.test: Test .find.
420
421 2009-07-20  Doug Evans  <dje@sebabeach.org>
422
423         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
424         commented out printfs.
425         * rtl.scm (rtl-finish!): Whitespace tweaks.
426         * model.scm (parse-insn-timing): Tweak logging message.
427         * operand.scm: Comment and whitespace tweaks.
428         (op:type): Tweak error message.
429         (op-ifield): Tweak logging message.
430         (-derived-operand-parse, anyof-merge-semantics): Ditto.
431         * read.scm: Whitespace cleanup.
432         * utils.scm: Whitespace cleanup.
433
434 2009-07-19  Doug Evans  <dje@sebabeach.org>
435
436         Fix binding of nested pmacro parameters.
437         * pmacros.scm (-pmacro-env-make): New arg prev-env.
438         All callers updated.
439         (-pmacro-bulid-lambda): Ditto.
440         * doc/pmacros.texi: Update.
441         * testsuite/pmacros-1.test: Add testcase.
442
443         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
444         calculation.
445         (-multi-ifield-make-default-extract): Ditto.
446
447         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
448         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
449         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
450         Define.
451         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
452         * doc/rtl.texi: Update.
453
454         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
455
456         Rename builtin boolean pmacros, for consistency with rtl.
457         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
458         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
459         * doc/pmacros.texi: Update.
460         * testsuite/pmacros-1.test: Update.
461
462 2009-07-17  Doug Evans  <dje@sebabeach.org>
463
464         Use hash tables to record ifields, operands, insns, macro-insns.
465         * attr.scm (attr-builtin!): Tweak some comments.
466         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
467         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
468         <ident>.
469         (<multi-ifield>): New constructor.
470         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
471         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
472         <ident>.
473         (-sub-insn-make!): Add hack to avoid differences in generated code.
474         (multi-insn-instantiate!): Add total number of multi-insns to
475         logging message.
476         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
477         minsn-list to foo-table.  New member next-ordinal.
478         Update getters/setters.
479         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
480         New functions.
481         (-get-next-ordinal!, -get-lowest-ordinal): New function.
482         (-make-ident-object-table, -ident-object-table->list,
483         -ident-object-table-add!, -ident-object-table-lookup): New functions.
484         (current-ifld-list, current-ifld-add! current-ifld-lookup,
485         -ifld-already-defined?): Rewrite.
486         (current-op-list, current-op-add! current-op-lookup,
487         -op-already-defined?): Rewrite.
488         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
489         (current-insn-list, current-insn-add! current-insn-lookup,
490         -insn-already-defined?): Rewrite.
491         (current-minsn-list, current-minsn-add! current-minsn-lookup,
492         -minsn-already-defined?): Rewrite.
493         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
494         (MAX-VIRTUAL-INSNS): Define.
495         (arch-analyze-insns!): Add hack to avoid differences in generated code.
496         Update use of arch-insn-list.
497         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
498         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
499         minsn-list.
500         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
501         <ident>.  New constructor.
502         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
503         <ident>.
504         * sid.scm (-virtual-insn-add!): New function.
505         (-create-virtual-insns!): Call it.
506         (-fill-sim-insn-list!): Rewrite.
507         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
508         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
509         * utils-cgen.scm (<ordered-ident>): New class.
510         (obj-ordinal, obj-set-ordinal!): New functions.
511         (add-ident-methods!): Delete.
512
513         * model.scm (parse-insn-timing): Change logging message to level 3.
514
515 2009-07-16  Doug Evans  <dje@sebabeach.org>
516
517         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
518         add a link to define-normal-insn-enum.
519
520         * doc/porting.texi (Conventions): Add docs on writing integers.
521
522         * cpu/simplify.inc (*): One line doc strings don't need \n.
523         (df): Invoke define-full-ifield instead of claiming it's an alias.
524         (dno): Define.
525         (dnop): Mark as deprecated.
526
527         * cpu/play.cpu: Add example of hardware `layout'.
528         * doc/porting.tex: Add docs on simplify.inc.
529         * doc/rtl.texi: Cleanup pass over "Simplification macros",
530         and other things.
531
532         * ifield.scm: Whitespace/formatting cleanup.
533
534         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
535
536         * read.scm (parse-error): Don't print single entry args as a list.
537         (-reader-process-expanded-1): Convert symbol to string for
538         string-append.
539
540         * insn.scm (multi-insn-instantiate!): Tweak logging message.
541
542 2009-07-15  Doug Evans  <dje@sebabeach.org>
543
544         * cpu/simplify.inc (dno): New pmacro.
545         * doc/porting.texi: Add section on simplify.inc.
546         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
547
548 2009-07-15  Doug Evans  <devans@sourceware.org>
549
550         * gen-all-doc: Generate index.html.
551
552 2009-07-13  Doug Evans  <dje@sebabeach.org>
553
554         Extend pmacro language, add testsuite.
555         * Makefile.am (SUBDIRS): Add testsuite.
556         * Makefile.in: Regenerate.
557         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
558         testsuite/test-utils.sh.
559         * configure: Regenerate.
560         * dev.scm (cload): Handle testsuite app.
561         (load-testsuite): New function.
562         * pmacros.scm: (-pmacro-debug?): New global.
563         (-smacro-table): New global.
564         (-smacro-lookup, -smacro-set!): New functions.
565         (-pmacro-make): New argument `syntactic-form?', all callers updated.
566         (-pmacro-syntactic-form?): New function.
567         (-pmacro-expected-number, -pmacro-verify-number): New functions.
568         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
569         (-pmacro-expected-non-negative-integer): New function.
570         (-pmacro-verify-non-negative-integer): New function.
571         (-pmacro-expand-expr-list): New function.
572         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
573         (-pmacro-process-args): Renamed from -pmacro-invoke.
574         (-pmacro-apply, -smacro-apply): New functions.
575         (-pmacro-expand): Rewrite syntactic form processing.
576         (-pmacro-build-lambda): Reformat.
577         (define-pmacro): Watch for more errors in definition.
578         (pmacro-debug): New function.
579         (pmacro-trace): Set/reset -pmacro-debug?.
580         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
581         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
582         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
583         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
584         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
585         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
586         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
587         (pmacros-init!): Initialize -smacro-table.
588         Rewrite pmacro initialization.
589         * read.scm (reader-process-expanded): Renamed from
590         -reader-process-expanded.  All callers updated.
591         Recognize () as a no-op.
592         (cpu-load): Tweak logging messages.
593         * utils.scm (message): Add comment.
594         * cpu/play.cpu: Add some instructions to play with .let.
595         * doc/cgenint.texi: Move some debugging related docs to here from
596         cgen.texi.
597         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
598         * testsuite/Makefile.am: New file.
599         * testsuite/Makefile.in: New file.
600         * testsuite/test-utils.sh.in: New file.
601         * testsuite/run-tests.sh: New file.
602         * testsuite/testsuite.cpu: New file.
603         * testsuite/pmacros-1.test: New file.
604
605         * decode.scm: Comment and formatting tweaks.
606         (-build-decode-table-guts): Add more data to logging message.
607
608 2009-07-12  Doug Evans  <dje@sebabeach.org>
609
610         Delete files that now live in ../cpu.
611         * cpu/iq10.cpu: Delete.
612         * cpu/iq2000.cpu: Delete.
613         * cpu/iq2000.opc: Delete.
614         * cpu/iq2000m.cpu: Delete.
615         * cpu/m32r.cpu: Delete.
616         * cpu/m32r.opc: Delete.
617
618 2009-07-09  Doug Evans  <dje@sebabeach.org>
619
620         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
621         All callers updated.  Work around -ve shifts by referencing the
622         entire value.
623
624         * utils.scm (message): Handle pairs.
625
626 2009-07-08  DJ Delorie  <dj@redhat.com>
627
628         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
629         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
630         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
631         written to.
632
633 2009-07-07  Doug Evans  <dje@sebabeach.org>
634
635         * cpu/play.cpu (add): Use (ifield enum) for one format element.
636         * cpu/play.opc: New file.
637
638         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
639         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
640         * doc/rtl.texi (Instructions): Update.
641
642         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
643         (opc-arguments, -OPC): Call set-opc-file-path!.
644         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
645         (set-opc-file-path!): New function.
646         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
647
648         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
649         before passing to gen-c-args.
650
651 2009-07-06  DJ Delorie  <dj@redhat.com>
652
653         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
654         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
655         unspecified accesses to control registers.
656
657 2009-07-01  DJ Delorie  <dj@redhat.com>
658
659         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
660         unspecified accesses to control registers.
661
662         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
663         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
664
665 2009-06-27  Doug Evans  <dje@sebabeach.org>
666
667         * gen-all-intrinsics: New file.
668
669 2009-06-24  Doug Evans  <dje@sebabeach.org>
670
671         * All *.scm files: Update copyright year.
672         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
673
674 2009-06-23  DJ Delorie  <dj@redhat.com>
675
676         * intrinsics.scm: Updates to support IVC2.
677         (belongs-to-group?): Check IVC2 slots.
678         (-slots-attribute): New.
679         (targets::attributes): Add SLOTS.
680         (target:add-well-known-intrinsics): Add CPMOV.
681         (md-insn): Add CPTYPE and CRET?.
682         (add-md-insn): Likewise.
683         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
684         duplicate insns with different bit patterns.
685         (write-cgen-insn?): Add cret? support.
686         (intrinsics.h): Add vector types.
687         (runtime-op): Add vector support.
688         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
689
690         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
691         * cpu/mep-ivc2.cpu: Update all insns to include type information.
692         (h-cr-ivc2): Default to typeless.
693         (h-ccr-ivc2): Fix register width.
694         (SLOTS): Fix values and default.
695         (ivc2_*): Add control register names.
696         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
697
698         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
699         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
700
701 2009-06-22  Doug Evans  <dje@sebabeach.org>
702
703         * semantics.scm (insn-build-known-values): Fix typo in comment.
704
705 2009-06-21  Doug Evans  <dje@sebabeach.org>
706
707         * rtl-xform.scm (rtx-simplify-insn): New function.
708         * html.scm (gen-insn-docs): Call it.
709         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
710         * iformat.scm (ifmt-analyze): Minor simplification.
711
712         * semantics.scm (semantic-compile): Change arg sem-code-list to
713         sem-code.
714         (semantic-attrs): Ditto.
715         * iformat.scm (ifmt-analyze): Update.
716         (ifmt-compute!): Update.
717         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
718         rtl-xform.scm.
719         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
720         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
721         * semantics.scm (rtx-simplify): Ditto.
722         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
723         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
724         (-simplify-expr-fn): Move to rtl-xform.scm.
725         (-solve-expr-fn, rtx-solve): Ditto.
726         * rtl-xform.c: New file.
727         * read.scm: Load it.
728
729         * rtl-c.scm (delay): Add FIXME, tweak formatting.
730         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
731         (-rtx-traverse, rtx-traverse): Ditto.
732
733 2009-06-20  Doug Evans  <dje@sebabeach.org>
734
735         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
736
737         * configure.in: Update version to 1.1.
738         * configure: Regenerate.
739         * read.scm (-CGEN-VERSION): Update to 1.1.0.
740
741 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
742             Doug Evans  <dje@sebabeach.org>
743
744         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
745         (cgen-desc.c): Ditto.
746         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
747         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
748         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
749         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
750         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
751         (cgen-cpuall.h, cgen-ops.c): Ditto.
752         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
753         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
754         (cgen-sem-switch.c): Ditto.
755         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
756         * sim-model.c (cgen-model.c): Ditto.
757
758 2009-06-18  Doug Evans  <dje@sebabeach.org>
759
760         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
761
762         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
763
764         * dev.scm (cload): Change #:arch argument to take the path to the
765         .cpu file instead of just the name of the architecture.
766         * read.scm (arch-path): Remove trailing '/'.
767         (cpu-load): Set `arch-path' to directory of .cpu file.
768         (-cgen): Don't set `arch-path' here.
769         (include): Update.
770         * doc/porting.texi: Update.
771
772 2009-06-14  Doug Evans  <dje@sebabeach.org>
773
774         * gen-all-doc: Use files in ../cpu where possible.
775
776         * Makefile.am (ARCHFILE): Fix path.
777         * Makefile.in: Regenerate.
778         * html.scm: Use "pre" instead of "plaintext".
779
780         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
781         * doc/app.texi: Cleanup pass.
782         * doc/cgen.texi: Cleanup pass.
783         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
784         * doc/intro.texi: Cleanup pass.
785         * doc/mdate-sh: New file.
786         * doc/opcodes.texi: Cleanup pass.
787         * doc/pmacros.texi: Cleanup pass.
788         * doc/porting.texi: Cleanup pass.
789         * doc/rtl.texi: Cleanup pass.
790         * doc/running.texi: Cleanup pass.  Document more runtime options.
791         * doc/stamp-vti: Update.
792         * doc/version.texi: Update.
793
794         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
795         (GUILE): Fix definition.
796         * Makefile.in: Regenerate with automake 1.9.6.
797         * aclocal.m4: Regenerate with aclocal 1.9.6.
798         * configure.in (AC_PREREQ): Set to 2.59.
799         (GENINSRC_NEVER): Define.
800         * configure: Regenerate with autoconf 2.59.
801         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
802         (cgen.info,cgen.dvi): Delete.
803         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
804         (noinst_TEXINFOS): Add cgenint.texi.
805         (DOCFILES): Add missing files.
806         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
807         * doc/Makefile.in: Regenerate with automake 1.9.6.
808
809         * guile.scm: Add "." to %load-path if >= guile version 1.8.
810
811         * attr.scm: Removing trailing whitespace.
812         * cgen-intrinsics.scm: Ditto.
813         * cgen-sim.scm: Ditto.
814         * cos.scm: Ditto.
815         * enum.scm: Ditto.
816         * guile.scm: Ditto.
817         * sim.scm: Ditto.
818
819 2009-05-28  DJ Delorie  <dj@redhat.com>
820
821         * cpu/mep.opc (parse_signed16_range): New.
822         (parse_unsigned16_range): New.
823         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
824
825 2009-05-26  DJ Delorie  <dj@redhat.com>
826
827         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
828         accumulator names.
829         (f-ivc2-ccrn-c3hi): New.
830         (f-ivc2-ccrn-c3lo): New.
831         (f-ivc2-ccrn-c3): New.
832         (ivc2c3ccrn): Use it.
833
834 2009-05-22  DJ Delorie  <dj@redhat.com>
835
836         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
837         (mep_config_map): Regenerate.
838
839         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
840         ivc2-specific names.
841         (simm8p20): New.
842         (cmovc): move to after field definitions, use ivc2-specific
843         register names.
844         (cpmovi_b_P0S_P1): New.
845         
846 2009-05-19  DJ Delorie  <dj@redhat.com>
847
848         * cpu/mep.opc: Regenerate configuration.
849         (parse_cdisp10): Only check CPU flags, not COP flags.
850         (check_configured_mach): Likewise.
851
852 2009-05-13  DJ Delorie  <dj@redhat.com>
853
854         * intrinsics.scm (insns.md): Add RTL predicates.
855         (intrinsics.h): Remove old C intrinsics.
856
857 2009-04-29  DJ Delorie  <dj@redhat.com>
858
859         * mep-ivc2.cpu: New.
860         * mep-core.cpu: Regenerated.  Add support for deferred register
861         writes.
862         (SLOT): Add IVC2 slot types.
863         (sim-syscall): Rename to something more appropriate.
864         * mep-ext-cop.cpu: Regenerate.
865         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
866         (print_slot_insn): New.
867         (mep_examine_ivc2_insns): New.
868         (mep_print_insn_set_ivc2_mode): New.
869         (mep_print_insn): Support IVC2 slotting.
870         
871 2009-04-20  DJ Delorie  <dj@redhat.com>
872
873         * intrinsics.scm (intrinsics-analyze!): Include aliases.
874         (guess-mode): Drop COP* syntax.
875         (need-insn): Add "--syscall--" to the list.
876         (enum-type): Drop COP* syntax.
877         (intrinsics.h): Likewise.
878         (intrinsic-protos.h): Change file header to allow it to be
879         included.
880
881 2009-04-17  DJ Delorie  <dj@redhat.com>
882
883         * cpu/mep-c5.cpu (f-12s20): Change to signed.
884         (lhucpm1): Limit to C5 mach.
885         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
886         * cpu/mep-core.cpu (extend-cdisp10): New.
887         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
888         
889 2009-04-08  DJ Delorie  <dj@redhat.com>
890
891         * cpu/mep-c5.cpu: New.
892         * cpu/mep-core.cpu: Add C5 support.
893         * cpu/mep.opc: Likewise.
894
895 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
896
897         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
898         about calling memset with a zero length.
899
900 2009-02-03  DJ Delorie  <dj@redhat.com>
901
902         * cpu/mep-core.cpu: Update to new MeP configuration.
903         * cpu/mep-ext-cop.cpu: Likewise.
904         * cpu/mep.opc: Likewise.
905
906 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
907
908         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
909
910 2008-06-17  Dave Brolley  <brolley@redhat.com>
911
912         * cpu/xstormy16.cpu (h-pc): Add a set handler.
913         (h-gr): Likewise.
914
915 2007-11-13  Dave Brolley  <brolley@redhat.com>
916
917         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
918
919 2007-11-05  Dave Brolley  <brolley@redhat.com>
920
921         * intrinsics.scm,cgen-intrinsics.scm: New application which
922         generates code to support intrinsic functions for insns in the
923         mep architecture in gcc.
924
925 2007-09-21  Dave Brolley  <brolley@redhat.com>
926
927         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
928         (rn3us): CDATA attribute now LONG.
929         
930 2007-08-21  Dave Brolley  <brolley@redhat.com>
931
932         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
933         than 32 bits.
934
935 2007-07-05  Nick Clifton  <nickc@redhat.com>
936
937         * utils.scm (copyright-fsf): Update copyright notice to refer to
938         the GPL version 3.
939
940 2007-05-22  Nick Clifton  <nickc@redhat.com>
941
942         * doc/cgen.texi: Use @copying around the copyright notice.
943         * doc/internals.texi: Likewise.
944
945 2007-02-05  Dave Brolley  <brolley@redhat.com>
946
947         * *mep*: New cpu description for Toshiba Media Processor (MeP).
948
949 2007-02-05  Dave Brolley  <brolley@redhat.com>
950
951         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
952         in the generated code for @arch@_cgen_init_asm if it is defined.
953
954         * Contribute the following changes:
955         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
956
957         * attr.scm (<string-attribute>): New attribute class.
958         (attr-kind): Handle <string-attribute>.
959         (parse-simple-attribute): New function.
960         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
961         (<bitset-attribute> 'parse-value): Likewise.
962         (<boolean-attribute> 'parse-value): Likewise.
963         (<enum-attribute> 'parse-value): Likewise.
964         (<string-attribute> 'parse-value): New function.
965         (-attr-parse): Handle <string-attribute>.
966         (-attr-read): Likewise.
967         (<string-attribute> 'gen-value-for-defn-raw): New function.
968         (<string-attribute> 'gen-value-for-defn): New function.
969
970 2006-11-07  Dave Brolley  <brolley@redhat.com>
971
972         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
973         necessary.
974
975 2006-10-18  Dave Brolley  <brolley@redhat.com>
976
977         * Contribute the following changes:
978
979         2006-07-11  Dave Brolley  <brolley@redhat.com>
980
981         * cpu/sh64-compact.cpu (movual, movual2): New insns.
982         (movcol): New insn.
983         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
984         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
985         hardware or memory mode which was used.
986         * sid-cpu.scm (hw-need-write-stack?): New function.
987         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
988         identify hardware which uses write stacks.
989         (useful-mode-names): Renamed to write-stack-memory-mode-names.
990         Initialized to an empty list.
991         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
992         hw-need-write-stack?.
993         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
994         (define-getters <hardware-base>): Define used-in-delay-rtl?.
995         (used-in-delay-rtl?): New method of <hardware-base>.
996         (hw-used-in-delay-rtl?): New function.
997
998         2006-06-20  Dave Brolley  <brolley@redhat.com>
999
1000         * sid.scm (gen-attr-type): Removed.
1001         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1002         (SH2a-MACH): Add sh5.
1003         (sh2a-nofpu-models): Add units for sh5.
1004         (sh2a-fpu-models): Likewise.
1005
1006         2006-06-15  Dave Brolley  <brolley@redhat.com>
1007
1008         * cpu/sh-sim.cpu: New file.
1009         * cpu/sh-sid.cpu: New file.
1010         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1011         (All fields): Remap for (insn-lsb0? #f)
1012         (All insns): Add timing specs.
1013         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1014         'xattrs' and .splice it in.
1015         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1016         (h-frc,h-drc): Add PROFILE attribute.
1017         (h-fpccr): Removed.
1018         (h-vbr): New hardware.
1019         (All fields): Remap for (insn-lsb0? #f)
1020         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1021         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1022         (fpscr): Use h-fpscr.
1023         (fsdm,fsdn): Use h-fsd.
1024         (dshci): Add xtiming argument and splice it in.
1025         (dr,xd): pmacros removed.
1026         (All insns): Add timing specs, *-MACH attribibutes,
1027         SH4{A}-GROUP attributes.
1028         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1029         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1030         we're being processed for sim or sid.
1031         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1032         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1033         (define-isa compact): Add (isa-parallel-insns 2).
1034         (define-isa media): Add (isa-parallel-insns 2). Add
1035         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1036         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1037         sh4a, sh4al
1038         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1039         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1040         (SH4al-MACH, SH5-MACH): New pmacros.
1041         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1042         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1043         (sh5-media-fp-units, common-model, common-model-with-fp) 
1044         (sh3-model, sh3e-model): New pmacros.
1045         (define-model sh2): New model.
1046         (define-model sh2e): New model.
1047         (define-model sh3): New model.
1048         (define-model sh3e): New model.
1049         (define-model sh2a-nofpu): New model.
1050         (define-model sh2a-fpu): New model.
1051         (define-model sh4-nofpu): New model.
1052         (define-model sh4): New model.
1053         (define-model sh4a-nofpu): New model.
1054         (define-model sh4a): New model.
1055         (define-model sh4al): New model.
1056         (define-model sh5-media): New model.
1057         (define-model sh5): Add all units.
1058         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1059         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1060         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1061         (h-pc): Add PROFILE attribute.
1062         (h-fr): Likewise.
1063         (h-tr): Likewise.
1064         (h-gr,h-grc): Likewise.
1065         (h-cr): Set h-sr in setter.
1066         (h-frbit): Get/Set h-fpscr.
1067         (h-szbit,h-prbit): Likewise.
1068         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1069         Add getter and setter.
1070         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1071         Adjust getter and setter.
1072         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1073         Adjust getter and setter.
1074         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1075         (h-fsd,h-fmov): New hardware.
1076
1077 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1078
1079         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1080         doc/notes.texi, doc/porting.texi, doc/running.texi,
1081         doc/sim.texi: Fix some typos.
1082
1083 2006-07-14  Dave Brolley  <brolley@redhat.com>
1084
1085         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1086         hardware or memory mode which was used.
1087         * sid-cpu.scm (hw-need-write-stack?): New function.
1088         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1089         identify hardware which uses write stacks.
1090         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1091         Initialized to an empty list.
1092         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1093         hw-need-write-stack?.
1094         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1095         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1096         (used-in-delay-rtl?): New method of <hardware-base>.
1097         (hw-used-in-delay-rtl?): New function.
1098
1099 2006-06-20  Dave Brolley  <brolley@redhat.com>
1100
1101         * sid.scm (gen-attr-type): Removed.
1102
1103 2006-05-10  Dave Brolley  <brolley@redhat.com>
1104
1105         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1106         support for (if (application-is? <appname>) (...) (...)).
1107         (-cgen): Add trailing "/" to arch-path.
1108         * utils.scm (dirname): Removed. dirname is a primitive function.
1109
1110 2006-05-09  Dave Brolley  <brolley@redhat.com>
1111
1112         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1113         'entire_insn' not 'base_insn'.
1114         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1115         is null.
1116         * sim.scm (-gen-arch-model-decls): Likewise.
1117         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1118         abuf->written if profiling.
1119         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1120         object->string om the mode.
1121         (-hw-gen-write-stack-decl): Likewise.
1122         * read.scm (include): Use arch-path as file location.
1123         (arch-path): Define it with a default setting.
1124         (-cgen): Update arch-path when "-a" option is specified.
1125         * utils.scm (dirname): New function.
1126
1127 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1128
1129         * configure.in: Remove AC_ARG_PROGRAM.
1130         * configure: Regenerate with autoconf 2.59.
1131
1132 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1133
1134         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1135         SIMULATOR.
1136
1137 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1138
1139         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1140         or an error message otherwise.
1141         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1142         Fix up comments to correctly describe the functions.
1143
1144 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1145             Anil Paranjape   <anilp1@kpitcummins.com>
1146             Shilin Shakti    <shilins@kpitcummins.com>
1147
1148         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1149         CPU description.
1150         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1151
1152 2006-02-10  Nick Clifton  <nickc@redhat.com>
1153
1154         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1155
1156 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1157
1158         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1159         for concatenation.
1160         (-hw-gen-write-stack-decl): Likewise.
1161
1162 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1163
1164         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1165         non-(adata-integral-insn? CURRENT-ARCH) case.
1166
1167 2005-10-28  Dave Brolley  <brolley@redhat.com>
1168
1169         Contribute the following changes:
1170         2005-09-19  Dave Brolley  <brolley@redhat.com>
1171
1172         * attr.scm (gen-value-for-defn-raw): New methods.
1173         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1174         gen-value-for-defn-raw.
1175         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1176
1177         2002-12-13  Dave Brolley  <brolley@redhat.com>
1178
1179         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1180         (-gen-attr-accessors): New function.
1181         (gen-obj-attr-defn): Update terminating initializer.
1182         (gen-obj-attr-end-defn): New function.
1183         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1184         * sid-cpu.scm (cgen-desc.h): Generate code to include
1185         "opcode/cgen-bitset.h"
1186         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1187         name.
1188         * desc.scm ('gen-defn): Update terminating initializer.
1189         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1190         terminatinig initializer.
1191         (gen-hw-decls): Ditto.
1192         (gen-operand-decls): Ditto.
1193         (gen-insn-decls): Ditto.
1194         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1195         (gen-insn-table): Update terminating initializer.
1196         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1197         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1198         * attr.scm (charmask-bytes): New function.
1199         (bitset-attr->charmask): New function.
1200         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1201         differences for SID-SIMULATOR.
1202         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1203         (<enum-attribute>): Ditto.
1204
1205 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1206
1207         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1208
1209 2005-10-24  DJ Delorie  <dj@redhat.com>
1210
1211         * operand.scm (-anyof-merge-syntax): Print a more useful error
1212         message.
1213
1214 2005-10-19  Nick Clifton  <nickc@redhat.com>
1215
1216         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1217         patch.
1218
1219 2005-10-18  Andreas Schwab  <schwab@suse.de>
1220
1221         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1222
1223 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1224
1225         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1226         size.
1227
1228 2005-08-02  Dave Brolley  <brolley@redhat.com>
1229
1230         * rtl-c.scm (s-unop): Don't dereference
1231         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1232         (s-binop, s-convop, s-cmpop): Likewise.
1233
1234 2005-07-29  Dave Brolley  <brolley@redhat.com>
1235
1236         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1237         if with-profile or with-parallel-write.
1238         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1239         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1240         string-append.
1241
1242 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1243
1244         * cpu/fr30.opc (print_register_list): Correct format strings.
1245         * cpu/ip2k.opc: Likewise.
1246
1247 2005-07-05  Nick Clifton  <nickc@redhat.com>
1248
1249         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1250         unsigned in order to avoid compile time warnings about sign
1251         conflicts.
1252
1253 2005-07-01  Nick Clifton  <nickc@redhat.com>
1254
1255         * desc-cpu.scm: Update to ISO C90 function declaration style.
1256         * opc-asmdis.scm: Likewise.
1257         * opc-ibld.scm: Likewise.
1258         * opc-itab.scm: Likewise.
1259         * cpu/fr30.opc: Likewise.
1260         * cpu/i960.opc: Likewise.
1261         * cpu/ip2k.opc: Likewise.
1262         * cpu/iq2000.opc: Likewise.
1263         * cpu/m32r.opc: Likewise.
1264         * cpu/openrisc.opc: Likewise.
1265         * cpu/sh.opc: Likewise.
1266         * cpu/sparc.opc: Likewise.
1267         * cpu/xstormy16.opc: Likewise.
1268
1269 2005-06-15  Dave Brolley  <brolley@redhat.com>
1270
1271         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1272         (cgen-cpu.h): Call it.
1273
1274         Contributed on behalf of Graydon Hoare
1275         2001-06-05  graydon hoare  <graydon@redhat.com>
1276
1277         * utils.scm (foldl): Define.
1278         (foldr): Define.
1279         (filter): Define.
1280         (union): Define.
1281         (intersection): Simplify.
1282         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1283         (-op-gen-delayed-set-maybe-trace): Define.
1284         (<operand> 'gen-set-{quiet,trace}): Delegate to
1285         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1286         up and needs cleaning.
1287         (-with-parallel?): Hardwire with-parallel to #t.
1288         (<operand> 'cxmake-get): Replace with lookahead-aware code
1289         * sid-decode.scm: Remove per-insn writeback fns.
1290         (-gen-idesc-decls): Redefine sem_fn type.
1291         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1292         with write stack stuff.
1293         (cgen-write.cxx): Replace per-insn writebacks with single write
1294         stack writeback. Add write stack reset function.
1295         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1296         stack stuff.
1297         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1298         estate attribute set.
1299         (delay): Set #:delayed attribute to calculated delay, update
1300         maximum delay of cpu, check (delay ...) usage.
1301         * operand.scm (<operand>): Add delayed slot to <operand>.
1302         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1303         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1304         * doc/rtl.texi (Expressions): Add section on (delay ...).
1305
1306 2005-06-13  Jim Blandy  <jimb@redhat.com>
1307
1308         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1309         as well as strings.
1310
1311 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1312
1313         * doc/porting.texi: Change all mention of md_apply_fix3 and
1314         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1315         respectively.
1316
1317 2005-05-18  Dave Brolley  <brolley@redhat.com>
1318
1319         * utils-sim.scm (-gen-decode-default-entry): New function.
1320         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1321         code to check that all opcodes bits match.
1322         (-gen-decoder-switch): Use -gen-decode-default-entry.
1323
1324 2005-05-16  Jim Blandy  <jimb@redhat.com>
1325
1326         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1327         fetched by one of our GETIMEM* methods.
1328         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1329         base-insn-sized chunks.
1330
1331 2005-05-10  Nick Clifton  <nickc@redhat.com>
1332
1333         * Update the address and phone number of the FSF organization in
1334         the GPL notices in the following files:
1335         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1336         cpu/powerpc.cpu, slib/random.scm
1337
1338 2005-05-06  Jim Blandy  <jimb@redhat.com>
1339
1340         * pprint.scm, cos-pprint.scm: Add documentation.
1341
1342         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1343
1344         * pprint.scm, cos-pprint.scm: New files.
1345
1346 2005-04-04  Nick Clifton  <nickc@redhat.com>
1347
1348         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1349         avoid a compile time warning.
1350
1351 2005-03-18  Nick Clifton  <nickc@redhat.com>
1352
1353         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1354         "percent-operand" from "%operand" as the latter confuses xgettext
1355         into thinking that it is a C printf formating directive, which
1356         prevents proper translation.
1357
1358 2005-02-23  Nick Clifton  <nickc@redhat.com>
1359
1360         * opcodes.scm (gen-parse-number): Add a cast to the desired
1361         pointer signed'ness in order to prevent compile time warnings.
1362         * cpu/ip2k.opc: Fixed compile time warnings about differing
1363         signed'ness of pointers passed to functions.
1364         * cpu/iq2000.opc: Likewise.
1365         * cpu/m32r.opc: Likewise.
1366         * cpu/openrisc.opc: Likewise.
1367         * cpu/xstormy16.opc: Likewise.
1368
1369 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1370
1371         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1372         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1373
1374 2005-02-16  Dave Brolley  <brolley@redhat.com>
1375
1376         * utils.scm: Update copyright years.
1377         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1378         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1379         * operand.scm (-derived-operand-parse): Move logit message from level 1
1380         to level 2.
1381
1382 2005-02-15  Nick Clifton  <nickc@redhat.com>
1383
1384         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1385         prevent compile time warning messages.
1386         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1387         * utils-gen.scm (attr-int-gen-defn): Likewise.
1388         (attr-gen-defn): Likewise.
1389         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1390         (print_dollarhex16): Remove unused function.
1391
1392 2005-02-15  Jim Blandy  <jimb@redhat.com>
1393
1394         * guile.scm (cgen-call-with-debugging): Doc fix.
1395
1396         Make backtraces work more reliably.
1397         * guile.scm: Set up debugging parameters, and enable debugging and
1398         source positions while loading.
1399         (cgen-call-with-debugging, cgen-debugging-stack-start): New
1400         functions.
1401         * read.scm: Don't set debugging parameters here.
1402         (catch-with-backtrace): Function deleted.
1403         (-cgen): Simply note the presence or absence of the -b option.
1404         Pass the flag to cgen-call-with-debugging, so debugging is turned
1405         off here if the user didn't request it, for faster computation.
1406         (cgen): Call cgen-debugging-stack-start here, instead of
1407         catch-with-backtrace.
1408
1409         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1410         trailing -s.
1411         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1412         Don't write out the trailing -s here.
1413         * Makefile.in: Regenerated.
1414         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1415         fixup.scm here; let the caller decide which Scheme's customization
1416         file to preload.
1417         * dev.scm: Load guile.scm, not fixup.scm.
1418         * fixup.scm: Deleted; contents have all moved to guile.scm.
1419         * README: Doc fix.
1420
1421         * guile.scm (debug-write): New function.
1422
1423 2005-02-14  Jim Blandy  <jimb@redhat.com>
1424
1425         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1426         transformer procedure, not eval.  Transformer procedures take one
1427         argument.
1428
1429 2005-02-11  Nick Clifton  <nickc@redhat.com>
1430
1431         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1432         to 'bfd_vma *' in order avoid compile time warning message.
1433
1434 2005-02-09  Jim Blandy  <jimb@redhat.com>
1435
1436         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
1437         corresponding change in the sim/common directory.)
1438
1439 2005-02-07  Jim Blandy  <jimb@redhat.com>
1440
1441         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
1442         changes in the opcodes directory.)
1443
1444         * guile.scm: New file, containing Guile-specific definitions and
1445         adaptations.  This is loaded by the app-specific shell scripts.
1446         Initially identical to fixup.scm.
1447         * cgen-sid.scm: Don't load fixup.scm here.
1448
1449         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1450         latter is a macro.
1451
1452 2005-01-27  Jim Blandy  <jimb@redhat.com>
1453
1454         * utils.scm (string/symbol->append): Renamed from 'concat'.
1455         * opcodes.scm (gen-switch): Use new name.
1456         * insn.scm (-sub-insn-make!): Same.
1457         * rtl.scm (rtx-dump): Same.
1458         * semantics.scm (semantic-compile): Same.
1459
1460 2005-01-20  Jim Blandy  <jimb@redhat.com>
1461
1462         * opcodes.scm (gen-switch): Use concat instead of string-map.
1463
1464         * utils.scm (concat): New function.
1465         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1466         * rtl.scm (rtx-dump): Same.
1467         * semantics.scm (semantic-compile): Same.
1468
1469 2004-12-16  Jim Blandy  <jimb@redhat.com>
1470
1471         * utils-cgen.scm (parse-name): Don't assume that string-map can be
1472         applied to symbols.  Process everything as strings, and then
1473         convert to a symbol at the end.
1474
1475         * read.scm (debug-repl): Temporarily redirect input and output to
1476         /dev/tty while we debug, so we don't interfere with whatever CGEN
1477         is reading or writing.
1478         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1479         New functions.
1480
1481 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
1482
1483         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1484         will work with newer versions of guile.
1485
1486 2004-10-27  Nick Clifton  <nickc@redhat.com>
1487
1488         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1489         * cpu/iq2000.cpu: Likewise.
1490
1491 2004-07-21  DJ Delorie  <dj@redhat.com>
1492
1493         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1494
1495 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
1496
1497         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1498         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1499
1500 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1501
1502         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1503
1504 2004-03-22  Dave Brolley  <brolley@redhat.com>
1505
1506         * utils.scm (copyright-fsf): Update copyright years.
1507         (copyright-red-hat): Ditto.
1508         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1509         code.
1510         (-op-gen-set-trace-parallel): Ditto.
1511
1512 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
1513
1514         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1515         disassembling codes for 0x*2 addresses.
1516
1517 2004-01-29  Dave Brolley  <brolley@redhat.com>
1518
1519         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1520         zeroes in the extra bit positions and generate 'opcode-mask' with ones
1521         in the extra bit positions.
1522
1523 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1524
1525         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1526
1527 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
1528
1529         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1530         "short" being 16 bit.
1531         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
1532         internationalize error message.
1533         (parse_lo16): Likewise.  Remove useless code.
1534
1535 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1536
1537         * cpu/m32r.cpu : Add new model m32r2.
1538         Add new instructions.
1539         Replace occurrances of 'Mitsubishi' with 'Renesas'.
1540         Changed PIPE attr of push from O to OS.
1541         Care for Little-endian of M32R.
1542         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1543         Care for Little-endian of M32R.
1544         (parse_slo16): signed extension for value.
1545
1546 2003-10-26  Dave Brolley  <brolley@redhat.com>
1547
1548         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1549         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1550         (-gen-extract-fn): Call -gen-record-profile-args.
1551
1552 2003-10-21  Dave Brolley  <brolley@redhat.com>
1553
1554         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1555         a static const int.
1556         * decode.scm (-opcode-slots): Correct typo in logit call.
1557
1558 2003-10-09  Jim Blandy  <jimb@redhat.com>
1559
1560         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1561         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
1562
1563         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1564
1565 2003-10-06  Dave Brolley  <brolley@redhat.com>
1566
1567         * gen-all-doc: Add fr550.
1568
1569 2003-09-11  Doug Evans  <dje@sebabeach.org>
1570
1571         * Makefile.am (ARCHFILE): New var.
1572         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1573         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1574         * Makefile.in: Regenerate.
1575
1576 2003-09-08  Dave Brolley  <brolley@redhat.com>
1577
1578         On behalf of Doug Evans <dje@sebabeach.org>
1579         Pass in paths to input files, instead of assuming they live in
1580         $srcdir/cpu.  Plus misc. option processing cleanup.
1581         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1582         Add pre-process pass to all options.
1583         * cgen-gas.scm (gas-arguments): Ditto.
1584         * cgen-sid.scm (sim-arguments): Ditto.
1585         * cgen-sim.scm (sim-arguments): Ditto.
1586         * cgen-stest.scm (stest-arguments): Ditto.
1587         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
1588         (-opc-file-path): New global.
1589         (opc-file-path): New fn.
1590         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1591         All callers updated.
1592         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1593         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1594         Replace srcdir arg with opc-file.  All callers updated.
1595         * read.scm (-opt-spec-update): Delete.
1596         (opt-get-first-pass,opt-get-second-pass): New fns.
1597         (-cgen): Process application-specific arguments in two passes.
1598
1599 2003-08-29  Dave Brolley  <brolley@redhat.com>
1600
1601         * cpu/frv.cpu: Removed.
1602         * cpu/frv.opc: Removed.
1603
1604 2003-08-21  Nick Clifton  <nickc@redhat.com>
1605
1606         * cpu/frv.cpu (mbtoh): Replace input parameter to
1607         u-media-dual-expand and u-media-dual-btoh with output parameter.
1608         (cmbtoh): Add profiling hack.
1609
1610 2003-08-19  Michael Snyder  <msnyder@redhat.com>
1611
1612         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1613
1614 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
1615
1616         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1617         the elements for the END record of CGEN_OPINST, silencing warnings.
1618
1619 2003-07-15  Doug Evans  <dje@sebabeach.org>
1620
1621         Add guile 1.6.4 support.
1622         - empty list must be quoted
1623         - string functions have stricter type checking
1624         - eval now takes a second argument
1625         - symbol-bound? is deprecated
1626         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1627         (bitset-attr->list): Ensure arg to string-cut is a string.
1628         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1629         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1630         * cos.scm (-class-list): Must quote empty list.
1631         (-class-parent-classes,-class-compute-class-desc): Ditto.
1632         (class-make,make,object-reset!): Ditto.
1633         (method-make-make!): Call eval1 instead of eval.
1634         (method-make-forward!,method-make-virtual-forward!): Ditto.
1635         * decode.scm (subdtable-add): Use stringsym-append instead of
1636         string-append.
1637         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1638         (-build-decode-table-entry): Fetch string name of insn.
1639         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1640         (-gen-mach-table-defns): Ditto for mach.
1641         (gen-ifld-defns): Ditto for ifld.
1642         (gen-hw-table-defns): Ditto for hw.
1643         (gen-operand-table): Ditto for op.
1644         (gen-insn-table-entry): Ditto for insn.
1645         * desc.scm (gen-attr-table-defn): Ditto for attr.
1646         (<keyword>,gen-defn): Don't pass symbols to string-append.
1647         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1648         symbol-append.
1649         (enum-vals-upcase): Use symbol-upcase to build result.
1650         (-enum-parse): Use stringsym-append to build errtxt.
1651         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1652         (eval1): New function.
1653         (symbol-bound?): Provide own version if >= guile 1.6.
1654         * hardware.scm (define-keyword): Use string-append instead of
1655         symbol-append.
1656         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
1657         cgen.html,cgen-insn.html): Convert current-arch-name to a string
1658         before using.
1659         (gen-list-entry): Handle either symbol or string `name' arg.
1660         (gen-obj-doc-header): Fetch string name of `o' arg.
1661         (define-cpu-intro): Ditto for cpu.
1662         (gen-mach-intro): Ditto for mach.
1663         (gen-model-intro): Ditto for model.
1664         (gen-isa-intro): Ditto for isa.
1665         (gen-machine-doc-1): Ditto for isa.
1666         (gen-reg-doc-1): Convert mach to string first.
1667         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
1668         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
1669         to string first.
1670         (gen-insn-categories): Fetch string name of mach.  Convert
1671         enum-val-name to string first.
1672         (gen-insn-docs): Fetch string name of mach.
1673         * ifield.scm (ifld-ilk): Result is a string.
1674         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
1675         Fetch string name of ifld.
1676         (-sfmt-search-key): Similarily for ifld and op.
1677         * insn.scm (syntax-make): Fetch string name of syntax element.
1678         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
1679         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
1680         * mode.scm (mode:c-type): Result is a string.
1681         (mode:enum): Fetch string name of mode.
1682         (-mode-parse): Use stringsym-append to build errtxt.
1683         * model.scm (model:enum): Fetch string name of model.
1684         (-model-parse): Use stringsym-append to build errtxt.
1685         (parse-insn-timing): Must quote empty list.
1686         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
1687         (-gen-minsn-opcode-entry): Ditto.
1688         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
1689         convert to string.
1690         (read-cpu.opc): Convert current-arch-name to a string before using.
1691         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
1692         (<derived-operand>): Must quote empty list.
1693         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
1694         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
1695         of ifld.
1696         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
1697         (-pmacro-sym): Must convert symbols to strings before passing to
1698         string-append.
1699         (-pmacro-str): Ditto.
1700         (pmacros-init!): Use eval1 instead of eval.
1701         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
1702         (keep-isa-atlist?): Ditto.
1703         (cmd-if): Use eval1 instead of eval.
1704         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
1705         (-rtl-c-get): Fetch string name of src.
1706         (s-unop): Ditto for mode.
1707         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
1708         (-gen-par-temp-defns,subword): Ditto.
1709         (join): Use stringsym-append instead of string-append.
1710         * rtl-traverse.scm (rtx-option?): Convert option to string first.
1711         (rtx-traverse-debug): Fetch string name of rtx-obj.
1712         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
1713         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1714         (rtx-pretty-name): Result is a string.
1715         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
1716         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
1717         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
1718         before using.
1719         (-gen-sfrag-case): Fetch string name of user.
1720         * sid-model.scm (unit:enum): Fetch string name of unit.
1721         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
1722         (<hw-memory>,gen-set-quiet): Ditto.
1723         (gen-mode-defs): Ditto.
1724         (sim-finish!): Convert current-arch-name to a string before using.
1725         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
1726         (-gen-no-scache-semantic-fn): Ditto.
1727         (cgen-defs.h): Fetch string name of isa.
1728         (cgen-read.c): Convert current-arch-name to a string before using.
1729         (cgen-write.c): Ditto.
1730         * sim-model.scm (unit:enum): Fetch string name of unit.
1731         (gen-model-fn-decls): Use stringsym-append instead of string-append.
1732         (-gen-model-timing-table): Fetch string name of model.
1733         (-gen-mach-model-table): Ditto.
1734         (-gen-mach-defns): Fetch string name of mach.
1735         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
1736         (<hw-memory>,cxmake-get): Fetch string name of mode.
1737         (<hw-memory>,gen-set-quiet): Ditto.
1738         (gen-mode-defs): Ditto.
1739         (sim-finish!): Must quote empty list.
1740         * utils-cgen.scm (<ident>): Must quote empty list.
1741         (obj:str-name): New fn.
1742         (parse-comment): Result is a string.
1743         (parse-symbol): Result is a symbol.
1744         (parse-string): Result is a string.
1745         (keyword-list?): Convert arg to string before calling string-ref.
1746         (keyword-list->arg-list): Ditto.
1747         (gen-attr-name): Convert attr-name to string first.
1748         (alpha-sort-obj-list): Use symbol<? instead of string<?.
1749         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
1750         (gen-define-ifmt-ifields): Ditto for fld.
1751         * utils.scm (gen-c-symbol): Ensure str is a string before calling
1752         map-over-string.
1753         (gen-file-name): Ditto.
1754         (symbol-downcase,symbol-upcase,symbol<?): New fns.
1755         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
1756         (reduce): Call eval1 instead of eval.
1757         * cpu/m32r.cpu (addi): Don't use `#.'.
1758
1759         * gen-all-sim: Fix some typos.
1760
1761 2003-07-08  Doug Evans  <dje@sebabeach.org>
1762
1763         * gen-all-doc: Ensure run from cgen src dir.
1764         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
1765         * gen-all-sid: Similarily, in ./tmp-sid.
1766         * gen-all-sim: Similarily, in ./tmp-sim.
1767
1768 2003-06-20  Doug Evans  <dje@sebabeach.org>
1769
1770         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
1771
1772 2003-06-19  Doug Evans  <dje@sebabeach.org>
1773
1774         * mach.scm (-ifld-already-defined?): New proc.
1775         (current-ifld-add!): Use it.
1776         (-op-already-defined?): New proc.
1777         (current-op-add!): Use it.
1778         (-insn-already-defined?): New proc.
1779         (current-insn-add!): Use it.
1780         (-minsn-already-defined?): New proc.
1781         (current-minsn-add!): Use it.
1782         (obj-isa-list): New proc.
1783         (isa-supports?): Use it.
1784
1785 2003-06-10  Doug Evans  <dje@sebabeach.org>
1786
1787         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
1788         * cpu/m32r.cpu (all insns): Ditto.
1789
1790         * mach.scm (current-*-add!): Disallow redefinition.  Make result
1791         "unspecified".
1792
1793         * gen-all-doc: Split arm and frv docs up a bit.
1794
1795         * cpu/arm.cpu: Add IDOC attribute.
1796         * cpu/frv.cpu: Ditto.
1797         * cpu/i960.cpu: Ditto.
1798         * cpu/openrisc.cpu: Ditto.
1799         * cpu/xstormy16.cpu: Ditto.
1800         * cpu/m32r.cpu: Ditto.
1801         (all insns): Explicitly specify IDOC attribute.
1802
1803         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
1804         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
1805         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
1806         * Makefile.in: Regenerate.
1807         * attr.scm (<integer-attribute>:parse-value-def): Implement.
1808         (-attr-read): Defer computing default value until we know the type.
1809         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
1810         (<attr-list>:attr-present?): New method.
1811         (atlist-attr-present?,obj-attr-present?): New fns.
1812         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
1813         (attr-builtin!): New insn attr IDOC.
1814         * cgen-doc.scm (doc-arguments): New args -I,-N.
1815         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
1816         Support comment as fourth element of enum value.
1817         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
1818         * html.scm (gen-html-header): New arg kind, all callers updated.
1819         (gen-table-of-contents): New arg insn-file, all callers updated.
1820         (gen-list-entry,gen-doc-header): New fn.
1821         (get-operands): Delete.
1822         (gen-iformat-table): Rewrite.
1823         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
1824         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
1825         (get-insn-properties,guess-insn-idoc-attr!): New fn.
1826         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
1827         (get-insns-for-category,gen-categories-insn-lists): New fns.
1828         (gen-insn-docs): Simplify each insn's semantics first.
1829         Print insn tables sorted by IDOC categories.
1830         (*insn-html-file-name*): New global.
1831         (cgen-insn.html): New fn.
1832         (cgen-all): Update.
1833         * insn.scm (<insn>): Create a setter for the `tmp' member.
1834         * semantics.scm (insn-build-known-values): Renamed from
1835         -build-known-values.  All callers updated.
1836
1837         * rtl.scm: Move traveral/evaluation support to ...
1838         * rtl-traverse.scm: New file.
1839         * read.scm: Maybe-load rtl-traverse.scm.
1840
1841         * rtl.scm (-rtx-valid-types): Add SETRTX.
1842
1843         * rtx-funcs.scm (nop,parallel): Fix mode.
1844
1845         * utils.scm (eqv-lookup-index): New fn.
1846         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
1847
1848         * dev.scm (load-doc): Set APPLICATION.
1849
1850 2003-06-10  Dave Brolley  <brolley@redhat.com>
1851
1852         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
1853         * sid-decode.scm: Generate #include of config.h into
1854         @prefix@-decode.cxx.
1855         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
1856
1857 2003-06-07  Doug Evans  <dje@sebabeach.org>
1858
1859         * gen-all-sid: New file.
1860         * gen-all-opcodes: New file.
1861
1862 2003-06-05  Nick Clifton  <nickc@redhat.com>
1863
1864         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
1865         version of the FRinti operand.
1866         (FRintjeven): Likewise for FRintj.
1867         (FRintkeven): Likewise for FRintk.
1868         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
1869         media-quad-arith-sat-semantics, media-quad-arith-sat,
1870         conditional-media-quad-arith-sat, mdunpackh,
1871         media-quad-multiply-semantics, media-quad-multiply,
1872         conditional-media-quad-multiply, media-quad-complex-i,
1873         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
1874         conditional-media-quad-multiply-acc, munpackh,
1875         media-quad-multiply-cross-acc-semantics, mdpackh,
1876         media-quad-multiply-cross-acc, mbtoh-semantics,
1877         media-quad-cross-multiply-cross-acc-semantics,
1878         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
1879         media-quad-cross-multiply-acc-semantics, cmbtoh,
1880         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
1881         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
1882         cmhtob): Use new operands.
1883         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
1884         (parse_even_register): New function.
1885
1886 2003-06-04  Doug Evans  <dje@sebabeach.org>
1887
1888         Better handling of 64 bit and mixed 32/64 bit architectures.
1889         * hardware.scm (hw-update-word-modes!): New fn.
1890         * mach.scm (define-cpu)): Call mode-set-word-modes!,
1891         hw-update-word-modes!.
1892         (state-word-bitsize): Replace FIXME with requested check.
1893         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
1894         * mode.scm (mode-find): Ignore INT,UINT.
1895         (-mode-word-sizes-kind): New global.
1896         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
1897         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
1898         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
1899         of mode-list to ...
1900         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
1901         unusable, correct values set later.
1902         (mode-finish!): Remove cruft.
1903         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
1904         * opcodes.scm (opcodes-init!): Ditto.
1905         * rtx-funcs.scm (annul): Fix mode of pc.
1906         * cpu/ia64.cpu: Remove cruft that sets word modes.
1907         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
1908
1909 2003-06-03  Nick Clifton  <nickc@redhat.com>
1910
1911         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
1912         immediate value not unsigned.
1913
1914 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
1915
1916         * cpu/sh.cpu: Amend comments to refer to SuperH.
1917         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
1918         * cpu/sh64-media.cpu: Likewise.
1919         (Saturation): Update manual reference.
1920
1921 2003-05-15  Doug Evans  <dje@sebabeach.org>
1922
1923         * Makefile.am (srcroot): New var.
1924         (html): New rule.
1925         * Makefile.in: Regenerate.
1926         * cgen-doc.scm: New file.
1927         * html.scm: New file.
1928         * gen-all-doc: New file.
1929         * dev.scm (cload): Handle DOC application.
1930         (load-doc): New fn.
1931         * machs.scm (machs-for-cpu): New fn.
1932         * model.scm (models-for-cpu): New fn.
1933         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
1934         All uses updated.
1935         (iota): Rewrite to be identical to pmacro version.  All uses updated.
1936         * utils-cgen.scm (alpha-sort-obj-list): New fn.
1937
1938         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
1939         (-gen-decode-bits): Instead put in better fix here.
1940
1941         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
1942
1943 2003-05-01  DJ Delorie  <dj@redhat.com>
1944
1945         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
1946         word accesses.
1947         (set-alignfix-mem): Likewise.
1948
1949 2003-04-16  Dave Brolley  <brolley@redhat.com>
1950
1951         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
1952         * utils.scm (copyright-fsf): Update generate copyright years.
1953         (copyright-cygnus): Ditto.
1954         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
1955         operands.
1956         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
1957         here.
1958         (<operand>'gen-profile-code): New parameter 'when'.
1959         (<iunit>'gen-profile-code): Ditto.
1960         (<insn>'gen-profile-code): Ditto.
1961         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
1962         'insn_reference' for the 'after' function.
1963         * model.scm (unit:enum): Moved to sim-model.scm.
1964         * sim-model.scm (unit:enum): Moved from model.scm.
1965         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
1966         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
1967         * sid-model.scm (unit:enum): New version for sid.
1968         (gen-model-class-name): New function.
1969         (gen-model-unit-fn-decl): New function.
1970         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
1971         (gen-model-unit-fn-name): New parameter 'when'.
1972         (-gen-model-insn-fn-name): Ditto.
1973         (-gen-model-insn-qualified-fn-name): New function.
1974         (-gen-model-insn-fn-decl): New function.
1975         (-gen-model-insn-fn-decls): New function.
1976         (-gen-model-insn-fn): New parameter 'when'. Call
1977         -gen-model-insn-qualified-fn-name.
1978         (-gen-model-insn-fns): Generate the constructor for the model. Generate
1979         functions for modelling insn before and after execution.
1980         (-gen-model-class-decls): New function.
1981         (" (gen-model-class-name model) "): New function.
1982         (gen-model-classes): New function.
1983         (-gen-insn-timing): Generate functions for modelling insn before and after
1984         execution.
1985         (-gen-insn-unit-timing): Generate class-qualified names.
1986         (-gen-model-timing-table): Ditto.
1987         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
1988         not needed (yet) by sid.
1989         (cgen-model.h): New function.
1990
1991 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
1992
1993         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
1994         * cpu/sh64-compact.cpu: Likewise.
1995         * cpu/sh64-media.cpu: Likewise.
1996
1997 2003-03-21  DJ Delorie  <dj@redhat.com>
1998
1999         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2000         which indicates if the sign flag is set from bit 15 or 7.
2001         Adjust all callers.
2002         (set-psw): New argument ws, propogate it.
2003         (set-psw-nowrite): Likewise.
2004         (set-mem-psw): Likewise.
2005         (set-psw-carry): Likewise.  Use temporaries to prevent
2006         prematurely overwriting needed inputs.
2007         (set-psw-rrotate17): Fix logic.
2008         (shrgrgr): Preserve carry for zero-bit shifts.
2009         (shrgrimm): Likewise.
2010         (shlgrgr): Likewise.
2011         (shlgrimm): Likewise.
2012         (asrgrgr): Likewise.
2013         (asrgrimm): Likewise.
2014         (reset): New.
2015
2016 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2017
2018         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2019
2020 2002-03-05  DJ Delorie  <dj@redhat.com>
2021
2022         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2023         prematurely overwriting needed inputs.
2024         (set-psw-sub): Likewise.
2025
2026 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2027
2028         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2029
2030 2003-02-18  DJ Delorie  <dj@redhat.com>
2031
2032         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2033         (movlmemimm): Just mask the address.
2034         (movhmemimm): Likewise.
2035         (movlmemgr): Likewise.
2036         (movhmemgr): Likewise.
2037         (set-psw): Always set the psw last.
2038         (set-psw-carry): Likewise.
2039         (set-psw-add): Likewise.
2040         (set-psw-sub): Likewise.
2041
2042         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2043         of 16 patterns from the set-psw-rotate17 function.
2044         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2045         movgriipostincgr, movgriipredecgr): Set psw correctly.
2046         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2047         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2048         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2049
2050 2003-02-11  Dave Brolley  <brolley@redhat.com>
2051
2052         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2053         @arch@_cgen-ifld_table.
2054         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2055         @arch@_cgen-ifld_table.
2056
2057 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2058
2059         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2060
2061 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2062
2063         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2064         empty ISAs.
2065
2066 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2067
2068         * utils-gen.scm (attr-int-gen-defn): Define.
2069
2070 2002-12-21  Doug Evans  <dje@sebabeach.org>
2071
2072         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2073         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2074
2075         * dev.scm (cload): Update location of .cpu files.
2076
2077 2002-12-19  Doug Evans  <dje@sebabeach.org>
2078
2079         * utils-sim.scm (gen-profile-sym): New fn.
2080         (<operand>,sbuf-profile-sym): New method.
2081         (<operand>,sbuf-profile-elm): Use it.
2082         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2083         of hardcoding symbol name.
2084         (<operand>,gen-profile-code): Ditto.
2085         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2086         symbol name.
2087
2088         * mode.scm (mode-sem-mode): New fn.
2089         * operand.scm (op:new-mode): Update. mode-name.
2090         (op-natural-mode?) New fn.
2091         * rtl.scm (hw): Set hw-name,mode-name.
2092
2093         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2094         Instead do:
2095         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2096         as size of IDESC-TABLE-VAR.
2097         (@prefix@_init_idesc_table): Ditto.
2098         * sim-model.scm (-gen-mach-defns): Ditto.
2099         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2100
2101         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2102
2103         * insn.scm (-parse-insn-format-symbol): Improve error message.
2104         (-parse-insn-format): Ditto.
2105
2106         * gen-all-sim: New script.
2107
2108 2002-12-16  DJ Delorie  <dj@delorie.com>
2109
2110         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2111
2112 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2113
2114         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2115         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2116         (parse_immediate16): Handle immediate16 values, which now include
2117         @hi(label) and @lo(label)
2118
2119 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2120
2121         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2122         Add braces and cast for union field.
2123         (gen-multi-ifield-nodes): Add braces and cast for union field.
2124         (cgen_operand_table): Similarly fix sentinel.
2125         (cgen_cpu_close): Constify "insns".  Formatting.
2126         (cgen-desc.c): Include xregex.h.
2127         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2128         Prototype.
2129         <opc.c>: Include safe-ctype.h.
2130         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2131         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2132         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2133         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2134         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2135         (parse_addr16): Correct type of "value".  Formatting.
2136         (parse_addr16_p): Likewise.
2137         (parse_addr16_cjp): Likewise.
2138         (parse_lit8): Likewise.
2139         (parse_bit3): Formatting.
2140         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2141         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2142         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2143         print_decimal.
2144         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2145         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2146         (print_dollarhex8): Likewise.
2147         (print_dollarhex16): Likewise.
2148         (print_dollarhex_addr16h): Likewise.
2149         (print_dollarhex_addr16l): Likewise.
2150         (print_dollarhex_p): Likewise.
2151         (print_dollarhex_cj): Likewise.
2152         (print_decimal): Likewise.
2153         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2154
2155 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2156
2157         * doc/rtl.texi (Model variants): Mention current limitations for
2158         unit inputs and outputs.
2159         (Hardware elements) <attribute PROFILE>: Be slightly more
2160         verbose.
2161         (Instructions) <timing>: input/output overrides have a direction
2162         operand.
2163
2164 2002-11-25  DJ Delorie  <dj@redhat.com>
2165
2166         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2167
2168 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2169
2170         * cpu/iq10.cpu: New file.
2171         * cpu/iq2000.cpu: Likewise.
2172         * cpu/iq2000.opc: Likewise.
2173         * cpu/iq2000m.cpu: Likewise.
2174
2175 2002-11-19  DJ Delorie  <dj@redhat.com>
2176
2177         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2178
2179 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2180
2181         * dev.scm: Call getenv with a string, not a symbol.
2182
2183 2002-10-08  Doug Evans  <dje@transmeta.com>
2184             Hans-Peter Nilsson  <hp@axis.com>
2185
2186         * types.scm (bitrange-overlap?): Handle lsb0?.
2187
2188 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2189
2190         From Robert Cragie <rcc@jennic.com>:
2191         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2192
2193 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2194             Ben Elliston  <bje@redhat.com>
2195             John Healy  <jhealy@redhat.com>
2196             Jeff Johnston  <jjohnstn@redhat.com>
2197             Alan Lehotsky  <alehotsky@redhat.com>
2198             Ubicom Inc. <SupportDesk@ubicom.com>
2199
2200         * cpu/ip2k.cpu: New file.
2201         * cpu/ip2k.opc: Likewise.
2202
2203 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2204
2205         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2206
2207 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2208
2209         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2210         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2211         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2212         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2213         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2214         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2215         (-sthi-byte): If there is a single byte to store, store it at
2216         proper address.
2217         (sthil, sthiq): Fix big-endian behaviour.
2218         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2219         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2220         (saturate): Use Dimode to check if saturation operation is required.
2221         (usaturate): Likewise.
2222         (mpermw): Fix mask.
2223         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2224         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2225         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2226         (msadubq): Fix subword index in second operand of first subtraction.
2227
2228 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2229
2230         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2231         code.
2232
2233 2002-06-18  Dave Brolley  <brolley@redhat.com>
2234
2235         * cpu/frv.cpu: New cpu description.
2236         * cpu/frv.opc: New cpu support code.
2237
2238 2002-05-21  Dave Brolley  <brolley@redhat.com>
2239
2240         * decode.scm (-opcode-slots): Don't consider bits beyond the
2241         length of the insn.
2242
2243 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2244
2245         * cpu/powerpc.cpu: New file.
2246
2247 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2248
2249         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2250
2251 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2252
2253         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2254         results are expanded recursively.
2255
2256 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2257
2258         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2259         call scan-symbol on it, to enable recursive macro-expansion.
2260
2261 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2262
2263         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2264         for multiple-isa configurations.
2265         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2266
2267 2002-02-04  Ben Elliston  <bje@redhat.com>
2268
2269         * cpu/sh.cpu, cpu/sh.opc: New files.
2270         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2271
2272 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2273
2274         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2275         (Enumerated constants): Mention that an ifield must not specify a
2276         multi-ifield.
2277         (Instruction operands): Ditto for index.
2278         (Expressions) <parallel>: Remove misplaced mention of local
2279         variables.
2280         <if>: Mention that mode must be specified and non-VOID when the
2281         result is used.
2282
2283 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2284
2285         * doc/porting.texi: When referring to *.opc, mention they are in
2286         the cpu subdir.  Call top-level directory toplevel, not devo.
2287         Close string in define-normal-insn example.
2288
2289         * doc/pmacros.texi: Fix .substr typo to .substring.
2290         Mention that .sym expansions are not further expanded.
2291
2292 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2293
2294         * desc-cpu.scm (ifld-number-cache): Add.
2295         (ifld-number): Add.
2296         (gen-maybe-multi-ifld-of-op): Add.
2297         (gen-maybe-multi-ifld): Add.
2298         (gen-multi-ifield-nodes): Add.
2299         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2300
2301 2002-01-10  matthew green  <mrg@redhat.com>
2302
2303         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2304         (gr-Rb-names): ... to this.
2305         (h-Rb): New hardware piece.
2306         (h-Rbj): Use gr-Rb-names.
2307         (Rb): Use h-Rb.
2308         (holdx): New instruction.
2309
2310 2002-01-07  Ben Elliston  <bje@redhat.com>
2311
2312         * utils.scm (package-cygnus-simulators): Rename from this ..
2313         (package-red-hat-simulators): .. to this.
2314         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2315         * sid-cpu.scm (cgen-desc.h): Likewise.
2316         (cgen-cpu.h): Likewise.
2317         (cgen-defs.h): Likewise.
2318         (cgen-write.cxx): Likewise.
2319         (cgen-semantics.cxx): Likewise.
2320         (cgen-sem-switch.cxx): Likewise.
2321         * sid-decode.scm (cgen-decode.h): Likewise.
2322         (cgen-decode.cxx): Likewise.
2323         * sid-model.scm (cgen-model.cxx): Likewise.
2324         * sid.scm (option-set!): Likewise.
2325         * sim.scm (option-set!): Likewise.
2326
2327 2002-01-07  Ben Elliston  <bje@redhat.com>
2328
2329         * utils.scm (copyright-fsf): Add 2002.
2330         (copyright-cygnus): Rename to copyright-red-hat.
2331         (copyright-red-hat): Add 2002.
2332         (CURRENT-COPYRIGHT): Update comment.
2333         * opcodes.scm (option-set!): Update callers.
2334         * sid-model.scm (cgen-model.cxx): Likewise.
2335         * sid-cpu.scm: Likewise.
2336         * sid-decode.scm: Likewise.
2337         * sid.scm (option-set!): Handle "redhat" as an option for
2338         "copyright"; use copyright-red-hat.
2339         * sim.scm (option-set!): Likewise.
2340
2341 2002-01-03  Dave Brolley  <brolley@redhat.com>
2342
2343         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2344         number of insns in the list.  Update the population count function to
2345         identify and prioritize 3 catgories of useful bits.
2346         (-population-top-few): Don't consider bits with a population count of
2347         zero.
2348         (-build-decode-table-entry): Don't call
2349         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2350         identical insns at the next tree level.
2351         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2352         this function is no longer used.
2353         (filter-non-specialized-ambiguous-insns): New function.
2354         (filter-identical-ambiguous-insns): New function.
2355         (find-identical-insn): New function.
2356         (filter-harmlessly-ambiguous-insns): Removed.
2357
2358 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2359             matthew green  <mrg@redhat.com>
2360             Frank Ch. Eigler  <fche@redhat.com>
2361             Nick Clifton  <nickc@cambridge.redhat.com>
2362
2363         * cpu/xstormy16.cpu: New file.
2364         * cpu/xstormy16.opc: New file.
2365
2366 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2367
2368         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2369
2370 2001-11-14  Dave Brolley  <brolley@redhat.com>
2371
2372         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2373         of the field being extracted.
2374
2375 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2376
2377         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2378         (cos ...) and (sin ..) rtx.
2379
2380 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2381
2382         * desc-cpu.scm: Do not include ctype.h in generated desc
2383         files.  They will inherit safe-ctype.h instead.
2384
2385 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2386
2387         * desc-cpu.scm: Add missing function prototypes (for generated
2388         C files).  Fix compile time warning messages about unused
2389         parameters (for generated C files).
2390         * opc-asmdis.scm: The same.
2391         * opc-ibld.c: The same.
2392         * opc-itab.scm: The same.
2393         * cpu/fr30.opc: The same.
2394         * cpu/m32r.opc: The same.
2395         * cpu/openrisc.opc: The same.
2396
2397 2001-09-17  graydon hoare  <graydon@redhat.com>
2398
2399         * insn.scm (syntax-break-out): Correct logic in handling escaped
2400         syntax characters.
2401
2402 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
2403
2404         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2405         call @arch@_cgen_build_insn_regex now that regex support is in
2406         libiberty.
2407
2408 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
2409
2410         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2411         (mask-superset?): Look for strict supersets to allow rejection of
2412         duplicate insns.
2413
2414 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2415
2416         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2417         (cgen-desc.h): Call it.
2418         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2419         decode-size.
2420         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2421         entire_insn for extraction, if it's shorter than base-insn-bitsize.
2422
2423 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2424
2425         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2426         mach->cpu insn-chunk-bitsize.
2427         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2428         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2429         * mach.scm (<cpu>): New field insn-chunk-bitsize.
2430         (-cpu-parse, -cpu-read): Parse/initialize it.
2431         * doc/rtl.texi (define-cpu): Document it.
2432
2433 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
2434
2435         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2436
2437 2001-07-06  Ben Elliston  <bje@redhat.com>
2438
2439         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2440
2441 2001-07-05  Ben Elliston  <bje@redhat.com>
2442
2443         * README: Update.
2444
2445         * read.scm (include): Include files from srcdir/cpu.
2446         (-cgen): Likewise for loading .cpu files.
2447         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2448         * *.cpu: Move all cpu descriptions into cpu subdirectory.
2449         * *.opc: Likewise.
2450         * simplify.inc: Likewise.
2451
2452 2001-07-04  Ben Elliston  <bje@redhat.com>
2453
2454         * read.scm (include): Log "Including file" message at level 1,
2455         rather than outputting it with (display).
2456         (cpu-load): Log "Loading cpu description" and "Processing cpu
2457         description" messages at levels 1 and 2, respectively, rather than
2458         using (display).
2459
2460 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
2461
2462         * desc.scm (<keyword> 'gen-defn): Add extra zero into
2463         CGEN_KEYWORD_ENTRY initializers.
2464
2465         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2466         (<operand> 'test-data): Involve both the index and the hardware
2467         in testcase generation.
2468         (<hw-indx> 'test-data): Generate test data from the underlying
2469         object.
2470         (<ifield> 'test-data): Generate test data by computing bit
2471         patterns for the field, then decoding them.
2472         (<hw-address> 'test-data): Allow for new calling convention.
2473         (<hw-iaddress> 'test-data): Likewise.
2474         (<keyword> 'test-data): Convert index values into keywords.
2475         (<hw-asm> 'test-data): Convert index values into integer strings.
2476
2477         * gas-test.scm (cgen-build.sh): Escape '.' as well.
2478
2479 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
2480
2481         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2482         is required for multi-mode hw types (memory).
2483
2484 2001-05-11  Ben Elliston  <bje@redhat.com>
2485
2486         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2487         when generating allinsn.d from objdump output. Without it, the
2488         testsuite will treat $ as the regular expression for end of line.
2489
2490 2001-05-09  Ben Elliston  <bje@redhat.com>
2491
2492         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2493         with `cgen_cpu_open'; documentation had become out of date.
2494         * doc/rtl.texi (Instruction operands): Likewise.
2495
2496 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
2497
2498         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2499         various-base-length instruction sets.
2500
2501 2001-04-02  Ben Elliston  <bje@redhat.com>
2502
2503         * sid-cpu.scm (-last-insn): New function.
2504         (-gen-sem-switch-engine): Loop through idesc while less than or
2505         equal to the last instruction enum, not less than the MAX enum.
2506         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2507         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2508         table's size to be the last instruction enum plus one, not
2509         @PREFIX@_INSN_MAX.
2510         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2511         instruction onto the instruction list.
2512
2513         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2514         using the size of the table and its elements.
2515         (-gen-decode-insn-globals): Define the idesc table's size to be
2516         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2517         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2518         last instruction enum plus one, not @CPU@_INSN_MAX.
2519
2520 2001-03-28  Ben Elliston  <bje@redhat.com>
2521
2522         * doc/version.texi (UPDATED, EDITION): Update.
2523         * doc/stamp-vti: Likewise.
2524
2525 2001-03-26  Ben Elliston  <bje@redhat.com>
2526
2527         * doc/credits.texi (Credits): Update.
2528
2529         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2530         specified prefix and, if necessary, escape `$' in gas-build.sh to
2531         prevent unwanted shell variable expansion.
2532
2533 2001-03-24  Ben Elliston  <bje@redhat.com>
2534
2535         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2536         (<keyword>,test-data): Likewise.
2537         (<hw-address>,test-data): Likewise.
2538         (<hw-iaddress>,test-data): Likewise.
2539         (-collate-test-set): New function.
2540         (build-test-set): Use it.
2541         (gen-gas-test): Generate five test cases per instruction.
2542         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2543
2544         * read.scm: Load "slib/random" if random is not defined.
2545         * slib/random.scm: New file.
2546
2547         * utils.scm: Remove comments about the Hobbit compiler.
2548         (copyright-cygnus): Add 2001.
2549         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2550         (package-gnu-simulators): Tidy.
2551
2552 2001-03-23  Ben Elliston  <bje@redhat.com>
2553
2554         * cgen-gas.scm: Inline documentation improvements.
2555
2556 2001-03-21  Ben Elliston  <bje@redhat.com>
2557
2558         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2559         given in a syntax string is undefined.
2560
2561         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2562         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2563
2564 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
2565
2566         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2567         for arg_type CGEN_CPU_OPEN_BFDMACH.
2568
2569 2001-03-20  Ben Elliston  <bje@redhat.com>
2570
2571         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2572         instruction onto the instruction list. Define MAX_INSNS to be the
2573         value of the last instruction enum plus one.
2574
2575 2001-03-14  Nick Clifton  <nickc@redhat.com>
2576
2577         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
2578
2579 2001-03-05  Dave Brolley  <brolley@redhat.com>
2580
2581         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2582         if the number of ifields is greater than zero.
2583
2584 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
2585
2586         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2587         Emit LIKELY/UNLIKELY branch probability hints.
2588         * sid-decode.cpu (-gen-record-args): Ditto.
2589
2590 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
2591
2592         * desc-cpu.scm (-gen-hash-defines): Rename
2593         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2594
2595 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
2596
2597         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2598         writeback tracking.
2599         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2600         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2601         if unnecessary.
2602         * sid.scm (<operand> gen-write): Use unsigned long long expression
2603         for writeback.
2604         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2605         (<unit> gen-profile-code): Ditto.
2606
2607 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
2608
2609         * doc/rtl.texi (Expressions): Document the (index-of ...) and
2610         (regno ...) rtx.
2611
2612 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2613
2614         * operand.scm (<operand> pretty-sem-name): New field.
2615         (<operand> make): Initialize it from hw-name.
2616         (op:set-pretty-sem-name!): New function.
2617         (<operand> gen-pretty-name): Default to fetching new field.
2618         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
2619         sem-name setting from -rtx-hw-name.
2620
2621 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2622
2623         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2624         its subsequent gen-pretty-name.
2625
2626         * read.scm: Increase thread working stack limit and backtrace
2627         depth limits.
2628
2629 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2630
2631         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2632
2633 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
2634
2635         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2636         current insn plus 4.
2637         (h-delay-insn): New hardware register.
2638         (l-jal): Uses h-delay-insn instead of pc when setting link register.
2639         (l-jalr): Likewise.
2640         (l-bal): Likewise.
2641
2642         * openrisc.opc (parse_hi16): Sign extend value.
2643         (parse_lo16): Likewise.
2644
2645 2001-01-06  Ben Elliston  <bje@redhat.com>
2646
2647         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2648         instead of @cpu@ and @CPU@ to generically prefix symbol names.
2649         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2650         (-gen-semantic-fn-table): Likewise.
2651         (-gen-scache-semantic-fn): Likewise.
2652         (-gen-no-scache-semantic-fn): Likewise.
2653         (cgen-read.c): Likewise.
2654         (cgen-sem-switch.c): Likewise.
2655         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2656         is a filename prefix.
2657         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
2658         (-gen-decode-insn-globals): Likewise.
2659         (-gen-idesc-decls): Likewise.
2660         (cgen-decode.h): Likewise.
2661         (cgen-decode.c): Likewise.
2662         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
2663         (gen-cpu-insn-enum): Likewise.
2664         (sim-finish!): Likewise.
2665
2666 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
2667
2668         * openrisc.cpu: New file.
2669         * openrisc.opc: Likewise.
2670
2671 2000-12-12  Ben Elliston  <bje@redhat.com>
2672
2673         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
2674
2675 2000-12-07  Ben Elliston  <bje@redhat.com>
2676
2677         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
2678         "insn" when there are zero ifields to extract.
2679
2680 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
2681
2682         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
2683         used by simple/non-scache simulators.
2684         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
2685         regardless of with-scache?.
2686         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
2687
2688 2000-12-03  Ben Elliston  <bje@redhat.com>
2689
2690         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
2691         (cgen-desc.c): Likewise.
2692
2693 2000-12-01  Greg McGary  <greg@mcgary.org>
2694
2695         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
2696
2697 2000-12-01  Ben Elliston  <bje@redhat.com>
2698
2699         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
2700         definitions if run without with-multipla-isa?.
2701         (cgen-defs.h): New function. Emit an ISA-specific defs file.
2702         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
2703
2704 2000-11-24  Ben Elliston  <bje@redhat.com>
2705
2706         * sim-cpu.scm (-gen-hardware-struct): New function.
2707         (-gen-hardware-types): If with-multiple-isa is specified, emit all
2708         hardware elements wich have share one or more ISAs with the ISAs
2709         being kept.
2710
2711         * sim.scm (-with-multiple-isa?): New symbol.
2712         (with-multiple-isa?): New function.
2713         (option-init!): Initialise -with-multiple-isa?.
2714         (option-set!): Handle with-multiple-isa option.
2715
2716 2000-11-21  Ben Elliston  <bje@redhat.com>
2717
2718         * utils.scm (copyright-fsf): Add the year 2000.
2719
2720 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
2721
2722         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
2723         unneeded "\n\n" from F() macro definition.
2724
2725 2000-11-15  Greg McGary  <greg@mcgary.org>
2726
2727         * utils-cgen.scm (gen-define-with-symcat): New function.
2728         * desc-cpu.scm (gen-ifld-defns): Use it.
2729         (gen-hw-table-defns): Use it.
2730         (-gen-hash-defines): Use it.
2731         (gen-operand-table): Use it.
2732         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
2733         * opc-itab.scm (-gen-ifmt-table): Use it.
2734         (-gen-insn-opcode-table): Use it.
2735         (-gen-macro-insn-table): Use it.
2736         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
2737         * sim-cpu.scm (cgen-semantics.c): Use it.
2738         (cgen-sem-switch.c): Use it.
2739
2740 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
2741
2742         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
2743         request to emit calls to insn extractors as functions rather than
2744         branches to inline blocks.
2745         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
2746         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
2747
2748         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
2749         to extractor clauses.
2750
2751 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
2752
2753         * decode.scm (-distinguishing-bit-population): Significantly
2754         improve popularity heuristic.  Renamed from
2755         (-mask-bit-population): Gone.
2756         (-population-above-threshold): Sort new bit numbers in order of
2757         popularity.
2758         (-population-top-few): Allow up to three more bits to be selected
2759         than requested.  Correct selection order to prefer better bits.
2760         Correct bug in fewer-than-requested case.  Keep threshold as
2761         floating-point.
2762         (decode-best-get-bits): Pass also the insn-values.
2763
2764         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
2765         future optimization.
2766
2767         * utils.scm (message): Format nested lists better.
2768
2769 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
2770
2771         * dev.scm: Add srcdir to %load-path.
2772
2773         * rtx-funcs.scm (subword): Mode of argument can be different
2774         than mode of result, so don't use OP0 to specify argument's mode.
2775
2776 2000-11-02  Ben Elliston  <bje@redhat.com>
2777
2778         * doc/porting.texi (Building a GAS test suite): Document my change
2779         to gas-build.sh.
2780
2781 2000-11-01  Ben Elliston  <bje@redhat.com>
2782
2783         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
2784
2785 2000-10-31  Ben Elliston  <bje@redhat.com>
2786
2787         * gas-test.scm (cgen-build.sh): Allow the generated script to run
2788         with no command line arguments if the gas build directory can be
2789         determined.
2790
2791 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
2792
2793         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
2794         op-ifld -> op-ifield.
2795
2796 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
2797
2798         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
2799
2800 2000-10-13  matthew green  <mrg@cygnus.com>
2801
2802         * utils-cgen.scm (get-ifetch): Move from here ...
2803         * sim.scm (get-ifetch): ... to here.
2804         * sid.scm (get-ifetch): Copy and port to c++.
2805
2806 2000-10-06  Dave Brolley  <brolley@redhat.com>
2807
2808         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
2809         ifld-start + ifld-word-offset.
2810         (gen-ifld-extract): Check adata-integral-insn? before checking whether
2811         the field is beyond the base number of bits.
2812         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
2813         (gen-extract-ifields): Ditto.
2814         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
2815         characters in the regular expression.
2816
2817 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
2818
2819         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
2820         preprocessor constant.
2821
2822 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
2823
2824         * slib/logical.scm: New file from slib.  Provides robust bitwise
2825         logical operations for large integers.
2826         * read.scm: maybe-load it.
2827
2828 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
2829
2830         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
2831         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
2832         single-isa predicate, but support keep-isa filtering.
2833
2834 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
2835
2836         * rtl-c.scm (s-sequence): Handle nested c-calls in both
2837         statement-expression and comma-expression contexts.
2838         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
2839
2840 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
2841
2842         * decode.scm (-population-top-few): Signal error gracefully if
2843         decoding is about to become ambiguous.
2844
2845 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
2846
2847         * doc/rtl.texi (decode-assist): Describe this field as optional.
2848
2849 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
2850
2851         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
2852         with decode proc.
2853
2854 2000-09-05  Dave Brolley  <brolley@redhat.com>
2855
2856         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
2857         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
2858
2859 2000-08-29  Dave Brolley  <brolley@redhat.com>
2860
2861         * utils-gen.scm (gen-ifld-extract): Pass total-len if
2862         adata-integral-insn is true for this architecture.
2863
2864 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
2865
2866         * hardware.scm (<hw-immediate> get-index-mode): Define method.
2867         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
2868         * rtl-c.scm (-c-rtl-get): Improve an error message.
2869         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
2870
2871 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
2872
2873         * Makefile.in (DIST_COMMON): Regenerated.
2874         * ifield.scm (<derived-ifield> needed-iflds): New method.
2875         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
2876         sfmts built from <derived-ifield>s.
2877         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
2878         type symbol 'derived-ifield, not an unparseable string.
2879         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
2880         (-sfmt-contents): Add tracing.
2881
2882         From Doug Evans <dje@transmeta.com>:
2883         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
2884         C code.
2885
2886 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
2887
2888         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
2889         (rtl-c-expr-parsed,rtl-c-expr): New fns.
2890         (-rtl-c-get): Rename from rtl-c-get.
2891         (rtl-c-get): New fn for getter logging.
2892
2893 2000-07-28  Ben Elliston  <bje@redhat.com>
2894
2895         * NEWS: Update.
2896
2897 2000-07-25  Ben Elliston  <bje@redhat.com>
2898
2899         * doc/credits.texi (Credits): Add Frank Eigler.
2900
2901 2000-07-24  Dave Brolley  <brolley@redhat.com>
2902
2903         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
2904         fully.
2905         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
2906         (<keyword>): Initialize all elements fully.
2907         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
2908         fully.
2909         (-gen-mach-table-defns): Ditto.
2910         (-gen-ifld-defns): Ditto.
2911         (-gen-operand-table): Ditto.
2912         (-gen-insn-table): Ditto.
2913         (-gen-cpu-open): Nothing to do for the mach table.
2914
2915 2000-07-13  Ben Elliston  <bje@redhat.com>
2916
2917         * doc/version.texi (UPDATED): Update.
2918
2919 2000-07-05  Ben Elliston  <bje@redhat.com>
2920
2921         * configure.in (AC_PATH_PROG): Remove.
2922         * configure: Regenerate.
2923         * Makefile.am (GUILE): Locate guile dynamically.
2924         * Makefile.in: Regenerate.
2925         * doc/Makefile.in: Likewise.
2926
2927 2000-07-03  Ben Elliston  <bje@redhat.com>
2928
2929         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
2930         * opc-itab.scm (cgen-opc.c): Likewise.
2931
2932 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
2933
2934         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
2935         guile 1.4 compatibility.
2936         (rtx-env-dump): Comment out buggy display calls.
2937
2938 2000-06-15  matthew green  <mrg@redhat.com>
2939
2940         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
2941
2942 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
2943
2944         * Makefile.in: Regenerated.
2945
2946         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
2947         (gen-ifld-defns): Ditto.
2948         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
2949         * rtl.c (rtl-finish!): Ditto.
2950         * opc-itab.scm (-gen-ifield-decls): Ditto.
2951         * opcodes.scm (gen-switch): Exclude derived operands.
2952         * operand.scm (op-iflds-used): Expand derived operands.
2953         (hw-index-derived): New dummy function to create dummy object.
2954         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
2955         constructor.  Set object's hw-name and index fields.
2956         (-anyof-merge-subchoices): Set instance object's index also.
2957         (-anyof-name): New helper function.
2958         (anyof-merge-semantics): Correct replacement of operand names in
2959         anyof instance.
2960         (op-ifield): Tolerate derived-operands and their funny indices better.
2961         * ifield.scm (ifld-known-values): Expand derived ifields.
2962         (non-multi-ifields, non-derived-ifields): New utility functions.
2963         (ifld-decode-mode): Tolerate objects with unbound decode field.
2964         * iformat.scm (compute-insn-length): Expand derived ifields.
2965         (compute-insn-base-mask): Ditto.
2966         * insn.scm (insn-base-ifields): Remove.
2967         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
2968         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
2969         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
2970         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
2971         (-frag-test-data): Ditto.
2972         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
2973         (-gen-sem-switch-engine); Ditto.
2974         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
2975         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
2976         (-gen-record-args): Tolerate unbound op-ifield.
2977         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
2978         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
2979         Exclude multi-insns.
2980         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
2981         * utils-sim.scm (op-extract?): Handle derived operands.
2982
2983         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
2984         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
2985         * hardware.scm (hardware-for-mode): New function.
2986
2987         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
2988         cleaning up decode tables.
2989         (mask-superset?): Little helper function for above.
2990         * decode.scm (-build-decode-table-entry): Call it.
2991         (-opcode-slots): Add some more tracing.
2992         * arm.cpu: Disable decode-splits construct due to implementation
2993         conflict with `filter-harmlessly-ambiguous-insns'
2994
2995         * decode.scm (-population-top-few): New function for better decode
2996         bit generation.  Includes minor helper functions.
2997         (decode-get-best-bits): Call it instead.
2998         (OLDdecode-get-best-bits): Renamed previous version of above.
2999
3000
3001 2000-06-13  Ben Elliston  <bje@redhat.com>
3002
3003         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3004         for the Guile library directory.
3005         * configure: Regenerate.
3006         * Makefile.in, doc/Makefile.in: Regenerate.
3007
3008         * Makefile.in, doc/Makefile.in: Regenerate.
3009         * configure.in: Remove unnecessary tests. Move to version 1.0.
3010         * acconfig.h, config.in: Remove.
3011         * configure, aclocal.m4: Regenerate.
3012         * doc/stamp-vti, doc/version.texi: Likewise.
3013         * AUTHORS: New file.
3014
3015 2000-06-07 Ben Elliston  <bje@redhat.com>
3016
3017         * fixup.scm (symbol-bound?): Reduce debugging output.
3018
3019 2000-06-02  matthew green  <mrg@redhat.com>
3020
3021         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3022         a given instruction, replacing derived fields with their subfields.
3023         (insn-value): Use `insn-base-ifields' to find all constant values.
3024         (multi-insn-instantiate!): Comment some debug messages.
3025
3026 2000-06-01  Ben Elliston  <bje@redhat.com>
3027
3028         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3029         symbol names used in a (c-call ..) rtx.
3030
3031         * sim-test.scm (build-test-set): Return (()) for an instruction
3032         with no operands, so it too is included in the generated test set.
3033
3034 2000-05-31  Ben Elliston  <bje@redhat.com>
3035
3036         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3037         (sim-test): Likewise.
3038         * Makefile.in: Regenerate.
3039
3040 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3041
3042         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3043         stack traceback, in an order that resembles gdb's `bt'.
3044
3045 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3046
3047         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3048         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3049         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3050         multi insns.
3051         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3052         virtual functions.
3053         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3054         * iformat.scm (ifmt-expanded-ifields): Gone.
3055         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3056         work.
3057         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3058         ifmt entries.
3059
3060         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3061         code.
3062
3063 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3064
3065         * sid.scm (with-any-profile?): New function clone.
3066
3067 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3068
3069         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3070
3071 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3072
3073         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3074         (-multi-ifield-read): Parse them.
3075         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3076         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3077         (multi-ifield gen-extract): Add decode hook.
3078         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3079
3080         * insn.scm (syntax-break-out): More correctly handle \-escaped
3081         syntax characters.
3082         (syntax-make-elements): Ditto.
3083         * opc-itab.scm (compute-syntax): Ditto.
3084
3085 2000-05-17  Ben Elliston  <bje@redhat.com>
3086
3087         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3088
3089 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3090
3091         * gas-test.scm (build-test-set): Return (()) for an instruction
3092         with no operands, so it too is included in the generated test set.
3093
3094 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3095
3096         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3097         IFMT_OPERANDS and SYNTAX_BYTES.
3098
3099 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3100
3101         * sim.scm (with-any-profile?): New function.
3102         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3103         to decide whether or not to include profiling counters.
3104
3105 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3106
3107         Fuller derived-operand support for opcodes.
3108         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3109         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3110         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3111         (gen-operand-table): Omit derived- and anyof- operands from table.
3112         (gen-insn-table): Omit multi-insns from table.
3113         * iformat.scm (ifmt-expanded-fields): New function to expand
3114         subfields of derived-ifields.
3115         (ifmt-compute!): Ignore remaining multi-insns.
3116         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3117         multi-insns.
3118         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3119         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3120         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3121         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3122         (gen-switch): Omit anyof-operands.
3123         * operand.scm (-anyof-syntax): New function.
3124         (-anyof-merge-syntax): Call it.
3125         * utils.scm (collect): New idiomatic function.
3126
3127 2000-05-10  Ben Elliston  <bje@redhat.com>
3128
3129         * m68k.cpu: New file (work in progress).
3130
3131 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3132
3133         * Makefile.am (all-local): New target.  Create stamp-cgen.
3134         * Makefile.in: Regenerated.
3135         * doc/Makefile.in: Regenerated.
3136
3137 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3138
3139         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3140         (-operand-parse-setter): Ditto.
3141         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3142         for CACHE-ADDR operands.
3143         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3144         trace entries.  Widen byte-wide values for printing.
3145         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3146         Widen byte-wide values for printing.  Hexify memory addresses.
3147
3148 2000-04-23  matthew green  <mrg@redhat.com>
3149
3150         * m32r.cpu: Fix a typo.
3151
3152 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3153
3154         * ia64.cpu (define-model): Change merced to Itanium.
3155         (f-qp): Change quilifying to qualifying.
3156         (movbr_ph, movbr_pvec): Delete.
3157         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3158
3159 2000-04-07  Ben Elliston  <bje@redhat.com>
3160
3161         * doc/porting.texi (Building a simulator test suite): Clarify
3162         where generated test cases are placed.
3163
3164 2000-04-07  Ben Elliston  <bje@redhat.com>
3165
3166         * Makefile.am (gas-test): Remove dependency on `cgen'.
3167         (sim-test): Ditto.
3168         * Makefile.in: Regenerate.
3169
3170 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3171
3172         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3173         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3174         type reconfiguration.
3175         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3176         with-profile?.
3177
3178 2000-03-30  Ben Elliston  <bje@redhat.com>
3179
3180         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3181
3182 2000-03-24  Ben Elliston  <bje@redhat.com>
3183
3184         * Makefile.am (stamp-cgen): Reinstate target.
3185         * Makefile.in: Regenerate.
3186
3187 2000-03-22  Ben Elliston  <bje@redhat.com>
3188
3189         * slib/ppfile.scm: Remove; unused.
3190         * slib/defmacex.scm: Likewise.
3191
3192 2000-03-21  Ben Elliston  <bje@redhat.com>
3193
3194         * doc/internals.texi (Source file overview): Document.
3195
3196         * Makefile.am (GUILEDIR): Remove.
3197         (CGEN): Ditto. Callers use $(GUILE) instead.
3198         (GUILEFLAGS): Ditto.
3199         (CGENFILES): Ditto.
3200         (APPDESCFILES): Ditto.
3201         (OPCODESFILES): Ditto.
3202         (SIMFILES): Ditto.
3203         (pkgdata_SCRIPTS): Ditto.
3204         (stamp-cgen): Remove target.
3205         * Makefile.in: Regenerate.
3206
3207         * configure.in: Remove header and library tests.
3208         * configure: Regenerate.
3209         * config.in: Likewise.
3210
3211 2000-03-20  Ben Elliston  <bje@redhat.com>
3212
3213         * read.scm: Cease loading "hob-sup.scm".
3214         * utils.scm: Inherit the fastcall family of procedures (for now).
3215         * hob-sup.scm: Remove.
3216
3217 2000-03-20  Ben Elliston  <bje@redhat.com>
3218
3219         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3220         * configure: Regenerate.
3221         * gdbinit.in: Remove.
3222
3223 2000-03-17  Ben Elliston  <bje@redhat.com>
3224
3225         * Makefile.am (CGEN): Use guile, not cgen.
3226         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3227         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3228         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3229         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3230         (HOB_OBJS): Likewise.
3231         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3232         (CGENOBJS): Likewise.
3233         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3234         (hobbit, hobbit.o, hobbit.c): Remove targets.
3235         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3236         (CLEANFILES): Update.
3237         * acconfig.h (WITH_HOBBIT): Remove.
3238         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3239         option --with-cgen-hobbit.
3240         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3241         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3242         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3243         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3244         * Makefile.in: Regenerate.
3245         * config.in: Likewise.
3246         * aclocal.m4: Likewise.
3247         * configure: Likewise.
3248         * README (Hobbit support): Remove.
3249         * doc/internals.texi (Conventions): Do not mention Hobbit.
3250         * doc/porting.texi (Supported Guile versions): Likewise.
3251
3252 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3253
3254         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3255         callback convention to new sid sidutil::basic_cpu code.
3256         (-gen-sfrag-engine-fn): Ditto.
3257         * sid.scm (-create-virtual-insns!): Ditto.
3258         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3259         mode.
3260         (cxmake-skip): Implement properly for pbb mode.
3261
3262 2000-03-03  Ben Elliston  <bje@redhat.com>
3263
3264         * doc/internals.texi: New file.
3265
3266 2000-02-29  Ben Elliston  <bje@redhat.com>
3267
3268         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3269         * doc/porting.texi: Formatting tweaks.
3270
3271 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3272
3273         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3274         field.
3275
3276 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3277
3278         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3279         mode.
3280
3281 2000-02-23  Andrew Haley  <aph@cygnus.com>
3282
3283         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3284         instruction.
3285
3286 2000-02-24  Ben Elliston  <bje@redhat.com>
3287
3288         * doc/rtl.texi (Derived operands): Add some cindex entries.
3289
3290 2000-02-23  Ben Elliston  <bje@redhat.com>
3291
3292         * ia32.cpu (dndo): Move general purpose macro from here ..
3293         * simplify.inc (dndo): .. to here.
3294
3295 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3296
3297         * arm.cpu (h-tbit): Add c-call setter function.
3298         (h-mbits): Ditto.
3299
3300 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3301
3302         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3303         (-frag-cost-compute!): Ditto.
3304         * utils.scm (copyright-cygnus): Add Y2K.
3305         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3306
3307 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3308
3309         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3310         flags field of the CGEN_CPU_TABLE structure.
3311
3312 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3313
3314         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3315         All references updated.
3316
3317 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3318
3319         * ia32.cpu: Rewrite addressing mode support.
3320
3321         * ifield.scm (<ifield>): New member `follows'.
3322         (ifld-known-values): New proc.
3323         (<ifield>): New method set-word-offset!.
3324         (ifld-set-word-offset!): New proc.
3325         (ifld-new-word-offset): New proc.
3326         (<ifield>): New method next-word.
3327         (<multi-ifield>): New method next-word.
3328         (ifld-next-word): New proc.
3329         (ifld-precedes?): New proc.
3330         (-ifield-parse): New args word-offset,word-length,follows.
3331         All callers updated.  Handle CISC-style vs RISC-style ifields.
3332         (-ifield-read): Recognize word-offset,word-length,follows specs.
3333         (-ifld-parse-follows): New proc.
3334         (-multi-ifield-make-default-insert): New proc.
3335         (-multi-ifield-make-default-extract): New proc.
3336         (-multi-ifield-parse): Provide default values for insert,extract
3337         handlers if not specified.
3338         (<derived-ifield>): New class.
3339         (derived-ifield?): New predicate.
3340         (ifld-derived-operand?): New predicate.
3341         (f-anyof): New global.
3342         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3343         (f-derived,ifld-derived?): Delete.
3344         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3345         * insn.scm (-sub-insn-ifields): New proc.
3346         (-sub-insn-make!): New proc.
3347         (multi-insn-instantiate!): Provide initial implementation.
3348         (-insn-parse): If insn contains "anyof" operands, create a
3349         <multi-insn> object instead of a plain <insn>.
3350         (-parse-insn-format-symbol): Rewrite derived operand handling.
3351         Add anyof operand handling.
3352         (-parse-insn-format-ifield-spec): Rewrite.
3353         (-parse-insn-format-operand-spec): Delete.
3354         (-parse-insn-format-list): Delete support for `(operand value)'.
3355         (anyof-operand-format?): Replaces derived-operand-format?.
3356         * operand.scm (-operand-parse-getter): Improve error messages.
3357         (-operand-parse-setter): Ditto.
3358         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3359         ifield-assertion.
3360         (<anyof-operand>): Change baseclass from <derived-operand> to
3361         <operand>.  Delete member values.  New members base-ifield,choices.
3362         (anyof-operand?): New predicate.
3363         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3364         (-derived-operand-parse): Rewrite.
3365         (-derived-operand-read): Rewrite.
3366         (-anyof-parse-choice): New proc.
3367         (-anyof-operand-parse): Rewrite.
3368         (-anyof-operand-read,define-anyof-operand): New procs.
3369         (<anyof-value>): Rewrite.
3370         (-anyof-initial-known): New proc.
3371         (anyof-satisfies-assertions?): New proc.
3372         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3373         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3374         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3375         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3376         (-anyof-value-from-derived): New proc.
3377         (-anyof-all-choices-1,anyof-all-choices): New procs.
3378         (operand-init!): Create define-anyof-operand reader command.
3379
3380         * insn (syntax-break-out): Take syntax as argument instead of insn.
3381         All callers updated.
3382         (syntax-make): Move here, from ???.
3383
3384         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3385         bitrange-foo. All uses updated.
3386         (bitrange-next-word): New proc.
3387
3388         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3389
3390         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3391         (rtx-make-const,rtx-make-enum): New procs.
3392         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3393         (rtx-mem-addr,rtx-mem-sel): New procs.
3394         (rtx-change-address): New proc.
3395         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3396         (rtx-make-set,rtx-single-set?): New procs.
3397         (rtx-combine): New proc.
3398
3399         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
3400         (rtx-traverse-with-locals): Ditto.
3401         (-rtx-traverse,-rtx-traverse-*): Ditto.
3402
3403         * rtl.scm (define-subr): New proc.
3404         (rtl-init!): Create reader command `define-subr'.
3405
3406         * cos.c (_object_mi_p): Ensure argument is an object.
3407         (indent): New function.
3408         (_object_print_elms): Add pretty-printing support.
3409         (_object_print): Ditto.
3410
3411         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3412         (*floats-s->c-fun-table*): Ditto.
3413         * hobbit.c,hobbit.h: Rebuild.
3414         * hob-sup.c (fastcall7): New proc.
3415         * hob-sup.h (fastcall7): Declare.
3416         * hob-sup.scm (fastcall7): New macro.
3417
3418         * mach.scm (<arch>): New member subr-list.
3419         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3420         (arch-finish!): Reverse recorded subr list.
3421
3422         * read.scm (debug-env): New global.
3423         (debug-var-names,debug-var,debug-repl-env): New procs.
3424         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
3425         (debug-quit): Renamed from `continue'.
3426
3427         * simplify.inc (dsmf): New pmacro.
3428
3429         * utils.scm (plus-scan): New proc.
3430         (split-bits): Rewrite.
3431         (split-value): New proc.
3432
3433 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
3434
3435         * doc/Makefile.am (DOCFILES): Add notes.texi.
3436         * doc/Makefile.in: Rebuild.
3437
3438 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
3439
3440         * ifield.scm (ifld-derived?): New proc.
3441         (f-derived): New global.
3442         (ifield-builtin!): Create ifield f-derived.
3443         (<multi-insn>): New class.
3444         (multi-insn?): New predicate.
3445         (multi-insn-instantiate!): New proc.
3446         (-insn-parse): Create <multi-insn> objects for insns with derived
3447         ifields.
3448         (-parse-insn-format-symbol): Handle derived ifields.
3449         (-parse-insn-format-ifield-spec): New proc.
3450         (-parse-insn-format-operand-spec): New proc.
3451         (-parse-insn-format-list): Simplify.
3452         (-parse-insn-format): No longer allow (ifield-object value) spec.
3453         (derived-operand-format?): New proc.
3454         (insn-alias?): New proc.
3455         (non-alias-insns): Rewrite.
3456         (insn-real?): Renamed from real-insn?, all callers updated.
3457         (virutal-insns): Rewrite.
3458         (multi-insns): New proc.
3459         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3460         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3461         Return #f if operand doesn't have an index or if index is not an
3462         ifield.
3463         (hw-index-anyof): New proc.
3464         (-operand-parse): Allow integer indices.
3465         (<derived-operand>): New class.
3466         (derived-operand?): New predicate.
3467         (<anyof-operand>): New class.
3468         (<anyof-value>): New class.
3469         (-anyof-parse-value,-anyof-operand-parse): New procs.
3470         (-derived-operand-parse,-derived-operand-read): New procs.
3471         (define-derived-operand,define-full-derived-operand): New procs.
3472         (operand-init!): New reader command define-derived-operand.
3473
3474         * utils.scm (list-take): Handle negative amount.
3475         (element?): Rewrite.
3476
3477 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
3478
3479         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3480
3481 1999-10-04  Richard Henderson  <rth@cygnus.com>
3482
3483         * ia64.cpu: Checkpoint.
3484
3485 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
3486
3487         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3488
3489         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
3490         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
3491
3492 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
3493
3494         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3495         PC returned by sim_engine_invalid_insn.
3496
3497 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
3498
3499         * ia32.cpu: New file.
3500
3501 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
3502
3503         * utils.scm (bit-set?): Fix off by one error.
3504
3505         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3506
3507         * rtl.scm (hw): Check for valid hardware element before trying to
3508         get its mode.
3509
3510         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
3511         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3512         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3513         * thumb.cpu (*): arm_compute_operand2_foo renamed to
3514         compute_operand2_foo.
3515
3516         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3517         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3518         Call delayed_branch/branch methods instead of assigning to `vpc'.
3519         (<hw-pc>,cxmake-skip): Call skip method.
3520         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3521         (<pc>,cxmake-skip): Ditto.
3522         (-create-virtual-insns!): Ditto.
3523         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3524         (op:write): Ditto.
3525         (op:record-profile): Specify #:output-language "c++".
3526         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3527         @arch@_insn_attr.
3528         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3529         Define enums here.
3530         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3531         (gen-semantic-code): Ditto.
3532         (-gen-sem-case,-gen-sfrag-code): Ditto.
3533         (-gen-hardware-types): Delete class @cpu@_cpu_base.
3534         (cgen-cpu.h): File is now #included by main cpu class, rather than
3535         subclassing.
3536         (cgen-defs.h): New proc.
3537         (-gen-scache-semantic-fn): Change result type to sem_status.
3538         New local `status'.  Call done_cti_insn/done_insn method at end.
3539         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3540         cgen-ops.h.
3541         (cgen-sem-switch.cxx): Ditto.
3542         * sid-decode.scm (-gen-idesc-decls): Update return type of
3543         @prefix@_sem_fn.
3544         (cgen-decode.h): Add using namespace @arch@.
3545         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3546
3547         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3548         (estate-output-language-c?,estate-output-language-c++?): New procs.
3549         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3550         (estate-make-for-normal-rtl-c++): New proc.
3551         (rtl-c++-parsed,rtl-c++): New proc.
3552         (s-c-call): Invoke cpu class method if c++.
3553         (join): Use s-c-raw-call.
3554
3555         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3556         (nop): Rewrite.
3557
3558         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3559         * rtl.scm (<eval-state>): New member `modifiers'.
3560         (<eval-state>,vmake!): Handle #:modifiers.
3561         (estate-with-modifiers): New proc.
3562
3563         * rtl.scm (rtx-side-effects?): New proc.
3564         (rtx-canonical-bool): Don't change expr if it has side effects.
3565         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3566         better.
3567
3568 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
3569
3570         * sim.scm (gen-scache-type): Fix typo in last patch.
3571
3572 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
3573
3574         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3575
3576 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
3577
3578         * sid.scm (<hw-pc>,cxmake-skip): New method.
3579         (<pc>,cxmake-skip): New method.
3580
3581         * decode.scm (decode-build-table): Delete args startbit,index-list.
3582         All callers updated.
3583         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3584         All callers updated.
3585         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3586         to decode-get-best-bits.
3587         * sid-decode.scm (-gen-decode-fn): Ditto.
3588
3589         * hardware.scm (hw-bits): New proc.
3590         (-hw-parse): New arg layout.  All callers updated.
3591         (define-full-hardware): New arg layout.  All callers updated.
3592         (-hw-validate-layout): New proc.
3593         (-hw-create-[gs]etter-from-layout): New procs.
3594         (<hw-register>,parse!): Handle layout spec.
3595         * types.scm (type-bits): New proc.
3596
3597         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3598         UNARY, BINARY, TRINARY rtxs.
3599
3600         * attr.scm (<enum-attribute>,parse-value): Allow strings.
3601         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3602         Support '- as "unused spot" indicator.
3603
3604 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
3605
3606         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3607
3608 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
3609
3610         * rtx-funcs.scm (subword): Fix mode spec of `value'.
3611
3612         * rtl.scm (-rtx-traverse-operands): Fix debugging message
3613         construction.
3614         (tstate-make): New arg `depth'.  All callers updated.
3615         (tstate-depth,tstate-set-depth!): New procs.
3616         (tstate-incr-depth!,tstate-decr-depth!): New procs.
3617         (-rtx-traverse-operands): Indent debugging output by traversal depth.
3618         (-rtx-traverse): Ditto.  Keep track of traversal depth.
3619
3620 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
3621
3622         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3623         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3624         * utils-sim.scm: Decoder generator support moved here.
3625         (-decode-equiv-entries?,-decode-sort-entries): New procs.
3626         (-gen-decoder-switch): Sort entries for more fall-throughs.
3627
3628         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3629         * Makefile.in: Rebuild.
3630         * sim-test.scm (build-sim-testcase): Add logging message.
3631         * dev.scm (cload): Recognize SIM-TEST application.
3632         (load-stest): Set APPLICATION to SIM-TEST.
3633
3634         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3635
3636         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3637         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3638         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3639
3640         * insn.scm (syntax-break-out): Handle ${foo}.
3641
3642 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
3643
3644         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3645         (bin_PROGRAMS): Define.
3646         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3647         (cgen-hob.c): Prepend $(srcdir)/ here.
3648         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3649         (libcpu_a_SOURCES): Delete.
3650         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3651         (CGEN_HOB_OBJ,CGENOBJS): New variables.
3652         * configure.in (LIBS): Replace -Wl,-rpath with -R.
3653         Add AC_CHECK_LIB(guile,main).
3654         * Makefile.in: Rebuild.
3655         * doc/Makefile.in: Rebuild.
3656         * aclocal.m4: Rebuild.
3657         * config.in: Rebuild.
3658         * configure: Rebuild.
3659
3660 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
3661
3662         Rename rtx functions from name: to name, accept optional leading
3663         modifier and mode.
3664         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
3665         * attr.scm (-attr-eval): Update.
3666         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
3667         (<hw-register>,mode-ok?): Disallow VOID.
3668         (<hw-immediate>,mode-ok?): Disallow VOID.
3669         (<hw-address>,mode-ok?): Disallow VOID.
3670         * mode.scm (mode-name?): New proc.
3671         (VOID): Renamed from VM.
3672         (DFLT): Renamed from DM.
3673         (mode-builtin!): Update.
3674         * opcodes.scm (<ifield>,gen-insert): Update.
3675         (<ifield>,gen-extract): Update.
3676         (<multi-ifield>,gen-insert,gen-extract): Update.
3677         * operand.scm (op:mode): Update.
3678         (<pc>,make!): Update.
3679         (op:new-mode): Update.
3680         (-operand-read): Update.
3681         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
3682         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
3683         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
3684         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
3685         (rtx-make): Call -rtx-munge-mode&options.
3686         (rtx accessors): Rewrite.
3687         (rtx-pretty-name): Update.
3688         (-rtx-traverse-*): Update.
3689         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
3690         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
3691         (-rtx-make-traverse-table): Update.
3692         (-rtx-traverse-operands): Update.
3693         (-rtx-option?,-rtx-option-list?): New procs.
3694         (-rtx-munge-mode&options): New proc.
3695         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
3696         (-rtx-traverse): Update.
3697         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
3698         (rtx-compile-time-constant?): Update.
3699         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
3700         (rtx-value): Update.
3701         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
3702         * rtx-funcs.scm (*): Update.
3703         * rtl-c.scm (rtl-c-get): Update.
3704         (rtl-c-set-quiet,rtl-c-set-trace): Update.
3705         (s-c-call,s-c-raw-call): Update.
3706         (s-boolifop,s-convop,s-if,s-cond): Update.
3707         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
3708         (-par-replace-set-dests,-par-replace-set-srcs): Update.
3709         (s-parallel,s-sequence): Update.
3710         (rtl-c-build-table): Update.
3711         * sem-frags.scm (-frag-hash-compute!): Update.
3712         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
3713         for temporary bug compatibility with previous version.
3714         (-frag-expr-locals,-frag-expr-stmts): Update.
3715         (-frag-compute-desired-frags,-frag-pick-best): Update.
3716         * semantics.scm (-simplify-expr-fn): Update.
3717         (rtx-simplify): Update.
3718         (-rtx-ref-type): Update.  Account for modifiers.
3719         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
3720         (-build-ifield-operand!): Update.
3721         (-build-known-values): Update.
3722         (semantic-compile): Update.
3723         (-gen-reg-access-defns): Update.
3724         (gen-semantic-code,-gen-sem-case): Update.
3725         (-gen-sfrag-code,-gen-sfrag-case): Update.
3726         * sim-cpu (gen-semantic-code): Update.
3727         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
3728         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
3729         (-hw-cxmake-get): Update.
3730         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3731         (<hw-index>,cxmake-get): Update.
3732         (<operand>,gen-type,gen-read,cxmake-get): Update.
3733         (<operand>,gen-set-quiet,gen-set-trace): Update.
3734         (<pc>,cxmake-get): Update.
3735         (sim-finish!): Update.
3736         * utils-gen.scm (-gen-ifld-extract-base): Update.
3737         (-gen-ifld-extract-beyond): Update.
3738         (gen-multi-ifld-extract): Update.
3739         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
3740         * sid.scm (<hw-pc>,gen-write): Update.
3741         (-gen-decode-insn-globals): Update.
3742         (-hw-cxmake-get): Update.
3743         (<hw-register>,cxmake-get-raw): Update.
3744         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3745         (<hw-index>,cxmake-get): Update.
3746         (<operand>,gen-type,gen-read,cxmake-get): Update.
3747         (<operand>,gen-set-quiet,gen-set-trace): Update.
3748         (<pc>,cxmake-get): Update.
3749         (-create-virtual-insns!): Update.
3750         (-decode-split-build-assertion): Update.
3751         * *.cpu: Update.
3752         * simplify.inc: Update.
3753
3754 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
3755
3756         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
3757         Prefix queue function name with sim_ instead of @cpu@_.
3758
3759         * sim.scm (-with-parallel-only?): New global.
3760         (option-init!): Initialize it.
3761         (option-set!): Set it.
3762         (with-parallel-only?): New proc.
3763         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
3764         and writeback markers if with-parallel-only.
3765         (-gen-idesc-init-fn): Update.
3766         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
3767         with-generic-write.
3768
3769 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
3770
3771         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
3772         with the invalid insn handler.
3773
3774         * utils.scm (list-maybe-ref): New proc.
3775
3776         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
3777         define-arch.
3778         (-mach-parse): Signal error if mach wasn't specified in define-arch.
3779
3780         * i960.cpu (test*-*): Delete `expr' arg.
3781         (test-op,branch-op): Update.
3782
3783 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
3784
3785         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
3786         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
3787         updated.
3788         (gen-reg-access-defn): Ditto.
3789         (-gen-hw-addr): Rewrite.
3790         (-op-gen-queued-write): Rewrite.
3791         * sim-cpu.scm (-gen-cpu-reg-access-decls):
3792         (-gen-scache-semantic-fn): Handle with-generic-write.
3793         (-gen-no-scache-semantic-fn): Ditto.
3794
3795 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
3796
3797         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
3798
3799         * sim.scm (-with-generic-write?): New global.
3800         (option-init!): Initialize it.
3801         (option-set!): Set it.
3802         (with-generic-write?): New proc.
3803         (-gen-hw-addr): New proc.
3804         (-op-gen-queued-write): New proc.
3805         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
3806
3807         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
3808         turned off.
3809         (-gen-sem-switch): Preserve existing with-parallel? value.
3810         (-gen-sem-parallel-switch): Ditto.
3811         (-gen-write-case): Add /indent support.
3812         (cgen-write.c): Rewrite.
3813
3814         * utils.scm (-current-print-state): New global.
3815         (make-print-state): New proc.
3816         (pstate-indent,pstate-set-indent!): New procs.
3817         (pstate-cmd?,pstate-cmd-do): New procs.
3818         (/indent): New global.
3819         (/indent-set,/indent-add): New procs.
3820         (string-write): Set -current-print-state.
3821         (-string-write): New arg pstate, all callers updated.
3822         Handle print-state commands.
3823         (-string-list-flatten): New proc.
3824         (string-list->string): Use it.
3825
3826         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
3827         (-gen-sem-fn-table-entry): New proc.
3828         (-gen-semantic-fn-table): New proc.
3829         (-gen-scache-semantic-fn): Make fn static.
3830         (-gen-no-scache-semantic-fn): Ditto.
3831         (cgen-semantics.c): Define macro SEM_FN_NAME.
3832         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
3833         FAST,FULL.  Update @cpu@_insn_sem contents.
3834         (-gen-semf-fn-name): Delete.
3835         (-gen-sem-fn-decls): Delete.
3836         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
3837         @cpu@_semf_init_idesc_table.
3838         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
3839         handlers here.
3840         (cgen-decode.h): Print sfmt enum.
3841         * sid-decode.scm (-gen-semf-fn-name): Delete.
3842         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
3843
3844         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
3845         (ifmt-compute!): Ditto.
3846         * sim-decode.scm (-gen-decoder-switch): Ditto.
3847         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
3848         (-gen-decoder-switch): Ditto.
3849
3850         * insn.scm (insn-virtual?): New proc.
3851
3852         * enum.scm (gen-enum-decl): Speed up, build string as list and then
3853         convert to string.
3854         * mach.scm (<arch>): attr-list is now a pair of lists.
3855         (current-attr-list): Rewrite.
3856         (current-attr-add!,current-attr-lookup): Rewrite.
3857         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
3858
3859 1999-08-06  Richard Henderson  <rth@cygnus.com>
3860
3861         * ia64.cpu: Initial checkpoint.
3862
3863 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
3864
3865         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
3866         (pmacros-init!): Update .apply help string.
3867
3868 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
3869
3870         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
3871         (<hw-pc>,cxmake-skip): New method.
3872         (<pc>,cxmake-skip): New method.
3873         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
3874         (gen-argbuf-type): New member `skip_count'.
3875         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
3876         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
3877
3878         * utils-sim.scm: New file.
3879         * dev.scm (load-sim): Load it.
3880         (load-sid): Load it.
3881         * cgen-sid.scm: Load it.
3882         * cgen-sim.scm: Load it.
3883         * iformat.scm (<sformat>): New member sbuf, not initialized by
3884         default make.
3885         * rtx-funcs.scm (skip): Rewrite.
3886         * rtl-c.scm (skip): Rewrite.
3887         * m32r.cpu (sc,snc): Update `skip' usage.
3888         * mode.scm (mode-real-mode): New proc.
3889         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
3890         Distinguish fragments by the <sformat-abuf> they use.
3891         * sim.scm (gen-profile-index-type): Delete.
3892         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
3893         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3894         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
3895         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
3896         (-gen-argbuf-elm): Rewrite.
3897         (-gen-argbuf-hw-elm): Delete.
3898         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
3899         of each sfmt.
3900         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
3901         (sim-init!): Initialize them.
3902         (sim-analyze-insns!): Set them.
3903         (current-sbuf-list): New proc.
3904         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
3905         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
3906         * sim-model.scm (-gen-model-insn-fn): Ditto.
3907         * sim-decode.scm (-gen-extract-decls): Delete.
3908         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
3909         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
3910         sim.scm.
3911         (<hw-register,gen-extract,gen-trace-extract): Ditto.
3912         (<hw-address,gen-extract,gen-trace-extract): Ditto.
3913         (-gen-op-extract,-gen-op-trace-extract): New procs.
3914         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
3915         gen-sfmt-argvars-foo and rewrite.
3916         (-gen-record-args): Rewrite.
3917         (-gen-extract-case): Tweak.
3918         * sid.scm (gen-profile-index-type): Delete.
3919         (ifield argbuf support): Move to utils-sim.scm.
3920         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3921         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
3922         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
3923         (-sim-sformat-argbuf-list): New global.
3924         (sim-init!): Initialize it.
3925         (sim-analyze-insns!): Set it.
3926         (current-sbuf-list): New proc.
3927         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
3928         (-gen-argbuf-hw-elm): Delete.
3929         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
3930         of each sfmt.
3931         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
3932         (-gen-extract-decls): Delete.
3933         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
3934         sid.scm.
3935         (<hw-register,gen-extract,gen-trace-extract): Ditto.
3936         (<hw-address,gen-extract,gen-trace-extract): Ditto.
3937         (-gen-op-extract,-gen-op-trace-extract): New procs.
3938         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
3939         gen-sfmt-argvars-foo and rewrite.
3940         (-gen-record-args): Rewrite.
3941         (-gen-extract-case): Tweak.
3942
3943         * cgen-gh.c (gh_putc,gh_puts): New functions.
3944         * cgen-gh.h (gh_putc,gh_puts): Declare them.
3945         * cos.c (_object_print_elms,_object_print): Use them.
3946         * hob-sup.c (fastcall_print): Use them.
3947         * configure.in: Check for scm_gen_puts, scm_puts.
3948         * config.in: Rebuild.
3949         * configure: Rebuild.
3950         * aclocal.m4: Rebuild.
3951         * Makefile.in: Rebuild.
3952
3953         * dev.scm (load-opc): Use load instead of maybe-load.
3954         (load-gtest,load-sim,load-stest): Ditto.
3955         (load-sid): Ditto.
3956
3957 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
3958
3959         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
3960         up to avoid g++ 'goto crosses initialization' warning.
3961         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
3962         (-gen-sfrag-case): Update use of NEXT_FRAG.
3963
3964 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
3965
3966         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
3967
3968         * read.scm: Load sem-frags.scm.
3969         * sem-frags.scm (*): Lots rewritten.
3970         * sid.scm (-with-sem-frags?): New global
3971         (with-sem-frags?): New proc.
3972         (option-init!): Initialize -with-sem-frags?.
3973         (option-set!): Recognize with-sem-frags.
3974         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
3975         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
3976         if asked to.
3977         (-gen-sfrag-engine-decls): New proc.
3978         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
3979         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
3980         (-gen-sfrag-engine): New proc.
3981         (-gen-sem-case): Emit setup-semantics if specified.
3982         (-gen-sem-switch-engine): Update init/use of computed goto label.
3983         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
3984         from local vars.
3985         (-gen-idesc-decls): Replace sem_address with cgoto.
3986         (-gen-scache-decls): Rewrite definition of `execute' member.
3987         * arm.cpu (arm isa): Enable decode-splits.
3988         * arm7.cpu (multiply insns): Rename result to mul-result.
3989
3990         Rename decode-specialize to decode-split.
3991         * decode.scm (*): Update.
3992         * insn.scm (*): Update.
3993         * mach.scm (*): Update.
3994         * sid.scm (*): Update.
3995
3996 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
3997
3998         Record objects as a smob.
3999         * cos.c (scm_tc16_object): New static global.
4000         (cos_init): Initialize it.
4001         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4002         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4003         (_object_tag): Delete.
4004         (_object_make_smob): New function.
4005         (_object_make_x,_object_make_with_values_x): Rewrite.
4006         (_object_elements,_object_class_desc): Rewrite.
4007         (_object_copy,object_p): Rewrite.
4008         (_object_specialize): Rewrite.
4009         (_object_print_elms,_object_print): New functions.
4010         (object_smob): New static global.
4011         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4012
4013         * cos.c (_make_x_symbol): New static global.
4014         (object_make): Use it.
4015         (cos_init): Initialize it.
4016
4017 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4018
4019         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4020         instead to determine whether to use FLD macro.
4021         (<rtl-c-eval-state>): New member ifield-var?.
4022         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4023         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4024         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4025
4026         * rtl.scm (rtx-sequence-assq-locals): New proc.
4027
4028         * cos.scm (-object-error): Don't crash on non-objects.
4029
4030         * Makefile.am (CLEANFILES): Add hobbit.
4031         * Makefile.in: Rebuild.
4032
4033         * rtl-c.scm (s-c-call): Delete unnecessary code.
4034
4035 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4036
4037         * rtl-c.scm (ifield): Always reference value via `FLD'.
4038
4039         * cos.c (elm_bound_p): Return problem SCM boolean values.
4040
4041         * utils-cgen.scm (display-argv): New proc.
4042         * cgen-opc.scm (cgen): Call it.
4043         * cgen-sim.scm (cgen): Ditto.
4044         * cgen-gas.scm (cgen): Ditto.
4045         * cgen-stest.scm (cgen): Ditto.
4046         * cgen-sid.scm (cgen): Ditto.
4047
4048 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4049
4050         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4051         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4052         (-gen-extract-switch): Initialize result to 1.
4053         * opcodes.scm (gen-ifield-default-type): New proc.
4054         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4055         updated.
4056         (<hw-index>,gen-insert): Handle non-ifield indices.
4057         (<hw-index>,gen-extract): Ditto.
4058         (<hw-asm>,gen-parse): Ditto.
4059         (<hw-asm>,gen-print): Ditto.
4060         (<keyword>,gen-parse): Ditto.
4061         (<keyword>,gen-print): Ditto.
4062         (<operand>,gen-fget): Ditto.
4063         (<operand>,gen-fset): Ditto.
4064
4065         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4066         (-gen-hw-index): Ditto.
4067         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4068         (-gen-hw-index): Ditto.
4069
4070         * sem-frags.scm: New file.
4071
4072         * attr.scm (attr-parse): Add better checking of input.
4073
4074         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4075         All uses updated.
4076         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4077
4078         * ifield.scm (ifld-nil?): New proc.
4079
4080         * operand.scm (<operand>): New members getter,setter.
4081         (<operand>,make!): New args getter,setter.  All uses updated.
4082         (op:getter,op:setter): New procs.
4083         (<hw-index>,field-start): Return 0 for non-ifield indices.
4084         (<hw-index>,field-length): Return 0 for non-ifield indices.
4085         (-operand-parse-getter,-operand-parse-setter): New procs.
4086         (-operand-parse): New args getter,setter.  All callers updated.
4087         Always use hw-index-scalar for scalar operands.
4088         (-operand-read): Handle getter,setter.
4089         (define-full-operand): New args getter,setter.  All uses updated.
4090         * semantics.scm (-build-ifield-operand!): Update.
4091         (-build-index-of-operand!): Update.
4092         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4093         * simplify.inc (define-normal-operand): Update.
4094
4095         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4096         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4097         (s-binop,s-cmpop,s-convop): Ditto.
4098         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4099         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4100         (fcc-tests): New insn-enum.
4101         (fcc-value): Rename from fcc-type.
4102         * sparcfpu.cpu: New file.  All fp support moved here.
4103
4104         * rtl.scm (<rtx-func>): New member class.
4105         (rtx-class-*?): New procs.
4106         (def-rtx-node): New arg class.  All callers updated.
4107         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4108         * rtx-funcs.scm (*): Specify class.
4109
4110         * utils-cgen.scm (context-make-reader): New proc.
4111
4112         * utils.scm (assert-fail-msg): New variable.
4113         (assert): Use it.
4114         (list-drop,list-tail-drop): New procs.
4115
4116 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4117
4118         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4119         CGEN_MIN_INSN_SIZE deleted on March 22.
4120
4121         * ifield.scm (<ifield>,needed-iflds): New method.
4122         (<multi-ifield>,needed-iflds): New method.
4123         (ifld-needed-iflds): New proc.
4124         (multi-ifield?): New proc.
4125         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4126         (-sfmt-search-key): Include insn length in key.
4127         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4128         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4129         (-ifmt-lookup-ifmt!): Compute key here.
4130         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4131         All callers updated.
4132         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4133         All callers updated.
4134         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4135         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4136         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4137         to ifmt-build.
4138         * operand.scm (op-iflds-used): New proc.
4139         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4140         and sim-cpu.scm.
4141         And from sid.scm,sid-cpu.scm as well.
4142         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4143         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4144         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4145         (gen-extracted-ifld-value): Ditto.
4146         (-extract-chunk-specs): Ditto.
4147         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4148         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4149         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4150         (-extract-insert-subfields): New function.
4151         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4152         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4153         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4154         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4155         gen-extract-foo.
4156         (-gen-no-scache-semantic-fn): Ditto.
4157         (-gen-sem-case): Ditto.
4158         (-gen-read-case): Update calls to gen-define-ifields,
4159         gen-extract-ifields.
4160         * sim-decode.scm (-gen-record-args): Update.
4161         (-gen-sfmt-argvars-assigns): Update.
4162         (-gen-extract-case): Update.
4163         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4164         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4165         gen-extract-foo.
4166         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4167         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4168         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4169         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4170         gen-define-ifields, gen-extract-ifields.
4171         (-gen-record-args): Update.
4172         (gen-sfmt-argvars-assigns): Update.
4173         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4174         with gen-define-ifields.  Ditto for gen-extract-foo.
4175         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4176         procs rather than method calls.
4177
4178 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4179
4180         * sid.scm (-create-virtual-insns!): New local `context', pass it
4181         to insn-read.
4182
4183         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4184         (operand name) not (operand object), (local name) not (local object).
4185         (rtx-traverse-with-locals): New proc.
4186         (-compile-expr-fn): New proc.
4187         (rtx-compile): Rewrite.
4188         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4189         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4190         (rtl-c-set-trace): Ditto.
4191         (operand define-fn): Recognize operand name argument.
4192         (local define-fn): Recognize sequence temp name argument.
4193         * rtx-funcs.scm (operand): Argument is operand name, not object,
4194         so call current-op-lookup.
4195         (local): Similarily, so call rtx-temp-lookup.
4196
4197         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4198         (rtx-operand?): Ditto.
4199         (rtx-pretty-name): Ditto.
4200         (rtx-local-obj): Flag symbol argument as an error.
4201         (rtx-local-name): New proc.
4202         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4203
4204         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4205
4206         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4207         updated.
4208
4209         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4210         (and: QI rd #xff).
4211
4212         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4213         (*floats-s->c-fun-table*): Ditto.
4214         * hobbit.c,hobbit.h: Rebuild.
4215         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4216         * semantics.scm (rtx-simplify): Use /fastcall-make.
4217
4218         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4219
4220         * insn.scm (<insn>): Delete members condition, compiled-condition.
4221         (<insn>,make!): Update
4222         (<insn> getters,setters): Update.
4223         (-insn-parse,insn-read,define-full-insn): Update.
4224         * minsn.scm (minsn-make-alias): Update.
4225         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4226         (ifmt-compute!): Ditto.
4227         * sim.scm (sim-finish!): Update.
4228         * simplify.inc: (define-normal-insn): Update.
4229         * sid-cpu.scm (gen-semantic-code): Update.
4230
4231         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4232         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4233         (ifmt-compute!): Ditto.
4234
4235 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4236
4237         * minsn.scm (minsn-compute-iflds): Print better error message for
4238         missing ifields.
4239
4240 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4241
4242         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4243
4244         * Makefile.am (HOBFLAGS): New variable.
4245         (cgen-hob.c): Use it.
4246         (hobbit.c): Use it.
4247         (libcpu_a_SOURCES): Add hob-sup.c.
4248         (hob-sup.o): New rule.
4249         * Makefile.in: Rebuild.
4250         * cgen.c: #include hob-sup.h.
4251         (cgen_init_c): Call hobbit_init_support.
4252         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4253         (*special-scm->c-functions*): Add them.
4254         (display-c-expression): Handle *c-symbol*.
4255         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4256         (*floats-s->c-fun-table*): Ditto.
4257         (normalize): Recognize /fastcall-make.
4258         (normalize-fastcall-make): New proc.
4259         * hobbit.c,hobbit.h: Rebuild.
4260         * hob-sup.scm: New file.
4261         * hob-sup.c: New file.
4262         * hob-sup.h: New file.
4263         * read.scm: Load hob-sup.scm.
4264         * rtl.scm (-rtx-name-list): New variable.
4265         (rtx-name-list): New proc.
4266         (rtx-lookup): Try symbol first.
4267         (def-rtx-node): Add name to -rtx-name-list.
4268         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4269         (-rtx-traverse-anymode): New proc.
4270         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4271         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4272         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4273         (-rtx-traverse-{symornum,object}): New procs.
4274         (-rtx-make-traverse-table): Rewrite.
4275         (-rtx-traverse-operands): Rewrite arg-types handling.
4276         Handle #f result of traverser.
4277         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4278         Move debug handling here.
4279         (-rtx-traverse-debug): Delete.
4280         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4281         for each rtx.
4282         * semantics.scm (semantic-compile:process-expr!): Fix call to
4283         -rtx-traverse.
4284         * utils.scm (map1-improper): New proc.
4285
4286 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4287
4288         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4289         (h-mbits): Ditto.
4290         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4291         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4292         (<operand>,cxmake-get): Tweak.
4293         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4294
4295 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4296
4297         * thumb.cpu (dnti): Delete timing spec.
4298         (all insn): Update.
4299
4300         * arm.cpu (arm isa): New fields condition, setup-semantics.
4301         (thumb isa): New field setup-semantics.
4302         (h-gr): Add attribute CACHE-ADDR.
4303         * arm7.cpu (dnai): Delete condition.
4304         (eval-cond): Delete.
4305
4306         * mach.scm (<isa>): New member setup-semantics.
4307         (-isa-parse-setup-semantics): New proc.
4308         (-isa-parse): New arg setup-semantics.
4309         (-isa-read): Recognize setup-semantics.
4310
4311         * sid-cpu.scm (gen-extract-fields): Split into two:
4312         gen-extract-ifields, gen-extract-ifmt-ifields.
4313         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4314         tracing begin/end messages (done by caller now).
4315         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4316         tracing begin/end messages (done by x-before,x-after virtual insns).
4317         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4318         end so don't have to look it up again next time.
4319         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4320         (-decode-expr-ifield-tracking-key): New proc.
4321         (-decode-expr-ifield-tracking): New proc.
4322         (-decode-expr-ifield-values-used): New proc.
4323         (-decode-expr-ifield-mark-used!): New proc.
4324         (-gen-decode-expr-set-itype): New proc.
4325         (-gen-decode-expr-entry): Rewrite.
4326         (-gen-decode-table-entry): New proc.
4327         (-gen-decoder-switch): Use it.
4328         (-gen-virtual-insn-finder): New proc.
4329         (-gen-argbuf-elm): Move here from sid.scm.
4330         (-gen-argbuf-hw-elm): Ditto.
4331         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4332         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4333         conditional-execution isas.
4334         (-gen-decode-fn): Record conditional-exec ifield.
4335         * sid.scm (-current-pbb-engine?): New global.
4336         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4337         (<ifield>,gen-ifld-extract): New arg `indent'.
4338         (<multi-ifield>,gen-ifld-extract): Ditto.
4339         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4340         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4341         (-gen-arch-model-decls): Only scan real insns.
4342         (scache-engine-insns,pbb-engine-insns): New procs.
4343         (-create-virtual-insns!): New proc.
4344         (sim-finish!): Call it.
4345         (-decode-specialize-insn?): New proc.
4346         (-decode-specialize-build-assertion): New proc.
4347         (-decode-specialize-insn-1): New proc.
4348         (-decode-specialize-insn): New proc.
4349         (-fill-sim-insn-list!): New proc.
4350         (sim-analyze!): Create copies of insns to be specialized.
4351         * utils-cgen.scm (obj-set-name!): New proc.
4352
4353         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4354         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4355         semantic-attrs.
4356         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4357         sformats.
4358         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4359         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4360         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4361         (attr): Rewrite test for insn owner.
4362         (member): New rtx function.
4363         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4364         as separate function.
4365         (rtx-ifield?,rtx-ifield-name): New procs.
4366         (rtx-operand-obj): Rewrite.
4367         (rtx-operand-name): New proc.
4368         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4369         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4370         (tstate-make): New args owner, known.  All callers updated.
4371         (tstate-known-lookup): New proc.
4372         (rtx-traverse): New arg owner.  All callers updated.
4373         (rtx-make-bool): New proc.
4374         (rtl-find-ifields): Rewrite.
4375         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4376         * semantics.scm: ... here.
4377         (rtx-const-equal,rtx-const-list-equal): New procs.
4378         (-build-known-values): New proc.
4379         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4380         (semantic-attrs): Ditto.
4381         * rtx-funcs.scm (member,number-list): New rtx functions.
4382
4383         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4384         Rewrite.  Delete arg `all-attrs'. All callers updated.
4385         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4386         updated.
4387         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4388
4389         * decode.scm (subdtable-add): Handle `expr' entries.
4390         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4391         (exprtable-entry-*): Update.
4392         (exprtable-entry-iflds): New proc.
4393         (exprentry-cost): New proc.
4394         (exprtable-sort,-gen-exprtable-name): New procs.
4395         (exprtable-make): New arg `name'.  All callers updated.  use vector.
4396         (exprtable-*): Update.
4397         (-build-decode-table-entry): Don't issue collision warning if all are
4398         specialized insns.  Sort exprtable entries before building table.
4399
4400         * read.scm (-reader-process-expanded-1): Move pretty printing of
4401         input to logging level 4.
4402
4403         * utils.scm (string-list->string): New proc.
4404
4405         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4406         semantics.
4407         (insn-read): Delete leading '-' in name.  All callers updated.
4408         (real-insn?): New proc.
4409         (real-insns): Rewrite.
4410         (insn-has-ifield?): New proc.
4411         (insn-builtin!): Create insn attribute SPECIALIZED.
4412
4413         * mach.scm (<arch>): Delete member app-data.
4414         (current-raw-insn-list): New proc.
4415         (insn-list-car,insn-list-splice!): New procs.
4416         (<decode-specialize>): New class.
4417         (-isa-parse-decode-specialize): New proc.
4418         (-isa-parse-decode-specializes): New proc.
4419         (<isa>): New members `condition', `decode-specializes'.
4420         (-isa-parse-condition): New proc.
4421         (-isa-parse): New args condition, decode-specializes.
4422         (-isa-read): Recognize condition, decode-specializes.
4423         (-isa-add-decode-specialize!): New proc.
4424         (modify-isa): New proc.
4425         (isa-conditional-exec?,state-conditional-exec?): New procs.
4426         (arch-init!): New reader command `modify-isa'.
4427
4428         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4429         (mode-signed,mode-unsigned?): New procs.
4430
4431 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
4432
4433         * types.scm (<array>): New method get-shape.
4434         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4435         onto type.
4436         (hw-shape,hw-num-elms): New procs.
4437         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4438         if there's more than 255 registers.
4439         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4440
4441         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4442         with get/set specs.
4443
4444 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
4445
4446         * cgen-sid.scm (sim-arguments): Add -X.
4447         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4448         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4449         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
4450         Simplify by supporting pbb engine only.
4451         (-gen-sem-switch-init): New proc.
4452         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4453         (cgen-sem-switch.cxx): New proc.
4454         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4455         with with-pbb?.  Support dual scache/pbb engines.
4456         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4457         Support dual scache/pbb engines.
4458         (cgen-decode.h): Generate semantic fn decls if with-scache?.
4459         * sid.scm (*) with-pbb? replaces with-sem-switch?.
4460         (sim-finish!): Create pbb support virtual insns if with-pbb?.
4461
4462 1999-05-10  Ben Elliston  <bje@cygnus.com>
4463
4464         * arm7.cpu: Remove coprocessor related fields, operands and insn
4465         definitions for now. Take the undefined instruction trap instead.
4466         (ldmda-wb): New instruction.
4467         (ldmib-wb): Likewise.
4468         (ldmdb-wb): Likewise.
4469         (stmdb-wb): Likewise.
4470         (stmib-wb): Likewise.
4471         (stmda-wb): Likewise.
4472
4473 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
4474
4475         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4476         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4477
4478         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4479         hobbit can't handle optional third arg.
4480
4481 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
4482
4483         * arm.cpu (h-tbit): Delete set spec.
4484         (h-mbits): Don't call arm_mbits_set in set spec.
4485         * arm.sim: New file.
4486         * hardware.scm (modify-hardware): New proc.
4487         (hardware-init!): Add modify-hardware command.
4488         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4489         (-hw-gen-set-quiet): Ditto.
4490         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
4491         hardware attribute.  Load $arch.sim file if present.
4492         * utils-cgen.scm (keyword-list?): New proc.
4493         (keyword-list->arg-list,arg-list-validate-name): New procs.
4494         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4495
4496         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4497
4498         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4499         @cpu@_cpu_cgen.
4500
4501         * attr.scm (obj-prepend-atlist!): New proc.
4502
4503         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4504
4505         * sid.scm (<operand>,profilable?): Use op:type.
4506         * sim.scm (<operand>,profilable?): Use op:type.
4507
4508 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
4509
4510         * utils.scm (find-index,find): Be more stack friendly.
4511
4512         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4513         (bic-imm): Ditto.
4514
4515 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
4516
4517         * arm.cpu (h-gr-usr): New hardware element.
4518         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4519         (arm-mode): New keyword.
4520         (h-mbits): Add set spec.
4521         (h-spsr): Implement get/set specs.
4522
4523         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4524         (-reader-process-expanded-1): Pretty print logging output.
4525
4526         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4527         (cgen-cpu.h): Print enums before hardware elements.
4528         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4529         * sid-decode.scm (cgen-decode.cxx): Ditto.
4530         * sid-model.scm (cgen-model.cxx): Ditto.
4531
4532         * utils-cgen.scm (context-error): Accept variable number of
4533         trailing args.
4534
4535         * rtx-funcs.scm (error:): New rtx function.
4536         * rtl-c.scm (s-case-vm): New proc.
4537         (-gen-non-vm-case-get,s-case-non-vm): New procs.
4538         (s-case): Simplify, handle non-VM result.
4539         (error:): New rtx function.
4540
4541 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
4542
4543         * arm.cpu (h-pc): Add set spec to zero bottom bits.
4544         (test-hi,test-ls): Fix cbit handling.
4545         (shift-type,h-operand2-shifttype): Move here ...
4546         * arm7.cpu: ... from here.
4547         (set-cond,set-cond-maybe,dnix): Delete, unused.
4548         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4549         * arm.cpu: ... to here.
4550         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4551         (alu-cmn): Use set-add-flags.
4552         (alu-tst): Use set-zn-flags.
4553         (alu-cmp): Use set-sub-flags.
4554         (lsl,lsr,asr): Set condition codes.
4555         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4556         (alu-op): Split into three: alu-logical-op,alu-arith-op,
4557         alu-shift-op.
4558         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4559         All callers updated.
4560         (sub-sp): Rename from add-sp-neg.
4561         (f-lbwl-offset): Delete.
4562         (f-lbwl-hi,f-lbwl-lo): New ifields.
4563         (lbwl-hi,lbwl-lo): Update.
4564         (bl-hi): Add 4 to pc.
4565         (push-reg,pop-reg): Simplify.
4566         (push,push-lr): Push registers in correct order.
4567         (pop,pop-pc): Pop registers in correct order.
4568         (save-reg-inc,load-reg-inc): Simplify.
4569         (ldmia): Save registers in correct order.
4570
4571 1999-04-30  Ben Elliston  <bje@cygnus.com>
4572
4573         * arm7.cpu (f-op-hdt): Remove; unused.
4574         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4575         (f-ror-imm8): New multi-ifield.
4576         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4577         callers updated.
4578         (f-uimm12): New field.
4579         (ror-imm8): New operand.
4580         (uimm12): Likewise.
4581         (hdt-offset8): Reinstate operand.
4582         (offset4-hi,offset4-lo): Remove.
4583         (set-cond): Remove macro; unused.
4584         (set-cond-maybe): Likewise.
4585         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4586         (store-word/byte): Likewise.
4587         (load-halfword): Use hdt-offset8 multifield operand instead of two
4588         4-bit operands that are explicitly combined by semantic code.
4589         (do-halfword-store): Bug fix. Set address when not preindexing.
4590         (store-halfword): Also use hdt-offset8 operand.
4591         (arith-op): Avoid clobbering source registers when one of them is
4592         the destination register.
4593         (arith-imm-op): Likewise.
4594         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4595         (teq-imm): Likewise.
4596         (ldm-p): Rename to ldmdb.
4597         (stm-pw): Rename to stmdb-wb.
4598         (multi-action): New macro; test reg-list bits and execute a
4599         semantic fn if the bit is set.
4600         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4601         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4602         (all insns): Use dnai entries for simplicity rather than dni.
4603         (*): Use short-form of (const ..).
4604
4605 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
4606
4607         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
4608         member eval to evaluator.
4609         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
4610         (tstate-make): Delete arg op-fn.  All callers updated.
4611         (tstate-op-fn,tstate-set-op-fn!): Delete.
4612         (rtx-traverse): Delete op-fn arg.  All callers updated.
4613         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4614         split out of -simplify-for-compilation.
4615
4616         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4617         (cgen_DEPENDENCIES): Add stamp-cgen.
4618         (stamp-cgen): New rule.
4619         * Makefile.in: Rebuild.
4620
4621         * rtl-c.scm (enum:): Define emitter for.
4622         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4623         enums as well.
4624         (rtx-constant-value,rtx-enum-value): New procs.
4625         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4626         (rtx-compile-time-constant?): Return #t for enums.
4627         (rtx-true?,rtx-false?): Handle enums.
4628         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4629         building result by hand.
4630         (rtx-simplify-eq-attr-insn): Ditto.
4631         * rtx-funcs.scm (enum:,enum): New rtx functions.
4632
4633         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4634         aliases-analyzed?.
4635         (arch-analyze-insns!): New proc.
4636         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4637         of calling ifmt-compute! directly.
4638         * sid.scm (-sim-insns-analyzed?): Delete.
4639         (sim-analyze!): Call arch-analyze-insns! instead of calling
4640         ifmt-compute! directly.
4641         * sim.scm (-sim-insns-analyzed?): Delete.
4642         (sim-analyze!): Call arch-analyze-insns! instead of calling
4643         ifmt-compute! directly.
4644
4645         * utils.scm (string-take-with-filler): New proc.
4646         (string-take): Use it.
4647
4648         * pgmr-tools.scm: New file.
4649         * read.scm: Load it.
4650         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4651
4652         * insn.scm (insn-base-mask): Renamed from insn:mask.
4653         All callers updated.
4654         (insn-base-mask-length): Renamed from insn:mask-length.
4655         All callers updated.
4656         (insn-foo): Renamed from insn:foo.  All callers updated.
4657         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
4658         * iformat.scm (compute-insn-base-mask-length): Renamed from
4659         compute-insn-mask-length.  All callers updated.
4660         (compute-insn-base-mask): Renamed from compute-insn-mask.
4661         All callers updated.
4662
4663         * enum.scm (-enum-parse-prefix): New proc.
4664         (<enum>,make!): Don't parse enum values here.
4665         (-enum-parse): Do it here.  Call -enum-parse-prefix.
4666         (define-full-insn-enum): Ditto.
4667         (enum-vals-upcase): New proc.
4668         * hardware.scm (define-keyword): Make enum prefix uppercase.
4669         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
4670
4671         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
4672         (<ifield>,field-extract): New method.
4673         (<multi-ifield>,field-extract): New method.
4674         (ifld-extract): New proc.
4675         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
4676         (ifld-extract-fn-name): Renamed from ifld-extract.
4677
4678         * ifield.scm (ifld-new-value): Renamed from ifield-make.
4679         All callers updated.
4680
4681         * ifield.scm (ifld-lsb0?): New proc.
4682         (sort-ifield-list): New arg up?.  All callers updated.
4683         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
4684         rather than global state.
4685
4686 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
4687
4688         * insn.scm (pretty-print-insn-format): New proc.
4689
4690         * Makefile.in: Rebuild.
4691         * aclocal.m4: Rebuild
4692         * configure: Rebuild.
4693
4694 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
4695
4696         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
4697         * configure: Rebuild.
4698         * aclocal.m4: Rebuild.
4699         * Makefile.in: Rebuild.
4700         * doc/Makefile.in: Rebuild.
4701         * doc/version.texi: Rebuild.
4702
4703 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
4704
4705         * utils.scm (bits->bools): New proc.
4706
4707 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
4708
4709         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
4710         subfield's gen-ifld-extract-decl method.
4711
4712 1999-04-23  Ben Elliston  <bje@cygnus.com>
4713
4714         * arm7.cpu (ldrsh-pu): Remove.
4715         (do-halfword-load): New pmacro.
4716         (load-halfword): Likewise.
4717         (do-halfword-store): Likewise.
4718         (store-halfword): Likewise.
4719         (strh-*): New instructions.
4720         (ldrsb-*): Likewise.
4721         (ldrh-*): Likewise.
4722         (ldrsh-*): Likewise.
4723
4724 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
4725
4726         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
4727         fields.
4728
4729         * arm7.cpu (do-word/byte-store): Fix typo.
4730
4731 1999-04-22  Ben Elliston  <bje@cygnus.com>
4732
4733         * arm7.cpu (do-word/byte-load): Handle cases where the destination
4734         register is the program counter (R15).
4735
4736         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
4737         (str-*): Implement using store-word-byte. Remove older versions.
4738         (bic): Use the `inv' rtx for obtaining bitwise complements.
4739         (bic-imm): Likewise.
4740         (mvn): Likewise.
4741         (mvn-imm): Likewise.
4742         (store-indev-reg): Remove crufty pmacro.
4743         (load-indiv-reg): Likewise.
4744         (ldm-p): Reverse the order of register processing for decrement.
4745         (stm-p): Likewise.
4746         (stbi): Remove; handled by the str-* insns.
4747
4748 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
4749
4750         * thumb.cpu (cmp): Fix carry bit computation.
4751         (alu-cmp): Ditto.
4752
4753 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
4754
4755         * arm.cpu (h-tbit): Specify set spec.
4756         (h-cpsr): Ditto.
4757         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
4758         (set-sub-flags): Interpret "carry bit" as a borrow.
4759         (all sub/cmp insns): Carry bit is actually a borrow bit.
4760         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
4761         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
4762         .pmacro instead.
4763         (hireg-add,hireg-cmp,hireg-move): Ditto.
4764
4765         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
4766         (-CGEN-LANG-VERSION): Ditto.
4767
4768 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
4769
4770         * pmacros.scm (-pmacro-make): New arg `default-values',
4771         all callers updated.
4772         (-pmacro-default-values): New proc.
4773         (-pmacro-process-keyworded-args): New proc.
4774         (-pmacro-process-args): New proc.
4775         (-pmacro-invoke): Process arguments before expanding macro.
4776         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
4777         (define-pmacro): Handle default values specified in arg list.
4778         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
4779         (rtx-boolif-op-arg[01]): New procs.
4780         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
4781         (rtx-simplify): Handle not,orif,andif.
4782         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
4783         * utils.scm (alist-copy): New proc.
4784         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
4785         (ldr*): Rewrite.
4786         (swi): Explicitly set pc.
4787
4788         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
4789
4790 1999-04-17  Ben Elliston  <bje@cygnus.com>
4791
4792         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
4793         correctly adjusts the program counter now.
4794
4795         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
4796         (f-signed?): Rename from `f-hdt-signed?'.
4797         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
4798         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
4799         (f-hdt-offset8): Use new field names.
4800         (ldr): Use `imm12' field, not `offset12', since we do our own
4801         address arithmetic.
4802         (str, str-*): Likewise.
4803         (ldu-*): Remove most; better not implemented than broken.
4804         (ldrh*): Likewise.
4805         (ldrsh-pu): New insn.
4806         (stri): Likewise.
4807         (stri-p): Likewise.
4808         (stbi): Likewise.
4809         (ldm-p): Likewise; replace (load-indiv-reg) version.
4810
4811 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
4812
4813         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
4814         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
4815         (*): Explicitly specify mode in c-call.
4816         (logical-op): Recognize sets of h-gr[15] as sets of pc.
4817         (arith-op): Ditto.
4818         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
4819         (arith-imm-op): New pmacro.
4820         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
4821         * thumb.cpu (bx-rs,bx-hs): Rewrite.
4822
4823 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
4824
4825         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
4826
4827         * rtl.scm (rtl-find-ifields): Implement.
4828
4829         * utils-gen.scm: New file.
4830         * read.scm: Load it.
4831         * desc.scm: Move generic attribute code to utils-gen.scm.
4832         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
4833         * Makefile.in: Rebuild.
4834
4835         * arm7.cpu (R15-OFFSET): New attribute.
4836         (dnai): New pmacro.
4837         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
4838         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
4839         for reg-shift version.
4840         (arith-op): Ditto.
4841         (data processing insns): Reorganize.  Use dnai.
4842
4843         * attr.scm (attr-kind): New proc.
4844         (attr-list-enum-list): Rewrite.
4845         (-attr-sort): Split result into two lists, bools and non-bools.
4846         (current-attr-list-for): Update.
4847
4848         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
4849         * sid-cpu.scm (-gen-attr-decls): New proc.
4850         (-gen-insn-attr-decls): New proc.
4851         (cgen-desc.h): New proc.
4852         (cgen-cpu.h): Put everything in @cpu@ namespace.
4853         (gen-parallel-exec-type): Change prefix of parexec struct from
4854         @cpu@ to @prefix@.
4855         (-gen-trace-record-type): Ditto for trace_record struct.
4856         (-gen-write-case): Update.
4857         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
4858         @prefix@.  Update scache struct references.
4859         (-gen-sem-case): Update scache struct references.
4860         (-gen-sem-switch-fn): Update idesc struct reference.
4861         Update insn_type enum reference.
4862         (cgen-write.cxx): Update scache,argbuf references.
4863         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
4864         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
4865         from @cpu@ to @prefix@.
4866         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
4867         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
4868         from @CPU@ to @PREFIX@.
4869         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
4870         from @CPU@ to @PREFIX@.
4871         (-gen-decode-insn-globals): Generate insn attributes.
4872         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
4873         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
4874         semantic fn typedef.
4875         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
4876         Change prefix of scache struct from @cpu@ to @prefix@.
4877         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
4878         Change prefix of idesc struct from @cpu@ to @prefix@.
4879         Change prefix of insn_type enum from @cpu@ to @prefix@.
4880         (-gen-argbuf-fields-union): Change prefix of sem_fields union
4881         from @cpu@ to @prefix@.
4882         (-gen-scache-decls): Change prefix of scache struct from
4883         @cpu@ to @prefix@.  Update idesc struct name.
4884         Update decode,execute methods.
4885         (-gen-extract-case): Update to type name changes.
4886         (-gen-decode-fn): Ditto.
4887         (cgen-decode.h): Put everything in @cpu@ namespace (except
4888         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
4889         (cgen-decode.cxx): Add using namespace @cpu@.
4890         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
4891         model_mark_get/set from @cpu@ to @prefix@.
4892         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
4893         @prefix@.
4894         (gen-model-fn-decls): Update idesc struct name.  Change prefix
4895         of model_insn_before/after from @cpu@ to @prefix@.
4896         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
4897         Update insn_word type name.
4898         (-gen-model-timing-table): Update INSN_TIMING struct name.
4899         (-gen-model-init-fn): Update MODEL_DATA struct name.
4900         (-gen-mach-defns): Update name of init_idesc_table fn.
4901         (cgen-model.cxx): Add using namespace @cpu@.
4902         * sid.scm (gen-cpu-class): Delete.
4903         (gen-attr-type): New proc.
4904         (gen-obj-attr-sid-defn): New proc.
4905         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
4906         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
4907         @CPU@ to @PREFIX@.
4908         (gen-cpu-insn-enum): Update name of insn enum.
4909         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
4910         (bx-hs): Ditto.
4911         (swi): Rename @cpu@_swi to @prefix@_swi.
4912
4913         * decode.scm (-build-decode-table-entry): Remove heuristic for
4914         distinguishing insns, and use insn ifield-assertion specs.
4915
4916         * desc-cpu.scm (gen-A-attr-mask): Simplify.
4917         (gen-ifld-defns): Boolean attributes begin at number 0 now.
4918         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
4919         * opc-itab.scm (-gen-macro-insn-table): Ditto.
4920         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
4921         all callers updated.
4922         (gen-attr-name): New proc
4923         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
4924         (gen-obj-attr-defn): Delete num_nonbools count.
4925
4926         * iformat.scm (ifmt-analyze): Handle insn-condition.
4927         (ifmt-compute!): Ditto.
4928         * insn.scm (<insn>): Specify default value for condition,
4929         post-cond-trap,compiled-condition,compiled-semantics.
4930         (<insn>,make!): New arg condition.
4931         (<insn>): Add getters for condition,compiled-condition.
4932         (-insn-parse): New arg condition, all callers updated.
4933         (-insn-read): Recognize condition spec.
4934         (define-full-insn): New arg condition.
4935         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
4936         * semantics.scm (semantic-compile): Change arg sem-code to
4937         sem-code-list.
4938         (semantic-attrs): Ditto.
4939         * sim.scm (sim-finish!): Update calls to define-full-insn.
4940         * simplify.inc (define-normal-insn): Update call to define-full-insn.
4941         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
4942         * sid.scm (sim-finish!): Update call to define-full-insn.
4943
4944 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
4945
4946         * Makefile.am (sim-cpu): Allow specification of ISA.
4947         * Makefile.in: Rebuild.
4948
4949 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
4950
4951         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
4952
4953 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
4954
4955         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
4956
4957         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
4958
4959         * attr.scm (atlist?): New proc.
4960         (-attr-eval): Rewrite.
4961         (attr-parse): New proc.
4962         (atlist-parse): Use it.
4963
4964         * decode.scm (exprtable-entry-make): New proc.
4965         (exprtable-entry-insn,exprtable-entry-expr): New procs.
4966         (exprtable-make,exprtable-insns): New procs.
4967
4968         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
4969         All uses updated.
4970         (hardware-builtin!): Make h-memory a vector.
4971
4972         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
4973         All callers updated.
4974         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
4975
4976         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
4977         All uses updated.
4978         (-insn-parse): Set semantics to #f if not specified.
4979         (define-insn,define-full-insn): Take out code that ignores ALIAS's
4980         if simulator.
4981         (-parse-insn-format): Recognize `=' iformat spec.
4982
4983         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
4984         (isa-max-insn-bitsize): Ditto.
4985
4986         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
4987         rtl-c-with-alist.
4988         (<ifield>,gen-extract): Ditto.
4989         (<multi-ifield>,gen-insert,gen-extract): Ditto.
4990         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
4991         (gen-define-ifmt-ifields): New proc.
4992         (gen-semantic-code): Rewrite.
4993         * sid-decode.scm (-gen-decode-expr-entry): New proc.
4994         (-gen-decoder-switch): Handle expression tables.
4995         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
4996         gen-define-fields.
4997         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
4998         instead of gen-define-fields.
4999         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5000         callers updated.
5001         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5002         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5003         (-gen-ifld-extract-beyond): Ditto.
5004         (<multi-ifield>,gen-ifld-extract): Ditto.
5005         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5006         rtl evaluation code.
5007         (op:read): Build an <eval-state> to pass to gen-read.
5008         (op:write): Build an <eval-state> to pass to gen-write.
5009         (op:record-profile): Build an <eval-state> to pass to
5010         gen-record-profile.
5011         * sim-cpu.scm (gen-semantic-code): Rewrite.
5012         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5013         rtl-c-with-alist.
5014         (-gen-ifld-extract-beyond): Ditto.
5015         (<multi-ifield>,gen-ifld-extract): Ditto.
5016         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5017         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5018         rtl evaluation code.
5019         (op:read): Build an <eval-state> to pass to gen-read.
5020         (op:write): Build an <eval-state> to pass to gen-write.
5021         (op:record-profile): Build an <eval-state> to pass to
5022         gen-record-profile.
5023
5024         * operand.scm (<operand>): Give `selector' default value of #f.
5025         Give `num' default value of -1.  Give `cond?' default value of #f.
5026         (op:new-mode): Delete arg `set?', all uses updated.
5027
5028         * read.scm (reader-error): Handle #f return from port-filename.
5029         (-init-parse-cpu!): Call rtl-c-init!.
5030         (reader-install-builtin!): Call rtl-builtin!.
5031
5032         * rtl-c.scm: New file.
5033         * semantics.scm: New file.
5034         * read.scm: Load them.
5035         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5036         to semantics.scm.
5037         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5038         type,eval,num.
5039         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5040         (-rtx-num-text,-rtx-max-num): New globals.
5041         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5042         (-rtx-macro-lookup): New proc.
5043         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5044         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5045         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5046         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5047         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5048         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5049         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5050         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5051         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5052         (rtx-pretty-name): New proc.
5053         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5054         (rtx-traverse-*): Rewrite rtx traversing.
5055         (rtx-eval-*): Rewrite rtx evaluation.
5056         (rtx-compile): New proc.
5057         (rtx-simplify): New proc.
5058         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5059         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5060         (ifield,index-of): Rewrite.
5061         (name): Renamed from `operand:'.
5062         (operand,xop,local): New rtx's.
5063         (current-insn): Rewrite.
5064         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5065         (cgen-hob.h): Remove rule for.
5066         (cgen-hob.o): Depend on cgen-hob.c only.
5067         * Makefile.in: Rebuild.
5068
5069         * utils-cgen.scm (vmake): New proc.
5070         (<context>): New class.
5071         (context-make-prefix,context-error): New procs.
5072
5073 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5074
5075         * i960.cpu: Add some ??? comments.
5076         (xnor, ornot): New instructions.
5077         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5078
5079 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5080
5081         * cos.scm (-object-error): Print better error message.
5082
5083         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5084         (-pmacro-env-ref): Renamed from -env-ref.
5085
5086 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5087
5088         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5089         (h-pc): Delete.
5090         (hardware-builtin!): Delete h-pc builtin.
5091         * arm.cpu (h-pc): Define.
5092         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5093         * arm7.cpu (set-logical-cc-maybe): Delete.
5094         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5095         (data processing insns): Rewrite.
5096         * m32r.cpu (h-pc): Define.
5097         * fr30.cpu (h-pc): Define.
5098         * i960.cpu (h-pc): Define.
5099         * sparc.cpu (h-pc): Define.
5100
5101         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5102         (s-parallel): Replace do {...} while (0) with {...}.
5103         (s-sequence): Ditto.
5104
5105         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5106         consistent.
5107         (-gen-write-case,-gen-sem-case): Ditto.
5108         (-gen-sem-case): Only specify `written' if profiling or
5109         parallel-write-back.
5110         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5111         (-gen-sem-switch-fn): New proc.
5112         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5113         based on with-sem-switch option.
5114         * sid-decode.scm (-gen-decode-insn-globals): Only define
5115         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5116         addresses in idesc_table if !with-sem-switch.
5117         (-gen-sem-fn-decls): Rewrite.
5118         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5119         member based on with-sem-switch.  Only define
5120         `idesc_table_initialized_p' member if with-sem-switch.
5121         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5122         * sid.scm (-with-sem-switch?): New variable.
5123         (option-init!): Initialize it.
5124         (option-set!): Set it.
5125         (with-sem-switch?): New proc.
5126         (-op-gen-set-trace): Only emit `written' reference if profiling.
5127         (sim-finish!): Use h_pc_set to set pc.
5128
5129 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5130
5131         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5132         All callers updated.
5133         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5134
5135         * sid.scm (gen-argbuf-type): Delete.
5136         (-gen-argbuf-fields-union): Move to ...
5137         * sid-decode.scm: ... here.
5138
5139         * read.scm (-reader-process-expanded-1): New proc.
5140         (-reader-process-expanded): Call it to catch nested begin's.
5141         (reader-process): Move `begin' handling to -reader-process-expanded.
5142
5143         * insn.scm (-insn-read): Fix name of `format' spec.
5144
5145         * pmacros.scm (.pmacro): New builtin.
5146         (scan-symbol): If procedure macro, return macro rather than its symbol.
5147         (check-macro): Don't do lookup, instead check if (car expr) is
5148         macro object.
5149         (scan-list): Handle .pmacro.
5150         (scan): No longer re-examine text for another macro invocation.
5151         (-pmacro-build-lambda): New proc.
5152         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5153         another, fetch the other's value (rather than doing it during
5154         expansion).
5155
5156 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5157
5158         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5159         * Makefile.in: Rebuild.
5160
5161         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5162         (-fill-slot!): Simplify.
5163         (-build-slots): Simplify.
5164
5165         * dev.scm (load-sid): Don't load sid-arch.scm.
5166
5167         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5168         switch's.
5169         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5170         switch's.
5171
5172 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5173
5174         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5175         * decode.scm: ... here.  New file.
5176         * sid-decode.scm: Use decoder computation code in decode.scm.
5177         * read.scm: Load decode.scm.
5178
5179         * arm.cpu (arm710 model): Add u-exec function unit.
5180         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5181         Add get/set specs to redirect reg 15 to h-pc.
5182         (h-*): Indicate for both ARM and THUMB isas.
5183         (cbit,nbit,vbit,zbit): Ditto.
5184         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5185         (h-cpsr): Make virtual.  Add get/set specs.
5186         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5187         (h-spsr): New virtual reg.
5188         * arm7.cpu (shift-type): New explicitly defined keyword.
5189         (h-operand2-shifttype): Use it.
5190         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5191         All callers updated.  Don't set cbit.
5192         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5193         shift-type enum as case choices.  Set cbit.
5194         (and,orr,eor,add-imm): Uncomment out.
5195         (undefined): Temporarily comment out.
5196         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5197         (lda-pc,lda-sp): Ditto.
5198         (ldr-pc): Rename from ldr.
5199         (cbranch): Mark insns as being thumb insns.
5200
5201         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5202
5203         * cgen-sid.scm: Don't load sid-arch.scm.
5204         (sim-arguments): Delete unused entries.
5205         * sid-arch.scm: Delete.
5206
5207         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5208         (<insn>,ifld-assertions): New member.
5209         (<insn>,make!): New arg ifld-assertions, all callers updated.
5210         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5211         (insn:fields): Delete.
5212         (-insn-parse): New arg ifld-assertions.  All callers updated.
5213         (-insn-read,define-insn): New procs.
5214         (define-full-insn): New arg ifld-assertions.  All callers updated.
5215         (insn-init!): New comment define-insn.
5216
5217         * model.scm (-model-parse): Ensure at least one unit specified.
5218
5219         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5220         (<c-expr-temp>,get-name): New method.
5221         (-rtx-make-current-closure,s-closure): New proc.
5222         (hw:): Wrap rtx indices in a closure.
5223         (-gen-case-prefix): New proc.
5224         (s-case): Simplify.
5225         * rtx-funcs.scm (case:): Fix call to s-case.
5226         (closure): New rtx func.
5227
5228         * hardware.scm (<hardware-base>): New member isas-cache.
5229         (<hardware-base>,get-isas): New method.
5230         (hardware-builtin): Indicate for all isas.
5231         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5232         * mach.scm (current-arch-mach-name-list): Return list of names.
5233         (current-isa-mach-name-list): Ditto.
5234         (define-arch): Install builtin objects here.
5235         * read.scm (keep-atlist?): Only keep if both mach and isa are
5236         being kept.
5237         (keep-mach-atlist?): New proc.
5238         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5239         (reader-install-builtin!): Renamed from -install-builtin!.
5240         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5241         -gen-cpu-reg-access-defns.  Rewrite.
5242         (gen-reg-access-defn): Delete.
5243         (-gen-hardware-struct): New proc.
5244         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5245         (gen-semantic-fn,-gen-all-semantics): Delete.
5246         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5247         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5248         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5249         Call sem-analyze-insns!.
5250         (cgen-semantics.cxx): Add multiple-isa support.
5251         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5252         (-gen-scache-decls,-gen-decode-fn): Ditto.
5253         (cgen-decode.h): Call sem-analyze-insns!.
5254         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5255         * sid.scm (-with-multiple-isa?): New variable.
5256         (option-init!): Initialize it.
5257         (option-set!): Set it.
5258         (with-multiple-isa?): New proc.
5259         (gen-cpu-ref): New arg isas.  All callers updated.
5260         (gen-cpu-class): New proc.
5261         (*-get-macro,*-set-macro): Delete.
5262         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5263         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5264         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5265         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5266         (-sim-insns-analyzed): New global variable.
5267         (sim-init!): Reset it.
5268         (sim-analyze-insns!): New proc.
5269         (sim-analyze!): Don't do instruction analysis here.
5270         (sim-finish!): Specify isa of x-invalid insn.
5271         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5272
5273 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5274
5275         * thumb.cpu (cpu,mach,model): Delete.
5276         (dntf): New pmacro.  Use it for all field definitions.
5277         (dntop): New pmacro.  Use it for all operand definitions.
5278         (asr): Correct field list.
5279         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5280
5281         * utils-cgen.scm (define-getters): New macro to simplify
5282         writing class accessors.
5283         (define-setters): Ditto.
5284         (sanitize): Recognize isa elements.
5285
5286         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5287         state-parallel-exec?.
5288         * sid-model.scm (*): Ditto.
5289         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5290         state-decode-assist.
5291
5292         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5293         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5294         * sim-decode.scm (-gen-decode-switch): Ditto.
5295
5296         * sim-arch.scm (-regs-for-access-fns): Delete.
5297         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5298         (-gen-arch-reg-access-defns): Delete.
5299
5300         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5301         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5302         with state-parallel=exec?.
5303         (cgen-*): Call sim-analyze-insns! here.
5304         * sim-decode.scm (cgen-*): Ditto.
5305         * sim-model.scm (cgen-*): Ditto.
5306         * sim.scm (-sim-insns-analyzed): New global variable.
5307         (sim-init!): Reset it.
5308         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5309         already done the analysis.
5310
5311         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5312         MACH struct.
5313
5314         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5315         (arm arch): Update isa spec.
5316         (arm,thumb isas): Define.
5317         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5318         (arm7tdmi mach): Add isa spec.
5319         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5320         `const' on word number.
5321         * fr30.cpu (fr30 arch): Update isa spec.
5322         (fr30 isa): Define.
5323         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5324         moved to isa spec.
5325         * i960.cpu (i960 arch): Update isa spec.
5326         (i960 isa): Define.
5327         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5328         liw-insns,parallel-insns moved to isas spec.
5329         * m32r.cpu (m32r arch): Update isas spec.
5330         (m32r isa): Define.
5331         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5332         liw-insns,parallel-insns moved to isa spec.
5333         * sparc.cpu (sparc arch): Update isas spec.
5334         (sparc isa): Define.
5335         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5336         decode-assist moved to isa spec.
5337         * sparc64.cpu (sparc64 cpu): Ditto.
5338         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5339         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5340         (-gen-mach-table-defns): Output mach table.
5341         (-gen-hash-defines): Delete insn size macros, except for
5342         CGEN_MAX_INSN_SIZE.
5343         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5344         (cgen-desc.h): Define MAX_ISAS.
5345         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5346         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5347         (arch-* accessors): Renamed from arch:*.  All callers updated.
5348         (current-arch-isa-name-list): New proc.
5349         (-arch-parse-isas): Renamed from -arch-parse-isa.
5350         (def-isa-attr!): Rewrite.
5351         (<iframe>): New class.
5352         (<itype>): New class.
5353         (<isa>): Rewrite.
5354         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5355         (isa-integral-insn?,isa-parallel-exec?): New procs.
5356         (-isa-parse,-isa-read,define-isa): New proc.
5357         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5358         liw-insns moved to <isa>.
5359         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5360         (-cpu-parse,-cpu-read): Update.
5361         (state-*): Renamed from state:*.  All callers updated.
5362         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5363         not cpu.
5364         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5365         (state-decode-assist): New proc.
5366         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5367         (-adata-set-derived!): Rewrite.
5368         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5369         callers updated.
5370         (arch-init!): Add define-isa command.
5371         * read.scm (<reader>): Default keep-isa member to (all).
5372         (reader-* accessors): Renamed from reader:*.  All callers updated.
5373         (-keep-isa-set!): Call string->symbol on isa name list.
5374         (keep-isa-validate!): Rewrite.
5375         (current-isa): New proc.
5376         (keep-isa?): Recognize "all".
5377         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5378         Call -keep-isa-set!.
5379         (cmd-if): Recognize keep-isa?.
5380         (cpu-load): New arg keep-isa.  All callers updated.
5381         (-opt-spec-update): New proc.
5382         (common-arguments): First arg is string, not symbol.
5383         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5384
5385         * rtl.scm (rtx-get): Default mode of string arg is INT.
5386
5387         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5388
5389         * rtx-funcs.scm (join:): Pass cpu to handler.
5390
5391         * configure.in (guile_include_dir): Delete.
5392         * configure: Rebuild.
5393         * Makefile.in: Rebuild.
5394         * doc/Makefile.in: Rebuild.
5395
5396         * sid-cpu.scm (-extract-chunk-specs): New proc.
5397         (gen-define-fields): Use it.
5398         (-extract-chunk): New proc.
5399         (-gen-extract-beyond-var-list): Use it.
5400         (gen-extract-fields): Simplify.
5401
5402 1999-03-22  Ben Elliston  <bje@cygnus.com>
5403
5404         * arm7.cpu (ldri-p): New instruction.
5405         (swi): Do not vector through 0x8 yet--there is nothing there.
5406         (addi): Reinstate.
5407         (movi): Likewise.
5408         (all): Use (const x) in subreg expressions.
5409
5410 1999-03-19  Ben Elliston  <bje@cygnus.com>
5411
5412         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5413         (smlal): Likewise.
5414
5415 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
5416
5417         * fr30.cpu (define-arch): Specify "forced" default-alignment.
5418         * mach.scm (-parse-alignment): Recognize "forced" alignment.
5419         * sim-cpu.scm (-extract-chunk-specs): New proc.
5420         (gen-define-fields): Use it.
5421         (-extract-chunk): New proc.
5422         (-gen-extract-beyond-var-list): Use it.
5423         (gen-extract-fields): Simplify.
5424
5425         Port to guile 1.3.1.
5426         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5427         (LIBIBERTY): New var.
5428         (HOB_OBJS): Add cgen-gh.o.
5429         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5430         * Makefile.in: Rebuild.
5431         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5432         * config.in: Rebuild.
5433         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5434         libncurses, libtermcap.
5435         Add checks for needed functions in guile 1.2 not in guile 1.3,
5436         and vice versa.  Add test for 3 argument scm_make_vector.
5437         * configure: Rebuild.
5438         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5439         definitions if guile doesn't have them.
5440         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5441         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
5442         with gh_vector_set_x.
5443         (cgh_qsort): Replace gh_list_length with gh_length.
5444         * cgen-gh.h: Add decls for added functions.
5445         (cgh_qsort): Don't declare if IN_HOBBIT.
5446         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
5447         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5448         scm_make_vector with gh_make_vector.
5449         * cos.scm: Use vector-length instead of length on vectors.
5450         * dev.scm (cload): Make varargs proc with keyword/value args.
5451         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
5452         provide version that works with guile 1.2 or 1.3.
5453         Include private copy of scmhob.h.
5454         * scmhob.h: New file.  Keep our own copy for now.
5455
5456 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
5457
5458         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5459         plain text.
5460         (-rtx-traverse-operands): Dump cx temp stack if debugging.
5461         (-cx-temp-dump-stack): Pretty up output.
5462
5463         * arm.cpu: comment out thumb.cpu until isa support ready.
5464         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5465         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5466         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5467
5468         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5469
5470 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5471
5472         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5473         (<hw-address>,mode-ok?): unsigned/signed are compatible.
5474
5475         * operand (op:new-mode): Improve error message.
5476
5477         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
5478         * arm7.cpu: New file.
5479
5480 1999-03-12  Ben Elliston  <bje@cygnus.com>
5481
5482         * arm.cpu: Lots of minor fixes after desk checking.
5483
5484 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5485
5486         * thumb.cpu: snapshot of current work
5487
5488         * rtl.scm (rtx-get): Tweak error message.
5489
5490 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
5491
5492         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5493         * Makefile.in: Rebuild.
5494
5495         * cos.c (cos_vector_copy): New function.
5496         (_object_copy): Use it.
5497
5498         * mode.scm (mode:eq?): Clean up.
5499         * rtl.scm (cx-new-mode): Copy attributes.
5500         (rtx-get): Don't make copy if <c-expr> with identical mode.
5501
5502         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5503         add new isas spec.
5504         (gr-names): h-gr register names moved here.
5505         (h-gr): Update.
5506         (cr-names): h-cr register names moved here.
5507         (h-cr): update.
5508         (dr-names): h-dr register names moved here.
5509         (h-dr): update.
5510         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5511         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5512         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5513         add new isas spec.
5514         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5515         add new isas spec.
5516         (gr-names): h-gr register names moved here.
5517         (h-gr): Update.
5518         (cr-names): h-cr register names moved here.
5519         (h-cr): update.
5520         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5521         (h-accums,h-psw): Ditto.
5522         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5523         add new isas spec.
5524         (gr-names): h-gr register names moved here.
5525         (h-gr-indices): Delete.
5526         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
5527         (sparc64 h-gr): Ditto.
5528         (h-y): Add get/set specs.
5529         (fp regs): Rewrite.
5530         (fp operands): Rewrite.
5531         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5532         (h-tbr,h-cwp,h-wim): Ditto.
5533         * sparc64.cpu (h-fpsr): Add get/set specs.
5534         * sparccom.cpu (ldd-reg+reg): Load value all at once.
5535         (fp-ld-op): New arg `dest', all callers updated.
5536         (*): Replace `make-di' with `join'.
5537
5538         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5539         present.
5540         (gen-semantic-code): Save/restore rtl generator state.
5541         (cgen-cpu.h): Call rtl-gen-init!.
5542         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5543         (-gen-ifld-extract-beyond): Ditto.
5544         (<multi-ifield>,gen-ifld-extract): Ditto.
5545         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5546         `gstate'.
5547         (-hw-gen-set-quiet-pc): Ditto.
5548         (<hw-pc>,gen-write): Ditto.
5549         (-hw-cxmake-get): Ditto.  Call getter function if present.
5550         (<hw-register>,cxmake-get-raw): New method.
5551         (<hw-register>,gen-set-quiet-raw): New method.
5552         (-hw-gen-set-quiet): New arg `gstate'.
5553         (hw-fun-access?): Delete.
5554         (gen-reg-access-defn): Output function contents.
5555         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5556         invocation.
5557         (-gen-hw-index): Ditto.
5558         (op:read): Update gen-read invocation.
5559         (op:write): Update gen-write invocation.
5560         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5561         operands.
5562         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5563         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5564         (<unit>,gen-profile-code): Update to sim.scm version.
5565
5566         * sim-arch.scm (-regs-for-access-fns): New proc.
5567         (-biggest-reg-mode): New proc.
5568         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5569         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5570         virtual regs separately.
5571         (-gen-cpu-reg-access-defns): Replace fun-access? with new
5572         get/set specs.
5573         (gen-semantic-code): Save/restore rtl generator state.
5574         (cgen-cpu.h): Call rtl-gen-init!.
5575         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
5576         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
5577         renamed to mach-bfd-name.
5578         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5579         (-gen-ifld-extract-beyond): Ditto.
5580         (<multi-ifield>,gen-ifld-extract): Ditto.
5581         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5582         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5583         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5584         `gstate'.
5585         (hw-fun-access?): Delete.
5586         (-hw-gen-set-quiet-pc): New arg `gstate'.
5587         (<hw-register>,gen-get-macro): Rewrite.
5588         (<hw-register>,gen-set-macro): Rewrite.
5589         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5590         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
5591         (<hw-register>,cxmake-get-raw): New method.
5592         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
5593         (<hw-register>,gen-set-quiet-raw): New method.
5594         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5595         invocation.
5596         (-gen-hw-index): Ditto.
5597         (<hw-index>): New arg `gstate'.
5598         (-gen-hw-selector): Update call to rtx-c.
5599         (<pc>): New arg `gstate'.
5600         (op:read): Update gen-read invocation.
5601         (op:write): Update gen-write invocation.
5602         (<operand>,cxmake-get): Handle raw-reg.
5603         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5604         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5605         (<operand>,gen-set-quiet): Handle raw-reg.
5606         (<operand>,gen-set-trace): Handle raw-reg.
5607         (-gen-mach-data): mach:cpu renamed to mach-cpu.
5608
5609         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5610         cgen_operand_type enum.
5611         (gen-operand-table): Add operand type enum.  Replace pointer to
5612         hardware element with its enum.  Null terminate table.
5613         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5614         Build operand table.
5615         * ifield.scm (-ifield-parse): Recognize ISA attribute.
5616         * mach.scm (<arch-data>): New member `isas'.
5617         (adata-isas): New accessor.
5618         (<isa>): New class.
5619         (isa-default-insn-word-bitsize): New accessor.
5620         (isa-enum): New proc.
5621         (current-arch-default-insn-word-bitsize): Delete.
5622         (current-isa-list,current-isa-lookup): New procs.
5623         (-arch-parse-isa): New proc.
5624         (-arch-parse): Rewrite.
5625         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
5626         (define-arch): Define ISA attribute.
5627         (def-isa-attr!,isa-supports?): New procs.
5628         (<mach>): New member `isas'.
5629         (mach-isas): New accessor.
5630         (-mach-parse): New arg `isas', all callers updated.
5631         (-mach-read): Recognize `isas'.
5632         (arch-finish!): Rewrite.
5633         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5634         @arch@_cgen_get_{int,vma}_operand.
5635         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5636         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5637         of pointer to table entry.
5638         * opcodes.scm (gen-switch): Handle multiply defined operands.
5639         * operand.scm (op-sort): New proc.
5640
5641         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5642         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5643         (hw-enum): Accept symbol argument.
5644         (hardware-builtin!): Delete attribute FUN-ACCESS.
5645         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5646
5647         * attr.scm (atlist-source-form): New proc.
5648         (attr-builtin!): New attr `PRIVATE'.
5649         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5650         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5651         if they have `PRIVATE' attribute.
5652         (gen-hw-table-defns): Output definitions of explicitly defined
5653         keyword tables.
5654         * hardware.scm (<keyword>): New member print-name.  Rename member
5655         `value' to `values', all uses updated.
5656         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
5657         (keyword-parse): Rewrite.
5658         (-keyword-read): New proc.
5659         (define-keyword): New proc.
5660         (-hw-parse-keyword): New proc.
5661         (-hw-parse-indices): Rewrite keyword handling, support new index spec
5662         `extern-keyword'.
5663         (-hw-parse-values): Ditto.
5664         (-hw-parse-get,-hw-parse-set): Rewrite.
5665         (hardware-init!): Add new comment define-keyword.
5666         * mach.scm (<arch>): New member `kw-list'.
5667         (arch:kw-list,arch_set-kw-list!): New accessors.
5668         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
5669
5670         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
5671         * mode.scm (mode-class-integral?): New proc.
5672         (mode-class-float?,mode-class-numeric?): New procs.
5673         (mode-integral?,mode-float?,mode-numeric?): New procs.
5674         (mode-compatible?): New proc.
5675         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
5676         rtx-c-with-alist.
5677         (<ifield>,gen-extract): Ditto.
5678         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
5679         (<gstate>): New class.
5680         (gstate-simulator?,gstate-set-simulator?!): New accessors.
5681         (gstate-context,gstate-set-context!): New accessors.
5682         (gstate-macro?,gstate-set-macro?!): New accessors.
5683         (gstate-make,gstate-copy): New procs.
5684         (-rtl-current-gstate): New global.
5685         (current-gstate-simulator?): New proc.
5686         (current-gstate-context,current-gstate-macro?): New procs.
5687         (current-gstate,current-gstate-set!): New procs.
5688         (rtl-gen-init!): Rewrite.
5689         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
5690         (tstate-make): New arg `gstate', all callers updated.
5691         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
5692         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
5693         (tstate-gstate,tstate-set-gstate!): New accessors.
5694         (tstate-copy): New proc.
5695         (tstate-new-cond?,tstate-new-set?): Rewrite.
5696         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
5697         (rtx-traverse): New arg `gstate', all callers updated.
5698         (rtx-strdump): New proc.
5699         (-simplify-for-compilation): New arg `gstate', all callers updated.
5700         (semantic-in-out-operands): Ditto.
5701         (semantic-attrs): Ditto.
5702         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
5703         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
5704         (rtx-value): Rewrite.
5705         (<c-expr>,gen-name): New method.
5706         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
5707         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
5708         (cx-new-mode): New proc.
5709         (-rtx-c-with-tstate): New proc.
5710         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
5711         callers updated.
5712         (-rtx-mode): Rewrite.
5713         (-rtx-mode-compatible?): New proc.
5714         (<c-expr-temp>): New member `value'.
5715         (cx-temp:value): New accessor.
5716         (<c-expr-temp>,make!): Override default method.
5717         (<c-expr-temp>,cxmake-get): Rewrite.
5718         (<c-expr-temp>,gen-set-quiet): Rewrite.
5719         (<c-expr-temp>,gen-set-trace): Rewrite.
5720         (gen-temp-defs): Use cx-temp:value.
5721         (record-temp!): New arg value, all callers updated.
5722         (cx-temp:cx:make): Delete.
5723         (-cx-temp-dump-stack): New proc.
5724         (rtx-get): New arg `gstate', all callers updated.  Do mode
5725         compatibility checks.  Ensure result has specified mode.
5726         (rtx-set-quiet): New arg `gstate', all callers updated.
5727         (rtx-set-trace): Ditto.
5728         (s-c-call): New arg `tstate', all callers updated.
5729         (s-c-raw-call): Ditto.
5730         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
5731         (s-cmpop,s-if,e-if): Ditto.
5732         (s-subreg): New proc.
5733         (-par-new-temp!): New proc.
5734         (-par-next-temp!): Rewrite.
5735         (-par-replace-set-dests): Use -par-new-temp!.
5736         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
5737         (s-sequence): Use -rtx-c-with-state.
5738         * rtx-funcs.scm (*): Update.
5739         (raw-reg:): New rtx function.
5740         (make-di): Delete.
5741         (join:,subreg:): New rtx functions.
5742
5743         * insn.scm (<insn>): New members pre-cond-trap, condition,
5744         post-cond-trap, compiled-condition.
5745
5746         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
5747
5748         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
5749
5750         * utils-cgen.scm (parse-symbol): New proc.
5751         (parse-string): New proc.
5752         (gen-get-macro,gen-set-macro): New arg `index-args'.
5753         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
5754         Prepend \ to newlines.
5755
5756         * utils.scm (alist-remove-duplicates): Delete.
5757
5758         * sid.scm (sim-init!): Delete private debugging code.
5759
5760 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
5761
5762         * cgen-sid.scm: New file for C++ simulator application.
5763         * sid-arch.scm: Ditto.
5764         * sid-cpu.scm: Ditto.
5765         * sid-decode.scm: Ditto.
5766         * sid-model.scm: Ditto.
5767         * sid.scm: Ditto.
5768         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
5769
5770 1999-03-05  Ben Elliston  <bje@cygnus.com>
5771
5772         * arm.cpu: New file.
5773
5774 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
5775
5776         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
5777         * Makefile.in: Rebuild.
5778
5779         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
5780         (-attr-parse): Validate default value.
5781
5782         * read.scm (-CGEN-VERSION): Change to 0.7.1.
5783         (-CGEN-LANG-VERSION): Ditto.
5784         (-keep-all-machs): Renamed from -keep-all, all uses updated.
5785         (<reader>): New member keep-isa plus accessors.
5786         (-keep-isa-set!,keep-isa-validate!): New procs.
5787         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
5788         (common-arguments): New variable.
5789         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
5790         (-debug-repl,continue): New procs.
5791         (-cgen,cgen): New procs.
5792         * cgen-gas.scm: Rewrite.
5793         * cgen-opc.scm: Rewrite.
5794         * cgen-sim.scm: Rewrite.
5795         * cgen-stest.scm: Rewrite.
5796
5797         * gas-test.scm (gas-test-init!): Call opcodes-init!.
5798         (gas-test-finish!): Call opcodes-finish!.
5799         (gas-test-analyze!): Call opcodes-analyze!.
5800         (<hw-asm>): New method test-data.
5801         (<operand>,testdata): Rewrite.
5802         * sim-test.scm (sim-test-init!): Call opcodes-init!.
5803         (sim-test-finish!): Call opcodes-finish!.
5804         (sim-test-analyze!): Call opcodes-analyze!.
5805         (<hw-asm>): New method test-data.
5806         (<operand>,testdata): Rewrite.
5807
5808 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
5809
5810         * fixup.scm (reverse!): Define if missing.
5811         * *.scm: Use reverse! instead of list-reverse!.
5812
5813         * utils.scm (leading-id-char?): New proc.
5814         (id-char?): Rewrite.
5815         (chars-until-delimiter): New proc.
5816         * opc-itab.scm (extract-syntax-operands): Rewrite.
5817         (strip-mnemonic): Rewrite.
5818         (compute-syntax): Rewrite.
5819
5820         * pmacros.scm (-pmacro-substr): New proc.
5821         (pmacros-init!): Add builtin .substr.
5822
5823 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
5824
5825         * thumb.cpu: New file.
5826
5827 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
5828
5829         * Makefile.am (CGENCFLAGS): New variable.
5830         (WITH_HOBBIT): Use automake conditional.
5831         (CGEN_HOB_SRC): New variable.
5832         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
5833         (*.o): Compile with CGENCFLAGS.
5834         (cgen-hob.c): Simplify.
5835         (cgen-nohob.c): New rule.
5836         (hobbit): Renamed from hob.x.
5837         (CLEANFILES): Add cgen-nohob.c.
5838         * Makefile.in: Rebuild.
5839         * doc/Makefile.in: Rebuild.
5840         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
5841         (WITH_HOBBIT): Use AM_CONDITIONAL.
5842         * configure: Rebuild.
5843         * aclocal.m4: Rebuild.
5844
5845         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
5846         with string-write-map.
5847
5848         * sim-cpu.scm (hw-need-storage?): New proc.
5849         (-gen-hardware-types): Use it.
5850         (gen-parallel-exec-elm): Call op-save-index?.
5851
5852         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5853
5854         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
5855         UNSIGNED attribute.
5856         (-gen-ifld-extract-beyond): Ditto.
5857         (<integer>): Delete all references.
5858         (<sim-hardware>): Delete.
5859         (hw-profilable?): New proc.
5860         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
5861         (<hw-register>): Rename method get-index-mode to save-index?.
5862         (<hw-register>): New methods gen-get-macro,gen-set-macro.
5863         (<hw-register>,gen-sym-decl): Make virtual.
5864         (<hw-memory>,gen-sym-decl): Make virtual.
5865         (<hw-memory>): Rename method get-index-mode to save-index?.
5866         (<hw-address>,gen-sym-decl): Make virtual.
5867         (<operand>): New method save-index?.
5868         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
5869
5870         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
5871         prefix added.  All uses updated.
5872
5873         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
5874         rather than pointer to table entry.
5875
5876         * opcodes.scm: Remove all attribute support, lives in desc.scm.
5877         Remove all hw-asm,op-asm support.
5878         (-gen-parse-number,-gen-parse-address): New procs.
5879         (<keyword>,gen-parse): Redo function name computation.
5880         (<keyword>,gen-print): Ditto.
5881         (<operand>,gen-function-name): Rewrite.
5882         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
5883         (opcodes-init!): Delete call to add-parser!.
5884
5885         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
5886         Define enum using hardware semantic name.
5887         (-gen-hw-decl,-gen-hw-defn): New procs.
5888         (gen-hw-table-decls): Use -gen-hw-decl.
5889         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
5890         CGEN_HW_ENTRY structs.
5891         (gen-operand-table): Output hw's enum, not pointer to table entry.
5892         (-gen-cpu-open): Build table of selected hardware elements.
5893
5894         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
5895         (<hardware> support): Delete.
5896         (<hw-asm>): Delete, moved to hardware.scm.
5897         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
5898         (<hw-asm>,gen-table-entry): New method.
5899         (<hw-asm>,parse!): Delete.
5900         (<keyword>,gen-table-entry): New method.
5901         (<keyword>,parse!): Delete.
5902         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
5903         for gen-decl,gen-defn,gen-ref,gen-init.
5904         (desc-init!): Don't create parser for operand asm specs.
5905
5906         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
5907         * ifield.scm (<ifield>): New member `mode'.
5908         (<ifield>,make!): New arg `mode'.
5909         (ifld-mode): Rewrite.
5910         (ifld-hw-type): Rewrite.
5911         (<ifield>,min-value): Rewrite.
5912         (<ifield>,max-value): Rewrite.
5913         (-ifield-parse): New arg `mode'.
5914         (-ifield-read): Update.
5915         (define-full-ifield): New arg `mode'.
5916         (define-full-multi-ifield): Ditto.
5917         (-multi-ifield-parse): Ditto.
5918         (-multi-ifield-read): Update.
5919         (define-full-multi-ifield): New arg `mode'.
5920         (ifield-builtin!): Update definition of f-nil.
5921         * simplify.inc (define-normal-ifield): Update call to
5922         define-full-ifield.
5923         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
5924         (define-normal-hardware): Delete arg asm.  New args indices, values,
5925         handlers.  Update call to define-full-hardware.
5926         (define-simple-hardware,dsh): New pmacros.
5927         (define-normal-operand): Update call to define-full-operand.
5928         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
5929         Specify INT/UINT mode instead.
5930         (h-gr,h-cr): Use "indices" instead of "asm".
5931         (h-dr,h-ps): Update keyword syntax.
5932         (h-r13,h-r14,h-r15): Ditto.
5933         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
5934         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
5935         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
5936         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
5937         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
5938         Specify INT/UINT mode instead.
5939         (h-gr): Use "indices" instead of "asm".
5940         (h-cc): Update keyword syntax.
5941         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
5942         Specify INT/UINT mode instead.
5943         (h-hi16,h-slo16,h-ulo16): Update.
5944         (h-gr,h-cr): Use "indices" instead of "asm".
5945         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
5946         (h-accums): Update keyword syntax.
5947         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
5948         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
5949         Specify INT/UINT mode instead.
5950         (h-gr-indices): New pmacro.
5951         (h-gr32,h-gr64): Split up from h-gr.
5952         (h-a): Update type spec.  Use values instead of asm spec.
5953         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
5954         (h-y,h-annul-p): Ditto.
5955         (h-asr): Update keyword spec.
5956         (h-lo10,h-lo13,h-hi22): Update.
5957         (get-freg-spec,set-freg-spec): New pmacros.
5958         (h-fr32,h-fr64): Split up from h-fr.
5959         (rdd): Comment out get/set specs.
5960         (lo10,lo13,hi22): Use "handlers" instead of "asm".
5961         * sparc32.cpu (h-psr): Use dsh instead of dnh.
5962         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
5963         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
5964         UNSIGNED.  Specify INT/UINT mode instead.
5965         (h-*): Use dsh instead of dnh where appropriate.
5966         (h-ixcc): Update type spec.  Use "values" instead of "asm".
5967         (h-p,h-membarmask): Ditto.
5968         (membarmask): Use "handlers" instead of "asm".
5969
5970         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
5971         values,handlers,getters,setters plus accessors.
5972         (hw-mode-ok?,hw-default-mode): New procs.
5973         (<hardware-base>): Rename method new-mode to mode-ok?
5974         (<hardware-base>): New method get-index-mode.
5975         (hw-index-mode): New proc.
5976         (pc?): Delete, moved to operand.scm.
5977         (address?): New proc.
5978         (<hardware>): Delete.
5979         (<hw-asm>): Definition moved here from desc.scm.
5980         (keyword-parse): New proc.
5981         (hardware-parsers): Delete.
5982         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
5983         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
5984         (-hw-parse-get,-hw-parse-set): New procs.
5985         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
5986         indices,values,handlers,get,set.  Rewrite.
5987         (-hw-read-extra): Delete.
5988         (-hw-read): Update.
5989         (define-hardware): Don't add object if not selected.
5990         (define-full-hardware): Ditto.
5991         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
5992         (<hw-register>): Member `type' moved to baseclass.  Delete member
5993         hw-asm.
5994         (<hw-register>,parse!): Rewrite.
5995         (<hw-register>): Delete methods get-rank,get-mode.
5996         (<hw-register>): Method new-mode renamed to mode-ok?
5997         (<hw-register>): New method get-index-mode.
5998         (<hw-pc>,parse!): Rewrite.
5999         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6000         (<hw-memory>,parse!): Rewrite.
6001         (<hw-memory>): Delete methods get-rank,get-mode.
6002         (<hw-memory>): Method new-mode renamed to mode-ok?
6003         (<hw-memory>): New method get-index-mode.
6004         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6005         hw-asm.
6006         (<hw-immediate>,parse!): Rewrite.
6007         (<hw-immediate>): Delete methods get-rank,get-mode.
6008         (<hw-immediate>): Method new-mode renamed to mode-ok?
6009         (<hw-address>): Delete member hw-asm.
6010         (<hw-address>,parse!): Rewrite.
6011         (<hw-address>): Delete methods get-rank,get-mode.
6012         (<hw-address>): Method new-mode renamed to mode-ok?
6013         (hw-profilable?): Delete.
6014         (hardware-init!): Delete hardware-parsers reference.
6015         Update argument specs of command define-full-hardware.
6016         (hardware-builtin!): Update definitions of hardware builtins.
6017         * operand.scm (<operand>): New members hw-name,mode-name.
6018         Delete member op-asm.  New member handlers.
6019         (<operand>,make!): Update.
6020         (op:hw-name,op:mode-name,op:handlers): New procs.
6021         (op:type): Rewrite.
6022         (op:mode): Rewrite.
6023         (<operand>): New method get-index-mode.
6024         (<pc>,make!): Update.
6025         (op:new-mode): Rewrite.
6026         (operand-parsers): Delete.
6027         (-operand-parse): Rewrite.  Return #f if insn not selected.
6028         (-op-read-extra): Delete.
6029         (-operand-read): Update.
6030         (define-operand,define-full-operand): Update.
6031         (operand-init!): Delete operand-parsers reference.
6032         Update syntax of define-full-operand command.
6033
6034         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6035         (define-full-insn): Update.
6036         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6037         (define-full-minsn): Update.
6038
6039         * mode.scm (<mode>): New member class.
6040         (mode:class): New proc.
6041         (mode?): Rewrite.
6042         (-mode-parse): New arg class.
6043         (define-full-mode): Update.
6044         (mode-find): Rewrite.
6045         (mode-make-int,mode-make-uint): New procs.
6046         (mode-init!): Update syntax of define-full-mode command.
6047         (mode-builtin!): Update definitions of builtin modes.
6048
6049         * model.scm (<profile>): Delete.
6050
6051         * read.scm (keep-atlist?): New proc.
6052         (keep-multiple?): New proc.
6053         (<parser-list>): Delete.
6054         (add-parser!,parse-spec!): Delete.
6055
6056         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6057         (def-rtx-syntax-node): Ditto.
6058         (-rtx-traverse-debug?): New variable.
6059         (tstate-make): New proc.
6060         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6061         (tstate-new-cond?,tstate-new-set?): New procs.
6062         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6063         tstate.  All callers updated.
6064         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6065         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6066         (-build-operand!): Replace arg cond? with tstate.
6067         (-build-reg-operand!,-build-mem-operand!): Ditto.
6068         (-build-index-of-operand!): Update making of <operand> object.
6069         (s-ifield): New arg tstate.  All callers updated.
6070         (hw:): New arg tstate.  All callers updated.  Replace call to
6071         current-hw-lookup with current-hw-sem-lookup-1.
6072         (s-index-of): New arg tstate.  All callers updated.
6073         (reg:,mem:): Ditto.
6074         (-rtx-use-sem-fn?): New proc.
6075         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6076         semantic cover fns.
6077         (s-convop): Only use semantic mode when using semantic cover fns.
6078         (s-cmpop): Call -rtx-use-sem-fn?.
6079         (s-cond,s-case): New arg tstate.  All callers updated.
6080         (s-parallel,s-sequence): Ditto.
6081
6082         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6083
6084         * types.scm (<scalar>): Rewrite implementation.
6085         (<integer>): Delete.
6086         (parse-type): Rewrite.
6087
6088         * utils-cgen.scm (parse-handlers): New proc.
6089
6090         * utils.scm (!=): New proc.
6091
6092 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6093
6094         * pmacros.scm (-pmacro-expand): Fix typo.
6095
6096 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6097
6098         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6099         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6100         * i960.cpu (build-hex2): New pmacro.
6101         (insn-opcode): Simplify.
6102         (insn-opcode2): Ditto.
6103
6104         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6105         * cgen-stest.scm (catch-with-backtrace): Ditto.
6106
6107 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6108
6109         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6110         All callers updated.
6111         (-pmacro-invoke): New proc.
6112         (-pmacro-sym,-pmacro-str): New procs.
6113         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6114         (pmacros-init!): Install builtins .iota, .map, .apply.
6115         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6116         (h-fr): Simplify register name spec.
6117         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6118         * utils.scm (num-args-ok?): New proc.
6119
6120 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6121
6122         * pmacros.scm (-pmacro-error): New proc.
6123         (-pmacro-expand): Use it.
6124         (-pmacro-splice): New proc.
6125         (pmacros-init!): Install new builtin .splice.
6126
6127         * sparc.cpu: Include sparc64.cpu when appropriate.
6128         (f-mmask,f-simm11): Moved to sparc64.cpu.
6129         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6130         (ANNUL attribute): Delete.
6131         (test-* pmacros): New arg cc, all callers updated.
6132         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6133         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6134         atomic-opc.
6135         (ldstub,swap): Moved to sparccom.cpu.
6136         * sparc64.cpu: Add more insns.
6137
6138 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6139
6140         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6141         CGEN_ATTR_VALUE.
6142         (cgen-sem-switch.c): Ditto.
6143         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6144         moved to cgen-engine.h.
6145         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6146         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6147         global.  Cache attributes and insn length in IDESC.
6148         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6149         @cpu@_opcode renamed to @cpu@_get_idata.
6150         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6151         done later underneath sim_resume.
6152         (@mach@_mach): Record @cpu@_prepare_run.
6153         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6154         updated.
6155         (-hw-gen-set-quiet-pc): Ditto.
6156         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6157         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6158         (<hw-addr>,cxmake-get): Ditto.
6159         (<hw-iaddr>,cxmake-get): Ditto.
6160         (<pc>,cxmake-get): Ditto.
6161         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6162         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6163         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6164         (<hw-pc>,gen-write): Use hw-selector-default.
6165         (<hw-register>,gen-write): Ditto.
6166         (<hw-memory>,gen-write): Ditto.
6167         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6168         (-gen-hw-selector): New proc.
6169
6170         * desc.scm: New file.
6171         * desc-cpu.scm: New file.
6172         * opcodes.scm: Split up into several smaller files.
6173         * opc-asmdis.scm: New file.
6174         * opc-ibld.scm: New file.
6175         * opc-itab.scm: New file.
6176         * opc-opinst.scm: New file.
6177         * Makefile.am (desc): New target.
6178         (opcodes): Update args to cgen-opc.scm.
6179         * Makefile.in: Rebuild.
6180         * aclocal.m4: Rebuild.
6181         * config.in: Rebuild.
6182         * configure.in: Update arg to AC_INIT.
6183         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6184         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6185         AC_PROG_INSTALL.
6186         * configure: Rebuild.
6187         * cgen-gas.scm: Update files to load.
6188         * cgen-opc.scm: Ditto.  Reorganize option letters.
6189         * cgen-sim.scm: Update files to load.
6190         * cgen-stest.scm: Ditto.
6191         * dev.scm (cload): New app "DESC".
6192         (load-opc): Update files to load.
6193         (load-gtest,load-sim,load-stest): Ditto.
6194
6195         * attr.scm (bool-attr?): New proc.
6196         (attr-list-enum-list): New proc.
6197         (-attr-sort): Rewrite.
6198         (attr-builtin!): Give ALIAS attribute a fixed index.
6199         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6200         calculate attribute enum list.
6201         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6202
6203         * insn.scm (-insn-parse): Renamed from parse-insn.
6204
6205         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6206         (-hw-read): Ditto.
6207
6208         * mode.scm (-mode-parse): Renamed from parse-mode.
6209
6210         * operand.scm (<operand>): New member `selector'.
6211         (<operand>,make!): Use default selector.
6212         (hw-selector-default): New variable.
6213         (hw-selector-default?): New proc.
6214
6215         * pmacros.scm (pmacros-init!): New proc.
6216         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6217         (-env-set!): Delete.
6218         (-pmacro-expand): New proc apply-macro.
6219         Use it in scan-list,scan.  Scan list first, then see if macro
6220         invocation.
6221         (define-pmacro): Rewrite.
6222         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6223
6224         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6225         selected if (current-mach) seen.
6226         (rtx?): Renamed from rtx-uneval?, all callers updated.
6227         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6228         updated.
6229         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6230         selector, all callers updated.
6231         (hw:): New arg selector, all callers updated.  Delete old comments
6232         and code.
6233         (reg:,mem:): Handle selectors
6234         * rtx-funcs.scm (reg:): Handle selectors.
6235
6236         * read.scm: Renamed from cpu.scm.
6237         (<command>): New class.
6238         (<reader>): New member commands.
6239         (reader-add-command!): New proc.
6240         (reader-lookup-command): New proc.
6241         (reader-error,-reader-process-expanded,reader-process): New procs.
6242         (reader-read-file!): New proc.
6243         (include): Call reader-read-file!.
6244         (cmd-if): New proc.
6245         (cpu-load): Call reader-read-file!.
6246         * utils.scm (num-args): New proc.
6247         * simplify.inc: New file.
6248         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6249         procs.  Move define-normal-foo procs (and abbreviated forms) to
6250         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6251         routines.
6252         * fr30.cpu: Include simplify.inc.
6253         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6254         * i960.cpu: Include simplify.inc.
6255         * m32r.cpu: Include simplify.inc.
6256         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6257         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6258         * sparc.cpu: Include simplify.inc.
6259         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6260         * utils-cgen.scm (parse-error): Moved to read.scm.
6261         (sanitize): Rewrite.
6262         (utils-init!): New proc.
6263
6264 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6265
6266         * sparc.cpu: New file.
6267         * sparc32.cpu: New file.
6268         * sparc64.cpu: New file.
6269         * sparccom.cpu: New file.
6270         * sparc.opc: New file.
6271
6272 1999-01-27  Frank Eigler  <fche@cygnus.com>
6273
6274         * utils.scm (gen-copyright): New proc.
6275
6276 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6277
6278         Parameterize rtl parsing, rather than having lots of little handlers.
6279         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6280         Delete member traverse.
6281         (rtx:set-traverse!): Delete.
6282         (-rtx-valid-types,-rtx-valid-matches): New variables.
6283         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6284         instead of expression.  All callers updated.
6285         (def-rtx-node): New args arg-types,arg-modes.
6286         (def-rtx-syntax-node): Ditto.
6287         (def-rtx-dual-mode): Ditto.
6288         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6289         All callers updated.
6290         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6291         All callers updated.
6292         (rtx-macro-expand): New proc.
6293         (-rtx-traverse-check-args): Delete.
6294         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6295         an rtx specific traverser.
6296         (-rtx-any-mode?,-rtx-symornum?): New procs.
6297         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6298         (-rtx-traverse-no-mode): Delete.
6299         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6300         (-rtx-traverse-operands): Rewrite.
6301         (-rtx-traverse-expr): Rewrite.
6302         (rtx-traverse): Don't expand macros here, leave for caller to do.
6303         (rtx-simplify): Delete.
6304         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6305         attributes.
6306         (rtx-true?,rtx-false?): Ditto.
6307         (-rtx-ref-type): Set dest is operand 1 now.
6308         (-simplify-for-compilation): New proc.
6309         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6310         Expand macros before calling rtx-traverse.  Sort operands by name
6311         to avoid unnecessary semantic formats.
6312         (semantic-attrs): New proc.
6313         (rtx-uneval?): Handle (<rtx-func> ...).
6314         (s-boolifop): Delete arg mode.  All callers updated.
6315         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6316         (eq-attr): New arg obj.
6317         (eq-attr:): Delete.
6318         * m32r.cpu (rach): Update calls to andif.
6319
6320         * minsn.scm (-minsn-parse-expansion): Renamed from
6321         parse-minsn-expansion.
6322         (-minsn-parse): Renamed from parse-minsn.
6323         (-minsn-read): Renamed from read-minsn.
6324         (def-minsn): Don't check APPLICATION here.
6325         (def-full-minsn): New proc.
6326         (define-macro-insn): Check APPLICATION here.  Expand macros.
6327         (define-normal-macro-insn): Ditto.
6328
6329         * utils.scm (word-value): New arg start-lsb?.
6330         (word-mask,word-extract): Ditto.
6331         (split-bits,powers-of-2): Use integer-expt instead of expt.
6332         (bit-set?): Handle 32 bit values (which are bignums).
6333         (cg-logand,cg-logxor): New functions.
6334         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6335         (<ifield>,field-value): Update call to word-value.
6336         (<ifield>,min-value): Use integer-expt instead of expt.
6337         (<ifield>,max-value): Ditto.
6338
6339         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6340
6341         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6342
6343         Compute raw instruction format in addition to semantic based format.
6344         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6345         (<iformat> accessors): Rename accessors to ifmt-*.
6346         (<sformat>): New class.
6347         (fmt-enum): Renamed from fmt:enum.
6348         (-ifmt-search-key): Rewrite.
6349         (-sfmt-search-key): New proc.
6350         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6351         Compute iformat and sformat search keys.
6352         (ifmt-build): Update.
6353         (sfmt-build): New proc.
6354         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6355         (ifmt-compute!): Compute instruction format <iformat> based on
6356         instruction fields alone.  Compute new semantic format <sformat>
6357         based on instruction fields and semantic information.
6358         (ifmt:lookup): Delete.
6359         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6360         (current-sfmt-list): New proc.
6361         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6362         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6363         (insn-length,insn-length-bytes): Update.
6364         (insn:mask-length,insn:mask): Update.
6365         (insn-lookup-op): Update.
6366         * gas-test.scm (gas-test-analyze!): Update.
6367         (gen-gas-test): Ditto.
6368         * sim-test.scm (sim-test-analyze!): Update.
6369         (gen-sim-test): Ditto.
6370         * opcodes.scm (gen-operand-instance-table): Update.
6371         (gen-operand-instance-ref): Ditto.
6372         (max-operand-instances): Use heuristic if semantics not parsed.
6373         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6374         (opcodes-analyze!): Only scan semantics of building operand instance
6375         tables.
6376         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6377         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6378         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6379         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6380         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6381         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6382         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6383
6384         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6385         New arg lsb0?  All callers updated.
6386         (decode-bits): New arg lsb0?.  All callers updated.
6387         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6388         of expt.
6389         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6390         (build-slots): Call integer-expt instead of expt.
6391         (build-decode-table-entry): Handle crossing word boundaries better.
6392         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6393         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6394
6395         * enum.scm (define-enum): Rewrite.
6396         (define-normal-enum): Ditto.
6397         (def-full-insn-enum): New proc.
6398         (define-normal-insn-enum): Rewrite.
6399
6400         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6401         valid C.
6402         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6403
6404         * dev.scm: Add sid support.
6405
6406         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6407         (CLEANFILES): Add tmp-*.
6408         * Makefile.in: Rebuild.
6409
6410         * doc/Makefile.am: New file.
6411         * doc/Makefile.in: New file.
6412         * doc/cgen.texi: New file.
6413         * Makefile.am (SUBDIRS): Define.
6414         * Makefile.in: Rebuild.
6415         * configure.in: Create doc/Makefile.
6416         * configure: Rebuild.
6417
6418 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
6419
6420         * insn.scm (insn:syn): Delete.
6421
6422 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
6423
6424         * fr30.cpu (model fr30-1): Add state variables load-regs,
6425         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
6426         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6427         (model m32rx): Ditto.
6428         (addi): Simplify function unit usage spec.
6429         (ld-plus): Rewrite operand names in function unit usage spec.
6430         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6431         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6432         overridden.  Allow operand to appear in input and output spec.
6433         (<insn>,gen-profile-code): string-append -> string-list.
6434
6435         * ifield.scm (define-ifield): Call pmacro-expand.
6436         (define-full-ifield,define-normal-ifield): Ditto.
6437         (define-multi-ifield,define-normal-multi-ifield): Ditto.
6438
6439         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6440         with-scache and without-scache cases.
6441
6442 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
6443
6444         * fr30.cpu (fr30-1): Add state variable h-gr.
6445         Add units u-cti, u-load, u-store, u-ldm, u-stm.
6446         (all insns): First pass at providing cycle counts.
6447         * sim.scm (<unit>,gen-profile-code): Only check for output operands
6448         when initializing unit output operands, ditto for input operands.
6449
6450         * insn.scm (insn-length,insn-length-bytes): New procs.
6451         * mach.scm (-adata-set-derived!): Use them.
6452         * sim-cpu.scm (-gen-sem-case): Ditto.
6453
6454         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6455         (-gen-write-case): Ditto.
6456         (gen-semantic-fn): Ditto.  Split into two:
6457         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
6458         in non-scache case.
6459         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
6460         scache/no-scache appropriately.  All callers updated.
6461         (-gen-sem-case): PCADDR->IADDR.
6462         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6463
6464         * sim-decode.scm (*): Replace string-append,string-map with
6465         string-list,string-list-map where the result is sufficiently large.
6466         (-gen-decode-insn-table): Go back to simple version for non-scache
6467         case: just record IDESC in decoder tables and leave field extraction
6468         to the caller.
6469         (-gen-decode-switch): Ditto.
6470         (-gen-decode-fn): Ditto.
6471         (-gen-extract-decls): Only emit format enum if with-scache?.
6472         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6473         non-scache case.
6474         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6475         (-gen-insn-timing): Ditto.
6476         * sim.scm (gen-argbuf-type): Only output sem_fields union in
6477         with-scache case.
6478
6479         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6480         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6481
6482 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
6483
6484         * cpu.scm (keep-mach-validate!): New proc.
6485         (include): New proc.
6486
6487         * mach.scm (current-arch-mach-name-list): New proc.
6488         (-parse-arch-machs): Always return canonical form.
6489         (def-arch): Validate user specified machs to be kept.
6490         (def-mach-attr!): Simplify.
6491
6492         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6493         (option-init!): Initialize it.
6494         (option-set!): Set it.
6495         (gen-insn-table-entry): Emit 0 for operand instance ref if not
6496         output operand instance tables.
6497         (cgen-opc.in): Only output operand instance tables if asked to.
6498
6499         * sim.scm (option-init!,option-set!): Clarify returned value.
6500
6501         * sim.scm (gen-mach-bfd-name): Move from here.
6502         * utils-cgen.scm: To here.
6503
6504 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
6505
6506         * fr30.cpu (ilm): Fix comment field.
6507         (cond-branch): Remove explicit setting of COND-CTI, let cgen
6508         compute it.
6509
6510         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6511         (rtx-true?, rtx-false?): New procs.
6512         * rtx-funcs.scm (annul): Rename vpc to pc.
6513         (-rtx-traverse-if): Improve determination of whether then/else parts
6514         are conditionally executed.
6515
6516         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6517         outer level.
6518         (gen-argbuf-type): Simplify generated definition (big sem_fields
6519         union moved outside).
6520
6521 1999-01-11  Ben Elliston  <bje@cygnus.com>
6522
6523         * doc/porting.texi: New file.
6524
6525         * doc/intro.texi: New file.
6526         (Layout): Use @example to insert preformatted ASCII text (such as
6527         diagrams). @code is inappropriate here.
6528
6529 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
6530
6531         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6532
6533         * m32r.opc (print_hash): Cast dis_info.
6534
6535         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6536         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6537         get/set macros.
6538
6539 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
6540
6541         * i960.cpu (f-br-disp): Remove RELOC attribute.
6542         (f-ctrl-disp): Ditto.
6543         (callx-disp): set-quiet -> set for (reg h-gr 2).
6544         (callx-indirect,callx-indirect-offset): Ditto.
6545
6546         * Makefile.am (gas-test): Fix dependencies.
6547         * Makefile.in: Rebuild.
6548         * cgen-gas.asm: File creation args are -<uppercase-letter>.
6549         * gas-test.scm (break-out-syntax,make-file-name): Delete.
6550         (gas-test-analyze!): Use syntax-break-out.
6551         * sim-test.scm (break-out-syntax,make-file-name): Delete.
6552         (sim-test-analyze!): Use syntax-break-out.
6553         (cgen-build.sh): Use gen-file-name.
6554         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6555         * insn.scm (syntax-break-out): New proc.
6556         * utils.scm (gen-file-name): New proc.
6557
6558         * fixup.scm (nil,<?,<=?,>?): Delete.
6559
6560         * utils.scm (count-true): Rewrite.
6561
6562         * slib/sort.scm: Move sort.scm to slib directory.
6563         * cpu.scm: Update.
6564
6565         * iformat.scm (ifmt-compute!): Record empty format.
6566
6567         * rtl.scm (semantic-in-out-operands): Simplify by moving several
6568         internal procs outside.  Handle expression register numbers.
6569         Handle index-of.
6570
6571         * rtx-funcs.scm (annul): Rename new_pc to vpc.
6572
6573         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6574         every register.
6575         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6576         (gen-semantic-fn,-gen-sem-case): Ditto.
6577         (cgen-cpu.c): Define WANT_CPU to @cpu@.
6578         (cgen-semantics.c): Ditto.
6579         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6580         (gen-ifmt-argvars-defns): New proc.
6581         (gen-ifmt-argvars-assigns): New proc.
6582         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6583         (-gen-decode-fn): Handle non-with-scache case.
6584         (cgen-decode.c): Define WANT_CPU to @cpu@.
6585         * sim-models.scm (-gen-mach-defns): Emit bfd name.
6586         (cgen-model.c): Define WANT_CPU to @cpu@.
6587         * sim.scm (gen-ifld-extract-argvar): New proc.
6588         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6589         with FUN-ACCESS specified.
6590         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6591         (<hw-register>,gen-extract): New arg local?.
6592         (<hw-address>,gen-extract): Ditto.
6593         (-hw-cxmake-get): Handle non-with-scache case.
6594         (-hw-gen-set-quiet): Ditto.
6595         (<hw-address>,cxmake-get): Handle non-with-scache case.
6596         (gen-op-extract-argvar): New proc.
6597         (<operand>,gen-record-profile): Rewrite.
6598         (<operand>,gen-profile-code): Rewrite.
6599         (<unit>,gen-profile-code): Use -gen-argfld-ref.
6600         (gen-argbuf-fields-union): New proc.
6601         (gen-argbuf-type): Use it.  Handle non-scache case.
6602
6603         * *.scm: class:foo procs renamed to class-foo.
6604         * attr.scm (<attribute>): New member `for'.
6605         (-attr-parse): New first value in list for default if
6606         none specified.
6607         (non-bool-attr-list,attr:add!): Delete.
6608         (def-attr): Use current-attr-add!.
6609         (atlist-attr-value-no-default): New proc.
6610         (attr-lookup-default): Handle boolean attributes.
6611         (gen-attr-enum): New proc.
6612         (-attr-remove-meta-attrs-alist): New proc.
6613         (attr-nub): New proc.
6614         (current-attr-list-for): New proc.
6615         (current-{ifld,hw,op,insn}-attr-list): New procs.
6616         (attr-builtin!): New proc.
6617         * cpu.scm (keep-obj?): Rewrite.
6618         (-init-parse-cpu!): Call arch-init!.
6619         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6620         (-finish-parse-cpu!): Call arch-finish!.
6621         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6622         (def-enum,def-full-enum): Use current-enum-add!.
6623         (gen-obj-list-enums): New proc.
6624         * hardware.scm (hw:add!,hw:lookup): Delete.
6625         (def-hardware,def-hardware-ext): Use current-hw-add!.
6626         (hw:std-attrs,hw:attr-list): Delete.
6627         (hardware-builtin!): Define builtin hardware attributes.
6628         * ifield.scm (ifld:add!,ifld:lookup): Delete.
6629         (def-ifield,def-full-ifield): Use current-ifld-add!.
6630         (ifld:std-attrs,ifld:attr-list): Delete.
6631         (ifield-builtin!): New proc.
6632         * insn.scm (insn:add!,insn:lookup): Delete.
6633         (def-full-insn): Use current-insn-add!.
6634         (insn:std-attrs): Delete.
6635         (insn-builtin!): New proc.
6636         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6637         minsn-list.
6638         (<arch-data>): New member machs.
6639         (current-attr-list,current-enum-list): New procs.
6640         (current-op-list,current-minsn-list): New procs.
6641         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6642         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6643         Ditto.
6644         (-parse-arch-machs): New proc.
6645         (-arch-parse): New arg machs, all callers updated.
6646         (-arch-read): Handle machs spec.
6647         (def-arch): Define MACH attribute here.
6648         (mach-init!,mach-finish!): Not here.
6649         (cpu:add!,cpu:lookup): Delete.
6650         (def-cpu): Use current-cpu-add!.
6651         (<mach>): New member bfd-name.
6652         (-mach-parse): New arg bfd-name, all callers updated.
6653         (-mach-read): Handle bfd-name spec.
6654         (mach:add!,mach:lookup): Delete.
6655         (def-mach): Use current-mach-add!.
6656         (def-mach-attr!): New proc.
6657         (arch-init!): New proc.
6658         (arch-finish!): New proc.  Reverse all object lists here.
6659         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
6660         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
6661         (define-normal-macro-insn): Ignore minsn if mach not kept.
6662         * mode.scm (mode-builtin!): New proc.
6663         * model.scm (model:add!,model:lookup): Delete.
6664         (def-model): Use current-model-add!.
6665         * opcodes.scm (insn:attr-list): Delete.
6666         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
6667         (gen-attr-table-defn): Emit value for default.
6668         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
6669         (op:attr-list): Delete.
6670         (gen-operand-decls,gen-insn-decls): New proc.
6671         (compute-insn-attr-list): Delete.
6672         (cgen-opc.h): Reorganize and simplify.
6673         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
6674         (def-operand,def-full-operand): Use current-op-add!.
6675         (op:std-attrs): Delete.
6676         (operand-enum): Delete.
6677         (operand-builtin!): Define builtin operand attrs.
6678         * utils-cgen.scm (sanitize): Update calls to lookup procs.
6679         (gen-attr-enum-decl): Use gen-obj-list-enums.
6680         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
6681         Rewrite.
6682         * fr30.cpu (define-arch): Add machs spec.
6683         (f-i4): SIGNED attribute -> !UNSIGNED.
6684         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
6685         (HASH-PREFIX): Define operand attribute.
6686         (NOT-IN-DELAY-SLOT): Define insn attribute.
6687         * i960.cpu (define-arch): Add machs spec.
6688         * m32r.cpu (define-arch): Add machs spec.
6689         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
6690         (HASH-PREFIX): Define operand attribute.
6691         (FILL-SLOT): Define insn attribute.
6692
6693 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
6694
6695         * fr30.cpu (stilm): Correct mask for and operation.
6696
6697 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
6698
6699         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
6700         Replace START/EXIT with start/pass.
6701         (gen-sim-test): Delete ".text".
6702
6703 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
6704
6705         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
6706
6707 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
6708
6709         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
6710         (h-sbit): Make it FUN-ACCESS.
6711         (h-gr): Reorder so that general regs are always printed by number.
6712
6713 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
6714
6715         * i960.cpu (flushreg): Use nop.
6716
6717 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
6718
6719         * m32r.cpu (default-alignment): Specify.
6720         * mach.scm (<arch-data>): New member default-alignment.
6721         (adata:default-alignment): New proc.
6722         (current-arch-default-alignment): New proc.
6723         (-arch-parse): New arg default-alignment.
6724         (parse-alignment): New proc.
6725         (-arch-read): Handle default-alignment spec.
6726
6727         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
6728
6729         * insn.scm (f-%): Delete.
6730         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
6731         be readded if proved useful.
6732         (gen-extract-fields): Ditto.  Use gen-ifetch.
6733         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
6734         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
6735
6736 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
6737
6738         * fr30.cpu (div2): Set zbit properly when remainder not zero.
6739
6740 1998-12-14  Dave Brolley  <brolley@cygnus.com>
6741
6742         * fr30.cpu: Remove stub macros.
6743         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
6744         (div2): Don't use addc/subc.
6745
6746 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
6747
6748         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
6749         if opcodes.
6750
6751 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
6752
6753         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
6754
6755 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
6756
6757         * cpu.scm (keep-all?): New proc.
6758         (assert-keep-all): Use it.
6759         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
6760         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
6761         Check for spelling errors.
6762
6763 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
6764
6765         * rtl.scm (s-convop): Call -rtx-sem-mode.
6766
6767 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
6768
6769         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
6770         (-parse-hw-profile): Ditto.
6771         (<hw-register>, parse!): Return `void' result.
6772         (<hw-pc>, parse!): Ditto.
6773         (<hw-memory>, parse!): Ditto.
6774         (<hw-immediate>, parse!): Ditto.
6775         (<hw-address>, parse!): Ditto.
6776
6777         * ifield.scm (-ifield-parse): Validate encode/decode fields.
6778         (-ifld-parse-encode-decode): New proc.
6779         (-ifld-parse-encode,-ifld-parse-decode): New proc.
6780         (-multi-ifield-parse): Set encode/decode to #f.
6781         (ifld:decode-mode): New proc.
6782         * utils.scm (nub): Rewrite.
6783         * operand.scm (op-nub): Rewrite.
6784         * sim.scm (<ifield>, gen-type): Rewrite.
6785         (-gen-ifld-argbuf-defn): New proc.
6786         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
6787         (<sim-hardware>): Forward gen-trace-extract onto `type'.
6788         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
6789         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
6790         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
6791         New method gen-trace-extract.
6792         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
6793         from gen-argbuf-elm, return "" if not caching register address.
6794         Rewrite gen-extract.  New method gen-trace-extract.
6795         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
6796         gen-extract, gen-trace-extract, cxmake-get.
6797         (<hw-iaddress>): New method cxmake-get.
6798         (op-needed-iflds): New proc.
6799         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
6800         (-gen-op-argbuf-defn): New proc.
6801         (gen-op-extract): Renamed from op:extract.
6802         (gen-op-trace-extract): Renamed from op:trace-extract.
6803         (fmt-extractable-operands): Renamed from fmt-semantic-operands
6804         and rewritten.
6805         (gen-argbuf-elm): Rewrite.
6806         * sim-decode.scm (-gen-record-args): Update.
6807
6808         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
6809
6810         * pmacros.scm (-pmacro-expand): Handle procedural macros in
6811         argument position.  Flag symbolic macros in function position as
6812         an error.
6813         (define-pmacro): Handle quoting in definition of symbolic macros.
6814         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
6815
6816 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
6817
6818         * fr30.opc (parse_register_list): Account for reverse masks
6819         for load and store.
6820         (print_register_list): Ditto.
6821         (parse_low_register_list_ld): New function.
6822         (parse_hi_register_list_ld): New function.
6823         (parse_low_register_list_st): New function.
6824         (parse_hi_register_list_st): New function.
6825         (print_hi_register_list_ld): New function.
6826         (print_hi_register_list_st): New function.
6827         (print_low_register_list_ld): New function.
6828         (print_low_register_list_st): New function.
6829         * fr30.cpu (ldr15dr): Implement workaround.
6830         (ldm0,ldm1,stm0,stm1): Implemented.
6831
6832 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
6833
6834         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
6835         * configure: Regenerate.
6836         * Makefile.am (WITH_HOBBIT): Update.
6837         (cgen-hob.c): Remove Makefile dependency.
6838         (cgen.o): Depend on cgen-gh.h, config.h.
6839         * Makefile.in: Regenerate.
6840         * aclocal.m4: Regenerate.
6841
6842 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
6843
6844         * i960.cpu, i960.opc: New files.
6845
6846 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
6847
6848         * fr30.opc (parse_register_number): New function.
6849         (parse_register_list): New function.
6850         (parse_low_register_list): Use parse_register_list.
6851         (parse_hi_register_list): Use parse_register_list.
6852         * fr30.cpu (sth): Fix assembler syntax. Implement more
6853         insns.
6854
6855 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
6856
6857         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
6858         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
6859         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
6860         (-op-gen-set-trace-parallel): Ditto.
6861         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
6862
6863         * fr30.cpu (call,calld): Fix setting of pc.
6864         (f-op5): Fix start bit number.
6865
6866 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
6867
6868         * fr30.cpu (st): Fix operand ordering. Implement more
6869         insns.
6870
6871 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
6872
6873         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
6874         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
6875         (fmt-semantic-operands): Move to sim.scm.
6876         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
6877         * operand.scm (<hw-index>): New member `name'.  All builders updated.
6878         (<hw-index>): New method get-name.
6879         (op-profilable?): Moved to sim.scm.
6880         (op-nub): New proc.
6881         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
6882         (op-profilable?): Moved here from operand.scm.
6883         (gen-extract-type): Delete.
6884         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
6885         (-gen-argfld-ref): New proc.
6886         (-gen-ifld-argfld-name): New proc.
6887         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
6888         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
6889         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
6890         (<hardware-base>): Delete method gen-extract-type.  New method
6891         gen-argbuf-elm.
6892         (<hw-register): Ditto.  Update method gen-extract.
6893         (<operand>, method gen-argbuf-elm): Rewrite.
6894         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
6895         (s-cmpop): Fix handling of eq,ne for unsigned modes.
6896         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
6897
6898         * sim-decode.scm (-gen-record-args): Tweak.
6899
6900         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
6901
6902 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
6903
6904         * doc/porting: Fix typo: gas->sim.
6905         * fr30.opc (print_m4): New function.
6906         * fr30.cpu: Implemented many insns.
6907
6908 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
6909
6910         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
6911
6912         * fr30.cpu (f-rel9): Delete RELOC attribute.
6913         (f-rel12): Add PCREL-ADDR attribute.
6914         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
6915         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
6916         * fr30.opc (print_label9): Delete.
6917
6918         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
6919         code for CTI indicators.
6920         * insn.scm (insn-cti?): Simplify.
6921         * utils-cgen.scm (atlist:cti?): New proc.
6922
6923 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
6924
6925         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
6926         (f-i20-4,f-i20-16,f-i20): New fields.
6927         (i20): New operand.
6928         (ldi8): Implement.
6929         (ldi20): New insn.
6930         (ldi32m): Delete.
6931         (jmpd): Implement.
6932         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
6933         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
6934         * mach.scm (arch-data): Ditto.
6935         (current-arch-default-insn-word-bitsize): Renamed from
6936         current-arch-default-insn-bitsize [ya, that's a pretty long name].
6937         (-arch-read): Update.
6938
6939         * hardware.scm (hw:attr-list): Move here ...
6940         * opcodes.scm: ... from here.
6941
6942         * ifield.scm (fld:bitrange): Delete.
6943         (fld:word-offset,fld:word-length): New procs.
6944         (ifield?): Use class-instance.
6945         (<ifield>, method field-start): Rewrite.
6946         (ifld:enum): New proc.
6947         (<ifield>, methods field-mask,field-value): Rewrite.
6948         (-ifield-parse): Rewrite.
6949         (<multi-ifield> support): Rewrite.
6950         (ifld-beyond-base?): Rewrite.
6951         (ifld:std-attrs): New variable.
6952         (ifld:attr-list): New proc.
6953         * iformat.scm (-compute-insn-mask): Rewrite.
6954         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
6955         Simplify.
6956         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
6957         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
6958         onto type.
6959         (<operand>): Ditto.  Forward onto index instead.
6960         (gen-ifld-decls,gen-ifld-defns): New procs.
6961         (ifld:insert,ifld:extract): New procs.
6962         (<ifield>): New methods gen-insert, gen-extract.
6963         (<multi-ifield>): Ditto.
6964         (<hw-index>): Forward gen-insert,gen-extract onto value.
6965         (<hw-asm>): Delete insert/extract support.
6966         (<hw-register,hw-memory,hw-immediate>): Ditto.
6967         (gen-hash-defines): Use string-list.
6968         Define CGEN_MAX_IFMT_OPERANDS.
6969         (gen-switch): Use string-list,string-list-map.
6970         (gen-fget-switch,gen-fset-switch): Use string-list.
6971         (gen-parse-switch,gen-insert-switch): Ditto.
6972         (gen-extract-switch,gen-print-switch): Ditto.
6973         (gen-insert-switch,gen-extract-switch): New local `total_length'.
6974         (gen-ifmt-table-1,gen-ifmt-table): New procs.
6975         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
6976         (gen-ivalue-entry): New proc.
6977         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
6978         computation.  Use 0 for operand ref table if ALIAS insn.
6979         (gen-minsn-table-entry): Use string-list.
6980         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
6981         (gen-opcode-open): Record address of ifield table.
6982         (cgen-opc.h): Call gen-ifld-decls.
6983         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
6984         * types.scm (<bitrange>): New members word-offset,word-length.
6985         Delete member total-length.  Delete methods start,mask,value.
6986         (bitrange:word-offset,bitrange:word-length): New procs.
6987         * sim-cpu.scm (gen-define-fields): Simplify.
6988         (gen-extract-fields): Simplify.
6989         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
6990         (<ifield>): New methods gen-ifld-extract-decl.
6991         Delete method gen-ifld-extract-beyond.
6992         (<multi-ifield>): New methods gen-ifld-extract-decl.
6993         (<multi-ifield>, method gen-ifld-extract): Implement.
6994         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
6995         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
6996
6997         * rtl.scm (-rtx-traverse-no-mode): Process operands.
6998         (-rtx-traverse-syntax-no-mode): New proc.
6999         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7000         (s-ifield): New proc.
7001         (s-shop): Don't prepend `unsigned' for unsigned modes.
7002         * rtx-funcs.scm (ifield): New rtx function.
7003         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7004         (delay): New rtx function.
7005         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7006
7007         * cos.scm (-elm-make-method-getter): Fix typo.
7008
7009         * utils.scm (backslash): Handle lists of strings.
7010
7011 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7012
7013         * fr30.cpu (f-rel9): Correct for pc+2.
7014         (label9): Use print_label9.
7015         * fr30.opc (print_label9): New function.
7016
7017 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7018
7019         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7020         * fr30.opc (parse_low_register_list): Renamed.
7021         (parse_hi_register_list): Renamed.
7022         (print_hi_register_list): Renamed.
7023         (print_low_register_list): Renamed.
7024
7025 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7026
7027         * fr30.cpu (f-rel9): Now a pc relative offset.
7028
7029 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7030
7031         * opcodes.scm (op-asm): Move to here, from operands.scm.
7032         (<op-asm>, method parse!): Validate arguments.
7033         (<operand>, method gen-function-name): Fix thinko.
7034         * operand.scm (<operand>, method make!): Don't set op-asm here.
7035         * utils.scm (list-elements-ok?): New proc.
7036
7037         * opcodes.scm: Clean up pass.
7038
7039 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7040
7041         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7042         the fr30_int function.
7043         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7044         (h-dr): Add FUN-ACCESS attribute.
7045
7046 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7047
7048         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7049         for C symbol for models array.
7050
7051 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7052
7053         * fr30.opc (parse_reglist_low): New function.
7054         (parse_reglist_hi): New function.
7055         (print_reglist_low): New function.
7056         (print_reglist_hi): New function.
7057         * fr30.cpu: Finish remaining insn stubs.
7058
7059 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7060
7061         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7062
7063         * fr30.cpu (ldi32m): Don't use for disassembly.
7064
7065 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7066
7067         * fr30.cpu (int): Implement it.
7068
7069 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7070
7071         * rtx-funcs.scm (nop): Fix C code.
7072
7073         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7074
7075         * fr30.cpu (f-i32): New ifield.
7076         (i32): New operand.
7077         (ldi32): New insn.
7078         (ldi32m): New macro insn.
7079         (inte): Provide simple version for now.
7080
7081         * sim-arch.scm: New file.
7082         * sim.scm: Move architecture support generation to sim-arch.scm.
7083         * cgen-sim.scm: Load sim-arch.scm.
7084         * dev.scm: Ditto.
7085
7086         * hardware.scm (pc?) New proc.
7087         (class <hardware-base>): Rewrite method 'pc?.
7088         (class <hardware>): Forward 'pc? to the hardware type.
7089         (class <hw-pc>): New method 'pc?.
7090
7091         Add support for variable length ISAs.
7092         * ifield.scm (ifld-beyond-base?): New proc.
7093         * m32r.cpu: Remove integral-insn? spec.
7094         * mach.scm (arch:derived,arch:set-derived!): New procs.
7095         (arch:app-data,arch:set-app-data!): New procs.
7096         (class <arch>): New members derived, app-data.
7097         (class <cpu>): Delete member integral-insn?.
7098         (cpu:integral-insn?): Delete.
7099         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7100         (-cpu-read): Delete integral-insn? support.
7101         (state:decode-assist): Delete.
7102         (state:int-insn?): Delete.
7103         (<derived-arch-data>): New class.
7104         (-adata-set-derived!): New proc.
7105         (mach-finish!): Call it.
7106         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7107         (gen-operand-instance): Add COND_REF support.
7108         (gen-operand-instance-table): Ditto.
7109         (gen-hash-defines): Update.
7110         (gen-extract-switch): Update type of `insn_value' arg.
7111         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7112         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7113         updated.
7114         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7115         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7116         beyond the base insn (for large insns).
7117         (-gen-extract-beyond-var-list): New proc.
7118         (gen-extract-fields): Handle large insns.
7119         (-gen-write-case): Update sem_arg computation.
7120         Update initial vpc computation.
7121         (gen-semantic-fn): Ditto.  Update type of `insn'.
7122         (-gen-sem-case): Update sem_arg computation.
7123         Update initial vpc computation.
7124         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7125         (-gen-extract-word): New proc.
7126         (<ifield>): New method gen-ifld-extract-beyond.
7127         (gen-ifld-extract-beyond): New proc.
7128         * types.scm (bitrange-overlap?): New proc.
7129
7130         * utils.scm (bits->bytes): New proc.
7131         (bytes->bits): New proc.
7132
7133         Move extraction support into decoder.
7134         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7135         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7136         support to sim-decode.scm.
7137         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7138         be array of IDESC,FMT entries.  Make the array const.
7139         (-gen-gcc-label-table): Make array const.
7140         (-gen-decode-switch): Branch to extraction code after insn has been
7141         identified.
7142         (-gen-decode-insn-globals): Delete extract handler from
7143         @cpu@_insn_sem.
7144         (gen-decode-fn): Add extraction support.
7145         (-gen-sem-fn-decls): Delete extraction fn decls.
7146         (-gen-idesc-decls): Update @cpu@_decode decl.
7147         (-gen-idesc-init-fn): Delete extraction support.
7148         (-gen-extract-decls): New proc.
7149
7150         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7151         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7152
7153         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7154         All callers updated.
7155         (table-entry:make): Record insn value as insn object, not name.
7156         All uses updated.
7157
7158         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7159         collision with C function.
7160         (path_dirname): Similarily.
7161         * hobbit.c,hobbit.h: Rebuild.
7162
7163 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7164
7165         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7166
7167 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7168
7169         * fr30.cpu: Implement more instruction stubs.
7170
7171 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7172
7173         * fr30.cpu: Implement more instruction stubs.
7174
7175 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7176
7177         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7178
7179         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7180
7181         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7182         (op:std-attrs): Ditto.
7183         * opcodes.scm (gen-operand-instance): Ditto.
7184         (gen-switch): Ditto.
7185         * m32r.cpu (condbit,accum): Update.
7186         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7187
7188 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7189
7190         * enum.scm (-enum-read): Fix typo.
7191
7192         * iformat.scm (-ifmt-search-key): Simplify a little.
7193
7194 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7195
7196         * doc/porting: semantics.c -> sem.c.
7197         * Makefile.in: Regenerate.
7198         * fr30.cpu (add): Change ADD to add. Add more registers and set
7199         status bits on 'add' instruction.
7200
7201 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7202
7203         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7204         of 0.
7205
7206 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7207
7208         * minsn.scm (minsn:enum): Update, call current-arch-name.
7209
7210         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7211
7212         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7213         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7214         (ARCH,CGEN,CGENFLAGS): New variables.
7215         (gas-test,sim-test): New rules.
7216         * Makefile.in: Rebuild.
7217         * configure.in (arch): Define.
7218         * configure: Rebuild.
7219
7220         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7221         * All .scm files: Ditto.
7222
7223         * dev.scm: Fix gas-test call to cpu-load.
7224         * gas-test.scm: Clean up pass to remove bit-rot.
7225         * sim-test.scm: Ditto.
7226
7227         * enum.scm (read-enum): Fix typo in `vals' handling.
7228
7229         * hardware.scm (-parse-hw-type): Fix typo.
7230         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7231         (def-hardware,define-normal-hardware): Ditto.
7232
7233         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7234         (display-var): Use it.
7235         * hobbit.c: Rebuild.
7236         * hobbit.h: Rebuild.
7237
7238         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7239         avoid hobbit problem.
7240         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7241         `parallel-insns-' to avoid hobbit problem.
7242
7243 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7244
7245         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7246         (parse_slo16,parse_ulo16): Ditto.
7247         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7248
7249 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7250
7251         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7252         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7253         * Makefile.in: Rebuild.
7254         * insn.scm (define-normal-insn): Expand pmacros.
7255         * mode.scm (<mode>): New member `host?'.  All uses updated.
7256         (mode:host?): New proc.
7257         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7258         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7259         (define-rtx-dual-mode): Ditto.
7260         (s-index-of): New proc.
7261         (s-unop): Use plain C for host mode operations.
7262         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7263         * rtx-funcs.scm (index-of): New rtx function.
7264         * sim.scm (<hw-index>): New method cxmake-get.
7265
7266 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7267
7268         * sim-cpu.scm (-gen-engine-decls): Delete.
7269
7270 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7271
7272         * doc/rtl (Example): Correct Typo.
7273         * doc/porting: Add 'make dep' step to opcodes port instructions.
7274         * fr30.opc: New file.
7275         * fr30.cpu: New file.
7276
7277 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7278
7279         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7280         * Makefile.am (GUILEINCDIR): New variable.
7281         (INCLUDES): Use it.
7282         * configure: Regenerate.
7283         * Makefile.in: Ditto.
7284         * aclocal.m4: Ditto.
7285
7286 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7287
7288         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7289         (cgen-semantics.c): Ditto.
7290         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7291         * sim-model.scm (cgen-model.c): Ditto.
7292         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7293         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7294
7295         * opcodes.scm (read-cpu.opc): Handle empty file.
7296
7297         * cos.scm (-elm-make-method-setter): Fix typo.
7298
7299         * cpu.scm (-init-parse-cpu!): Call types-init!.
7300         (-finish-parse-cpu!): Call types-finish!.
7301         * ifield.scm (<ifield>): Delete members start,length.
7302         New member bitrange.
7303         (<ifield>, methods field-start,field-length): Update.
7304         (fld:start): New arg insn-len.  All callers updated.
7305         (<ifield>, methods field-mask,field-value): Update.
7306         (-ifield-parse): Update.
7307         (ifield-init!): Update.
7308         * iformat.scm (compute-insn-length): Simplify.
7309         (compute-insn-mask): Update.
7310         * insn.scm (insn:value): Update.
7311         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7312         (current-arch-default-insn-bitsize): New proc.
7313         (current-arch-insn-lsb0?): New proc.
7314         (-arch-parse,-arch-read): Update.
7315         (<cpu>): New member file-transform.
7316         (-cpu-parse,-cpu-read): Update.
7317         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7318         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7319         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7320         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7321         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7322         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7323         * operand.scm (op:start): Update call to field-start method.
7324         * sim-decode.scm (opcode-slots): New arg lsb0?.
7325         (fill-slot!,build-slots): Ditto.
7326         (build-decode-table-entry,build-decode-table-guts): Ditto.
7327         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7328         (gen-decode-fn): Ditto.
7329         (cgen-decode.c): Update call to gen-decode-fn.
7330         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7331         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7332         (cgen-cpuall.h): Call -gen-cpuall-includes.
7333         * types.scm (<bitrange>): New class.
7334         (types-init!,types-finish!): New procs.
7335         * utils-cgen.scm (parse-number): New proc.
7336         (parse-boolean): New proc.
7337         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7338         (word-mask): Rewrite.
7339         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7340         (m32rxf): New field `file-transform'.
7341         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7342
7343         * hobbit.h: Fix include file name.
7344
7345 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7346
7347         * slib: New directory of slib files used by cgen/hobbit.
7348         * hobbit.scm: New file.
7349         * hobbit.c: New file.
7350         * hobbit.h: New file.
7351         * hobscmif.h: New file.
7352         * hob-main.c: New file.
7353         * hobslib.scm: New file.
7354         * hob.sh: New file.
7355         * Makefile.am: Add support for compiling hobbit, and using compiled
7356         version of hobbit to compile cgen.
7357         * Makefile.in: Regenerate.
7358         * configure.in: Support --with-hobbit.
7359         * configure: Regenerate.
7360         * acconfig.h (WITH_HOBBIT): Add.
7361         * config.in: Regenerate.
7362
7363         * rtl.scm: New file, was cdl-c.scm.
7364         Definition of rtx funcs moved to rtx-funcs.scm.
7365         (semantic-in-out-operands): Rewrite to compute object form of
7366         semantic code.
7367         * rtx-funcs.scm: New file.
7368
7369         * cgen-gh.c: #include "config.h".
7370         (gh_cadddr,gh_cddddr): New fns.
7371         (cgh_vector_to_list): New fn.
7372         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7373         (cgh_init): Prefix qsort procs with "cgh-".
7374         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7375         * cgen.c: #include "config.h".
7376
7377         * attr.scm (bitset-attr?): New proc.
7378         (<bitset-attribute>, method parse-value): Value syntax changed from
7379         (val1 val2 ...) to val1,val2,....
7380         (<bitset-attribute>): New method gen-value.
7381         (<integer-attribute>): New method gen-value.
7382         (<enum-attribute>): New method gen-value.
7383         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7384         (<reader>): New class.
7385         (CURRENT-ARCH,CURRENT-READER): New globals.
7386         (keep-mach?): Move here from mach.scm.
7387         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7388         (<arch>): New class.
7389         (<arch-data>): New class.
7390         (<cpu>): Make subclass of <ident>.
7391         (*ENDIAN* variables): Delete.
7392         (process-state-vars): Delete.
7393         (mach-finish!): Add `base' value to MACH attribute.
7394         * hardware.scm (<hardware>): Make subclass of <ident>.
7395         (hw:std-attrs): New global.
7396         (hw-profilable?): New proc.
7397         * ifield.scm (<ifield>): Make subclass of <ident>.
7398         (sort-ifield-list): Move here from iformat.scm.
7399         * iformat.scm (<iformat>): Renamed from <insn-format>.
7400         Make subclass of <ident>.
7401         (-ifmt-search-key): Include cti? in categorization of formats.
7402         (ifmt-analyze): Compile semantics (turn to object form).
7403         * insn.scm (<insn>): Make subclass of <ident>.
7404         New member compiled-semantics.
7405         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7406         * mode.scm (<mode>): Make subclass of <ident>.
7407         (UBI): Delete.
7408         * model.scm (<unit>): Make subclass of <ident>.
7409         New members inputs,outputs.
7410         (<model>): Make subclass of <ident>.  New member state.
7411         (-unit-parse): Parse inputs,outputs.
7412         (<iunit>): New class.
7413         (-insn-timing-parse-model): New proc.
7414         (parse-insn-timing): Function unit spec rewritten.
7415         * operand.scm (<operand>): Make subclass of <ident>.
7416         New members sem-name,num,cond?  New method gen-pretty-name.
7417         (hw-index-scalar): New global.
7418         (op-nub-hw): Move here from rtl.scm.
7419         (op:lookup-sem-name,op-profilable?): New procs.
7420         * pmacros.scm: Rewrite to pass through hobbit.
7421         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7422         * utils.scm (logit): Make a macro.
7423         (bit-set?): Rewrite.
7424         (high-part): Rewrite.
7425
7426         * m32r.cpu (define-arch): Move to top of file.
7427         (cpu family m32rbf): Renamed from m32rb.
7428         (model m32r/d): Function unit spec rewritten.
7429         (all insns): Ditto.  Replace UBI with BI.
7430
7431         * opcodes.scm (gen-attr-table-decls): Declare
7432         @arch@_cgen_hw_attr_table.
7433         (gen-attr-table-defns): Generate hw attribute table.
7434
7435         * sim-cpu.scm (-gen-engine-decls): New proc.
7436         (-gen-model-decls): New proc.
7437         (gen-parallel-exec-type): Add new member `written' to struct parexec.
7438         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7439         (-gen-record-profile-args): Simplify.
7440         (-gen-parallel-sem-case): Delete.
7441         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7442         New local `written'.  Delete profiling code.
7443         (-gen-sem-case): Ditto.
7444         (-uncond-written-mask,-any-cond-written?): New procs.
7445         (cgen-sem-switch.c): Include duplicates of insns that can be executed
7446         parallelly or serially, and write-back handlers for all parallel insns.
7447         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7448         support to initialization of struct insn_sem.
7449         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7450         (-gen-insn-sem-type): Add parallel write-back support to struct
7451         insn_sem.
7452         (-gen-idesc-init-fn): Add support for virtual insns.
7453         Add parallel write-back support.
7454         * sim-model.scm (gen-model-profile-fn): Delete
7455         (-gen-model-fn-decls): New proc.
7456         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7457         (-gen-model-init-fn): New proc.
7458         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7459         members in @mach@_init_cpu.
7460         (cgen-model.c): Generate model handlers for each insn.
7461         * sim.scm (gen-define-field-macro): Cti insns handled differently.
7462         (<hw-pc>): New method gen-write.
7463         (<hw-register>, method gen-write): New arg `mode'.
7464         (<hw-register>): Delete method gen-record-profile!.
7465         New method gen-profile-index-type.
7466         (<hw-memory>, method gen-write): New arg `mode'.
7467         (<hw-address>, method gen-extract): Delete.
7468         (<hw-address>, method gen-write): New arg `mode'.
7469         (<hw-index>, method get-write-index): Rewrite.
7470         (<pc>, method cxmake-get-direct): Delete.
7471         (<pc>): New method cxmake-get.  Comment out methods
7472         gen-set-quiet,gen-set-trace.
7473         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7474         gen-profile-index-type,gen-profile-code.
7475         Delete method gen-pretty-name.  Rewrite method gen-write.
7476         Delete method cxmake-get-direct.
7477         (-op-gen-set-trace): Update `written'.
7478         (-op-gen-set-trace-parallel): Ditto.
7479         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7480         (gen-cpu-insn-enum-decl): Add extra entries for parallel
7481         insns and their write-back handlers.
7482         (insn-op-lookup): New proc.
7483         (<unit>): New method gen-profile-code.
7484         (<iunit>): New method gen-profile-code.
7485         (gen-argbuf-elm): Add profiling elements.
7486         (gen-argbuf-type): Define cti insns separately in their own struct.
7487         Add member `addr_cache' to this struct.  Add entries for pbb virtual
7488         insns.  Move semantic entries here from struct scache.
7489         Delete everything from struct scache except argbuf.
7490         (<insn>, method gen-profile-locals): Rewrite.
7491         (<insn>, method gen-profile-code): Rewrite.
7492         (sim-finish!): Create virtual pbb insns.
7493
7494 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7495
7496         * m32r.cpu (h-cr): Add bbpc,bbpsw.
7497         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7498         (h-psw,h-bpsw,h-bbpsw): Define.
7499         (rte,trap): Handle bbpc,bbpsw.
7500         * opcodes.scm (max-operand-instances): Fix typo.
7501         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7502         hardware elements to be fun-access.
7503         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7504
7505 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7506
7507         * m32r.cpu (trap): Pass `pc' to m32r_trap.
7508
7509 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
7510
7511         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7512
7513 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
7514
7515         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7516         architecture name.
7517         (mach m32r): Update.
7518
7519         * mach.scm (mach:supports?): New proc.
7520         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7521         gen-reg-access-{decls,defns}.
7522         * sim.scm (gen-reg-access-{decl,defn}): New procs.
7523         (gen-mach-bfd-name): New proc.
7524         (gen-arch-reg-access-{decls,defns}): New procs.
7525         (cgen-arch.[ch]): Output register access cover fns.
7526
7527         * hardware.scm (hardware-builtin!): Set print handlers for
7528         h-addr,h-iaddr.
7529         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7530         `od'.
7531         (CGEN_PRINT_NORMAL,print_hash): Ditto.
7532         (my_print_insn): Ditto.  Delete args buf, buflen.
7533         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7534         (-hw-asm-specs): Add `handlers' spec.
7535         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
7536         `normal-hw-asm'.
7537         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
7538         print.
7539         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7540         (<hw-asm>, parse!): New method.
7541         (gen-insn-table-entry): Print semantics.
7542         (gen-opcode-open): Renamed from gen-opcode-table.
7543
7544         * utils.scm (string-write): No longer a macro.
7545         (-string-write): Handle procedure args.
7546         * opcodes.scm: Update all calls to string-write.
7547         * sim-cpu.scm: Ditto.
7548         * sim-decode.scm: Ditto.
7549         * sim-model.scm: Ditto.
7550         * sim.scm: Ditto.
7551
7552 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
7553
7554         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7555         (-gen-insn-builders,-gen-insn-builder): New procs.
7556
7557 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
7558
7559         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7560         (gen-opcode-table): Properly terminate comment.
7561
7562 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
7563
7564         * Version 0.6.0.
7565         Clean up pass over everything, so starting fresh.