OSDN Git Service

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