OSDN Git Service

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