OSDN Git Service

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