OSDN Git Service

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