OSDN Git Service

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