OSDN Git Service

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