OSDN Git Service

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